![Omron SYSMAC CX-Programmer 9 Operation Manual Download Page 45](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241045.webp)
19
Variables
Section 1-3
• Ladder programming language: Enter hexadecimal numerical values
after the # and decimal values after the &.
• Structured text (ST language): Enter hexadecimal numerical values af-
ter 16# and enter decimal numerical values as is.
Exception: Enter directly or indirectly specified addresses for Index Registers
IR0 to IR15 and Data Registers DR0 to DR15 directly into the instruction
operand.
1-3-2
Variable Usage and Properties
Variable Usage
The following variable types (usages) are supported.
Internals:
Internal variables are used only within an instance. They cannot
be used pass data directly to or from I/O parameters.
Inputs:
Input variables can input data from input parameters outside of
the instance. The default input variable is an EN (Enable) vari-
able, which passes input condition data.
Outputs:
Output variables can output data to output parameters outside of
the instance. The default output variable is an ENO (Enable Out)
variable, which passes the instance’s execution status.
In Out:
Input-output variables can input data from input parameters out-
side of the instance and can return the results of processing in a
function block instance to external parameters.
Externals:
External variables are either system-defined variables registered
in advance with the CX-Programmer, such as the Condition Flags
and some Auxiliary Area bits, or user-defined global symbols for
use within instances.
For details on variable usage, refer to the section on
Variable Type (Usage)
under
Variable Definitions
in
2-1-2 Function Block Elements
.
The following table shows the number of variables that can be used and the
kind of variable that is created by default for each of the variable usages.
1-3-3
Variable Properties
Variables have the following properties.
Variable Name
The variable name is used to identify the variable in the function block. It
doesn’t matter if the same name is used in other function blocks.
Note
The variable name can be up to 30,000 characters long, but must not begin
with a number. Also, the name cannot contain two underscore characters in a
row. The character string cannot be the same as that of a an index register
such as in IR0 to IR15. For details on other restrictions, refer to
Variable Defi-
nitions
in
2-1-2 Function Block Elements
.
Data Type
Select one of the following data types for the variable:
BOOL, INT, UINT, DINT, UDINT, LINT, ULINT, WORD, DWORD, LWORD,
REAL, LREAL, TIMER, COUNTER, and STRING
For details on variable data types, refer to
Variable Definitions
in
2-1-2 Func-
tion Block Elements
.
AT Settings (Allocation to
an Actual Addresses)
It is possible to set a variable to a particular I/O memory address rather than
having it allocated automatically by the system. To specify a particular
address, the user can input the desired I/O memory address in this property.
This property can be set for internal variables only. Even if a specific address
is set, the variable name must still be used in the algorithm.
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: ......