Chapter 6 Symbol Variables If users declare a symbol whose data type is ARRAY, they have to select an array type, and set the size of the array. The number of elements in an array must be within the range between 1 and 512. A start device address is assigned to a symbol whose data type is ARRAY according to the array type. Please notice that the start device address is assigned to a symbol whose data type is ARRAY cannot be an SR device, an SM device, an E device, or an F device. Please refer to section 6.1.4 for more information.
Besides, an array is composed of the devices starting from the device assigned by users or the system, and the number of devices in the array conforms to the size of the array. In the figure below, ARRAY[3] OF DWOED in the Type… cell for Ary_0 indicates that the array is composed that the start device address is D0. As a result, the array is composed of D0~D5 (6 word devices). of 3 elements, and the array type is DWORD. The device address in the Address cell for Ary_0 indicates ARRAY[5] OF BOOL in the Type… cell for Ary_1 indicates that the array is composed of 5 elements, and the array type is BOOL.
The device address in the Address cell for Ary_1 indicates that the start device address is M0. As a result, the array is composed of M0~M4. For DVPxxMC and AS5xx, if ARRAY[10] OF BOOL in the Type, the assigned address is%IB0, this means the array will occupy %IB0 ~ %IB9 device, a total of 10% IB devices. When users declare a symbol whose data type is ARRAY, they can set the initial value of the symbol. Please refer to the following example. [1,2,3,4,5] in the Initial Value cell for A_Ary indicates that the initial value of A_Ary[0] is 1, the initial value of A_Ary[1] is 2, the initial value of A_Ary[2] is 3, the initial value of A_Ary[3] is 4, and the initial value of A_Ary[4] is 5.
[1,3(0),5] in the Initial Value cell for B_Ary indicates that the initial value of B_Ary[0] is 1, the initial value of B_Ary[1] is 0, the initial value of B_Ary[2] is 0, the initial value of B_Ary[3] is 0, and the initial value of B_Ary[4] is 5. 6-29