5-39
5 Designing Tasks
NJ-series CPU Unit Software User’s Manual (W501)
5-2 Task System
5
5-2-14 Variable Access from Outside the Controller
A variable access from outside the Controller is executed during the system service. The system
service is executed in an unused time between tasks. This means, if multiple variables are accessed
from outside the Controller, refreshing all variable values may not be completed in a task period. If
refreshed variables and not-refreshed variables are mixed in the user program, the Controller may
perform unintended operation.
To avoid this, make the variable access from outside the Controller be executed during the system
common processing 2 of the task. By making this, multiple variable values can be securely
refreshed in the same task period.
This section particularly describes how to execute the variable access from outside the Controller dur-
ing the system common processing 2 of the task.
There are the following four methods to access variables from outside the Controller.
• Sysmac Studio
• NS-series PT
• EtherNet/IP tag data links
• CIP communications instruction from the host computer
If the Sysmac Studio is used to access variables, it can only refresh the variable values during the sys-
tem common processing 2 of the task. Values are accessed during the system services.
5-2-14 Variable Access from Outside the Controller
Methods to Access Variables From Outside the Controller
Primary period
Variable access 1 from
outside the Controller
The access to multiple variables may not be
completed in the same task period.
Variable access 2 from
outside the Controller
Accessing variables from outside the Controller during the system service
Primary period
MC IO UPG
SS
Primary
periodic task
System
services
Pausing
System common
processing 1
System common
processing 2
MC IO UPG
SS
Variable access 1 from
outside the Controller
The access to multiple variables is securely executed in the
same task period.
Variable access 2 from
outside the Controller
Accessing variables from outside the Controller during the system common processing 2
MC IO UPG
SS
Primary
periodic task
System
services
MC IO UPG
SS
System common
processing 1
System common
processing 2
Primary period Primary period
Pausing