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

Function blocks
Table of Contents

Advertisement

Function Block Specifications
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)
ENO (Enable Output) Variable
The ENO variable is created as the default output variable. The ENO output
variable will be turned ON when the instance is called. The user can change
this value. The ENO output variable can be used as a flag to check whether or
not instance execution has been completed normally.
■ Internal Variables
Internal variables are used within an instance. These variables are internal to
each instance. They cannot be referenced from outside of the instance and
are not displayed in the instance.
The values of internal variables are retained until the next time the instance is
executed (i.e., when EN turns OFF, the value of the internal variable is
retained). Consequently, even if instances of the same function block defini-
tion are executed with the same I/O parameters, the result will not necessarily
be the same.
Example:
The internal variable tim_a in instance Pulse_2sON_1sOFF is different from
internal variable tim_a in instance Pulse_4sON_1sOFF, so the instances can-
not reference and will not affect each other's tim_a value.
Pulse_2sON_1sOFF
P_On
EN
ENO
&20
ON_TIME
&10
OFF_TIME
Pulse_4sON_1sOFF
P_On
CLOCK PULSE
EN
ENO
&40
ON_TIME
&10
OFF_TIME
ON
The initial value will not be set.
Variable table
Usage
Name
1.0
Internal
tim_a
Internal
tim_b
Input
ON_TIME
Input
OFF_TIME
1.1
Section 2-1
Initial value
Data type
TIMER
TIMER
INT
INT
25

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