Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 795 -
3. Synchronizing tasks ( Event flag)
Event flag is used to synchronize execution of tasks. The event flags
relating to the specific operation are grouped and it forms an event group.
(For example, consider a case that a task detects a signal and notifies that
to other tasks.) Maximum 32 flags can be grouped for an event group.
Execution of tasks can be suspended until the state of an event group matches
a specific data pattern.
MSB LSB
31 0
+---------------+---------------+---------------+---------------+
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+---------------+---------------+---------------+---------------+
| |
| +-> flag 1
| :
| :
| :
+---------------------------------------------------------------> flag 32
Event group
~~~~~~~~~~~
A signal can wake all of the suspended tasks of which the triggering condition
is satisfied.
+--------------------------+
+----------------> | event flag |
| +--------------------------+
signal | waiting for event |
| +---------------+-------------------+
| | | |
+---------+ +---------+ +---------+ +---------+
| TASK A | | TASK B | | TASK C | | TASK D |
+---------+ +---------+ +---------+ +---------+