This question edges into overall system philosophy…
Which is better:
- To have a continuously increasing counter in a PLC, say a 32 bit UINT, or a 64 bit UINT and…
- Poll once an hour and take the difference for the hourly rate.
- Reset the counter in the PLC once an hour, based on the PLC’s clock, and …
- Poll every couple of seconds, looking for the change to zero.
The problem is how to get the hourly rate recoded in the history db without recording every case, but without missing any in the totals.
I think the first has the most merit, because you will always have an acurate count over any interval.
Any comments or hints?