Chapter 4. CPU module
4 - 17
•
If execution of an internal task program is requested, the execution conditions will be checked when scan
program has finished its execution. Therefore, if an internal task execution conditions, during ‘one’ scan,
has been occurred and disappeared (if the specified contact has been turned from OFF to ON, and then
from ON to OFF) by scan program or (time driven or external) task program the task will not be executed
as the execution condition can not be detected at the time that execution conditions are being checked.
6) Task processing at momentary power failure
•
In case of the power failure of 20 ms or less, the ready tasks before the power failure will be executed, a
time driven task will be invoked with calculation of the power failure time, and time driven tasks invoked
repeatedly before the power failure will be ignored.
7) Examination on task program
After writing down a task program, be sure to examine the following items.
(1) Task setting has been correctly done?
If tasks are invoked more frequently than necessary or several tasks are invoked simultaneously within one
scan, the scan time become longer and irregular. In case that the task setting cannot be changed, check
the maximum scan time.
(2) Task priorities are properly arranged?
The lower priority tasks still may not be processed after its time due to delay by higher priority tasks. In
some cases, if the prior tasks have been delayed and next task occurs task collision can occur. Set the
priority with due consideration of items such as urgency and execution time of a task.
(3) Task programs are written as shortly as possible?
If execution time of a task program is long, the scan time may become longer and irregular and also
collision of task programs may occur. Therefore, write task programs as shortly as possible.
(4) Protection of lower priority programs against higher priority program isn’t needed during execution of those
programs.
If the priority of a task program (or a scan program) has been set to lower priority and other tasks must not
interrupt during its execution, use the function ‘DI’ and ‘EI’ to protect the program partly. When processing
global variables used commonly in other programs, special modules or communications modules, problems
can occur.
REMARK
1) For examination on processing speed of scan program and task program, refer to the ‘Scan time
Calculation Example in the Section 4.2.3 ‘Scan Time’.