Modbus bases its data model on different basic types that have distinguishing characteristics. The four basic types are:
|
Basic types |
Object type |
Service |
Comment |
|---|---|---|---|
|
Discrete Inputs (Inputs) |
Single bits |
Read only |
This type of data can be provided by the I/O of a device. |
|
Coils (Outputs) |
Single bits |
Read / Write |
Bit information that can be changed by the user program. |
|
Input Registers (Inputs) |
16-bit words |
Read only |
This type of data can be provided by the I/O of a device. |
|
Holding Registers (Outputs) |
16-bit words |
Read / Write |
Bit information that can be changed by the user program. |
The distinctions between inputs and outputs, and between bit-addressable and word-addressable data items, do not need any application program. The four basic types can overlap, provided that the target system interprets them correctly.
For each of the primary types, the protocol allows for the individual selection of 65536 data items. Reading or writing these data units can comprise several consecutive registers up to a maximum data size which depends on the function code.
32-bit values (DINT, FLOAT) are stored in two successive registers.