IMDHMIControls LibraryShop main store

How-to

Set up a CLICK PLC 4-20 mA pressure trip with a relay output

PLC programming Published 7 min read

Short answer

Wire the two-wire loop into channel 1 of a C0-04AD-1, set that channel to 4-20 mA with 4 mA scaled to 0 PSI and 20 mA to 300 PSI in DF1, and drive relay output Y1 from Set and Rst coils that trip above 250 PSI and release below 230 PSI, with a loop-fault test below -10 PSI.

On this page
  1. How do I wire a two-wire transmitter to the C0-04AD-1?
  2. Where do I set the 4-20 mA scaling in the CLICK software?
  3. How do I write the trip rung in ladder?
  4. How do I stop the relay chattering around the trip point?
  5. What happens to the reading if the transmitter loop breaks?
  6. How much load can the relay output switch?
  7. How do I commission the trip without a real overpressure?
  8. Questions asked

Set the channel so 4 mA writes 0 PSI and 20 mA writes 300 PSI into float register DF1, then drive relay output Y1 from a Set and Rst pair that trips above 250 PSI and releases below 230 PSI. The scaling lives in the analog module setup dialog, not in ladder math, so the program is two compare rungs plus a loop-fault latch. The example hardware is a CLICK stack from AutomationDirect: a C0-11DRE-D CPU, a C0-04AD-1 four-channel current input module, and an SPT25-20-0300D two-wire 0-300 PSI transmitter on a 24 VDC loop.

How do I wire a two-wire transmitter to the C0-04AD-1? #

Loop +24 VDC through the transmitter into CH1 I+ and return CH1 I- to the supply negative; the module's internal 250 ohm sense resistor converts the loop current to the 1-5 V the converter measures, so no external shunt is needed. A two-wire transmitter is powered by the same two conductors that carry the signal, so the supply, the transmitter, and the input channel form one series loop.

  1. Kill the 24 VDC field supply and drop PLC power before landing anything on the terminal block.
  2. Run +24 VDC to the transmitter +V terminal.
  3. Run the transmitter -V (signal) terminal to CH1 I+ on the C0-04AD-1.
  4. Jumper CH1 I- back to the 24 VDC return to complete the loop.
  5. Land the cable shield on panel ground at one end only, and budget 60 mA of supply headroom for one SPT25 transmitter.

Where do I set the 4-20 mA scaling in the CLICK software? #

In the analog input setup dialog for the C0-04AD-1, set channel 1 to the 4-20 mA current range (range code 4 on this module), enter 0 for the low scale value and 300 for the high scale value, and point the result at DF1. The module also offers 0-20 mA and voltage ranges, so pick the 4-20 mA range deliberately.

  1. Open the C0-04AD-1 analog input setup in the CLICK Programming Software.
  2. Choose the 4-20 mA current range for channel 1.
  3. Enter 0 as the value at 4 mA and 300 as the value at 20 mA.
  4. Assign the channel result to DF1, enable the input filter, and download.

The module digitizes the voltage across its sense resistor and the CPU maps it linearly - the same conversion chain described in how PLC analog input and output modules convert signals. The relationship is DF1 = (I - 4 mA) / 16 mA x 300 PSI, so a milliammeter in series with the loop tells you exactly what DF1 should say.

Loop current DF1 (PSI) Meaning
4.0 mA 0.0 transmitter zero
12.0 mA 150.0 mid-scale check point
16.27 mA 230.0 reset setpoint
17.33 mA 250.0 trip setpoint
20.0 mA 300.0 full scale

DF1 is an ordinary float register, so anything else on the network can read the same engineering value; reading a CLICK PLC float over Modbus TCP in an HMI covers the addressing.

How do I write the trip rung in ladder? #

Two rungs do it: a compare contact DF1 > DF2 drives a Set coil on Y1, and a compare contact DF1 < DF3 in series with the reset pushbutton X1 drives a Rst coil, so the relay latches on trip and only an operator releases it. The Set coil closes Y1 the first scan the comparison is true and holds it after pressure falls.

These addresses belong to this example: DF2 is a float register holding the trip setpoint, initialized to 250.0; DF3 is a float register holding the reset setpoint, initialized to 230.0; X1 is a discrete input wired to a normally open momentary pushbutton; Y1 is the relay output; C10 is a control relay for the loop fault.

|--[ DF1 > DF2 ]----[/C10]--------------------( Set  Y1 )--|
|--[ DF1 < DF3 ]----[ X1 ]--------------------( Rst  Y1 )--|

Keeping the setpoints in registers rather than constants lets an operator or an HMI change them without editing the program.

How do I stop the relay chattering around the trip point? #

Split the setpoint into a trip value and a reset value 20 PSI lower - Set Y1 above 250 PSI, Rst below 230 PSI - so a signal hovering at the trip point cannot cycle the contact, because 20 PSI is 6.7 percent of the 300 PSI span. One compare against a single threshold would drop Y1 the moment pressure fell back under it, and a loop sitting at the setpoint would cycle the contact every few scans.

Worked example, the currents behind the two setpoints. Trip: 250 / 300 = 0.8333 of span; 0.8333 x 16 mA = 13.33 mA; 13.33 + 4 = 17.33 mA. Reset: 230 / 300 = 0.7667; 0.7667 x 16 mA = 12.27 mA; 12.27 + 4 = 16.27 mA. A signal swinging between 16.3 and 17.3 mA crosses the trip compare but never satisfies the reset compare, so Y1 holds steady.

For a pump or compressor cut-out on this span, use the 20 PSI deadband as drawn; widen it to 30 PSI (10 percent of span) only if the contact still cycles with the filter on.

What happens to the reading if the transmitter loop breaks? #

DF1 falls below zero - the straight-line scaling gives -75 PSI at 0 mA - so a high trip fails safe, and you add a loop-fault relay that latches when DF1 drops under -10 PSI, which is 3.47 mA, just below the module's 3.5 mA open-wire threshold. A broken loop therefore cannot fake a high pressure, but it can fake a low one, so annunciate it.

Arithmetic on the fault threshold: -10 / 300 = -0.0333 of span; -0.0333 x 16 mA = -0.53 mA; 4 - 0.53 = 3.47 mA. The module also raises its own per-channel open-wire flag around 3.5 mA, so wire either that flag or the computed compare - both fire on the same broken loop.

|--[ DF1 < -10.0 ]----------------------------( Set  C10 )--|
|--[ DF1 > 0.0 ]------------------------------( Rst  C10 )--|

C10 drops out on its own once current returns, and it sits normally closed in the Y1 Set rung from the previous section. Drive an amber lamp with it so a dead transmitter reads as a fault, not as zero pressure. To push that alarm up to a SCADA system, detecting a failed analog input channel and reporting it to SCADA shows the pattern.

How much load can the relay output switch? #

The C0-11DRE-D relay contacts are rated 2 A at 250 VAC and 30 VDC, form A (SPST-NO), so Y1 switches a horn, lamp, or a small pilot relay directly, and anything bigger - especially a motor contactor coil - goes through an interposing relay. Land the load between the Y1 terminal and the output common, fuse the switched leg, and fit an MOV or RC snubber across any coil you switch.

One limit to respect: this rung is operational control, not overpressure protection. The ASME Boiler and Pressure Vessel Code, Section VIII, requires relief protection that does not depend on the electrical control system, so the mechanical relief stays installed and set above the trip, letting the PLC act first. For small air receivers run below 120 PSI, limiting air tank pressure safely below 120 PSI walks the same setpoint decision.

How do I commission the trip without a real overpressure? #

