Many drivers have the ability to define arrays of contiguous registers of the same data type.
- Standard drivers only support 1 and 2 dimensional arrays.
- An array's individual elements cannot be addressed directly.
- Sub-arrays of data within the array are not allowed. Users cannot create an array of arrays.
When creating an array in a standard driver, the array dimensions are specified using square brackets. The array's address is defined as Register[row][col].
4X4 Array in a Siemens S7-300 Device
In the 4x4 array example below, the array is referenced as "DB0W0 [4][4]" and the data is returned as a variant array.
73 | 78 | 84 | 255 |
256 | 257 | 258 | 259 |
9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 |
Note: The OPC Quick Client will display the data as "[73,78,84,255][256,257,258,259][9,10,11,12][13,14,15,16]".
1x16 Array in a Siemens S7-300 Device
In the 1x16 array example below, the array is referenced as "DB0W0 [1][16]" and the data is returned as a variant array.
73 | 78 | 84 | 255 | 256 | 257 | 258 | 259 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Note: The OPC Quick Client will display the data as "[73,78,84,255,256,257,258,259,9,10,11,12,13,14,15,16]".