502
28 LABELS
28.5 Arrays
• The data storage location becomes dynamic by specifying a label for the array index. This enables arrays to
be used in a program that executes loop processing. The following is a program example that consecutively
stores "1234" in the "uLabel4" array.
• The element number of the array can be omitted in ladder diagram. If the element number is omitted, it is
regarded as the start number and converted. For example, when the defined label name is "boolAry" and
the data type is "Bit (0..2, 0..2)", the operation of "boolAry[0,0]" is the same as that of "boolAry".
• When a multidimensional array is specified as setting data of instructions, functions, and function blocks
that use arrays, the rightmost element is regarded as a one-dimensional array.
bLabel1
INC wLabel3
bLabel2
MOV K1234 uLabel4[wLabel3]
Label1 wLabel2
[0] [1] [3]
[0,0] [0,3]
[1,0]
[0,1]
[1,1]
[3,0] [3,3]
[2]
[0,2]
[1,2] [1,3]
[2,3][2,2][2,1][2,0]
[3,2][3,1]
BMOV wLabel1 wLabel2 K3