Events (UA specific function block)

Mappable events are marked with a "speech bubble"      icon.

This icon is used on the data source side as well as on the OPC UA information model side for events.

In the PLC Application OPC UA events are represented as function blocks. These function blocks are derived from a base function block L_IOSP_BaseEventType provided by the L_IOSP_OpcUaServer library. The base function block supports the generic event handling between OPC UA Server and the PLC application. The derived function block is enhanced by the event fields of the OPC UA event and the operation logic.

The IEC handling variables between the event function block and the OPC UA Server and the event field variables for the BaseEventType are not represented in the data source tree.

Event function block - OPC UA Server interaction

The following figure describes the general usage of the function block inside the PLC application and the interaction with the Lenze OPC UA Server. To connect the function block with the OPC UA Server it is necessary to publish the function block via the symbol configuration and to map it to an OPC UA EventNotifier in the user information model.

It is expected to extend an application specific function block with the L_IOSP_BaseEventType. The application specific function block can then be enhanced with output variables for additional Event properties.

 

Sequence:

  1. The event trigger decision is done by the PLC application.

  2. The event operation (preparing the event properties) can be done in any suitable application specific IEC task. The operation may take several cycles. For the event operation automatically called methods are provided. Not needed methods can be deleted.

    • StartMethod()

    • ExecuteMethod()

    • ResetMethod()

  3. After the Start- and ExecuteMethod() operation the output variables are provided to the OPC UA Server.

  4. The OPC UA Server sends the Event to the subscribing Client.

  5. To signal the application that the Event has been fired, the OPC UA Server sets the corresponding input variable xEventTriggered on true of the function block.