Function Block Specifications
Item
Retain setting
No
Variables created by
EN (Enable):
default
Receives an input con-
dition.
Note
Note
Inputs
Outputs
Supported
ENO (Enable Output):
Outputs the function
block's execution sta-
tus.
For details on Externals, refer to Appendix C External Variables.
■ Input Variables
Input variables pass external operands to the instance. The input variables
are displayed on the left side of the instance.
The value of the input source (data contained in the specified parameter just
before the instance was called) will be passed to the input variable.
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 have the same variable as an input variable and
output variable, register the variables with different names and transfer the
value of the input variable to the output variable in the function block with
an instruction such as MOV.
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.
Variable type
Internals
Supported
None
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
Externals
No
Pre-defined symbols
registered in advance
as variables in the CX-
Programmer, such as
Condition Flags and
some Auxiliary Area
bits.
SIGN IN16 tmp
+L IN32
tmp OUT32
Type
DINT
BOOL
INT
DINT
BOOL
DINT
23
Need help?
Do you have a question about the CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION and is the answer not in the manual?