Modbus Multidrop

R

Thread Starter

RavinderK

Hello,

I am trying to communicate modbus rtu in multi drop environment.

I am using 1 master and 2 slave (address 1 and 2).

Now the problem i am facing is at slave side.
on each slave, i can get wrong frame in two ways.

1. A request (for slave 1) send by the master to slave 1 but this will also get received by slave 2. (and of course slave 2 have to ignore).

2. response of slave 1 (to master) is get received by slave 2 too.

I can handle the first case, but in second case it seems quite impossible because from structure of wrong frame is different when it comes from master or another slave.

Any suggestion.
 
I do not understand.

Each slave is only allowed to answer to a request with slave_adr == the slave_adr that has been set within the slave.

All other traffic must be ignored by a slave.
The other slaves read the bytes on the wire but ignore them.
 
L

Lynn August Linse

Normally you create a simple state-machine.

The slave notices an idle gap on the serial line. This resets the state-machine to idle.

The first byte it receives defines the 'slave address', which puts the slave into 1 of 2 states:
- state "for_me" which is entered when the slave address is equal to mine.
- state "not_mine" which is entered when the slave address is not equal to mine.

You exit the state when a new idle gap is detected.
 
S
What "situations like this"? He didn't tell us anything he was doing that was different from a normal multidrop Modbus serial application.

Are you saying we've just been imagining all these years that we could simply run one set of wires to all the slaves in parallel and actually talk to them with no problem?
 
Top