Herunterladen Inhalt Inhalt Diese Seite drucken

Bosch rexroth IndraWorks 15VRS Anwendungsbeschreibung Seite 347

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

Werbung

IndraWorks 15VRS Feldbusse
(* This method gets called, whenever a event occurs for which the implementing
FB is registered via |BACnetServer.RegisterHook| or
|BACnetServer.RegisterCallback|. Since several FBs implementing IBACnetEventConsumer
can be registered for one event or callback the
following rules are used for the returned BOOL:
If the method returns FALSE, all other registered IBACnetEventConsumer objects for
the specified Hook/Callback are further called.
If the method return TRUE, the other registeres IBACnetEventConsumer objects are not
called anymore. The calling order is as
the objects were registered. All calls have to treat on their own, whether the
EventIds are correct (see CmpBACnet.EVENTIDS) and/or
BACnet-Object-IDs or other additional data fits the needs of the registered FB
(i.e. the specific BACnet-Object-FB).*)
METHOD BACnetEventCallback : BOOL
VAR_INPUT
// If only one event is possibly called, the following Ids can be ignored. If there are more
// at least the EventId should be checked, to get the right type of pParameter.
// ID of the occured Event. Contains the class and the event (see CmpBACnet.EVENTIDS)
EventId
: DWORD;
// Id of the parameter structure (see pParameter and CmpBACnet.EVENTIDS)
usParamId
: WORD;
// Version of the parameter structure (see pParameter and CmpBACnet.EVENTIDS)
usVersion
: WORD;
// Pointer to the event specific parameter, that is specified by Id
// (see CmpBACnet.EVENTIDS and CmpBACnet, i.e. EVT_BACNET_ACKALARM)
pParameter
: POINTER TO BYTE;
END_VAR
// METHOD BACnetEventCallback
// NOTE: no breakpoint possible, because this event callback is called from the
// BACstack task, which is not an IEC task!
(* Check Event *)
IF( EventId
= BACnet.CmpBACnet.EVT_ConfCOVNotification AND
usParamId = BACnet.CmpBACnet.EVTPARAMID_CmpBACnet_ConfCOVNotification
) THEN
LastEvtValid := TRUE;
EvtCnt := EvtCnt + 1;
(* set event parameter *)
prEvtConfCovNotify
LastCovNotifyInfo
LastPropertyValue
// Note: the buffer in 'LastPropertyContents' is stack internal,
// that means you have to copy the value here in the callback!
(* analog object COV notificatin *)
IF( LastCovNotifyInfo.monitoredObjectID.typ = BACnet.CmpBACnet.OBJ_ANALOG_INPUT OR
LastCovNotifyInfo.monitoredObjectID.typ = BACnet.CmpBACnet.OBJ_ANALOG_OUTPUT OR
LastCovNotifyInfo.monitoredObjectID.typ = BACnet.CmpBACnet.OBJ_ANALOG_VALUE
) THEN
Programm:
(* Reset Event-Count*)
IF(TRUE = ResetOutputs
EvtCnt := 0;
LastEvtValid := FALSE;
ELSE
ResetOutputs_old := ResetOutputs;
END_IF
4. Fügen Sie die Callback Methode BACnetEventCallback zum Funk‐
tionsbaustein FB_CB_CONF_COV_NOTIFICATION hinzu:
Programm:
Programm:
:= pParameter;
:= prEvtConfCovNotify^.pServiceInfo^;
:= LastCovNotifyInfo.listOfValues^;
Gebäudeautomatisierung
AND
FALSE = ResetOutputs_old) THEN
R911393282_Ausgabe 05 Bosch Rexroth AG
335/395

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis