Herunterladen Inhalt Inhalt Diese Seite drucken
Inhaltsverzeichnis

Werbung

5.3.1.6 Force Single Coil (Funktionscode 0x05):
Mit Hilfe dieser Funktion wird ein einzelnes Ausgangsbit geschrieben. Diese Funktion
kann auch als Broadcast verschickt werden, dann wird dasselbe Bit in allen Slaves
gesetzt. Beim Koppler/Controller ist die Anzahl der E/A-Punkte auf 256 begrenzt.
Anfrage:
Der gewünschte ON- oder OFF-Zustand wird als Konstante im Datenfeld der Anfrage
spezifiziert. Ein Wert von 0xFF00 setzt das Ausgangsbit auf 1, ein Wert von 0x00 auf 0.
Andere Werte sind nicht spezifiziert und haben keine Auswirkung auf den Zustand der
Ausgänge. In diesem Beispiel wird das Bit 0 in Slave 11 auf 1 gesetzt:
Feldname
Start of frame
Slave address
Function code
Coil address high
Coil address low
Force data high
Force data low
Error Check (LRC / CRC)
End of frame
Tabelle 5.38: Beispiel Anfrage, Force Single Coil
Antwort:
Die Antwort ist ein Echo der Anfrage. Sie wird zurückgegeben, wenn das Bit gesetzt
wurde.
Feldname
Start of frame
Slave address
Function code
Coil address high
Coil address low
Force data high
Force data low
Error Check (LRC / CRC)
End of frame
Tabelle 5.39: Beispiel Antwort, Force Single Coil
MODBUS / Konfiguration
01.10.99
Beispiel
RTU
-
t1-t2-t3
0x0B
0x0B
0x05
0x05
0x00
0x00
0x00
0x00
0xFF
0xFF
0x00
0x00
-
0x8C
0x90
t1-t2-t3
Beispiel
RTU
-
t1-t2-t3
0x0B
0x0B
0x05
0x05
0x00
0x00
0x00
0x00
0xFF
0xFF
0x00
0x00
-
0x8C
0x90
t1-t2-t3
61
ASCII
":"
0x3a
"0B"
0x30, 0x42
"05"
0x30, 0x35
"00"
0x30, 0x30
"00"
0x30, 0x30
"FF"
0x46, 0x46
"00"
0x30, 0x30
"F1"
0x46, 0x31
-
0xD, 0xA
ASCII
":"
0x3a
"0B"
0x30, 0x42
"05"
0x30, 0x35
"00"
0x30, 0x30
"00"
0x30, 0x30
"FF"
0x46, 0x46
"00"
0x30, 0x30
"F1"
0x46, 0x31
-
0xD, 0xA

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis