Modbus Card Most Common Function Codes

12 Nov.,2021

In this article, you will understand how Modbus card codes work.

 

Face Recognition Attendance System Supplier

 

In this article, you will understand how Modbus card codes work.

 

â–º 1.  “Read Coils” code

It is used to read from 1 to 2000 contiguous registers for the status of coils in a slave device. The Request PDU specifies the first coil address of the slave’s memory registers, and the number of coils to read from the slave device.

 

â–º 2. “Read Holding Registers” code

It is used to read the contents of a contiguous block of holding registers in a remote slave. The Request PDU specifies the starting register address and the number of registers to read from the slave device.

 

â–º 3. “Read Discrete Input” code

It is used to read from 1 to 2000 contiguous status of discrete outputs in a remote slave. The Request PDU specifies the first input address of the slave’s memory registers, and the number of inputs to read from the slave device.

 

â–º 4. “Write Single Coil” code

It is used to write a single output to either ON or OFF in a remote slave device.

 

â–º 5. “Read Input Registers” code

It is used to read from 1 to 125 contiguous input registers in a remote device. The Request PDU specifies the starting register address and the number of registers.

 

â–º 6. “Write Multiple Coils” code

It is used to force each coil in a sequence of coils to either ON or OFF in a remote slave device. The Request PDU specifies the coils memory address to be forced ON or OFF.

 

â–º 7. “Write Single Register” code

It is used to write a single holding register in a remote slave device. The Request PDU specifies the address of the slave memory register address to be written to.

 

â–º 8. “Write Multiple Registers”

It is used to write a block of contiguous registers from 1 to 123 registers in a remote slave device.

 

We are a Modbus Card supplier, please contact us if you need them.