Just to explain it a little better, rather than shift the data though a shift register I decided to have fixed fields on the HMI in the example HMI page I just had monday to friday (could be 7 day if required).
The data is held in an array of a UDT type for example the UDT is as follows
I called it logging
Date_Year, Int
Date_Month, Int
Date_Day, Int
Prod_Count, Int
Then created an array (0..6) of the UDT
Called Log_Array
The reason that all fields are integers is that the Date/time format when read from the PLC (in this case) is all integers it also includes a day of the week 0-6
0 being Sunday, this is used as the pointer to the log array in other words the data for that day is logged only in the fields pointed to by the day of the week.
Foir example if the DOW is 3 then that is Wednesday & in the 3rd row only, some might prefer a rolling i.e. shift down the display but that is a little more complicated, not that difficult just shift by the number of fields. One I did some years ago had two shifts per day & there was a total of 16 lines, this was done on a concentrator PLC that fetched data from the lines then displayed it on 16 message displays one for each line & sent the data to a production Scada DB this ws accessed by the operations using automated spreadsheets template & formatted into the required data & graphs.
The data is held in an array of a UDT type for example the UDT is as follows
I called it logging
Date_Year, Int
Date_Month, Int
Date_Day, Int
Prod_Count, Int
Then created an array (0..6) of the UDT
Called Log_Array
The reason that all fields are integers is that the Date/time format when read from the PLC (in this case) is all integers it also includes a day of the week 0-6
0 being Sunday, this is used as the pointer to the log array in other words the data for that day is logged only in the fields pointed to by the day of the week.
Foir example if the DOW is 3 then that is Wednesday & in the 3rd row only, some might prefer a rolling i.e. shift down the display but that is a little more complicated, not that difficult just shift by the number of fields. One I did some years ago had two shifts per day & there was a total of 16 lines, this was done on a concentrator PLC that fetched data from the lines then displayed it on 16 message displays one for each line & sent the data to a production Scada DB this ws accessed by the operations using automated spreadsheets template & formatted into the required data & graphs.