RS485 multi slave full duplex

Thread Starter

Deepti Salunke

Joined Dec 29, 2017
2
Hi all,
I am trying to use Modbus RS 485 in full duplex, multi-slave configuration.
My configuration is as attached to the image below. where Rt= 120 ohm and Rb= 1.2k. I am using ADM2490 as a RS485 transceiver.

When I connect master and any one of the slaves alone, everything works fine.
But when I connect two slaves at a time, the master could send the queries to both slaves, one at a time, but only one slave responds to the query and another's response is lost.

Am I going wrong anywhere?
 

Attachments

Papabravo

Joined Feb 24, 2006
21,159
Hi all,
I am trying to use Modbus RS 485 in full duplex, multi-slave configuration.
My configuration is as attached to the image below. where Rt= 120 ohm and Rb= 1.2k. I am using ADM2490 as a RS485 transceiver.

When I connect master and any one of the slaves alone, everything works fine.
But when I connect two slaves at a time, the master could send the queries to both slaves, one at a time, but only one slave responds to the query and another's response is lost.

Am I going wrong anywhere?
In a master/slave arrangement you need to establish a protocol for slave devices to respond in a way that does not allow two simultaneous transmissions.
 

Thread Starter

Deepti Salunke

Joined Dec 29, 2017
2
In a master/slave arrangement you need to establish a protocol for slave devices to respond in a way that does not allow two simultaneous transmissions.
Thank you for the response.
Will you elaborate this? I am using Modbus protocol. Are you suggesting to change the way it works?
 

Papabravo

Joined Feb 24, 2006
21,159
No, I'm sure Modbus has already addressed this issue. I'm not clear on what expectations you might have in your implementation. Clearly you can do point-to-point data exchanges with one master and one slave device. When you add a second slave device you need to distinguish between the point-to-point exchanges with one or more slave devices and a broadcast message which might trigger responses from multiple devices. In the later case there needs to be a rule to mediate when the slave devices have the right to talk.
 

John P

Joined Oct 14, 2008
2,025
If two slaves are talking at once, the result would normally be a garbled message that wouldn't make sense. But if the slaves are both talking, and they say the same thing at the same time, you'll never know. Could that be happening?

It really is best in a setup like this to send data in packets of some defined type, where each slave will include its own identity in the packet. That way you can be sure you know who's talking. Also, have the packet include a checksum or CRC to verify the packet's integrity. And of course, make sure that there's some protocol that makes sure only one of them is transmitting.

It's a nice idea, if possible, to add an LED in parallel with the transmit-enable line on your transceivers. So if it blinks, you know that unit has made a transmission. That's assuming the transmit time is long enough for the LED to be visible.
 

Picbuster

Joined Dec 2, 2013
1,047
In a normal case the master will address a slave and ask for data or send it.
If no response the master will take the next one and will place the 'no answering slave' in a slow poll list.
This will avoid that all units are talking at the same time and allow the master to make a list of connected devices.


Picbuster
 
Top