

The coils in the response message are packed as one coil per bit of the data field. This function code is used to read from 1 to 2000 contiguous status of coils in a remote device. This type of data can be alterable by an application program. This type of data can be provided by an I/O system. This type of data can be alterable by an application. This type of data be provided by an I/O system. The four primary tables are the following: The below table summarises the object types. Though it has its limitations such as it cannot represent negative numbers, floating-point numbers, or values with representation greater than 65535. The Registers are of 16 bits ( 2 bytes) unsigned registers and therefore can have values from 0 to 65535 (0 to FFFF). Some coils can represent inputs and some as outputs. The coils can be understood as digital as can only be either ON (1) or OFF (0). In Modbus, the data types can be divided majorly in two types: Coils and Registers. Modbus message at the moment: 02 (slave address) With this example, we are going to create a Modbus RTU message along with this post. So, the master would send a message and all the slaves would receive the message, but only slave number 2 will respond and act on the command, even though other devices might receive it. The master only wants to send a message to slave number 2 requesting the value of 6 input registers. Let's give an example! Imagine that we have a Modbus serial network, where there is a master and up to 31 slaves, each with a unique slave address. Only the addressed device will respond and act on the command, even though other devices might receive it.Īlso, it is important to say that all Modbus commands contain checksum information to allow the recipient to detect transmission errors.

All the other devices are slaves and answer requests and commands.Ī Modbus command contains the Modbus address of the device it is intended for. The Modbus RTU works by RS-485 which is a single cable multi-drop network, only the node assigned as the Master may initiate a command. Each device on a Modbus communication has a unique address.
