IMDHMIControls LibraryShop main store

How-to

How to add a 4-20 mA sensor to a PLC without analog inputs

Controllers and I/O Published 7 min read

Short answer

Connect the transmitter through a CP1W analog input expansion unit on the CP1E's expansion connector and scale it with Pressure_bar = (I_mA - 4) × (10 bar / 16 mA). If no expansion unit fits, convert the 4-20 mA loop to a 0-1 kHz pulse train with a 24 VDC signal conditioner and count it on a high-speed counter input over a fixed gate.

On this page
  1. Check the expansion connector first
  2. Route 1: add the CP1W analog input unit
  3. Scale the loop current to bar
  4. Route 2: count a pulse train when no unit fits
  5. Worked example: 7.2 bar through the converter
  6. Which route to take
  7. Commissioning checks
  8. Questions asked

The CP1E-E30SDRA cannot measure a 4-20 mA loop on its own: its inputs are digital points and its outputs are relays. The loop current has to be converted by hardware you add, and there are exactly two practical ways to do it — a CP1W analog input expansion unit on the CPU's expansion connector, or a 24 VDC current-to-frequency signal conditioner feeding a counter input. The expansion unit is the normal answer and costs one line of scaling math; the converter route costs more program but works when no expansion position is free, and it resolves 0.01 bar at a 1 s update. Wiring, arithmetic and commissioning checks for both routes follow.

Check the expansion connector first #

CP1E controllers get analog I/O as expansion units: Omron's CP1E family documentation adds analog I/O and temperature inputs by connecting expansion units to the CPU, and CPM1A expansion units attach under the same conditions as CP1W units. So the first move is physical. Power down, look at the right-hand end of the CPU, and check the expansion connector — free means route 1, occupied or absent means route 2.

For route 1 the model choice is between the CP1W-AD041, which gives four analog inputs, and the CP1W-MAD11, which adds analog input and analog output channels — take the MAD11 if a proportional output to a pump drive or a valve is coming later. Confirm the unit you order appears in the CP1E expansion table for your CPU. The N and NA CPU types are the ones documented to take the full CP1W range plus option boards.

Route 1: add the CP1W analog input unit #

  1. Power down and clip the unit onto the expansion connector. It takes power and data through that connector, with no external wiring back to the CPU.
  2. Set the channel to the current range. This selection lives on the module as switches or settings, exactly where its manual says; a channel left in a voltage range reads a fixed nonsense value with a current loop hung on it.
  3. Wire the two-wire transmitter in series around the loop: panel +24 VDC to the transmitter's + terminal, the transmitter's - terminal to the module's current-input + terminal, and the module's input common back to 0 V. The module's input resistor is what the loop current actually flows through.
  4. Power up and locate the channel's raw value in the PLC's I/O data. The chain between that terminal and that number — how PLC analog input and output modules convert signals — is now your measurement path, so it is worth understanding once.
  5. Scale the value and send engineering units to the HMI, never raw counts: the operator watching a pipe wants bar.

Scale the loop current to bar #

The transmitter spans 0-10 bar over the loop's full range, so 16 mA of current carries 10 bar of span:

Pressure_bar = (I_mA - 4) × (10 bar / 16 mA)

The module hands you counts rather than mA, so run the same equation one step earlier, with C4 and C20 the raw values the module manual states at the loop's bottom and top:

Pressure_bar = (Counts - C4) × 10 bar / (C20 - C4)

Check it at three points before trusting it: 4.00 mA gives (4 - 4) × 10/16 = 0.00 bar, 12.00 mA gives (12 - 4) × 10/16 = 5.00 bar, and 20.00 mA gives 10.00 bar. In ladder this is the same subtract-the-live-zero, multiply-by-the-span-ratio pattern as scaling a 4-20 mA analog input to engineering units in CPM2 ladder, applied to CP1E data instead.

Route 2: count a pulse train when no unit fits #

  1. Pick a 24 VDC signal conditioner with a 0/4-20 mA input and a frequency output; a 0-1 kHz span is a common configuration. Configure the two endpoints before it goes in the cabinet and write them down: Fmin, the output frequency at the loop's bottom end, and Fmax, the frequency at full scale.
  2. Wire the transmitter loop into the conditioner's input, the conditioner's pulse output into a high-speed counter input on the CP1E with its common to 0 V, and power the conditioner from the panel's 24 VDC rail.
  3. Configure that input as a high-speed counter — the flow is the same as configuring a CP1H high-speed counter for an encoder input: choose the input, the counting mode and the reset behaviour.
  4. Gate the count at a fixed interval T, from a timed interrupt if your CPU offers one and a self-resetting timer otherwise, and compute the frequency as f_Hz = (Count_now - Count_last) / T.
  5. Convert in two steps: I_mA = 4 + (f_Hz - Fmin) × 16 mA / (Fmax - Fmin), then Pressure_bar = (I_mA - 4) × 10 / 16.

Land the pulses on the counter input, not on an ordinary input read by the scan: input filters exist to reject fast switching, which is the same mechanism behind why a PLC misses short input pulses, and a filtered 1 kHz train just looks like an input that is permanently on.

