Chapter 4. CPU module
4 - 16
4) External contact program processing method
The following explains in the case that the task( start -up condition) of a task program has been set to an
external input signal.
(1) Settings that have to be set for the input module
•
A contact of input module can be used as interrupt input.
(2) Settings that have to be set for the task
•
Set the contact No. of input module and priority for the task that will be used as start-up conditions of the
task programs to be executed. Priority will be the task number.
(3) External contact task processing
•
The CPU module checks the occurrence of interrupt input every 1ms and executes the task program
which are designated by the contact at which the signal has been occurred.
(4) Precautions for using an external contact task.
•
While a task program which are designated by an input module having interrupt input, contact is being
executed or ready for its execution, if an execution request of a task program has been occ urred to the
same input contact then 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_BAMP[n]) will be set to ON at its
corresponding location and the occurrence time of the external task whose execution request has been
congested.
•
Execution request for a task program can be accepted only when the operation mode is in the RUN
mode. That is, if the RUN mode has been changed into the PAUSE mode while operating with the RUN
mode and the operation mode has been changed into the RUN mode again, all execution requests
occurred during the operation with the PAUSE mode will be ignored.
5) Internal task program processing method
The following explains the processing method when the task (start-up condition) of a task program has been
set to the contact of direct variable area(I, Q or M) or automatic variable area.
(1) Settings that have to be set for the task.
•
Set the contact No. of input module and priority for the task that will be used as start-up conditions of the
task programs to be executed. Priority will be the task number.
(2) Internal contact task processing
•
After the execution of scan program has been completed in the CPU module, the internal contacts that
are the start-up conditions of the task program will be checked and the internal task programs where
rising edge or on state has been occurred will be executed in accordance with its parameter.
(3) Precautions when using an internal task program.
•
The internal task program is executed when scan program has finished its execution. Therefore, though
the execution condition for the internal task program has been invoked in the scan program or task
program(time driven, external) the task (start-up condition) will not be immediately executed but will be
executed when scan program has finished its execution.