Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 1040 -
3. Task execution rule
High-Level Task is called after CNC task in the periodical interrupt
procedure at 8msec intervals.
<---- 8msec ---> <---- 8msec ---> <---- 8msec --->
|----------------|----------------|----------------|
|--->|==>| |--->|==>| |--->|==>|
(A) (B)
(A) CNC task
(B) C-EXE High-Level Task
High-Level Task (B) is surely called once at each 8 msec. But execution
intervals are not always exact 8 msec.
(T1) <---- 8msec ---> <---- 8msec ---> <---- 8msec ---> <---- 8msec --->
|----------------|----------------|----------------|----------------|
|--->|==>| |----->|==>| |--->|==>| |--->|==>|
(T2) |<---- 9msec ----->|<--- 7msec -->|<---- 8msec --->|
T1 Interval of interrupt procedure ( == 8 msec )
T2 Interval of High-Level Task ( != 8 msec )
The timing of calling High-Level Task changes according to execution time of
CNC task (A) as mentioned above. Generally, each tasks on CNC system, such
as CNC, PMC, Servo, etc., run synchronously by hand-shaking each other.
Therefore, nothing must be considered about relationship to the other tasks
even if the execution intervals change.
Total processing time of above-mentioned (B) is limited up to 1 msec for
each interruption. When the task attempts to run over 1 msec, the execution
is forcedly interrupted by timer interruption. The interrupted task will
restart its execution from the interrupted instruction in the next timer
interruption procedure.
<---- 8msec ---> <---- 8msec ---> <---- 8msec --->
|----------------|----------------|----------------|
|--->|===>| |--->|=>| |--->|==>|
(B) ^ ^ (B')
INTERRUPTED RESTART
|<------------ 16msec ----------->| (actual interval)
In this case, a series of process is divided into multiple parts that are
executed on separate interruptions. Therefore, it makes actual interval of
the task longer than 8 msec. To avoid this, it is recommended to keep
reserve of execution time for High-Level Task, not to reach the upper limit
1 msec. Concretely, keep actual max. execution time of High-Level task
up to approximately 0.8 msec. C Executor management procedure takes approx.
0.03 msec for calling High-Level task. This time is included in the
execution time of High-Level task.