Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Operation Manual page 39

Function blocks
Table of Contents

Advertisement

Function Block Specifications
24
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.
P_On
FB
EN
ENO
D0
PV
CV
The value of the output variable (CV) is passed to the parameter
specified as the output destination, which is D100 in this case.
Example
0.0
ADD_INT_DINT
EN
ENO
D100
IN16
OUT32
D200
IN32
OUT32 is a DINT variable, so
the variable's value is passed
to D1000 and D1001.
Like internal variables, the values of output variables are retained until the
next time the instance is executed (i.e., when EN turns OFF, the value of the
output variable is retained).
Example:
In the following example, the value of output variable CV will be retained until
the next time the instance is executed.
Product A counter
CTD
CD
Q
LD
PV
CV
Note
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.
1.0
D100
Algorithm (Body)
10.0
D1000
Variable table
Internal
Input
Input
Input
Output
Output
D150
EN
SIGN IN16 tmp
+L IN32
tmp OUT32
Usage
Name
Data type
tmp
DINT
EN
BOOL
IN16
INT
IN32
DINT
ENO
BOOL
OUT32
DINT
Section 2-1

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION and is the answer not in the manual?

This manual is also suitable for:

Cx-programmer 5.0Sysmac ws02-cxpc1-e-v50Cs1-hCj1-hCj1m

Table of Contents

Save PDF