What a Coil Is
A coil is a discrete (single-bit) read/write data point in Modbus. Coils represent binary on/off states such as relay outputs, enable flags, or command triggers.
The term “coil” originates from relay coils in early industrial control — a coil being energized (1) or de-energized (0).
Coils vs Other Register Types
| Type | Access | Size | Typical Use |
|---|---|---|---|
| Coil | Read/Write | 1 bit | Relay outputs, commands |
| Discrete Input | Read-only | 1 bit | Sensor contacts, alarms |
| Holding Register | Read/Write | 16 bits | Setpoints, configuration |
| Input Register | Read-only | 16 bits | Measurements, counters |
Function Codes
| Code | Function |
|---|---|
| 01 | Read Coils |
| 05 | Write Single Coil |
| 15 | Write Multiple Coils |
Addressing
Coils traditionally use the 0xxxx reference number range (e.g., 00001–09999). However, actual addressing depends on whether the device uses reference-style (1-based) or offset-style (0-based) numbering.
[!NOTE] Always confirm the addressing convention with the device vendor’s register map. See Modbus Addressing & Register Reference for details.