Omron CX-PROGRAMMER V8.1 Operation Manual page 59

Function blocks/ structured text
Table of Contents

Advertisement

Function Block Specifications
Note
34
1.0
P_On
FB
EN
ENO
D0
D100
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
10.0
0.0
ADD_INT_DINT
EN
ENO
D100
D1000
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
D150
PV
CV
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, output variables are passed to the corre-
sponding parameters after the algorithm is processed. Consequently, val-
ues cannot be written from output variables to parameters within the
algorithm. If it is necessary to write a value within the execution cycle of the
algorithm, do not write the value to a parameter. Assign the value to an in-
ternal variable and use an AT setting (specified addresses).
Initial Value
An initial value can be set for an output variable that is not being retained, i.e.,
when the Retain Option is not selected. An initial value cannot be set for an
output variable if the Retain Option is selected.
The initial value will not be written to the output variable if the IOM Hold Bit
(A50012) is ON.
Auxiliary Area control bit
IOM Hold Bit (A50012)
Algorithm (Body)
EN
SIGN IN16 tmp
+L IN32
tmp OUT32
Variable table
Usage
Name
Data type
Internal
tmp
DINT
Input
EN
BOOL
Input
IN16
INT
Input
IN32
DINT
Output
ENO
BOOL
Output
OUT32
DINT
ON
The initial value will not be set.
Section 2-1
Initial value

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents