(supplement) Each task class corresponds to the macro-program of the Macro
Executor as follows.
Macro Executor C Executor
-----------------------+---------------------------
Conversational Macro Main task
Auxiliary Macro Alarm task , Communication task
Execution Macro none
5.1.2 Difference of each task class
The auxiliary task is limited in available functions compared to the main
task.
Main task Alarm task Communication task
-----------------------+---------------+---------------+-------------------
Standard functions x x x
Key input x - -
Character display x - -
Graphic display x - -
File I/O x x(*1) x(*1)
CNC/PMC window function x x(*2) -
Reader/Punch Interface x x(*3) x(*3)
x : can be used - : cannot be used
(*1) A file cannot be accessed simultaneously by more than two tasks.
File accesses arbitration should be considered by application
program.
(*2) Simultaneous access with main task will cause busy error.
(*3) Accesses to the I/O port should be arbitrated by application
program.
5.1.3 Task switching
Task switching between the main task and the auxiliary task is executed by
calling task management library functions in the application program. To run
the auxiliary task periodically, the period is also specified by the
application program.
The priority of the task class is as follows.
task class priority
-----------------------+-----------
Main task low
Communication task mid
Alarm task high
Auxiliary tasks are executed by interrupting the main task.
Task switching from the auxiliary task to the task of lower priority is
accomplished by calling functions which wait for certain events to happen.
There are following functions which are used for this purpose.