Variable Properties - Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Operation Manual

Function blocks
Table of Contents

Advertisement

Variables
1-3-3

Variable Properties

Variable Name
Data Type
AT Settings (Allocation to
an Actual Addresses)
Array Settings
Initial Value
14
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.
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.
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.
Select one of the following data types for the variable:
BOOL, INT, UINT, DINT, UDINT, LINT, ULINT, WORD, DWORD, LWORD,
REAL, LREAL, TIMER, COUNTER
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.
Refer to Variable Definitions in 2-1-2 Function Block Elements for details on
AT settings and 2-4-3 AT Settings for Internal Variables for details on using AT
settings.
A variable can be treated as a single array of data with the same properties.
To convert a variable to an array, specify that it is an array and specify the
maximum number of elements.
This property can be set for internal variables only. Only one-dimensional
arrays are supported by the CX-Programmer Ver. 5.0.
• Setting Procedure
Click the Advanced Button, select the Array Variable option, and input the
maximum number of elements.
• When entering an array variable name in the algorithm in a function block
definition, enter the array index number in square brackets after the vari-
able number.
For details on array settings, refer to Variable Definitions in
.
Elements
This is the initial value set in a variable before the instance is executed for the
first time. Afterwards, the value may be changed as the instance is executed.
Section 1-3
2-1-2 Function Block

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