Funktion 43-16: Datum und Uhrzeit schreiben
Struktur der Modbus-Nachrichten zum Schreiben von Datum und Uhrzeit
Anfrage
Definition |
Anzahl Bytes |
Wert |
Beispiel |
||
---|---|---|---|---|---|
Servernummer |
1 Byte |
0x2F |
47 |
||
Funktionscode |
1 Byte |
0x2B |
43 |
||
Unterfunktionscode |
1 Byte |
0x10 |
16 |
||
Reserviert |
1 Byte |
0x00 |
Reserviert |
||
Datum und Uhrzeit(1) |
Byte 1 |
Nicht verwendet |
1 Byte |
0x00 |
Nicht verwendet |
Byte 2 |
Jahr |
1 Byte |
0x0A |
Jahr 2010 |
|
Byte 3 |
Monat |
1 Byte |
0x0B |
Monat November |
|
Byte 4 |
Tag des Monats |
1 Byte |
0x02 |
Zweiter Tag des Monats |
|
Byte 5 |
Stunde |
1 Byte |
0x0E |
14 Stunden |
|
Byte 6 |
Minute |
1 Byte |
0x20 |
32 Minuten |
|
Byte 7 und Byte 8 |
Millisekunde |
2 Bytes |
0x0DAC |
3,5 Sekunden |
|
(1) Siehe DATETIME. |
Antwort
Definition |
Anzahl Bytes |
Wert |
Beispiel |
||
---|---|---|---|---|---|
Servernummer |
1 Byte |
0x2F |
47 |
||
Funktionscode |
1 Byte |
0x2B |
43 |
||
Unterfunktionscode |
1 Byte |
0x10 |
15 |
||
Reserviert |
1 Byte |
0x00 |
Reserviert |
||
Datum und Uhrzeit(1) |
Byte 1 |
Nicht verwendet |
1 Byte |
0x00 |
Nicht verwendet |
Byte 2 |
Jahr |
1 Byte |
0x0A |
Jahr 2010 |
|
Byte 3 |
Monat |
1 Byte |
0x0B |
Monat November |
|
Byte 4 |
Tag des Monats |
1 Byte |
0x02 |
Zweiter Tag des Monats |
|
Byte 5 |
Stunde |
1 Byte |
0x0E |
14 Stunden |
|
Byte 6 |
Minute |
1 Byte |
0x20 |
32 Minuten |
|
Byte 7 und Byte 8 |
Millisekunde |
2 Bytes |
0x0DAE |
3,502 Sekunden |
|
(1) Siehe DATETIME. |