Herunterladen Inhalt Inhalt Diese Seite drucken

Bosch rexroth IndraWorks 15VRS Anwendungsbeschreibung Seite 348

Feldbusse
Vorschau ausblenden Andere Handbücher für rexroth IndraWorks 15VRS:
Inhaltsverzeichnis

Werbung

336/395
Gebäudeautomatisierung
LastRealValue := BACnet.GetRealFromContents(LastPropertyValue.value);
(* Event found Meldung *)
ELSE
LastRealValue := 0.0;
END_IF
(* event handled *)
BACnetEventCallback := TRUE; // TRUE = no calls of other registered callbacks of this event
ELSE // unexpected EventId
(* not my event *)
BACnetEventCallback := FALSE; // FALSE = call the other registered callbacks of this event
END_IF
(* Note:
prEvtConfCovNotify^.pCBStatus^ := BACnet.CmpBACnet.IEC_BACNET_CB_STATUS.CB_STATUS_DEFAULT
=> default: the stack handles the default actions (and not the hook / callback)
Note:
prEvtConfCovNotify^.pCBStatus^ := BACnet.CmpBACnet.IEC_BACNET_CB_STATUS.CB_STATUS_OK
=> the hook or application generates the reply, see the ((Response-)-'CbCompletion' functions,
which are mentioned in the corresponding event structures,
e.g. see documentation of EVT_BACNET_CONFCOVNOTIFICATION.
*)
PROGRAM COV
VAR
(* Test_00 - Example COV Notification *)
Test_00 : TestState := once;
(* COV Notification *)
StartCOV : BOOL := FALSE;
FB_SendCOVnotification : BACnet.BACnetClientSubscribeCOV;
COVTargetDeviceNumber : DWORD := 0; // DeviceId of the device (BACnet-Server) at the BACnet network
COVObjectType : DINT := 0;
COVObjectInstance : DWORD := 0;
COVSubscribe : BOOL := TRUE;
CovValue : REAL := 0.0; // for analog values, with GetRealFromContent()
COVState : UINT := 0; // at the busy state
(* COV Callback *)
StartCallback : BOOL := FALSE;
FB_CB_Conf_COV_Notification : FB_CB_CONF_COV_NOTIFICATION; // Instance of the Calback-FBs
BACnetStatus : BACnet.CmpBACnet.IEC_BACNET_STATUS;
EventCount : UINT := 0;
(* Timeout Timer *)
Timeout : TON;
tTimeout: TIME := T#1M;
waitTon: Ton;
eventTon:
Ton;
Run_case: INT;
bAgain: BOOL := TRUE;
wfinish: WORD;
END_VAR
IF TRUE = UserVarGlobal.BACnetReady THEN
CASE Test_00 OF
once: // run through only once at the beginning
//---------------------------------------
(* Registering the FB with your own BACnet server *)
FB_SendCOVnotification.RegisterToServer(BACnet_Server);
(* Registering the Callbacks with your own BACnet-Server *)
BACnetStatus := BACnet_Server.RegisterHook(
Bosch Rexroth AG R911393282_Ausgabe 05
5. Erstellen Sie das COV Programm COV:
Programm:
// AI = 0, AO = 1, AV = 2, BI = 3, BO = 4, BV = 5
// Subscribe or Un-Subscribe
//if bAgain = false then reading of the value is stopp
Programm:
IndraWorks 15VRS Feldbusse

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis