I am continuing to work on this project and have added HMI tables. I also added extra information in typEnergyPrice.
There I added iArrayPlace to have an overview of where in the array the info is located when I sort from cheap to most expensive. But when I added iArrayPlace then I get weird values in HMI tables
In array 1, 3, 5, etc., I get 125.0 as the value. But when I look in the SortedJsonData Array, I don’t get those values.
When I remove. iArrayPlace : INT;
TYPE typEnergyPrice :
STRUCT
NOK_per_kWh : REAL;
EUR_per_kWh : REAL;
EXR : REAL;
time_start : DATE_AND_TIME;
time_end : DATE_AND_TIME;
NOK_per_kWh_mva : REAL;
// iArrayPlace : INT;
END_STRUCT
END_TYPE
AND the sorthing in HTTP_HvaKosterStrommen. I get the right vaules in tables inn HMI.
// Add array placement in array
// FOR i := 0 TO (n) DO
// SortedJsonData[i].iArrayPlace := i;
// END_FOR
I have tride to delete the tables in HMI and add it back. But I get the same result.