System Events

Instead of a “task” also a “system event” can be used to call a POU of your project. The available system events are target specific (definition in target file). The list of the standard events of the target may be extended by customer specific events. Possible events are for instance: Stop, Start, Online Change.

The assignment of system events to POUs is also done in the Task configuration editor. Use the dialog ‘Events’, which will be opened as soon as the entry ” System-events” is selected in the task configuration tree:

../_images/004c6fca4375a0a50a33139006eab46b

Each event is represented in a line: Name and Description are displayed as defined in the target file, in the column called POU you can enter the name of the project POU which should be called and processed as soon as the event occurs.

For this use the input assistant (<F2>) or enter manually the name of an already existing POU (e.g. “PLC_PRG” or “PRG.ACT1”), or insert a name for a not yet existing POU.

In order to get a new POU (function) created in the project, press button Create POU. Hereupon the POU will be inserted in the Object Organizer. The input and output parameters which are required by the event will automatically be defined in the declaration part of the POU. Below the assignment table the currently selected event is displayed in a picture, showing the required parameters.

If you actually want the POU to be called by the event, activate the entry in the assignment table.

Activating/deactivating is done by a mouseclick on the control box.