Control Expert uses a multi tasking structure in the PLC. An application may consist of any of the following tasks:
-
Master task
-
Fast task
-
Auxiliary task
-
Event task
The following diagram illustrates the task sequence of multitasking processing with a cyclic master task, a fast task with a 20ms period and event processing:
I:
Acquisition of Inputs
P:
Program processing
O:
Updating of Outputs
The following diagram shows the positioning of the Event tasks in the priority hierarchy of a multitasking structure:
Event processes can either be triggered by the event timer or through an input signal from the HLI module. Within the Event tasks there is again a hierarchy of priorities.
The following diagram shows the positioning of the I/O events in the priority hierarchy of the Event tasks:
Rules for I/O Event Priorities
The following list shows which basic rules apply to Event process priorities.
-
EVT0 event is the highest priority (priority 0). It can itself interrupt other types of events.
-
Only one I/O signal can be attached to EVT0.
-
EVTi has priority 1. It can interrupt TIMERi events.
-
The priority of an input signal attached to a priority 1 event is determined by:
The Input signal with the lowest position number has the highest priority.
The following illustration shows the interdependence between slot/channel number and the priority of an input signal:
Control of Event Processing
The various types of event processing can be globally validated or inhibited by the application program, by using the system bit %S38. If one or more events occur while they are inhibited, the associated processing is lost.
Two elementary functions of the language, MASKEVT() and UNMASKEVT(), used in the application program can also be used to mask or unmask event processing.
If one or more events occur while they are masked, they are stored by the system and the associated processing is carried out after unmasking.