OK.
Isn't the format for function 4 the same as for function 3? The only difference is the id (3 or 4) for the call?
Modbus Read Holding Registers (03)
Modbus Read Holding Registers, function code 03, reads between 1 and 125 holding registers from the PLC.
The request PDU consists of 5 bytes:
Offset |
Length |
Description |
Values |
0 |
Byte |
Function Code |
03 |
2 |
Word |
First input address |
0000h - FFFFh |
4 |
Word |
Register count |
0001 - 007Dh |
Modbus Read Input Registers, function code 04, reads between 1 and 125 input registers from the PLC.
The request PDU consists of 5 bytes:
Offset |
Length |
Description |
Values |
0 |
Byte |
Function Code |
04 |
2 |
Word |
First input address |
0000h - FFFFh |
4 |
Word |
Register count |
0001 - 007Dh |
Thus support should be extremely trivial to add? Especially since I expect that the code simply checks against the request function 3, 6 and 16 when choosing what action to take.