I'm having the same problem. To my knowledge the response from the modbus slave device is processed by the function get_FC3 which moves them from the au8buffer to au16reg however I am struggling to get data from them. I used a 3rd party program to ensure I am getting the correct query from my arduino and Ive used the same program to send that query to the modbus device and received the expected response. So I know the data is there I am just having some issues displaying them.
The Arduino Serial Monitor shows ASCII data. As you know, the Modbus RTU protocol handles raw binary data. Therefore it only shows ⬜ and wrong symbols instead of the real values.
When I wrote this library, I used third-party simulators either for the Master or for the Slave. I recommend you these:
Modpoll and its slave Variant: http://www.modbusdriver.com/modpoll.html
Post a Comment