Modbus Communication Problems


Thread Starter

Jeremi Lussier

Ok this is my first post so if im off etiquette let me know....

I'm trying to setup communication between a

Telemecanique TWDLCAE40DRF plc
using a rs485 3 terminal port
with this port setup as a slave
talking modbus.

Other Modbus device

Delta Controls Bacnet router (DSM-RTR-MOD30),

Im using Twidosuite as my programming software. The port is set to slave. In <b>describe</b>, I added a generic modbus device and linked that device to my 485 port.

Now my transmission settings (baud rate, etc..) are the same as the other tech's settings in the bacnet controller. His controller is set to master for his port. His port is showing lights on the TX blinking when sending requests but his RX light is solid. I disconnect the Rx wire and his light stays on. Don't know if this is a problem.

2 wire cable connecting both are connected positive to positive and (-) to (-).

We cant get them to talk to each other. He's getting invalid signals on his end in his network traffic statistics.

Has anyone succesfully configured the two systems to talk?
Should I get my hands on a serial to ethernet converter and see if I can get my ethernet port to talk to his 485?

Any help would be appreciated

What are the "invalid signals on his end" that the master is providing?

The failure to communicate can be physical link related or protocol related.

Some things to look for on the physical link side:

Go get B&B's RS-485 trouble shooting guide here:

1) There is no standard for labeling the A/B or +/- lines for two wire, half duplex RS-485, so sometimes wiring is not + to +, (-) to (-).

The first thing to try is to swap wires on one side, the connection is
+ to (-)
(-) to +

and try again. Swapping +/(-) can not damage the drivers, and sometimes that's the problem.

2) Although it's called 2 wire RS-485, a ground reference is needed. See B&B's RS-485 guide for discussion:

3) sometimes the lines need to be held at a biased voltage level. See page 17-19 (pdf) of B&B RS-485 Technical Reference Guide for biasing

4) Although the Modbus protocol states that "no parity" shall have 2 stop bits, some device drivers can't handle 2 stop bits, period. The work around is to use even or odd parity with a single stop bit. Parity setting has to match on each side.

5) Is your baud rate too fast for the conditions? Start at a slow baud rate (which is more likely to work over any distance) to establish communications, then speed up to see if the physical link can tolerate it.

6) Are you using twisted pair, shielded cable?

7) Most suppliers recommend 120 ohm termination resistors. Sometimes the termination resistors make it worse, depending on conditions. Try with and without.

8) The documentation for the master should state what the Rx indicator status should do under what conditions. "Should" . . . . Yeah, right . . .

On the protocol side:

1) The devices were powered cycled after serial port setting changes to ensure that the changes were recognized?

2) What is your slave address set up as? Which address is the master addressing?

3) Which command are you using to address which register ? Using a command the slave doesn't recognize will generate an error message. Addressing a non-existent register will generate an error message.

Wassim Daoud

This is easily done with OPC. OPC bridges your data sources to deliver your data. All you need to do is install the following:

1-OPC Server for Modbus to take care of the communication to your Telemecanique PLC. Here is the download link for it:

2-OPC Server for BACnet to take care of the communication to your BACnet devices and objects. Here is the download link for it:

3-OPC Data Manager to link both OPC Servers together. Here is the download link for it:

After that, you are ready to get your data trouble free. If you need to brush up on your OPC knowledge, if recommend giving those materials a brief look:

Let me know if you need any help

Wassim Daoud
Global Solutions Architect
Are you suggesting that he add a PC to the system just to communicate between a PLC and the BACnet router? Isn't that a bit of an overkill?

Patrick Lansdorf

Hi there,

We, HMS, have a customer in Brazil (Jonny Doin) who wrote us the following about RS485:

(I can only agree with him and sorry for the lengthy post...:)).

The main electrical standard we use to communicate with our mainstream weight indicators is RS-485, multidrop with Modbus-RTU or peer-to-peer with other nonstandard protocols. Grounding issues on the RS-485 links are by far the largest single cause of field failures in these industrial instrumentation equipment. There is a small number of typical problem scenarios on those installations, listed below with differing approaches to fix them.

A) One of the worst situations, surprisingly one of the most frequent also, is the use of RS-485 as a "two-wire" bus. This is the case when the '485 cable has actually only 2 conductors, for the "A" (+) and "B" (-) differential lines, with no reference ground wire. We found that it's a very strong popular mith that RS-485 is a 2-wire electrical standard, and in fact you can actually find RS-485 serial adapters that simply don't have the signal ground terminal at all (!).

What is particularly wrong with these installations is that the network actually works fine in most of them. We have time and again got the "but it always worked" comment from customers upon a catastrophic crash and burn situation on these cases.

These "2 wire" networks do work most of the time because they actually have a phantom "third connection", shared by all the network nodes, as the protective grounding of each instrument. Typically all nodes are close enough to share the same protective ground point (less than 300m), and the differing ground levels are close enough electrically (under 5V of gradient) to be absorbed by the common-mode range of the line drivers, so the network drivers can drive and extract differential digital data bits to/from the bus.

However, the AC path of the ground returns for the real circuit formed by all the chassis grounding poses a number of threats to the whole network.

First of all, the effective circuit forms a potentially very large transformer winding, where the data cable and ground returns form the 2 wires of a large transformer. Factory floor equipment like motors, induction furnaces, high-power thyristor inverters can induce field currents capable of forcing a few amps of current spikes on the cables. Those transients generally travel through the instruments circuit boards, disturbing and potentially causing the failure of unrelated circuits, besides burning the '485 line drivers, through excessive clamping currents through the front-end "ESD diodes".
Secondly, the small ground voltage gradient can pose the line drivers in a permanent common-mode voltage stress, placing some nodes at a near-failure operation point. ESD energy and transients that would normally be absorbed by the drivers protection network can cause chip failure, due to pre-biased ESD diodes and reduced voltage margins.
Third, this stress certainly causes reduced RFI immunity, and data error can be much more frequent.

This is the scenario where a PC is connected to the network via a usb-to-485 adapter with only 2 terminals, or with the ground connection ignored. The PC can suffer severe electrical damage to the motherboard due to the failure mode exemplified above.

B) Another failure scenario is when the network spans through 2 different ground domains, for example when the cable ends are driven by equipment that feed on AC power from 2 different power distribution substations. Although the 2 buildings may be very close (300m to 500m), the substations can be several kilometers apart, and the low-impedance ground returns may be several volts apart. Generally, this leads to quick catastrophic failure of one or both line ends of the cable, due to the large ground currents, regardless of the network having good 3-wire cabling for all nodes.

In this scenario, a complete galvanic isolation of the drivers may be needed, and is clearly the ideal situation. However, galvanically isolated nodes absolutely need 3-wire cables, due to their lack of local ground reference. When a 2-wire connection is used with isolated nodes, one of the data lines end up being "used" by the circuit to establish the reference voltage, reducing the digital noise margins of the connection. In that case, the circuit may not work at all, or may have reduced ESD margins and higher data errors.

We have successfully installed systems under this scenario by following a simple procedure: all the nodes located in one ground domain were left "floating" regarding the local ground, and a separate high-quality (thick stranded) ground connection was wired along the '485 cable, and all nodes on the network were chassis-grounded by this wire. All AC/DC power supplies were standard isolated supplies, and no connection from primary to secondary were allowed, even and especially the protective ground connection. That way, the 10V or so ground difference was elliminated, and all nodes were referred to a common ground, allowing the '485 drivers to work with the largest common-mode margins possible.

Of course, that installation scenario only works if all nodes have no electrical connection with grounded equipment at the "floated" factory, which is the case in a large number of industrial automation instruments, that are only connected via the network cable. (have in mind that the eventual sensors must also float).

C) The third most-often found scenario is where the network wiring, by its sheer size, acts as a very effective electromagnetic antenna to VLF electrical fields and intense RFI energy, that is coupled to the data lines and ultimately result in electrical spikes seen by the drivers as high-energy transient voltage pulses. Some installations are prone to this kind of high-energy noise, for example steel laminating and induction furnaces, where the electrical fields are capable of inducing complete burnout of entire circuit boards.

The three scenarios above call for a comprehensive approach at protection of RS-485 lines:
a) customer education and good installation practices;

b) analysis of the actual operating conditions and the grounding ecosystem, to avoid destructive ground loops. Isolation is a good solution, but it is not the only one;

c) circuit design practices to integrate strong RFI blocking and transient protection to survive frequent severe ESD and harsh EM environments.

We have found, after some design generations that a very simple circuit is very effective at providing both strong RFI and conducted noise spikes to the RS-485 front-end. The circuit that we use today at our non-isolated RS-485 line drivers is simplicity in itself, constituted of 2 circuit elements:

1) a hefty bi-directional TVS diode, like the SMA6J5.0CA Transil series from ST, placed very close to the entrance terminal of the '485 line, shunting each line to a local GND plane, that returns via a very low impedance (1 square) to the cable GND point of the '485 terminal block. This local ground plane is connected to the main circuit ground plane via a 20mils thin connection, geometrically distant from the TVS-GND-terminal circuit. The thin gnd track is to provide good DC reference but poor AC coupling of fast transient energy. The pcb layout is very important to provide a good separation of the RF and wavefront clamped energy from the "internal" digital ground, to reduce ground-plane coupled noise during transients.

2) the other circuit protection element is a RFI absorber from Murata, like the BLM18HG601, which is a multiphase ceramics' device that shows frequency-dependent nonlinear impedance, with a high insertion loss at high frequencies (600ohms at 1GHz, 100miliohms at DC). These BLMs are placed in series with the data line, just after the blocking TVS. The BLMs disperse RFI and reduce switching noise by displacing the high-frequency energy over the spectrum, causing steep rising edges to show a slower slope, but redistributing the energy as a soft overshoot, reducing the emission of the pulse as irradiated electromagnetic field energy. That is the difference of the BLMs over traditional ferrites and inductive elements: a series inductor or blocking choke will take energy from the fast rising edges and transform it into a electromagnetic field with high efficiency, thus actually irradiating RFI to the nearby circuits. Although the conducted signal is "less noisy", it can actually couple RFI and cause crosstalk to adjacent pcb tracks and other inductors, wheras the BLMs will spread the pulse energy into lower frequencies, including infrared (heat).

You will notice the reduced headroom imposed by the SMA6J5.0CA (5.8V of working voltage) voltage rating. Yes, this reduces the RS-485 common-mode voltage to ±5.5V, instead of the +12V/-7V allowed for the electrical standard. However, this allows us to use a very compact, one-element clamper, and will work in any well installed RS-485 environment, where the typical common mode voltages is ±2V, anyway.

We have had so far a very good field mark for this approach, noticeably reducing failures caused by line transients, and withstanding operation on sites known by the harsh EM environment.

Patrick Lansdorf
HMS support