FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
05-12-2023 12:58 PM
Hello,
I need to use the IL_InterpolationLinear function, to do an interpolation of values that I have stored in arrays. This function is part of the CXA_UTILITIES library in the mathematical functions folder.
But I don't know how to use the IL_COORD_PAIR_TYPE01 structure, to initialize the two arrays of X and Y values that I have stored.
Do you have any example of the use of this structure and function?
Beste regards.
Solved! Go to Solution.
05-12-2023 02:11 PM
I just had a quick look into the type. A declaration method would be:
myTable: ARRAY [0..127] OF IL_COORD_PAIR_TYPE01 := [(X := 1, Y := 2), (X := 3, Y := 4), (X := 5, Y := 6), (X := 7, Y := 8), (X := 9, Y := 10), 95(())];
In the programm it could be used like:
myTable[1].X := 1;
myTable[1].Y := 2;
FOR i:=0 TO 127 DO
myTable[i].X := aritableX[i];
myTable[i].Y := aritableY[i];
END_FOR