Tuesday, 13 March 2012

Modbus on RS485 Advice #9



Advice #9



What can go wrong with 485?

Let's say you adopted all the best practices for installation of the network but you get intermittent or unacceptable performance because of packet loss, noise, collisions … Then you should consider hiring an expert to resolve your problems because now you are in the ‘Art’ part of RS485. These are some of the things they will look at.


  • Reflections.
Without a scope and expertise you won't know this is a factor. It is easy and cheap to eliminate. Look at the cable spec. Find the nominal impedance. Buy two resistors of the same value. At each end of the trunk install the resistors between the Tx and Rx terminals. If you don’t have obvious ends of the trunk (because you created a star) then we recommend re-cabling to form a linear trunk or we wish you luck.


Some devices have terminating resistors built into them. If the vendor did a poor job, the default is to have the resistor active and they must be disabled unless they are the terminating devices on the network. Read vendor doc.


  • Biasing, Idle State Biasing, Fail Safe Biasing, Anti Aliasing


There are a whole string of terms uses as synonyms to describe this phenomenon.
To use two wires ( as opposed to full duplex 4 wire) for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. Releasing the line means allowing it to ‘float’. It must not be allowed to float at any voltage level so devices have pull up/down resistors to pull the line to an allowable ‘floating’ voltage. (the floating state is also known as the tri-state. ) The load presented by other devices on the network affects this floating so the resistor values may need to be changed depending on the number of devices installed and the values of the pull up/down resistors they are using. (You can imagine how tricky it is going to be to resolve this). If a device floats out of the specified range then to other devices it will look like the floating devices isn’t floating at all. The other devices will think that it is transmitting or receiving and thus blocking the line.



The simplest way of knowing if this is a factor – Does the device work properly when it is the only device on the network ?. When you install it in the full network other devices or this device stops working properly. This device and/or the pull up/down resistors of other devices are candidates for investigation.
A number of vendors have a range of pull up/down resistors installed and allow you to change the selection using software or jumpers.



  • Line Drive On / Off


To use two wires for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. When a device wants to send it must grab the line. When it has finished sending it must release the line. You can see there are potential problems here. What happens if one device waits too long after sending its last bit before releasing the line – its possible that the other devices will miss some bits of data.


Advice # 10

No comments:

Post a Comment