Worked example: 7.2 bar through the converter #

Take Fmin = 0 Hz, Fmax = 1000 Hz and a gate of T = 1.0 s — an illustrative configuration; your conditioner's configured span replaces these numbers and the arithmetic is unchanged.

  • Loop current at 7.20 bar: I = 4 mA + 7.20 bar × (16 mA / 10 bar) = 4 + 11.52 = 15.52 mA
  • Conditioner output: f = (15.52 - 4) × (1000 Hz / 16 mA) = 11.52 × 62.5 Hz/mA = 720 Hz
  • Counts in one gate: 720 Hz × 1.0 s = 720 counts
  • Back in the program: I = 4 + (720 - 0) × 16/1000 = 15.52 mA, then Pressure_bar = (15.52 - 4) × 10/16 = 7.20 bar

Resolution follows from the span: 1000 counts cover 10 bar, so one count is 0.01 bar at a 1.0 s gate. Shorten the gate to 0.5 s and the step becomes 0.02 bar, with the HMI refreshing twice as often.

Which route to take #

Situation Route What you get
Expansion connector free CP1W-AD041, or CP1W-MAD11 if an analog output is wanted too Updates at module speed, module resolution, one scaling line
No expansion position, counter input free Conditioner plus counter, 1.0 s gate 0.01 bar steps at 1 s updates
Neither free Free up a counter input and use the conditioner route Same numbers; there is no way around added hardware

Decide it this way: with the connector empty, fit the CP1W analog input — least code, fastest update, and it is the route Omron documents for CP1E analog expansion. Fit the converter when the connector is full or absent, and take the 1.0 s gate: 0.01 bar resolution updates far faster than water pressure in a pipe moves. There is no third route that measures — a resistor into a digital input is a trip point, not a measurement.

Commissioning checks #

  • Inject the same three calibration currents with a loop calibrator: the HMI must read 0.00, 5.00 and 10.00 bar. Any deviation at those three points sits in the scaling or the wiring, not in the physics.
  • On the converter route, verify the gate too: the bottom-end current must count Fmin × T (0 counts in the example) and full-scale current must count Fmax × T (1000 counts).
  • A broken loop behaves differently on the two routes. On the analog unit the raw value falls below the live zero and the scaled result goes negative — clamp it and alarm, with the logic covered in detecting a failed analog input channel and reporting it to SCADA. On the converter route a dead loop sits at Fmin and reads 0.00 bar; if the conditioner has a fault output, wire it to a spare digital input.
  • Keep overpressure protection where it already lives — the relief valve or pressure switch in the pipe, independent of this reading. A scaled value on an HMI is a measurement, not a safeguard.

Questions asked

Can the CP1E-E30SDRA read 4-20 mA without added hardware?

No. Every input on the base unit is a threshold detector, so the loop current has to be converted by hardware you add: a CP1W analog input unit on the expansion connector, or a signal conditioner feeding a counter input. If a replacement CPU ever lands on the table, the N and NA types take the full CP1W expansion range plus option boards, which buys room for future analog and temperature inputs.

How do I pick the gate time for the counter method?

Set the converter endpoints first, then trade resolution for refresh. With the 0-1 kHz span of the example, a 1.0 s gate gives one count per 0.01 bar; shortening the gate to 0.5 s makes the step 0.02 bar but updates the HMI twice as often. Both steps are finer than a typical pressure transmitter's accuracy, so pick the gate for how fast the display must follow the pipe, not for resolution.

How do I wire a four-wire, self-powered transmitter into the analog input?

Leave the panel 24 VDC loop supply out of it. Connect the transmitter's 4-20 mA output directly between the module's input positive terminal and the input common, because an active transmitter sources the current itself. If the transmitter and the PLC input are both earthed on their negative sides, fit a signal isolator or the loop will carry a ground-loop current that biases the reading.

Why not put a resistor across a digital input and read the sensor that way?

A digital input reports one bit, so a resistor plus the input threshold gives you a single pressure trip point, never a measurement. That is usable as a standalone alarm, but it cannot maintain pressure or drive an HMI trend. A measurement needs the loop to reach an analog input channel or a counter input through a converter.

Keep reading

  • Selection guide

    Add 4-20 mA analog inputs when the CompactLogix rack is full

    Swap the installed four-channel analog input card for an eight-channel one when channel isolation matches; that adds four inputs against a need of three, with no rack, power-supply or enclosure change. If isolation rules the swap out, reposition the existing power supply to free an end slot. When the cabinet itself is full, add a POINT I/O analog module or IO-Link converters over EtherNet/IP.

    Controllers and I/O

  • Explainer

    How PLC analog input and output modules convert signals

    Analog input modules amplify and digitize a field voltage or current into a 12-bit binary code (4,096 counts) or a three-digit BCD value, and the program scales that code into engineering units. Analog outputs run the same path in reverse through a DAC. Troubleshoot in the order signal, format, scaling.

    Controllers and I/O

  • 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