I need some help in advance. I am working on production line management system in heineken brewery. Project need to collect data from whole line in PLC collector according weihenstephan standard and to make SCADA system for visualization, calculation, reporting, etc. I have successful done collecting data but i am stuck with making SCADA and need some suggestions and help. First of all for calculating KPIs i need to regular calculate times (Total time, manned time, operating working time,etc.), according the machine program and operating state.
Here is the picture of times:

Here is the picture of data which i need to use:

Problem is because i don't know when to increase which time. Does anyone have expirience with this and can help me?
BR,
Branislav