6-27
6 Programming
NJ-series CPU Unit Software User’s Manual (W501)
6-3 Variables
6
6-3-1 Variables
6-3 Variables
In the NJ-series System, variables are used to exchange I/O information with external devices, to per-
form data calculations, and to perform other processes. This section describes variable designations in
detail.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for details on setting variables
with the Sysmac Studio.
Variables store I/O data for exchange with external devices or temporary data that is used for internal
POU processing. In other words, a variable is a container for data with a name, data type, and other
attributes.
You do not need to assign a memory address to a variable. However, you can assign a specific memory
address if necessary (see note). The NJ-series CPU Unit automatically allocates memory addresses in
the memory area for variables.
Note This is done to use specific functions for some CJ-series Special Units. You must specify the CJ-series Unit
memory address in the AT Specification attribute of the variable. Refer to AT Specification on page 6-55 for
details.
Variables are broadly classified into the following three types.
User-defined Variables
The user defines all of the attributes of a user-defined variable. The rest of this section describes
user-defined variables.
Semi-user-defined Variables
These variables are used to access specific devices and data. There are two types of semi-user-
defined variables: device variables and cam data variables. Refer to 2-3-1 Types of Variables and 3-
3-1 I/O Ports for details on device variables.
System-defined Variables
System-defined variables are provided in advance in an NJ-series CPU Unit. The names and all
attributes are defined by the system. They have specific functions. System-defined variables are
supplied for each function module. Refer to A-3 System-defined Variables for details.
Refer to 2-3-1 Types of Variables for details on the different types of variables.
6-3-1 Variables
6-3-2 Types of Variables