Found few topics here regarding production output counters, but logically, every case is specific and there is no universal approach.
In my case, I need to log end of batch counter value, then reset of that counter, since new batch will be started.
It can be done easily by adding 2 HMI buttons (and the respecive PLC program updates) - one for end of batch and one for reset. However, the machines are many, running 24/7, and a scheduled PLC&HMI program change will take a lot of time.
Is it possible to capture the previous (last) value of the counter before reset, and how the script will look like? Any help appreciated,