Analog & Scaling:
turn a current into a number you trust.
Digital inputs are easy — a button is on or off. The real world isn't: temperature, pressure, level, flow and weight are continuous, and they reach the PLC as a tiny electrical signal that means nothing until you give it meaning. A 4–20 mA loop becomes a raw integer becomes — only after you scale it — a real 72.4 °C. Get that chain right and your process data is trustworthy; get it wrong and every alarm, every PID loop, every report is built on a lie. This module walks the whole path: the signal and why it's 4–20 mA, the raw count and what it really is, the two-point scaling math, filtering noise without hiding events, and catching a dead or lying sensor before it makes a decision for you.
Raw counts aren't degrees
📊 the card hands you 13824, not 50 °C. Scaling is the linear map from the card's raw range to your engineering units — the single most common piece of analog code, and the one beginners get backwards or off-by-a-bit.
4–20 mA is honest by design
🔌 the loop starts at 4 mA, not 0, on purpose: a real zero reads 4 mA, while 0 mA can only mean a broken wire. That live-zero is a built-in fault signal — if you bother to check for it.