Modbus Transactions
Nr | Transaction | Function Code | Description |
|---|---|---|---|
1 | Read Coils | 0x01 | Read from 1 to 2000 contiguous status of coils in a remote device. |
2 | Read Discrete Inputs | 0x02 | Read from 1 to 2000 contiguous status of discrete inputs in a remote device. |
3 | Read Holding Registers | 0x03 | Read the contents of a contiguous block of holding registers in a remote device. |
4 | Read Input Registers | 0x04 | Read from 1 to 125 contiguous input registers in a remote device. |
5 | Write Single Coil | 0x05 | Write a single output to ON or OFF in a remote device. |
6 | Write Single Register | 0x06 | Write a single holding register in a remote device. |
15 | Write Multiple Coils | 0x0F | In a sequence of coils, force each coil to either ON or OFF in a remote device. |
16 | Write Multiple Registers | 0x10 | Write a block of contiguous registers in a remote device. |
22 | Mask Write Register | 0x16 | In a single transaction, modify the contents of a specified holding register using a combination of an AND mask, an OR mask, and the register's current contents. Can be used to set or clear individual bits in the register. |
23 | Read/Write Multiple Registers | 0x17 | Performs a combination of one read operation and one write operation. The write operation is performed before the read. |
Reference: MODBUS Application Protocol Specification V1.1b3, April 26 2012
For more information refer to the Modbus organisation website.