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

Function blocks
Table of Contents

Advertisement

Function Block Specifications
Variables
Condition
Variables not
Start of operation Not retained
set to Retain
Power ON
Note
26
10.0
0.0
ADD_INT_DINT
EN
ENO
D100
D1000
IN16
OUT32
D200
IN32
Internal variable tmp
is not displayed.
Retain Data through Power Interruptions and Start of Operation
Internal variables retain the value from the last time that the instance was
called. In addition, the Retain Option can be selected so that an internal vari-
able will also retains its value when the power is interrupted or operation
starts (the mode is switched from PROGRAM to RUN or MONITOR mode).
When the Retain Option is selected, the value of the variable is retained when
the power is interrupted or operation starts unless the CPU Unit does not
have a backup battery. If the CPU Unit does not have a good battery, the value
will be unstable.
Variables
Variables set to Retain
When the Retain Option is not selected, the value of the variable will not be
held when the power is interrupted or operation starts. Even variables not set
to be retained, however, can be held at the start of operation by turning ON
the IOM Hold Bit (A50012) and can be held during power interruptions by set-
ting the PLC Setup, as shown in the following table.
OFF
IOM Hold Bit Status at Startup
(PLC Setup) selected
Retained
Not retained
Retained
The IOM Hold Bit (A50012) is supported for compatibility with previous mod-
els. To hold the values of variables in function blocks, however, use the Retain
Option and not the IOM Hold Bit.
Initial Value
An initial value can be set for an internal variable that is not being retained
(i.e., when the Retain Option not selected). An initial value cannot be set for
an internal variable if the Retain Option is selected.
Internal variables that are not being retained will be initialized to 0.
The initial value will not be written to the internal variable if the IOM Hold Bit
.
(A50012) is ON
Auxiliary Area control bit
IOM Hold Bit (A50012)
■ External Variables
External variables are either system-defined variables that have been regis-
tered in CX-Programmer before hand, or variables that externally reference
user-defined variables in the global symbol table.
Algorithm (Body)
EN
SIGN IN16 tmp
+L IN32
tmp OUT32
Variable table
Name
Internal
tmp
Input
EN
Input
IN16
Input
IN32
Output
ENO
Output
OUT32
Condition
Start of operation
Retained
Power ON
Retained
IOM Hold Bit (A50012) setting
ON
IOM Hold Bit Status at Startup
Retained
Not retained
ON
The initial value will not be set.
OFF
The initial value will be set.
Section 2-1
Type
DINT
BOOL
INT
DINT
BOOL
DINT
Status
(PLC Setup) not selected
Initial value

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents