
5.1.5 Task Management
Kind of tasks
(1) CNC task
* CNC interruption tasks
Automatic or manual operation, servo control, spindle control,
I/O transfer of PMC and execution of the ladder, MDI control,
program editing, etc. are realized by these tasks. They are triggered
by the timer interruptions and run periodically. There are actually
multiple tasks which are waked by the timer interruptions.
They are assumed to be single task for simplification in the
following explanation.
* CNC display task
Displaying of the CNC screen, background editing, CNC window
processing, etc. are realized by this task. This task is executed
in the idle CPU time which is not used by the CNC interruption tasks.
(2) User task
* Main task
Almost all processing of the user application, such as displaying
of the user screen, are executed in this task. The TASK1 is the main
task.
* Background tasks
These tasks are usually waked by various events and they are
executed independently of the main task. The TASK2 (the communication
task) and the TASK3 (the alarm task) are background tasks. These
tasks execute the processing about the related events, then suspend
execution to wait for the next event again, and give the CPU to the
main task.
Both the main task and the background tasks are executed in the
idle CPU time which is not used by the CNC interruption tasks.