Modbus RTU and Ethernet


Thread Starter


question question. How to construct a modbus rtu message ready to be sent over the Ethernet.
The problem is I know it consist of a slave address, a function code, starting address, registers to be read and followed by the CRC, a eight byte message.
The problem is when i connect to the ip address over the port I specified, it sends the bytes but the network echoes back my query.
i.e.using function code 4, I generate a 8 byte message consisting of 0A 04 00 00 0A 71 76 and it over, it replies back the same bytes to me.
i would appreciate if you could help as I am having a big headache over this asap.

Thanks in advance

Frank Prendergast

Dear Casey,
Your answer is found on "":
In our Beginners corner click on Modbus TCP.

Modbus TCP ( Modbus over Ethernet) specification and source code examples are included.

Best regards,
Frank Prendergast
Systems and Programs Manager
Schneider Automation
Check out "": or

You didn't say what you are connecting to, but MOST Modbus+Ethernet based products expect Modbus/TCP - not Modbus/RTU. The spec for this is linked into the site.

Try sending: 11 22 00 00 00 06 0A 04 00 00 00 0A instead and see if you get an answer. The spec will tell you more, but there is a 3-word header here and no CRC.

Best Regards

Lynn August Linse, Senior IA Application Engineer
15353 Barranca Parkway, Lantronix Inc, Irvine CA 92618
[email protected]
Tel: (949)300-6337 Fax: (949)453-7152