Semantic Error (SEM1195): There are ... indices specified but the array ... defines ... dimension(s).
In a code worksheet, an invalid array access is programmed by specifying a wrong number of array indices. For example, two indices where used for a one-dimensional array or vice versa. The number of used indices is indicated in the error message together with the number of expected indices and the array name.
To realize an n-dimensional array in PLCnext Engineer, n arrays of an array have to be defined as shown for two dimensions in the following example. The example also illustrates how to access an element of this 2-dimensional matrix in ST and FBD/LD.
Further Info
For information on user-defined data types and how to declare them refer to the chapter "User-defined data types". |