[ CHAPTER 01 · 14 MIN ]

Signals — how a machine talks to a PLC

The four signal types every controller has, what they look like on a meter, and the scaling arithmetic behind every analog value on an HMI.

DI · DO · AI · AO · 24 VDC · 4–20 mA

CPU · 24VDCDI %I0.0DO %Q0.0AI 4-20mAAO 0-10VTERMINAL STRIP12.0 mA = 50 %5.00 barTRANSMITTERPROCESS LINE · 0–10 bar

0% read · 0 of 10 sections

A PLC only knows four things

Strip away the fieldbuses and the software and an industrial controller has exactly four kinds of connection to the physical world: digital in, digital out, analog in, analog out. Every sensor and actuator on a machine, from a €4 reed switch to a €40,000 Coriolis meter, ends up presented to the CPU as one of those four.

Digital means two states — a circuit is complete or it is not. Analog means a continuously variable quantity, which the module converts to a number. That is the whole model. When a signal misbehaves, you are always debugging one of four very small stories.

TypeWhat it carriesTypical field wiringExample device
Digital input (DI)24 VDC present or absent2 or 3 wire, sinking or sourcingInductive proximity sensor
Digital output (DO)Controller switches 24 VDC or a relay contact2 wire to a loadSolenoid valve, contactor coil
Analog input (AI)4–20 mA, 0–10 V, RTD/TC millivolts2, 3 or 4 wire, shieldedPressure transmitter
Analog output (AO)Controller drives 4–20 mA or 0–10 V2 wire, shieldedVFD speed reference, control valve
The four signal types, as they appear at the terminal

Why the whole industry settled on 24 VDC

24 VDC is not a technical accident. It is high enough that a few hundred millivolts of contact resistance or cable drop does not matter, low enough to be outside the range that reliably kills a person, and low enough that SELV/PELV rules let a technician work in a live panel with far less ceremony than 230 V.

A typical DI counts anything above roughly 11 V as a 1 and anything below about 5 V as a 0, with a deliberate dead band between them (IEC 61131-2 Type 1/2/3 inputs). That gap is why a "floating" input — a broken wire — is unpredictable rather than safely off, and why a spare input should be tied off rather than left dangling.

PNP and NPN — the one that costs an afternoon

A three-wire DC sensor has brown (+24 V), blue (0 V) and black (signal). What the black wire does when the sensor triggers is the whole difference. A PNP sensor sources 24 V onto the signal wire. An NPN sensor sinks the signal wire to 0 V.

A PLC input card is built for one or the other. A sinking input card expects the field device to source (PNP); a sourcing input card expects the field device to sink (NPN). Europe standardised on PNP, much of Asia and older North American equipment on NPN. Mixing them gives you a sensor whose own LED lights perfectly while the PLC never sees a thing — which is exactly why people blame the software.

  • PNP = Positive switching = signal goes to +24 V when active. Pair with sinking (common-negative) input cards.
  • NPN = Negative switching = signal goes to 0 V when active. Pair with sourcing (common-positive) input cards.
  • Both sensor LEDs light regardless of whether the card can read them. The LED proves the sensor sees the target, nothing else.
  • Cheap fix when you already bought wrong: an interposing relay, or a card whose common terminal you can rewire (many Siemens ET 200SP and Allen-Bradley 1769 DI cards are configurable per group).

4–20 mA, and why current beat voltage

A current loop carries the measurement as amps, not volts, and that single choice removes most of the failure modes of a long analog cable. Current is the same everywhere in a series loop, so 200 m of cable and a couple of terminal blocks change nothing. Voltage signals lose amplitude over the same run.

The bottom end being 4 mA rather than 0 mA is the second piece of engineering. A live loop always carries at least 4 mA, so 0 mA is unambiguous: broken wire, dead transmitter, blown fuse. That is called live zero, and it is why a 4–20 mA loop can tell the difference between "the tank is empty" and "I cannot tell you anything".

ReadingMeaning
0.0 mALoop is open — broken wire, no loop power, or dead transmitter
3.6 mA or 3.8 mADownscale burnout: the transmitter itself is reporting a fault (NAMUR NE 43)
4.00 mALive zero — bottom of the calibrated range, loop healthy
12.00 mAExactly 50 % of range
20.00 mATop of range
21.0–23.0 mAUpscale burnout / over-range — sensor fault or genuine over-pressure
What a milliamp reading is telling you

The scaling arithmetic behind every HMI number

An analog input card does not hand your program engineering units. It hands you raw counts from its ADC, and your code maps counts to bar, °C or litres per minute. Every vendor gives you a helper — SCALE/UNSCALE, SCP, NORM_X/SCALE_X — and they all do the same straight-line calculation.

The general form is: value = min + (raw − rawMin) × (max − min) ÷ (rawMax − rawMin). Get the raw endpoints from the card manual, not from memory: Siemens S7 uses 0–27648 for the nominal range of a ±10 V or 4–20 mA channel, Allen-Bradley 1769-IF4 defaults to 0–32767 (and can be set to engineering units in the module profile), Beckhoff EL30xx terminals give 0–32767 for unipolar.

Resolution, accuracy and the number of digits you may show

