What a Discrete Input Is
A discrete input is a read-only single-bit data point in Modbus. Discrete inputs typically represent physical sensor states, alarm contacts, or status flags — values that the device reports but external systems cannot write.
Discrete Inputs vs Coils
| Aspect | Discrete Input | Coil |
|---|---|---|
| Access | Read-only | Read/Write |
| Typical use | Sensor states, alarm contacts | Relay outputs, commands |
| Modbus function | FC 02 (Read Discrete Inputs) | FC 01, 05, 15 |
| Address range | 1xxxx (traditional) | 0xxxx (traditional) |
Function Code
| Code | Function |
|---|---|
| 02 | Read Discrete Inputs |
[!NOTE] Some devices map digital status points as discrete inputs while others use holding registers with bitmask values. Always check the vendor’s register map.