Skip to main content

Modbus Data Formats

Modbus uses the concept of a data table to refer to data. A data table is an array or block of memory used to store data. Data is referenced using data table addresses.

Data Table Types

Modbus data table addresses come in four types:

Discrete Inputs

Represent a single bit (Boolean) which can only be read. In other words, the client can only perform a read action on the discrete inputs.

PropertyValue
Size1 bit
AccessRead-only
Typical UsePhysical input states

Coils

Read-write Boolean values. They are typically used to represent outputs or internal bits which are both read by and written to by the user.

PropertyValue
Size1 bit
AccessRead-write
Typical UseDigital outputs, internal flags

Input Registers

Read-only 16-bit integers. They are typically used to represent analogue input values and other integer values which are read but not written to by the user.

PropertyValue
Size16 bits
AccessRead-only
Typical UseAnalog inputs, counter values

Holding Registers

Read-write 16-bit integers. They are typically used to represent analogue outputs or internal numbers which are both read by and written to by the user.

PropertyValue
Size16 bits
AccessRead-write
Typical UseAnalog outputs, configuration values

Summary Table

Data TypeSizeAccessTypical Use
Discrete Input1 bitRead-onlyPhysical input states
Coil1 bitRead-writeDigital outputs, internal flags
Input Register16 bitsRead-onlyAnalog inputs, counter values
Holding Register16 bitsRead-writeAnalog outputs, configuration values