Event example

Add a new POU for the event

Add a new POU for the event operation which extends the L_IOSP_BaseEventType.

Ein Bild, das Text, Screenshot, Software, Computersymbol enth-lt.

Automatisch generierte Beschreibung

Define the additional event properties

Define the additional needed event properties as output variables.

Add super^(); to the implementation to invoke the base function block during operation.

Ein Bild, das Text, Screenshot, Software, Computersymbol enth-lt.

Automatisch generierte Beschreibung

Delete optional operation sub-methods

The Start- and ResetEvent() are optional. They can be deleted if they are not needed. They can be added again with the command "Implements interfaces...".

Ein Bild, das Text, Software, Computersymbol, Webseite enth-lt.

Automatisch generierte Beschreibung

Implement the event operation

Implement the event operation in the ExecuteEvent() and other optional operation methods.

Finalize the cyclically called methods with xComplete := TRUE;

Ein Bild, das Text, Screenshot, Software, Computersymbol enth-lt.

Automatisch generierte Beschreibung

Instantiate and call event function block in a task.

The created event function block must be instantiated and called in an IEC task suitable for the PLC application.

Publish event for OPC UA access via symbol configuration

The created instance of the event function block must be published for OPC UA access via the symbol configuration. After the selection of the instance a "generate code" of the PLC application is necessary.

Create and map an OPC UA EventNotifier with the Mapping Editor

Add an OPC UA user information model below the OPC UA Server device. Create an OPC UA EventNotifier with matching event properties in the user information model with the Mapping Editor. Map the previously created event function block (published via the symbol configuration) to the OPC UA EventNotifier.

For further information how to use the Mapping Editor see the corresponding documentation. Mapping Editor

Ein Bild, das Text, Screenshot, Software, Computersymbol enth-lt.

Automatisch generierte Beschreibung

Go online and subscribe to the OPC UA Event

Download the PLC application (including the OPC UA user information model and the mapping to the PLC) on the controller device.

Start the PLC application.

Afterwards the user information model is accessible by an OPC UA Client (e. g. UA Expert) and it is possible to subscribe to the event.

If the PLC application fires the event with xExecute = TRUE, it will be sent in a notification to the subscribing client.

Ein Bild, das Text, Screenshot, Software, Computersymbol enth-lt.

Automatisch generierte Beschreibung