![Fuji Electric SPF Series User Manual Download Page 52](http://html1.mh-extra.com/html/fuji-electric/spf-series/spf-series_user-manual_2341814052.webp)
1-43
Section 1 Specifications
1-5-2 Variable declaration
Variables are declared in tabular format as shown below.
* Each column can be hidden if necessary. For details, refer to the user’s manual “SX-Programmer Expert (D300win)
<Reference> (FEH257).”
(1) Usage of variables
Usage
Description
VAR
Declarative statement for local variable
VAR_INPUT
Declarative statement for function / function block input variable
VAR_OUTPUT
Declarative statement for function block output variable
VAR_IN_OUT
Declarative statement for function block input/output variable
VAR_EXTERNAL
Declarative statement for global variable to be used in POU
VAR_GLOBAL
Declarative statement for variables that can be used in whole project (global variable)
<Local variable and global variable>
MICREX-SX series allow the user to split an application program into blocks for individual processing function of a system.
However, considering the modularization of application program, the variables that can be used only in a certain program
(POU) are necessary. On the other hand, in order to Maintain the relationship between programs (POUs), the variables that can
be used in any POU are also necessary.
For MICREX-SX series, the variable that can be used only in one POU is referred to as “local variable”; the variable that can be
used in any POU, as “global variable”. Global variables are declared on the global variable worksheet, and local variables are
declared on the local variable worksheet. To use a global variable in a POU, “VAR_EXTERNAL” is set for variable type to call
the global variable in the local variable worksheet.
Enter the variable name.
Enter the variable comment.
Assign an address to the variable.
To specify the variable as “retain,”
check this box.
Specify the data type.
Specify the type of the variable.
Specify the initial value of the variable.
Local variable
Local variable
Local variable
Global variable