Resolution is how finely a card can chop up the range; accuracy is how close the answer is to the truth. A 16-bit card on a 0–10 bar transmitter resolves about 0.0003 bar, which tempts people into displaying four decimals on an HMI. The transmitter itself is typically ±0.5 % of span, or ±0.05 bar — five hundred times coarser than the resolution.

Show one more digit than the accuracy justifies and you have built an operator complaint generator: the number twitches, someone reports the machine as unstable, and an engineer spends a day chasing noise that is inside the sensor spec. Display what the measurement can support, and keep the extra bits for control maths.

  • 12-bit = 4096 steps · 13-bit = 8192 · 16-bit = 65536. More bits never improves a sensor that is ±1 % of span.
  • Total error is the sensor, the card and the temperature drift of both, not just the headline sensor figure.
  • Repeatability often matters more than absolute accuracy: for closed-loop control, a consistently wrong reading is workable, a drifting one is not.

Shielding, grounding and the noise you will actually meet

The single biggest source of analog trouble on a machine is a VFD sharing a cable tray with signal wiring. A drive switches hundreds of volts in tens of nanoseconds, and that dV/dt couples straight into any unshielded pair running beside it.

The rules that fix it are boring and they work: run analog and motor cable in separate trays, or cross at 90°, never parallel. Use twisted, shielded pair for every analog signal. Land the shield at one end only — normally the cabinet end, on the shield bar, with a proper 360° clamp rather than a pigtail. A shield grounded at both ends becomes a ground loop and carries current instead of draining it.

[ WHEN IT GOES WRONG ]

The faults this chapter's hardware actually produces, with the cause and the fix.

  • Sensor LED lights, PLC input never turns on

    Cause · PNP sensor on a sourcing card (or NPN on a sinking card), or the card group common is not wired.

    Fix · Meter the signal terminal to 0 V with the target present. 24 V means PNP, 0 V means NPN. Match the card, or drop an interposing relay in.

  • Analog value reads 0 while the transmitter display is fine

    Cause · Loop open somewhere after the transmitter, or the loop power supply is missing on a 2-wire device.

    Fix · Break the loop and read current with the meter in series. 0 mA proves an open loop; then halve the loop to find the break.

  • Analog value pegged at full scale

    Cause · Card configured for voltage while the field device sources current (or the 4–20 mA jumper/DIP is on the wrong position).

    Fix · Check the channel type in the hardware configuration and the module DIP/jumper. On a current channel, a voltage source reads near zero; on a voltage channel, a current source pegs high.

  • Value jumps by a few percent, at random, only in production

    Cause · Shield landed at both ends, shield pigtailed instead of clamped, or signal cable parallel to motor cable.

    Fix · Lift the field end of the shield, clamp the cabinet end 360° to the shield bar, and reroute the last parallel run.

  • Digital input flickers when a nearby contactor drops out

    Cause · Long unfiltered input run picking up the coil collapse, or no suppression across the coil.

    Fix · Fit an RC or diode suppressor across the coil, and use the card input filter/delay parameter rather than debouncing in code.

  • Every input on one group is dead, others fine

    Cause · Blown fuse feeding that group, or the group common wire pulled out.

    Fix · Meter 24 V at the group supply terminal and continuity on the common. Group-level dead spans are almost never a CPU problem.

[ WHICH ONE DO I BUY? ]

Real selection questions, answered the way a colleague would answer them.

  • 4–20 mA or 0–10 V?

    Anything leaving the cabinet, or running more than a few metres, or living near drives: 4–20 mA. 0–10 V is fine for short in-panel links and is common on VFD analog references and older sensors. Current also gives you live-zero diagnostics, which voltage cannot.

  • 2-wire, 3-wire or 4-wire transmitter?

    2-wire is loop-powered and cheapest to wire — the signal and the supply share the pair. 3-wire needs a separate supply and is common on cheaper sensors. 4-wire fully separates power and signal, which you want for anything with a display, heaters or a high burden.

  • How many spare I/O should the panel carry?

    Budget around 15–20 % spare per type, and physically wire spares to terminals. Spare channels on a card you cannot reach are not spares. If the card is a 16-channel DI, buying a second one to hold 3 spares is usually cheaper than a shutdown to add it later.

  • Relay output or transistor output?

    Transistor (sourcing/sinking) outputs switch fast, last essentially forever, and handle 24 VDC loads only. Relay outputs handle AC and mixed voltages and give galvanic separation, but wear out after a few hundred thousand operations — do not use them for anything cycling every second.

[ CHECK YOURSELF ]

Six questions. Every answer explains itself, pass or fail.

Module quiz

6 questions. Answer them all; each answer explains itself whether you get it right or wrong.

  1. Q01

    A 4–20 mA loop reads 0.0 mA. What does that tell you?

  2. Q02

    A three-wire sensor puts 24 V on its black wire when it detects a target. It is…

  3. Q03

    An S7-1500 analog channel reads 13824 counts on a 0–10 bar, 4–20 mA transmitter. The pressure is…

  4. Q04

    Where should the shield of an analog signal cable be grounded?

  5. Q05

    A transmitter is ±0.5 % of a 0–10 bar span. How many decimals belong on the HMI?

  6. Q06

    A NAMUR NE 43 transmitter drives the loop to 3.6 mA. That means…

Score: 0 / 6