Modbus RS485/422 und Broadcast

pvs-deck
PowerUser
Avatar
Geschlecht:
Alter: 54
Beiträge: 1344
Dabei seit: 02 / 2009
Betreff:

Modbus RS485/422 und Broadcast

 · 
Gepostet: 25.04.2011 - 15:23 Uhr  ·  #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
Geschlecht:
Herkunft: Belgrade, Serbia
Alter: 54
Homepage: rs.linkedin.com/in…
Beiträge: 653
Dabei seit: 07 / 2002
Betreff:

Re: Modbus RS485/422 und Broadcast

 · 
Gepostet: 26.04.2011 - 10:45 Uhr  ·  #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.
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   47   61 · Page-Gen-Time: 0.029758s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI