TcModbusSrv
The defined modbus functions are implemented in the PLC library TcModbusSrv.lib.
Modbus TCP function | Function code | PLC block |
---|---|---|
Read Coils | 1 | |
Read Discrete Inputs | 2 | |
Read Registers | 3 | |
Read Input Registers | 4 | |
Write Single Coil | 5 | |
Write Single Register | 6 | |
Write Multiple Coils | 15 | |
Write Multiple Registers | 16 | |
Read/Write Multiple Registers | 23 | |
Diagnostic | 8 |
Modbus UDP function | Function code | PLC block |
---|---|---|
Read Coils | 1 | |
Read Discrete Inputs | 2 | |
Read Registers | 3 | |
Read Input Registers | 4 | |
Write Single Coil | 5 | |
Write Single Register | 6 | |
Write Multiple Coils | 15 | |
Write Multiple Registers | 16 | |
Read/Write Multiple Registers | 23 | |
Diagnostic | 8 |
Further Information
- FB_MBReadCoils (Modbus function 1)
- FB_MBReadInputs (Modbus function 2)
- FB_MBReadRegs (Modbus function 3)
- FB_MBReadInputRegs (Modbus function 4)
- FB_MBWriteSingleCoil (Modbus function 5)
- FB_MBWriteSingleReg (Modbus function 6)
- FB_MBWriteCoils (Modbus function 15)
- FB_MBWriteRegs(Modbus function 16)
- FB_MBReadWriteRegs (Modbus function 23)
- FB_MBDiagnose (Modbus function 8)
- UDP