Local Variables
A local variable can be read and written only inside the POU (program or function block) in which it is
defined.
“Local variables” is the generic term for internal variables, input variables, output variables, and exter-
nal variables.
l
Internal Variables
An internal variable can be used only within one POU.
An internal variable is declared in the local variable table of the POU.
You cannot access the values of internal variables from outside of the POU.
Y
ou can declare an internal variable with the same name in different POUs. In this case, memory is
allocated separately for each variable.
l
Input Variables
When a POU is called, the values of the input parameters are assigned to the input variables from
the calling POU. An input variable is declared in the local variable table of the POU.
l
Output Variables
Before processing a POU is completed, the output parameters returned to the calling POU are as-
signed to the output variables. An output variable is declared in the local variable table of the POU.
l
External Variables
External variables are used to access global variables from a POU.
Global Variables
A global variable is declared in the global variable table.
Device variables that are automatically created from the Slave Terminal configuration are automatical-
ly registered as global variables.
6-2-4
Attributes of Variables
You can set the following attributes for variables.
Variable Attributes According to Variable Type
l
Attributes of Variables
Attribute Description Specification Default
Variable Name The variable name is used to identify
the variable.
UTF-8 format
127 bytes max.
Name
Data Type The data type defines the format of
the data that is stored in the variable.
--- BOOL
6 Programming
6 - 13
NX-series Safety Control Unit User's Manual (Z930)
6-2 Variables
6
6-2-4 Attributes of Variables