How are Arrays addressed in drivers like Modbus and Siemens?
Most drivers in TOP Server provide the ability to define arrays of contiguous registers of the same data type.
- The standard drivers support 1 and 2 dimensions arrays only
- The individual elements of an array cannot be addressed directly.
- Sub arrays of data within the array are not allowed and you cannot create an array of arrays.
For reference, when creating an array in a standard driver, the array dimensions are specified using square brackets, [ and ]. The address for the array is defined as Register[row][col].
In the 4x4 array example below, array is referenced as DB0W0 [4][4].
The data is returned as a variant array. The OPC Quick Client will display the data in the following format: [73,78,84,255][256,257,258,259][9,10,11,12][13,14,15,16].
| 73 | 78 | 84 | 255 |
| 256 | 257 | 258 | 259 |
| 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 |
In the 4x4 array example below, array is referenced as DB0W0 [1][16].
The data is returned as a variant array. The OPC Quick Client will display the data in the following format: [73,78,84,255,256,257,258,259,9,10,11,12,13,14,15,16].
| 73 | 78 | 84 | 255 | 256 | 257 | 258 | 259 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |