1
\$\begingroup\$

I am designing a convertor board that will interface three device with Modbus RTU RS232 port to a Modbus RTU RS485 network. enter image description here Slaves supports Modbus RTU, but their ports is different from master port.

The ARM processor is intended to handle the communications of master RTU with different devices in the different addresses. I konw the packet structure in the Modbus RTU protocol is as follows: enter image description here The question is: After receiving master packet and finding out the destination device (by reading slave ID byte), what should i send to the Device? Should i send the same packet that i received from master ? does it need to manipulate something (slave ID,...) within packet?

Thanks in advance

Best Regards

\$\endgroup\$
5
  • \$\begingroup\$ The "Slave ID" is meant for multi-drop/multi-device networks (like RS485). RS232 devices will probably ignore this field (unless the slave ID is 255). You should probably pass the packet through unmodified. \$\endgroup\$
    – Ron Beyer
    Nov 7, 2019 at 16:45
  • \$\begingroup\$ Do you have any document about this? \$\endgroup\$
    – Alihaji
    Nov 7, 2019 at 16:50
  • \$\begingroup\$ Have you read the Modbus spec? The "Slave ID" doesn't have any meaning to a single-node network device (other than the broadcast ID). \$\endgroup\$
    – Ron Beyer
    Nov 7, 2019 at 16:53
  • \$\begingroup\$ Yes, I read a lot, but i could't find . there are two possibility: 1- RS232 RTU Device simply ignore slave ID 2- Master Sends special character for slave ID over its RS232 RTU port. \$\endgroup\$
    – Alihaji
    Nov 7, 2019 at 17:03
  • \$\begingroup\$ I'm with Ron, most likely you should just pass the query along unmodified. Obviously, this will work or not depending on what is written on the firmware of the device, so what devices in particular are you talking about seem to be a critical piece of information if you expect somebody to give you an answer which is not pure guesswork. \$\endgroup\$
    – Marcos G.
    Nov 19, 2019 at 7:03

1 Answer 1

1
\$\begingroup\$

After implementing the whole system and some try and error, i figured out that we must pass the packet through unmodified. RS232 RTU device will ignore the Slave ID filed in the packet.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.