Modbus RS485/422 und Broadcast

pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Modbus RS485/422 und Broadcast

 · 
Posted: 25.04.2011 - 15:23  ·  #1
Hallo Leute,

ich habe mal eine Frage, ich habe gerade eine Inbetriebnahme mit ca. 42x RS485 Slaves an einen Modbus Master. Diese Teilnehmer sind an 8x RS485 und 422 Schnittstellen angeschlossen (Fulldublex (4draht) und Halfdublex (2Draht) ). In meiner alten Software hatte ich mit einer Schleife jeden Teilnehmer nacheinander abgefragt und entsprechend mit Daten versorgt, das lief jetzt ca. 7 Jahre ohne Probleme. Nun hat sich aber die Datenanzahl deutlich erhöht, wenn ich jetzt jeden Teilnehmer einzeln mit Datenversorge dauert es zu lange, bis er wieder am Anfang ist. Da die Slave-Bausteine nicht von mir programmiert sind nun meine Frage, laut Modbus Protokoll ist die Slave-Adresse "0" ja die sogenannte Broadcast-Adresse. Kann ich davon ausgehen, das die Modbusslaves dies als Broadcast immer erkennen und verarbeiten? Oder ist das doch kein Standard?

Wenn ich dieses Broadcast nutzen könnte, könnte ich mit einem Send alle Clients an der Schnittelle aufeinmal mit Daten versorgen!

Gruß
Thorsten
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Modbus RS485/422 und Broadcast

 · 
Posted: 26.04.2011 - 10:45  ·  #2
Hello Thorsten,

As far as I know RS485 standard defines maximum of 32 devices on the same wires. For more you need a repeater. Otherwise you are out of specification scope and risk reliability. It might work in your case (especially if total cable length is much, much less then 1200m), but it is not recommended at all. Online translation was not clear about having everything in one or more segments, so forgive me if I misunderstood your configuration.

If I remember well, I have implemented broadcast in both RTU and ASCII MODBUS slave implementations. The slave simply executes MODBUS valid command but does not reply at all. I will have to check this for confirmation. If you are in a hurry, then you can check it yourself if you send command to change some data in slave with address 0, and then try to read it (use real address instead of 0) and see if it was changed or not. The problem with broadcast is that you can not know if all your slaves were live at the moment of sending the message, accepted the message, and then executed the command from the message. There isn't any confirmation at all. If confirmation is important to you, you will have to implement it on your own, since broadcast confirmation is not supported by the standard. Maybe you can put some autoincrement byte as last one in the long message(s), and then check each slave if they all have correct value of this byte. One long broadcast message and many short individual checks should be considerably shorter then many long individual messages.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 14 · Cache Hits: 14   47   61 · Page-Gen-Time: 0.016059s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI