5 Designing Tasks
5-40
NJ-series CPU Unit Software User’s Manual (W501)
The tasks that execute variable access from outside the Controller during the system common process-
ing 2 are predetermined as follows according to the variable types.
To access variables from outside the Controller during the system common processing 2, it is neces-
sary to make the following two settings on the Sysmac Studio.
• Settings for exclusive control of variables in tasks (when the target variables are the global variables)
• Settings for Variable Access Time
If global variables are accessed from outside the Controller during the system common processing 2 of
the task, it is necessary to make setting for exclusive control of variables in tasks. The Exclusive Control
of Variables in Tasks refers to the function that specifies the task that can refresh the target global vari-
able. This function prevents the target variable from being updated by other tasks or by other methods
to access variables from outside the Controller.
For the details on the exclusive control of variables in tasks, refer to Settings for Exclusive Control of
Variables in Tasks on page 4-9.
When you use EtherNet/IP tag data links, always specify the same task as the refreshing task for
all tags (variables that have Network Publish attribute) in the same tag set. Otherwise, multiple
tags in a tag set may be refreshed in separate task periods.
When variable access from outside the Controller is executed during the system common processing 2
of the task, the task execution time may be longer. The user must set the upper limit of the processing
time for accessing variables on the Sysmac Studio. The Variable Access Time refers to the upper limit
of the processing time for accessing variables.
Calculating Variable Access Time
Use the following equation for calculating the variable access time.
Variable access time [µs] = total size of variables [bytes] * a + number of variables * b + number of
accesses * c + d
Tasks that Execute Variable Access during the System Common
Processing 2
Variable Tasks that refresh values
Global variables specified in the settings for
exclusive control of variables in tasks
The refreshing task specified in Settings for Exclusive
Control of Variable in Tasks under Configurations and
Setup
Task Settings on the Sysmac Studio.
Device variables for EtherCAT slaves Tasks specified in I/O Control Task Settings in Task Settings
under Configurations and Setup on the Sysmac Studio.
Device variables for CJ-series Basic I/O Units
Device variables for CJ-series Special Units Primary periodic task
Variables with AT specifications in memory used
for CJ-series Units
Settings for Executing Variable Access during the System Common
Processing 2
Settings for Exclusive Control of Variables in Tasks
Settings for Variable Access Time