6 Programming
6-64
NJ-series CPU Unit Software User’s Manual (W501)
• The data type name and data type size are the same.
• The Retain attribute is set to retain the value of the variable.
Function block instances are added to and displayed in the local variable table as a data type.
A function block instance is treated as a local variable of the program in which the instance is
created. As such, the instance is added to and displayed in the local variable table of the pro-
gram. You cannot treat these instances as global variables.
You can monitor the value of variables from a Watch Tab Page on the Sysmac Studio.
1
Select Watch Tab Page from the View Menu. The Watch Tab Page is displayed.
The Watch Tab Page is displayed.
2
Establish an online connection with the Controller and register the variables in one of the follow-
ing ways.
(1) Enter the variable in the name cell in the Watch Tab Page.
(2) Drag variables to the Watch Tab Page from an editor or variable table.
The present values of the variables are displayed.
Retain attribute
of variable
Type of variable
When a major fault level
Controller error occurs
During online editing
Variable added to a POU
for online editing.
Variable in a POU for
online editing.
Non-retain
User-defined vari-
ables and device vari-
ables
• If initial values are set,
the variables change to
the initial values.
• If initial values are not
set, the variables
change to 16#00.
• If initial values are set,
the variables change to
the initial values.
• If initial values are not
set, the variables
change to 16#00.
No change
CIO and Work mem-
ory areas for CJ-
series Units
16#00 No change
Retain
User-defined vari-
ables and device vari-
ables
No change (retains value
before error).
• If initial values are set,
the variables change to
the initial values.
• If initial values are not
set, the variables
change to 16#00.
Holding, DM, and EM
memory areas for CJ-
series Units
No change
Others
Forced refreshing
status
Cleared. No change
6-3-10 Function Block Instances
6-3-11 Monitoring Variable Values