7.24 UA_EventItemAdd

FB-Name UA_EventItemAdd
This Function Block is used to add handles for events.
VAR_INPUT
BExecuteBOOLFB performs its task on rising edge on this input.
BSubscriptionHdlDWORDSubscription handle.
BNodeHdlDWORDHandle of the node to monitor for emitted events. Events are only produced by the node classes Object and View. Whether a node is actually producing events or not may be determined by its EventNotifier attribute.
BEventTypeUANodeIDType of the event to monitor. The EventType will be included as OfType operator in the Where Clause of the event monitored item filter.
BEventFieldSelectionCountUINTNumber of elements in EventFieldSelections
BEventFieldSelectionsARRAY OF
UARelativePath

Array of UARelativePath for the event fields to select. The path starts from the event type node. The FieldSelection is used as Select Clause of the event monitored item filter.

Examples are

0: Message selects the Message event field

0: ActiveState/0: Id selects the Boolean representation of the Alarm ActiveState.

Length is vendor-specific (MAX_EVENT_FIELD_SELECTIONS). See Constants of Array Lengths
Hint: MaxSize is initialized by a predefined fixed size

BTimeoutTIMETime to response.
VAR_OUTPUT
BDoneBOOLFB has completed its task.
BBusyBOOLThe FB is not finished and new output values are to be expected.
BErrorBOOLSignals that an error has occurred within the FB.
BErrorIDDWORDError code
BEventItemHdlDWORDEvent Item Handle. The handle can be used to process the published events with UA_EventItemOperate and remove them from the subscription with UA_EventItemRemove.
VAR_IN_OUT
BEventFieldsARRAY OF
Vendor specific
Vendor specific list of variables used to receive the events field data for one event occurrence. Vendor specific.
BEventProcessedBOOLIndicates that the values of the event item have been changed.
BRemainingEventCountUINTNumber of remaining events available for processing
BFieldErrorIDs

ARRAY OF

DWORD

Contains an error code for each valid element of the EventFieldSelection array.

Length is vendor-specific (MAX_EVENT_FIELD_SELECTIONS). See Constants of Array Lengths – including the “Overflow bit” indication.

Notes: -
UA_EventItemAdd
BOOLExecuteDoneBOOL
DWORDSubscriptionHdlBusyBOOL
ARRAY OF DWORDNodeHdlErrorBOOL
ARRAY OF UANodeIdEventTypeErrorIDDWORD
UINTEventFieldSelectionCountEventItemHdlDWORD
ARRAY OF UARelativePathEventFieldSelection
TIMETimeout
ARRAY OF Vendor specificEventFieldsEventFieldsARRAY OF Vendor specific
BOOLEventProcessedEventProcessedBOOL
UINTRemainingEventCountRemainingEventCountUINT
ARRAY OF DWORDFieldErrorIDsFieldErrorIDsARRAY OF DWORD