Wie aus Modbus Configuration einen TimeOut erkennen ?

Kayle

Level-1
Beiträge
161
Reaktionspunkte
3
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo zusammen,

ich nutze an einer 750-653 Klemme Modbus RTU. Wie kann ich aus einem Task heraus erkennen ob ein TimeOut ansteht ?

Hier der Programmteil während RUN:

mbcfg.png

Darin erkennt man das aktuell KEIN Time Out ansteht. Ich möchte bei einem Time Out eine Variable hochzählen, weiß nur nicht wie ich den Time Out programmtechnisch erkennen kann. Kann mir hier jemand einen kurzen Hinweis geben ?

Danke im Voraus
Gruß Kay
 
Die Variable MBCFG_ERROR ist vom Typ enumMB_ERROR und kann folgende Werte annehmen:

Code:
    MB_NO_ERROR                    := 16#00,
    MB_NOT_SUPPORTED_FUNCTION    := 16#01, (* this function is not supprted by the master *)
    MB_ILLEGAL_ADDRESS            := 16#02,
    MB_ILLEGAL_DATA                := 16#03,
    MB_EXTENDED_SLAVE_ERROR        := 16#90, (* see the error entry inside modbus response struct *)
    MB_NOT_ALLOWED_BROADCAST    := 16#95, (* this function is not allowed with broadcast address *)
    MB_CRC_ERROR                := 16#96, (* a crc-error is detected by the master *)
    MB_ILLEGAL_NUMBER_OF_POINTS    := 16#97,
    MB_OVERRUN                    := 16#98, (* more characters then expected are received *)
    MB_TIME_OUT                    := 16#99  (* no response from the slave while this time *)



Holger
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Die Variable MBCFG_ERROR ist vom Typ enumMB_ERROR und kann folgende Werte annehmen:

Code:
    MB_NO_ERROR                    := 16#00,
    MB_NOT_SUPPORTED_FUNCTION    := 16#01, (* this function is not supprted by the master *)
    MB_ILLEGAL_ADDRESS            := 16#02,
    MB_ILLEGAL_DATA                := 16#03,
    MB_EXTENDED_SLAVE_ERROR        := 16#90, (* see the error entry inside modbus response struct *)
    MB_NOT_ALLOWED_BROADCAST    := 16#95, (* this function is not allowed with broadcast address *)
    MB_CRC_ERROR                := 16#96, (* a crc-error is detected by the master *)
    MB_ILLEGAL_NUMBER_OF_POINTS    := 16#97,
    MB_OVERRUN                    := 16#98, (* more characters then expected are received *)
    MB_TIME_OUT                    := 16#99  (* no response from the slave while this time *)



Holger
Danke Holger.
 
Zurück
Oben