Walk the loop up with a calibrated source and watch three checkpoints: about 4.0 mA and DF1 = 0 ± 2 PSI at atmosphere, 17.33 mA and DF1 = 250 ± 2 PSI at trip, and Y1 releasing only after the reset pushbutton once you bleed below 230 PSI. Everything else in the rungs follows from those three points.

  1. Break the loop at the I+ terminal and put a multimeter in series; at atmosphere the transmitter draws about 4.0 mA and DF1 should read 0 ± 2 PSI.
  2. Connect the CLICK Programming Software in monitor mode and watch DF1 in the data view while you apply a pressure calibrator.
  3. At 150 PSI the meter shows 12.0 mA: (12 - 4) / 16 x 300 = 150, and DF1 should read 150 ± 2 PSI.
  4. Raise the calibrator to 250 PSI, confirm Y1 sets the first scan DF1 passes 250, and confirm the driven load actually drops out.
  5. Bleed down through 230 PSI and confirm Y1 stays latched until you press the X1 reset pushbutton.
  6. Lift the I+ conductor: DF1 falls under -10, C10 turns on, and a new high reading cannot set Y1; restore the conductor and C10 clears.
  7. Record the as-found and as-left values - both checkpoints and both setpoints - on the commissioning sheet.

Questions asked

Can I show this pressure on an HMI without writing scaling code there?

Yes. DF1 already holds engineering units, and the CLICK Ethernet port serves it as a 32-bit float over Modbus TCP, so the HMI reads the register directly and displays it with one decimal. Keep the trip comparison in the PLC so the display is never part of the trip path.

Why does DF1 read a large negative number when the loop is disconnected?

The straight-line scaling keeps going below 4 mA: at 0 mA the equation gives (0 - 4) / 16 x 300 = -75 PSI. A reading near -75 means the loop is open - broken conductor, loose terminal, or lost 24 VDC - not a vacuum. Treat anything below -10 PSI as a loop fault and alarm it separately.

How wide should the deadband be on a different pressure range?

Use 5 to 10 percent of span for pumps and compressors. On this 0-300 PSI transmitter, 20 PSI is 6.7 percent, inside that band. Set the reset point at least as far below the trip as the largest normal ripple plus the transmitter accuracy; if the relay still chatters, widen toward 10 percent or turn on the input filter rather than removing hysteresis.

Can the CLICK relay output switch a contactor coil directly?

Only if the coil's continuous and inrush current both stay under the 2 A contact rating at your voltage. Contactor inrush runs several times the holding current, so the usual practice is to let Y1 switch a small interposing relay and let that relay switch the contactor coil, with an MOV across the coil to protect the contact.

Does the input filter slow down the trip?

It smooths loop ripple before the comparison, which trades a little response time for stability. On a pressure loop that moves over seconds, with a 20 PSI deadband, the delay is negligible for trip timing. If you genuinely need the fastest response, disable the averaging and rely on the deadband alone to stop chatter.

Keep reading

  • How-to

    Scaling a 4-20 mA analog input to engineering units in CPM2 ladder

    Scale with y = x × 120 / 9999 - 20: the raw analog word reads 0 at 4 mA and 9999 at the top of the loop, so DM1010 stores -20 °C and 100 °C at the ends of the loop. Multiply before dividing into a 32-bit-wide product that holds 1,199,880, drive the rung with the Always-On bit, and read the destination as signed. If DM1010 only needs 0-9999, MOVE the raw word and skip the math.

    PLC programming

  • Troubleshooting

    Fixing 4-20 mA scaling on a Quantum AVI030 analog input

    On the Quantum AVI030 analog input, the raw range follows the channel resolution: 12-bit reports 0-4095 counts and 16-bit maps 4-20 mA to 6400-32000 counts. Neither 0-64000 nor a mismatched 0-4095 will scale or hold; set the block's raw limits to match the configured resolution and verify with 4, 12 and 20 mA test currents.

    Controllers and I/O

  • Troubleshooting

    Troubleshooting non-linear 4-20 mA readings on an S7-1200 analog input

    A 4-20 mA loop is linear by construction, so counts swinging between 10 and 30246 mean the current at the terminal is not what the sensor LCD shows. On the SM 1231, 27648 counts is the top of the 4-20 mA range and 30246 decodes to 21.5 mA over-range fault current. Check the loop with a series meter, split sensor from module with a calibrator, and anchor NORM_X to 0 and 27648.

    Controllers and I/O