Data Storage in Standard Modbus Protocol
In the Modbus protocol, data is stored within the slave device in four distinct tables, each designed to manage specific types of data. These tables are categorized as follows:
Discrete Values (Coils):
- On/Off states stored as 1-bit values.
- Two tables: one for read-only and another for read-write access.
Numerical Values (Registers):
- Stored as 16-bit (1 word) values.
- Two tables: one for read-only and another for read-write access.
Key Features:
- Each table can hold up to 9999 values.
- Coils and Contacts: Each 1-bit coil/contact is assigned a data address between 0000 and 270E.
- Registers: Each 16-bit register is assigned a data address between 0000 and 270E.
Coil/Register Numbers vs. Data Addresses:
- Coil/Register Numbers serve as logical names for locations but do not appear in Modbus messages.
- Data Addresses are used in messages and have an offset to differentiate table types.
For example:
- Holding Register 40001 corresponds to Data Address 0000.
- The offset for Holding Registers is 40001, while other tables have different offsets (1, 10001, 30001).
Modbus Data Storage Overview:
This below table organizes the types of data storage in Modbus, highlighting the differences in access types, addresses, and usage. The structure ensures efficient data communication and management in Modbus networks.
Coil/Register Numbers | Data Addresses | Access Type | Description | Table Name |
---|---|---|---|---|
1–9999 | 0000–270E | Read-Write | Discrete Output Coils | Discrete Output Coils |
10001–19999 | 0000–270E | Read-Only | Discrete Input Contacts | Discrete Input Contacts |
30001–39999 | 0000–270E | Read-Only | Analog Input Registers | Analog Input Registers |
40001–49999 | 0000–270E | Read-Write | Analog Output Holding Registers | Analog Output Holding Registers |