![Omron CS1-H Series Operation Manual Download Page 30](http://html1.mh-extra.com/html/omron/cs1-h-series/cs1-h-series_operation-manual_742526030.webp)
15
Variables
Section 1-3
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.
Retain
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
.
1-3-4
Variable Properties and Variable Usage
The following table shows which properties must be set, can be set, and can-
not be set, based on the variable usage.
Note
Inputs can be set as initial values, but the value of the actual input parameter
will be given priority.
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.
Property
Variable usage
Internals
Inputs
Outputs
Name
Must be set.
Must be set.
Must be set.
Data Type
Must be set.
Must be set.
Must be set.
AT (specified address)
Can be set.
Cannot be set.
Cannot be set.
Initial Value
Can be set.
Can be set.
(See note.)
Can be set.
Retained
Can be set.
Can be set.
(See note.)
Can be set.
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 CS1-H Series
Page 3: ...iv...
Page 5: ...vi...
Page 7: ...viii TABLE OF CONTENTS...
Page 15: ...xvi Application Precautions 4...
Page 151: ...136 Procedures Section 3 2...
Page 153: ...138 Data Types Appendix A...
Page 177: ...162 External Variables Appendix C...
Page 181: ...166 Revision History...