Event Handler 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:
-
The event trigger decision is done by the PLC application.
-
The event operation can be done in any suitable none realtime 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()
-
-
After the Start- and ExecuteMethod() operation the output variables are provided to the OPC UA Server.
-
The OPC UA Server sends the Event to the subscribing Client.
-
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.
The OPC UA Client Server connection is a none realtime communication. Thus, the PLC application is not synchronized with the communication. In order not to disturb the PLC realtime task, the Server FB L_IOSP_BaseEventType should be executed in a low prio task without watchdog or free-wheeling task.