Hello, I'm trying to implement a ModbusTCP Master with RTU compatibility. I have implemented a TCP Master and also a Serial Master, but I have no documentation on how to implement a RTU Master over TCP connection. Is there any information or example about this code implementation? Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You make the requests "headless". This causes the 6 byte Modbus/TCP header to be ignored and the CRC to be added. The slave will receive the "RTU-formatted" request and respond with a "RTU-formatted" response. The master will then see that the request was headless and interpret the response data as an "RTU-formatted" response message.
All that pretty much happens automatically for you, once you've indicated that the request itself is "headless".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I'm trying to implement a ModbusTCP Master with RTU compatibility. I have implemented a TCP Master and also a Serial Master, but I have no documentation on how to implement a RTU Master over TCP connection. Is there any information or example about this code implementation? Thanks in advance.
You make the requests "headless". This causes the 6 byte Modbus/TCP header to be ignored and the CRC to be added. The slave will receive the "RTU-formatted" request and respond with a "RTU-formatted" response. The master will then see that the request was headless and interpret the response data as an "RTU-formatted" response message.
All that pretty much happens automatically for you, once you've indicated that the request itself is "headless".