21
Variables
Section 1-3
1-3-5
Internal Allocation of Variable Addresses
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.
Setting Internal Allocation
Areas for Variables
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.
Setting Procedure
Select
Function Block/SFC Memory - Function Block/SFC Memory Allo-
cation
from the
PLC
Menu. Set the areas in the Function Block/SFC Memory
Allocation Dialog Box.
a
b
15
0
15
0
t
Name Type
AT
Initial Value
Retained
a
BOOL
Name Type
AT
b
YES
t
TIMER
2000.00
Name Type
Initial
Value
c
2000.00
Initial Value
Retained
Retained
AT
BOOL
BOOL
Input 0.00
Instance of function block definition A
Output 2.00
Output 5.00
Note: Variable c is an internal
variable, so it is not displayed.
Usage: Inputs
Properties:
Usage: Outputs
Properties:
Usage: Internals
Properties:
Automatic allocation of
addresses by system
Manual allocation of address to
variable in FB by AT Settings option.
Program
FB instance areas
Size (words)
Non-retained area
Retained area
Starting address
Starting address
Starting address
Starting
address
Timer area
Counter area
CIO, H, W,
D, or E Area
H, D, or E
Area
T Area
C Area
Size (words)
Size (Completion
Flags)
Size (Completion
Flags)
Example
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......