Function Code FC23 (Read/Write multiple registers 4×0) in Modbus SLAVE RTU with HMI
This tutorial concerne only the HMI Modbus Slave function FC23 (0x17 in hexa). This is a special function for special cases and experts.
By default, when you Read Input and Output Registers in HMI Modbus register, you need to perform 2 requests using 2 Function codes from the Master
This tutorial proposes to add the FC23 function in order to optimise the response times of the HMI in Modbus slave mode.
Function Code FC23 (Read/Write multiple registers 4×0)
This function performs a combination of a read and write operation in a single request
The function accepte writing of new data to a group registers, and will return the data of a different group
Replace the modbus files in HMI-Tool directory
- Copy these 2 files (modbus_rtu_slave.dll and modbus_rtu_slave.so) into their respective directories where the HMI-Tool software is located (C:\Program Files (x86)\HMITool7.0)
- Load the project and test with your external Master Modbus device!