Automation Glossary • Discrete vs Analog I/O

Discrete vs Analog I/O:
On/Off Signals vs Continuous Values

Merobix Engineering • • 7 min read

Every signal a controller reads or writes is either discrete or analog, and knowing the difference is fundamental to understanding any automation system. Discrete I/O deals in on/off states; analog I/O deals in continuous measured values. This guide explains both, the four categories DI, DO, AI, and AO, and how each type maps from a field device into a PLC, RTU, and SCADA.

Back to Blog

Discrete vs Analog I/O in one line: Discrete (digital) I/O handles two-state on/off signals such as a switch being open or closed, while analog I/O handles continuously variable signals such as a 4-20 mA pressure or level measurement spanning a full range.

Discrete I/O: On or Off

Discrete I/O, also called digital I/O, represents a signal that has only two states - on/off, open/closed, running/stopped, or true/false. A discrete input (DI) reads the state of something: a pump run status, a limit switch, a high-level float, an ESD pushbutton, a valve's open or closed position feedback. A discrete output (DO) commands a two-state device: energize a relay, open a solenoid valve, start a motor, turn on a beacon.

Electrically, discrete signals are simply a voltage present or absent (for example 24 VDC or dry contacts). One discrete point equals one bit of information. Discrete I/O is the backbone of interlocks, shutdowns, and sequencing, where the question is always binary: is it on or off, safe or tripped?

Analog I/O: Continuous Values

Analog I/O represents a value that varies continuously across a range. An analog input (AI) reads a transmitter - pressure, level, flow, temperature - most commonly as a 4-20 mA current loop, where 4 mA is the bottom of the range and 20 mA is the top. An analog output (AO) drives a modulating device to a specific position, such as sending 4-20 mA to a control valve positioner to hold it 37% open.

Inside the controller, an analog signal is converted to a number by an analog-to-digital converter and then scaled from raw counts into engineering units - so 12 mA might become 50 psi. From there, discrete and analog points alike become tags in the PLC or RTU that a SCADA host reads over a protocol like Modbus or DNP3. A well-built system labels every point clearly by type, because a shutdown interlock (discrete) and a trend of tank level (analog) are handled very differently.

Specifying I/O: The Point List Comes First

Before any hardware is ordered, a real project writes an I/O list: every point with its tag name, type (DI, DO, AI, AO), signal characteristics, range, fail state, and terminal assignment. That list drives the controller card count, and it should include spares, because adding a card and rewiring later costs far more than unused points today; how much spare capacity to carry is a site decision. For discrete inputs the list needs to say whether each point is a dry contact wetted by the card or a powered signal from the field, and whether the wiring convention is sinking or sourcing, since a mismatch there leaves an input permanently off. For discrete outputs it should distinguish relay outputs from solid-state, and flag inductive loads that need interposing relays.

Analog points carry their own specification details: whether each transmitter is loop-powered from the input card (two-wire) or separately powered (four-wire), what the calibrated range is, and whether the channels need galvanic separation, a choice the guide to isolated versus non-isolated analog inputs works through. If digital access to smart transmitters is planned, note which channels must pass HART.

A Worked Scaling Example

Take a transmitter ranged from zero to a span of S engineering units across 4-20 mA. The loop current for any measured value V is I = 4 + 16 x (V / S) mA, and running the arithmetic backwards, V = (I - 4) / 16 x S. At 12 mA the fraction (12 - 4) / 16 works out to one half, so the reading is half of span regardless of the units involved. Inside the controller the same computation happens on raw counts: the analog-to-digital converter maps 4-20 mA onto a count range from R_low to R_high, and the tag value is V = (R - R_low) / (R_high - R_low) x S.

Two failure points hide in that chain. First, the scaling can be configured against the wrong range: a transmitter re-ranged in the field while the controller still holds the old span produces readings that are plausible but wrong, which is far more dangerous than an obvious fault. Second, the count endpoints can be mismatched between the card's actual behavior and the configuration. The defense is to configure engineering unit scaling for a tag from documented values and then prove the whole chain end to end with a loop check of the 4-20 mA analog input, injecting known currents and confirming the displayed value at each test point.

Failure Behavior: How Each Type Tells You It Is Broken

A broken wire on a discrete input simply reads as the de-energized state, indistinguishable from a genuine off. That is why circuit sense is a design decision: trip and alarm circuits are usually wired normally closed, so an open wire de-energizes the input and reads as the alarm condition rather than hiding it. Where site standards require it, supervised circuits with end-of-line monitoring detect both opens and shorts on critical discrete loops, and any change to that arrangement belongs to the site's safety system procedures and qualified personnel.

Analog signals carry failure detection in the signal itself. Because the live zero is 4 mA, a reading of 0 mA is unambiguously a broken loop or dead transmitter, not a low measurement, and a transmitter that detects an internal fault can drive the loop to a defined band below or above the normal range so the controller can flag it. On top of that, out-of-range and rate-of-change alarms in the host catch values that are electrically valid but physically implausible. This built-in diagnosability is one of the quiet advantages of analog measurement over a bare contact.

Frequently Asked Questions

What is the difference between discrete and analog I/O?

Discrete (digital) I/O carries two-state on/off signals like a switch or motor status, while analog I/O carries continuously variable measurements like a 4-20 mA pressure or level reading across a full range.

What do DI, DO, AI, and AO stand for?

Discrete Input (reads an on/off state), Discrete Output (commands an on/off device), Analog Input (reads a continuous measurement), and Analog Output (drives a modulating device such as a control valve).

What is 4-20 mA and why is it used for analog signals?

It is a current loop where 4 mA represents the low end of a measurement range and 20 mA the high end. Because a healthy signal is never zero, a reading of 0 mA clearly indicates a broken wire or fault, which is why it is the standard for analog signals.

What is the difference between sinking and sourcing discrete I/O?

It describes which side of the circuit switches the current. A sourcing device supplies voltage toward the input; a sinking device switches the return path to common. The field device and the input card must be complementary - one sources while the other sinks - and mixing two of the same kind is a classic wiring error that leaves the input permanently in one state. The card's datasheet states which convention it expects.

Can I wire a discrete signal into an analog input, or the other way around?

Electrically it can sometimes be made to work, but it is poor practice. A contact into an analog channel wastes a more expensive input and gives up the clean on/off semantics, while a varying signal into a discrete input collapses the measurement to a single threshold with no visibility of the value. Use each point type for what it is, and convert properly in the design if a signal genuinely needs to change category.

Sources and verification

This page references the protocol specifications published by the organizations below. Editions, product capabilities, and documentation change over time - confirm current requirements and specifications directly with the source.

Merobix is not affiliated with, endorsed by, or sponsored by these organizations; their names are used only to identify the standards and products discussed.

More in PLC, RTU, HMI & DCS
Modbus Register Types (Coils, Discrete Inputs, Input Registers, Holding Registers)  •  Isolated vs non-isolated analog input  •  DNP3 Analog Output Block  •  Analog bar graph  •  Analog Input Module  •  All PLC, RTU, HMI & DCS →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →