EasyManua.ls Logo

Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION - Page 40

Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION
183 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
25
Function Block Specifications Section 2-1
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.
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.
Auxiliary Area control bit Initial value
IOM Hold Bit (A50012) ON The initial value will not be set.
P_On
1.0
&10
CLOCK PULSE
EN ENO
ON_TIME
OFF_TIME
&20
Pulse_2sON_1sOFF
P_On
1.1
&10
CLOCK PULSE
EN ENO
ON_TIME
OFF_TIME
&40
Pulse_4sON_1sOFF
tim_a TIMER
tim_b TIMER
ON_TIME INT
OFF_TIME INT
Variable table
Name
Internal
Internal
Input
Input
Data type
Usage

Table of Contents

Related product manuals