5 Designing Tasks
5-6
NJ-series CPU Unit Software User’s Manual (W501)
All programs must be assigned to one of the tasks. Use the guidelines in the following table to deter-
mine which tasks to assign your programs to based on the requirements of the programs.
The specifications of tasks are given in the following table.
*1 There can be no more than one task with each of the following execution priorities: 16, 17, and 18.
*2 There can be up to 32 tasks with each of the following priorities as long as there are no more than a total of 32
tasks with these priorities: 8 and 48.
*3 With the NJ301-, you can use this setting with unit version 1.03 or later.
Valid Task Periods for Periodic Tasks
* With the NJ301-, you can use this setting with unit version 1.03 or later.
Guidelines for Separating Tasks
Task Programs that are suitable for this task
Primary periodic task • Programs that require I/O refreshing at an exact execution period.
• Programs that require the highest execution priority.
• Programs that include motion control processing.
Priority-16 periodic task • Programs that require I/O refreshing.
• Programs with a relatively low execution priority that must be executed
periodically.
• Programs that contain motion controls with a relatively low execution pri-
ority.
Priority-17 or priority-18 periodic
task
• Programs with a relatively low execution priority that must be executed
periodically.
Event Task • Programs that are executed only when specified conditions are met.
5-2-2 Specifications of Tasks
Item Specification
Type of task • Primary periodic task
• Periodic task (priority 16, 17, or 18)
• Event task (priority 8 or 48)
Numbers of tasks • Primary periodic task: 1
• Periodic tasks: 0 to 3 tasks
*1
• Event tasks: 0 to 32 tasks
*2
Number of programs per
task
128 max.
Task period of the primary
periodic task
500 s
*3
, 1 ms, 2 ms, or 4 ms
Task periods of periodic
tasks
Set the task period of each periodic task to an integer multiple of the task period of
the primary periodic task. Refer to the table of valid task periods for periodic tasks
that is given below.
Task period of the primary periodic task Task periods that you can set for periodic tasks
500 µs* 1 ms, 2 ms, 3 ms, 4 ms, 5 ms, 8 ms, 10 ms, 15 ms, 20 ms, 25 ms,
30 ms, 40 ms, 50 ms, 60 ms, 75 ms, or 100 ms
1 ms 1 ms, 2 ms, 3 ms, 4 ms, 5 ms, 8 ms, 10 ms, 15 ms, 20 ms, 25 ms,
30 ms, 40 ms, 50 ms, 60 ms, 75 ms, or 100 ms
2 ms 2 ms, 4 ms, 8 ms, 10 ms, 20 ms, 30 ms, 40 ms, 50 ms, 60 ms, or
100 ms
4 ms 4 ms, 8 ms, 20 ms, 40 ms, 60 ms, or 100 ms