AH Motion Controller – Operation Manual
5-18
Data type Name Description Program
Function
block
ARRAY Array
If a symbol is declared as an array, the size
of an array and an array data type must be
specified. (An array is composed of 256
elements/members at most.)
String Character string
Variable-length single-byte data string.
8 bits as one ASCII character. The string
length needs to be specified on
declaration.
5.4.4 Using Devices, Symbols and Instructions
A device is assigned to a symbol according to the data type of the symbol. You can set the initial value of the device. After
the program in a project is downloaded to a motion controller, the initial values will be written into the devices assigned to
the symbols at the first scan cycle.
The principles of assigning devices to symbols are as follows.
Devices can be assigned to the global symbols and the local symbols declared in the program POU by users, or
assiagned automatically by system.
Local symbols (except the symbols of VAR class) declared in a function block can only be assigned with devices by
the system.
The system will assign applicable devices only. (You can set a range of devices which can be assigned automatically.)
If a symbol is declared, the device assigned to the symbol, the data type of the symbol, and the initial value of the
symbol must be compatible with one another.
The relation between the data types and the device types which can be assigned is described below.
Data type
AH Motion Controller CPU
Device assigned by users Device assigned by the system
BOOL Contact M/SM or bit in the device X/Y (*3) Contact M/SM
WORD D W
DWORD D W
LWORD D W
UINT D W
UDINT D W
INT D W
DINT D W
LINT D W
REAL D W
LREAL D W
CNT C C
TMR T T
ARRAY
`The devices assigned to a symbol whose data type is ARRAY depend on the array type specified. An
array is composed of the devices starting from the device assigned by users or the system, and the