User-Defined Data Type (Enum) - Delta AH Series Operation Manual

Motion controller
Hide thumbs Also See for AH Series:
Table of Contents

Advertisement

AH Mo t io n C on tr o ll er – O p er a t io n M a nu a l
*1. The data stored in an index register indicates the offset for the device which the index register modifies. If the system
automatically assigns a device to a symbol, the use of an index register to modify the symbol will cause the program to
be executed incorrectly because users do not know which device is assigned to the symbol.
_5
*2. If you want to assign index registers to symbols, you have to specify device addresses and data types.

5.5. User-defined Data Type (ENUM)

You can also use the user-defined data type for enumeration (ENUM). ENUM is a derivative data type which defines the
ENUM symbol with its elements and the associated values. You can specify the initial value to an element, and use one of
the enumerated values in the associated elements list. The list defines an ordered set of values in series, starting with the
first element and ending with the last one. You can use the same element in different ENUM symbols.
The rules for specifying the elements and the values for an ENUM symbol:
If elements are not specified, the initial value will be 0, and following 1, and etc.
When elements are specified with initial values, the initial value of the element will be changed. The enumerated
values before the element is defined with an initial value remain unchanged. For example, 0, 1, 2 (not defined),
35(the defined initial value), 36, 37, and etc.
Another example when the element is defined twice: 0, 1, 2 (not defined), 35(first defined value), 36, 70(second
defined value), 71, and etc.
5 - 2 0

Advertisement

Table of Contents
loading

Table of Contents