Basically I have this Problem like in C decribed here for Structured Text.
So in C I can do this to copy vector c into matrix rows a :
int a[100][100];
int c[10][10];
int i;
for(i = 0; i<10; i++)
{
memcpy(&a[i], &c[i], sizeof(c[0]));
}
How to do this in Structured Text? My analogous Approach does not work so far. (Compiler Error: to less indices for field a).
VAR
a: ARRAY[0..99,0..99] OF REAL; (*2D array*)
c : ARRAY[0..99] OF REAL; (*1D array*)
END_VAR
FOR i:=0 TO 99 DO
memcpy(ADR(a[i]), ADR(c[i]), SIZEOF(c[0]));
END_FOR