![background image](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526039.webp)
24
Function Block Specifications
Section 2-1
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.
Example
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.
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.
P_On
FB
EN ENO
PV CV
D0
D100
1.0
The value of the output variable (CV) is passed to the parameter
specified as the output destination, which is D100 in this case.
D1000
0.0
10.0
D200
ADD_INT_DINT
EN
ENO
IN16 OUT32
IN32
D100
tmp
DINT
EN
BOOL
IN16
INT
IN32
DINT
ENO
BOOL
OUT32
DINT
SIGN IN16 tmp
EN
+L IN32 tmp OUT32
OUT32 is a DINT variable, so
the variable's value is passed
to D1000 and D1001.
Algorithm (Body)
Variable table
Name
Internal
Input
Input
Input
Output
Output
Data type
Usage
CTD
CD Q
LD
PV CV
D150
Product A counter
Содержание CS1-H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ...viii TABLE OF CONTENTS...
Страница 15: ...xvi Application Precautions 4...
Страница 151: ...136 Procedures Section 3 2...
Страница 153: ...138 Data Types Appendix A...
Страница 177: ...162 External Variables Appendix C...
Страница 181: ...166 Revision History...