Full-Duplex Modbus/RTU

L

Thread Starter

Lynn Linse

We have a large customer using Modicon PLC (Modbus/RTU slaves) who wants to use the XMIT block to send Master-like writes when an alarm condition exists (ie: to implement Report-By-Exception). The Modicon PLC handles this
situation and interleaves the new "Master Request" between the "Slave Response". We need to do the same.

So my question is - do other people deal with this full-duplex Mas/Slv behavior? If so I'd like to accommodate the widest range of future
customers.

The algorithm I planned to use is:

1) Force customer to define one 8- bit "MY_SLAVE_ADDR" for this unit.

2) Understand that no multi-drop is EVER supported

3) If MB message received from slave:
IF( Msg_Addr == MY_SLAVE_ADDR) then assume this is a Slave Response to a previous request
IF( Msg_Addr <> MY_SLAVE_ADDR) then assume this is a new Master Request

4) If we have MB message to send to slave:
IF( Msg_Addr == MY_SLAVE_ADDR) then assume this is a new Master Request we are sending
IF( Msg_Addr <> MY_SLAVE_ADDR) then assume this is an old Slave Response to a previous slave Request

Understanding the roll as "request" or "response" is critical to us as our firmware needs to parse & calculate the expected length of the message to
optimize performance. Assuming a "half-duplex" behavior, we also need to manage the 2 "sessions" at the same time - meaning 1 request can be pending at the slave, plus the slave can have 1 request out-standing with us.

This is of course a "user selected option", so no one is forced to change to a full-duplex Modbus.

regards

Lynn August Linse, Senior Product Application Engineer
15353 Barranca Parkway, Lantronix Inc, Irvine CA 92618
[email protected] www.lantronix.com
Tel: (949)300-6337 Fax: (949)453-7132
 
Top