Modbus Function Code Support
Function Code | Register Type |
1 | Read Coil |
2 | Read Discrete Input |
3 | Read Holding Registers |
4 | Read Input Registers |
5 | Write Single Coil |
16 | Write Multiple Holding Registers |
B4R:
' initial Paramter
Modbus.Initial(5,6,2,9600)
' Set Registers
Modbus.CO(0) = True ' Coil Register 00000
Modbus.DI(0) = True ' Discrete Input 10001
Modbus.IR(0) = 25 ' Input Register 30001
Modbus.HR(0) = 50 ' Holding Register 40001
Modbus.HR(7) = 100 ' Holding Register 40008
You can use Radzio! Modbus Master Simulator
Attachments
Last edited: