What is the difference between analogue and digital I/O?
A digital signal has two states — on or off, like a limit switch or a contactor. An analogue signal is a continuous range representing a measured value, like a 4–20 mA pressure transmitter. Digital tells you whether something happened; analogue tells you how much.
Comparison
| Digital I/O | Analogue I/O | |
|---|---|---|
| States | Two (0/1) | Continuous range |
| Typical signals | 24 V DC, relay contact | 4–20 mA, 0–10 V, RTD, thermocouple |
| Examples | Proximity switch, E-stop, valve open | Pressure, level, flow, temperature |
| In code | BOOL | INT/REAL, needs scaling |
| Noise sensitivity | Low | High — needs screened cable |
| Module cost | Lower | Higher, fewer channels |
Why is 4–20 mA used instead of 0–10 V?
Because a current loop survives long cable runs and is self-diagnosing. Current does not drop over distance the way voltage does, and the 4 mA offset means zero is a valid reading — so 0 mA tells you the loop is broken rather than that the tank is empty. That live-zero property is why 4–20 mA still dominates process instrumentation across Gulf plants.
What is scaling and why does it go wrong?
The PLC sees raw counts, not engineering units — a card might report 0–27648 for 4–20 mA. Scaling maps that range onto real units, say 0–10 bar. Two failures are extremely common: assuming a full 0–27648 span when the transmitter is 4–20 mA (giving a permanent offset), and mixing integer and real arithmetic so the result truncates.
What causes noisy analogue readings?
- Earthing — screen earthed at both ends creating a loop; earth at one end only
- Cable routing — signal cable run alongside VFD motor cable
- No screened cable where the environment demands it
- Software filtering used to hide a wiring fault — treats the symptom
Fix the physical cause before reaching for a filter. This is a standard interview question precisely because it separates people who have been on site from people who have not.
What should a beginner practise?
Wire one digital input to a lamp output, then scale one analogue input and display it on an HMI in engineering units. Those two exercises cover most of what first-year work involves. See 12 ways to practise at home.
