Variable Properties And Variable Usage; Internal Allocation Of Variable Addresses - Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Operation Manual

Function blocks
Table of Contents

Advertisement

Variables
Retain
1-3-4

Variable Properties and Variable Usage

Note
1-3-5

Internal Allocation of Variable Addresses

Setting Internal Allocation
Areas for Variables
For example, set a boolean (BOOL) variable (bit) to either 1 (TRUE) or 0
(FALSE). Set a WORD variable to a value between 0 and 65,535 (between
0000 and FFFF hex).
If an initial value is not set, the variable will be set to 0. For example, a bool-
ean variable would be 0 (FALSE) and a WORD variable would be 0000 hex.
Select the Retain Option if you want a variable's data to be retained when the
PLC is turned ON again and when the PLC starts operating.
• Setting Procedure
Select the Retain Option.
The following table shows which properties must be set, can be set, and can-
not be set, based on the variable usage.
Property
Name
Data Type
AT (specified address)
Initial Value
Retained
Inputs can be set as initial values, but the value of the actual input parameter
will be given priority.
When an instance is created from a function block definition, the CX-Program-
mer internally allocates addresses to the variables. Addresses are allocated
to all of the variables registered in the function block definition except for vari-
ables that have been assigned actual addresses with the AT Settings prop-
erty.
Program
Instance of function block definition A
Input 0.00
a
b
Output 2.00
t
Output 5.00
Note: Variable c is an internal
variable, so it is not displayed.
Usage: Inputs
Properties:
Name Type
AT
Initial Value
Retained
a
BOOL
Usage: Outputs
Properties:
Name Type
AT
Initial Value
Retained
b
BOOL
YES
t
TIMER
Usage: Internals
Properties:
Name Type
AT
Initial Value
Retained
c
BOOL
2000.00
The user sets the function block instance areas in which addresses are allo-
cated internally by the system. The variables are allocated automatically by
the system to the appropriate instance area set by the user.
Variable usage
Internals
Inputs
Must be set.
Must be set.
Must be set.
Must be set.
Can be set.
Cannot be set.
Can be set.
Can be set.
(See note.)
Can be set.
Can be set.
(See note.)
FB instance areas
Non-retained area
Starting address
15
Retained area
Starting address
15
Timer area
Starting address
Counter area
Starting
Automatic allocation of
address
addresses by system
Example
2000.00
Manual allocation of address to
variable in FB by AT Settings option.
Section 1-3
Outputs
Must be set.
Must be set.
Cannot be set.
Can be set.
Can be set.
0
CIO, H, W,
Size (words)
D, or E Area
0
H, D, or E
Size (words)
Area
Size (Completion
T Area
Flags)
Size (Completion
C Area
Flags)
15

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