Variable Usage And Properties; Variable Properties - Omron WS02-CXPC1-V9 - V9 Operation Manual

Table of Contents

Advertisement

Variables
1-3-2

Variable Usage and Properties

Variable Usage
1-3-3

Variable Properties

Variable Name
Note
Data Type
AT Settings (Allocation to
an Actual Addresses)
• 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.
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.
Variables have the following properties.
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.
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.
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.
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.
Section 1-3
19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents