-> Hier kostenlos registrieren
Hallo,
habe eine Wetterstation mir von Elsner RS485 besorgt und einen RS485 CP von Siemens.
Nur leider weiß ich nicht, wie ich den einbinden kann in Simatic.
Hier mal das Protokoll:
Gruß babylon05
habe eine Wetterstation mir von Elsner RS485 besorgt und einen RS485 CP von Siemens.
Nur leider weiß ich nicht, wie ich den einbinden kann in Simatic.
Hier mal das Protokoll:
Code:
Alle verwendeten Zeichen bzw. Zahlen beruhen auf der ASCII-Norm, d. h. dass jeder Messwert, der intern als Integer oder Float-Wert verarbeitet wird, immer in seine einzelnen Zeichen im ASCII-Format zerlegt und übertragen wird. Diese müssen dann vom Empfänger im umgekehrten Prozess wieder zusammengesetzt werden. Die Prüfsumme wird durch Addition aller empfangenen Bytes bis Byte 35 vom Empfänger mitgerechnet und dann mit der von der P02 übertragenen Prüfsumme verglichen.
[TABLE="width: 86%"]
[TR]
Byte-Nr. Beschreibung Anmerkung [/TR]
[TR]
[TD="width: 50"]1[/TD]
[TD]'[B]W[/B]' - Start[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]2[/TD]
[TD]Außentemperatur Vorzeichen '[B]-[/B]' oder '[B]+[/B]'[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]3[/TD]
[TD]Außentemperatur 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]4[/TD]
[TD]Außentemperatur 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]5[/TD]
[TD]Außentemperatur Punkt '[B].[/B]'[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]6[/TD]
[TD]Außentemperatur 3. Zahl (Zehntel)[/TD]
[TD="width: 521"]Der aus Byte 2 bis 6 zusammengesetzte Float/Real-Wert entspricht der Aussentemperatur in Grad Celsius ([URL="http://infosys.beckhoff.com/content/1031/tcsample_elsnerp02p03/html/TcSample_ConvCelsiusToFahrenheit.htm"]°C[/URL]). [/TD]
[/TR]
[TR]
[TD="width: 50"]7[/TD]
[TD]Helligkeit Süd 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]8[/TD]
[TD]Helligkeit Süd 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]9[/TD]
[TD]Helligkeit West 1. Zahl (Zehner)[/TD]
[TD="width: 521"]Da die P03/[B]1[/B]-RS485 nur einen Helligkeitssensor verwendet, wird hier in dem Fall der gleiche Wert eingesetzt wie im Byte 7. [/TD]
[/TR]
[TR]
[TD="width: 50"]10[/TD]
[TD]Helligkeit West 2. Zahl (Einer)[/TD]
[TD="width: 521"]Da die P03/[B]1[/B]-RS485 nur einen Helligkeitssensor verwendet, wird hier in dem Fall der gleiche Wert eingesetzt wie im Byte 8. [/TD]
[/TR]
[TR]
[TD="width: 50"]11[/TD]
[TD]Helligkeit Ost 1. Zahl (Zehner)[/TD]
[TD="width: 521"]Da die P03/[B]1[/B]-RS485 nur einen Helligkeitssensor verwendet, wird hier in dem Fall der gleiche Wert eingesetzt wie im Byte 7. [/TD]
[/TR]
[TR]
[TD="width: 50"]12[/TD]
[TD]Helligkeit Ost 2. Zahl (Einer)[/TD]
[TD="width: 521"]Da die P03/[B]1[/B]-RS485 nur einen Helligkeitssensor verwendet, wird hier in dem Fall der gleiche Wert eingesetzt wie im Byte 8. [/TD]
[/TR]
[TR]
[TD="width: 50"]13[/TD]
[TD]Dämmerung: '[B]J[/B]' = Ja; '[B]N[/B]' = Nein[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]14[/TD]
[TD]Tageslicht 1. Zahl (Hunderter)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]15[/TD]
[TD]Tageslicht 2. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]16[/TD]
[TD]Tageslicht 3. Zahl (Einer)[/TD]
[TD="width: 521"]Der aus Byte 14 bis 16 zusammengesetzte Wert entspricht der aktuellen Helligkeit in Lux.[/TD]
[/TR]
[TR]
[TD="width: 50"]17[/TD]
[TD]Windgeschwindigkeit 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]18[/TD]
[TD]Windgeschwindigkeit 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]19[/TD]
[TD]Windgeschwindigkeit Punkt '[B].[/B]'[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]20[/TD]
[TD]Windgeschwindigkeit 3. Zahl (Zehntel)[/TD]
[TD="width: 521"]Der aus Byte 17 bis 20 zusammengesetzte Float/Real-Wert entspricht der Windgeschwindigkeit in [I]m/s[/I]. Eine Bestimmung der Windstärke kann anhand der [URL="http://infosys.beckhoff.com/content/1031/tcsample_elsnerp02p03/html/BeaufortScale.htm"]Beaufortskala[/URL] erfolgen.[/TD]
[/TR]
[TR]
[TD="width: 50"]21[/TD]
[TD]Regen: '[B]J[/B]' = Ja; '[B]N[/B]' = Nein[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]22[/TD]
[TD]Wochentag: [B]1[/B] = Montag, [B]7[/B] = Sonntag, '[B]?[/B]' = nicht definiert[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]23[/TD]
[TD]Datum Tag 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]24[/TD]
[TD]Datum Tag 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]25[/TD]
[TD]Datum Monat 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]26[/TD]
[TD]Datum Monat 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]27[/TD]
[TD]Datum Jahr 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]28[/TD]
[TD]Datum Jahr 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]29[/TD]
[TD]Uhrzeit Stunde 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]30[/TD]
[TD]Uhrzeit Stunde 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]31[/TD]
[TD]Uhrzeit Minute 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]32[/TD]
[TD]Uhrzeit Minute 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]33[/TD]
[TD]Uhrzeit Sekunde 1. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]34[/TD]
[TD]Uhrzeit Sekunde 2. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]35[/TD]
[TD]Sommerzeit: '[B]J[/B]' = Sommerzeit, '[B]N[/B]' = Winterzeit, '[B]?[/B]' = nicht definiert[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]36[/TD]
[TD]Prüfsumme 1. Zahl (Einer)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]37[/TD]
[TD]Prüfsumme 2. Zahl (Zehner)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]38[/TD]
[TD]Prüfsumme 3. Zahl (Hunderter)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]39[/TD]
[TD]Prüfsumme 4. Zahl (Tausender)[/TD]
[TD="width: 521"] [/TD]
[/TR]
[TR]
[TD="width: 50"]40[/TD]
[TD]Endkennung [B]0x03[/B][/TD]
[TD="width: 521"] [/TD]
[/TR]
[/TABLE]
Gruß babylon05