Modbus-RTU Timout Last unit on Bus

Hello

I have 32 Modbus Slaves on a bus (Slave Addr 1 - 32). A Master Write Multiple Register and Read Inputs from Each Slave continuously.
- Baud 19200.
- Twisted pair cable.
- 100 Ohm Term on each end of the bus.
- 150mm wire between each Slave
- Total bus length = +- 5m
- Read Input (Addr 0 - 40)
- Write Multiple (Addr 0)
- No Stubs on the bus, maybe just the 15mm from connector the RS485 converter on PCB.
- Use SerialTest Async to Sniff the bus.

The bus runs fine and then after about an hour I get a timeout on Slave 32 (The last unit on the Bus).
Below you can see the Timeout error (Master) and the Sniffer on right shows that the Slave did not relpy.

I've swopped this unit (Slave 32) with (Slave 1), then slave 1 give the Timeout.
I've also swopped the slave addresses (32 <--> 1), then slave 1 Time out. This tells me the last location is the problem.

That could this be?

Untitled.png

Marinus
 
You have 33 total devices on your network (32 slaves and 1 master). If all devices are 1 Unit Load devices, you are exceeding the 32 Unit Load limit of RS-485. The RS-485 spec only allows up to 32 Unit Loads. Additionally, a 100 ohm termination puts more load on the bus than the typical 120 ohm termination (although both values are valid as long as they match the characteristic impedance of the cabling used).

  1. Does the issue still occur if you remove the 100 ohm termination on each end of the bus?

  1. Have you checked, and/or replaced, the wiring to the last slave?

  1. Are you using a 3rd wire for 0V reference connected between all devices?

  1. After a request times out to Slave 32, do all additional requests to Slave 32 timeout as well?

  1. Can you duplicate the issue with a different Modbus master, such as one of the following running on a PC with a USB to RS-485 adapter?

ModScan​
Simply Modbus​
Modbus Poll​
 
Hello jschulze

Thank you for replying.


You have 33 total devices on your network (32 slaves and 1 master). If all devices are 1 Unit Load devices, you are exceeding the 32 Unit Load limit of RS-485. The RS-485 spec only allows up to 32 Unit Loads. Additionally, a 100 ohm termination puts more load on the bus than the typical 120 ohm termination (although both values are valid as long as they match the characteristic impedance of the cabling used). (Thanks for noting this, I'm running a test with 17 slaves connected now)

  1. Does the issue still occur if you remove the 100 ohm termination on each end of the bus? (Will Test this soon)

  1. Have you checked, and/or replaced, the wiring to the last slave? (Yes I did)

  1. Are you using a 3rd wire for 0V reference connected between all devices? (No I'm not)

  1. After a request times out to Slave 32, do all additional requests to Slave 32 timeout as well? (No only 32 times out mostly, then 31 on ocations)

  1. Can you duplicate the issue with a different Modbus master, such as one of the following running on a PC with a USB to RS-485 adapter? (I will rerun the test with ModPoll)
 
Follow the advice of Mr. Schulze closely. Normally speaking 32 is the max. limit for driving the bus, so I would make a 2nd trunk or split the 33 modules in 16 and 17 slaves on 2 buses...
Your bus driving electronics must also be able to drive the signals on the bus, that is what is normally limiting the max. nr. of slaves on the bus (at least, electrically). You could consider an extra bus-driver.
See the "Leaflet Promux" of the Promux RS485 IO modules on this page: https://cascade.net/en/modular-plcs/
See chapters 2.3 Network termination and 2.4 RS485 network wiring on pages 11-13 in the Leaflet. They give you advice on the cabling.
I had this problem also one time with custom-cabling of the customer that was not easy replaceable. I solved it by using an extra bidirectional RS-485 bus driver/repeater like the PM485REP in chapter 3.18 page 123 in the same document mentioned above.

Normally speaking 120ohm termination is used, but it depends on your cable.
I don't know what type of cable you use, but the German company Lapp makes excellent 120ohm impedance Modbus RS-485 compliant cable (Unitronic Bus) that can be ordered per meter from Conrad. This way your signals stay integer and since the cable is shielded it prevents problems with external noise coming in.
See: https://www.conrad.com/p/lapp-21702...s-2-x-2-x-022-mm-violet-sold-per-metre-600618
But there are many other companies that deliver Lapp cable, just to give you an idea.
You could also consider/use Canbus cable for Devicenet, that is also 120ohm impedance corrected....

Keep us informed on the developments, we like to help.

Best regards and have a nice weekend.
 
Thank you Partickduis

I reduced the slaves to 17 units.
I'm actually busy developing Modbus Protocol and that's why I do the tests.
So It could be a Code error as well.

I will give more info on Monday.
 
Top