Chapter 4. CPU module
4 - 15
(4) Relationship of task program to initialization or scan program
•
User defined tasks will not start while the initialization task program is being executed.
•
As scan program has the lowest priority, if a task is invoked the scan program will be stopped and the
task programs will be processed prior to them. Therefore, if tasks are invoked many times or
concentrated sometimes the scan time may be extended abnormally. Be cautious when setting task
conditions.
(5) Protection of the programs under execution from task programs
•
If problems can be occur in case that program lose its execution continuousness by the task programs
which have higher proprieties, the execution of task programs can be partly perverted For program
protection, use the DI function(Task program start-up disable) or EI function(task program start-up
enable)
3) Time driven task program processing method
The followings explain the processing method of a task program when its task condition(start-up condition) has
been set to be driven by time.
(1) Settings that have to be set for the task
•
Set the task execution cycle and its priority which are used as start-up conditions for the task programs to
be executed. Priority number will be assigned as task number automatically.
(2) Time driven task processing
•
The corresponding time driven interrupt task program will be executed every setting time internal
(execution cycle).
(3) Precautions for using the time driven task program
•
While a time driven task program is being executed or ready for its execution, if a same priority task
program has been invoked to be executed the newly invoked task will be ignored, the representative task
collision warning flag (_TASK_ERR) will be set to ON, the detailed system error flag(_TC_BMAP[n] will be
set to ON at its corresponding location and occurrence time of the time driven tasks whose execution
requests have been ignored will be written at its corresponding location of the flag _TC_CNT[n].
•
The timer that invokes the execution request for time driven task programs will be incremented only when
the operation mode is in the RUN mode
If the RUN mode has been changed into the PAUSE mode while operating with the RUN mode, and then
the operation mode has been changed again into the RUN mode, the operation time spent with the
PAUSE mode will be ignored.
•
When setting the execution cycle for a time driven task program, be cautious that execution requests for
many time driven task programs can occur. If four time driven task programs of cycle 2, 4, 10 and 20sec
are used, four execution requests will occur every 20 sec and scan time can be momentarily extended.