Procedure

The table below summarizes the essential steps for programming event processing.

Step

Action

1

Configuration phase (for events triggered by input/output modules)

In offline mode, from the configuration editor, select Event Processing (EVT) and the event processing number for the channel of the input/output module concerned.

2

Unmasking phase

The task which can be interrupted must in particular:

  • Enable processing of events at system level: set bit %S38 to 1 (default value).

  • Unmask events with the instruction UNMASKEVT (active by default).

  • Unmask the events concerned at channel level (for events triggered by input/output modules) by setting the input/output module's implicit language objects for unmasking of events to 1. By default, the events are masked.

  • Check that the stack of events at system level is not saturated (bit %S39 must be at 0).

3

Event program creation phase

The program must:

  • Determine the origin of the event(s) on the basis of the event status word associated with the input/output module if the module is able to generate several events.

  • Carry out the reflex processing associated with the event. This process must be as short as possible.

  • Write the reflex outputs concerned.

Note: the event status word is automatically reset to zero.

Illustration of Event Unmasking

This figure shows event unmasking in the MAST task.

Illustration of the Contents of Event Processing

This figure shows the possible contents of event processing (bit test and action).