Basic Operation Of Tasks - Omron NJ-series User Manual

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

Advertisement

5-2-3

Basic Operation of Tasks

The CPU Unit cannot execute more than one task at the same time. The order in which tasks are exe-
cuted depends on the execution priority that is set for each task.
Task Execution Priority
The type of the task determines its execution priority. If the execution condition is met for another task,
Tb, that has a higher execution priority while task Ta execution is in progress, execution of Ta will be
interrupted to allow execution of Tb. Processing for Ta will resume when processing for Tb is completed.
The execution priority for each task type is given in the following table. The smaller the value of the exe-
cution priority, the higher the priority.
Task
Primary periodic task
Periodic task
Event task
High
Execution priority
(0 to 63)
Low
Task Periods for the Primary Periodic Task and Periodic Tasks
The CPU Unit repeatedly and cyclically executes the primary periodic task and periodic tasks. The task
periods for periodic tasks must be assigned as integer multiples of the task period of the primary peri-
odic task (called the primary period). Therefore, execution of both tasks will be start at the same time
every few cycles.
For example, if the primary period is set to 1 ms and the task period of the priority-16 periodic task is set
to 4 ms, the execution timing of the primary periodic task and the priority-16 periodic task is
synchronized after each four executions of the primary periodic task.
NJ-series CPU Unit Software User's Manual (W501)
Execution pri-
ority
4
---
16, 17, or 18
You cannot set the same execution priority for more than one task.
8 or 48
You can set the same execution priority for more than one event
task. Refer to 5-2-5 Event Task Execution Timing for the order of
execution.
Primary
4
periodic task
Event tasks
8
Periodic task
16
17
Periodic task
18
Periodic task
Event tasks
48
Tasks with the same execution priority
Numbers of tasks
1
0 to 32
0 or 1
A total of up to 32
tasks for both
priority levels.
0 or 1
0 or 1
0 to 32
5 Designing Tasks
5-7
5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents