Omron NJ-series User Manual page 136

Machine automation controller cpu unit software
Hide thumbs Also See for NJ-series:
Table of Contents

Advertisement

Execution priority
High
Primary
periodic task
Priority-16
periodic task
Priority-17
periodic task
System
services
Low
Precautions for Correct Use
Precautions for Correct Use
If you have multiple tasks that read and write to the same variables, make sure to use exclusive
control of variables between the tasks. Otherwise, a task other than the one currently in execu-
tion may change the variable values. Refer to 5-2-13 Ensuring Concurrency of Variable Values
between Tasks for details.
Executing Other Tasks during the Unused Time of a Task
A task with a higher execution priority is never interrupted to start execution of a task with a lower exe-
cution priority. However, if unused time occurs during a task with higher priority, that time may be used
to start execution of a task with lower priority. An example of this is the time spent waiting for a data
transfer to be completed in an I/O refresh process. As soon as processing resumes for the task with
higher priority, the task with lower priority will be interrupted. This processing order is illustrated in the
following figure.
Execution
priority
High
Primary
periodic task
Priority-17
periodic task
Low
Precautions for Correct Use
Precautions for Correct Use
Even if unused time occurs in the primary periodic task, the priority-16 periodic task is always
executed after the primary periodic task is completed. This restriction does not apply to the prior-
ity-17 or priority-18 periodic tasks. This restriction also does not apply to I/O refreshing in the pri-
ority-16 periodic task. I/O refreshing for the priority-16 periodic task may be executed during the
unused time of the primary periodic task.
NJ-series CPU Unit Software User's Manual (W501)
Primary period
Primary period
IO UPG
MC
IO UPG
MC
Task execution
Task
Task execution
Task
condition is
execution is
condition is
execution is
met.
completed.
met.
completed.
Pausing
IO UPG
Pausing
Task execution
Task execution
is completed.
condition is met.
Pausing
Task execution
condition is met.
Primary period
IO
MC
UPG
Unused
Interrupted.
UPG
Task execution
condition is met.
The priority-17 periodic task is executed during
the unused time of the primary periodic task.
Primary period
Primary period
IO UPG
MC
IO UPG
MC
Task execution
Task
Task execution
condition is
execution is
condition is
execution is
met.
completed.
met.
completed.
Task period
UPG
Task period
UPG
Pausing
UPG
Pausing
Task execution
IO
UPG
Task period
UPG
Task execution
is completed.
5 Designing Tasks
Primary period
IO UPG
MC
Task execution
Task
Task
condition is
execution is
met.
completed.
Pausing
Pausing
IO UPG
Task execution
condition is met.
is completed.
SS
MC
5
5-9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents