Function Block Specifications
Note
P_On
FB
EN
ENO
D0
PV
CV
The value of the parameter specified as the input (value of D0)
is passed to the instance's input variable (PV).
Example
10.0
ADD_INT_DINT
0.0
EN
ENO
D100
D1000
IN16
OUT32
D200
IN32
IN16 is an INT variable, so the content of D100 is used.
IN32 is a DINT variable, so the content of D200 and
D201 is used.
1. The same name cannot be assigned to an input variable and output vari-
able. If it is necessary to receive a value from an external variable, change
the variable inside the function block, and then return the result to the ex-
ternal variable, use an input-output variable.
2. When the instance is executed, input values are passed from parameters
to input variables before the algorithm is processed. Consequently, values
cannot be read from parameters to input variables within the algorithm. If
it is necessary to read a value within the execution cycle of the algorithm,
do not pass the value from a parameter. Assign the value to an internal
variable and use an AT setting (specified addresses). Alternatively, refer-
ence the global symbol as external variables.
Initial Value
Initial values can be set for input variables, but the value of the input parame-
ter will be enabled (the input parameter value will be set when the parameter
for input variable EN goes ON and the instance is executed).
Note The input parameter setting cannot be omitted when using the CX-
Programmer.
EN (Enable) Variable
When an input variable is created, the default input variable is the EN variable.
The instance will be executed when the parameter for input variable EN is ON.
■ Output Variables
Output variables pass return values from the instance to external applications.
The output variables are displayed on the right side of the instance.
After the instance is executed, the value of the output variable is passed to the
specified parameter.
1.0
D100
Algorithm (Body)
P_On
Variable table
Usage
Name
Internal
tmp
Input
EN
Input
IN16
Input
IN32
Output
ENO
Output
OUT32
Section 2-1
SIGN IN16 tmp
+L IN32
tmp OUT32
Type
DINT
BOOL
INT
DINT
BOOL
DINT
33
Need help?
Do you have a question about the CX-PROGRAMMER V8.1 and is the answer not in the manual?
Questions and answers