6 Programming
Variable Designations for Function Blocks
Value is
assigned
Input parameters
The specifications for variables in function blocks are given below.
Variables
Input varia-
bles
Output varia-
bles
Internal vari-
ables
*1.
The individual restrictions are listed in the above table. The actual upper limits depend on the overall pro-
gram capacity and internal memory capacity.
Refer to 6-2-4 Attributes of Variables on page 6 - 13 for details on the variable attributes that can be
set for each type of variable.
Function Block Definitions and Instances
A function block consists of a "function block definition" that is made in advance and "instances" that
are used in the actual programs.
All instances of a function block are based on the "function block definition".
A "function block definition" consists of an algorithm and a local variable table.
6 - 8
Instance name
Function block definition name or
instruction name
Input
Internal
variable
variables
*1
Number
1 to 64
Input variables are used as input arguments within the function block. They
cannot be changed inside the function block.
•
When the function block is executed, the input variables are set to the values
of the input parameters.
•
You can specify either constants or variables for input parameters.
•
Omitting Input Parameters:
Refer to the NX-series Safety Control Unit Instructions Reference Manual
(Cat. No. Z931).
1 to 64
Output variables are used as output arguments from the function block.
•
The output parameters are set to the values of the output variables at the
end of execution.
•
You cannot specify a constant for an output parameter. Only variables may
be specified.
•
You can omit output parameter connections. If you omit an output parameter,
the value of the output variable is not assigned to any parameter.
•
Omitting Output Parameters:
Refer to the NX-series Safety Control Unit Instructions Reference Manual
(Cat. No. Z931).
•
You can access the values from outside of the function block. Access these
values with the following format: InstanceName.OutputVariableName. How-
ever, you cannot write values directly to an output variable.
No limit
Internal variables are used for temporary storage within a function block.
•
The values of internal variables are retained regardless of whether the func-
tion block is executed.
•
The values cannot be referenced from outside of the function block.
Value is
assigned
Output
Output parameters
variable
Specification
NX-series Safety Control Unit User's Manual (Z930)