In PG2 how do I show a maximum value from the last hour?
Voted best answer
This is not easily done (if even possible) by coding in PG2. E.g. what values shall be shown when calling the display in a newly opened workplace?
An enlightened person might be able to use the persistent storage of PG2 graphics to sample & hold past values, but still if no display is on screen no sampling will be made.
My suggestion is to use a Calculation aspect for this purpose. The calc can be made to sample the signal and calculate a "rolling max" value which you can use for presentation.
In Basic History you can use the Max aggregate to record the maximum value for a given sample period, however, I'm not sure if you can read a single OPC HDA point in time from a log and then present it as if it was an OPC DA item.
You don't. This is a job for your controller or for a calculations object or aspect.
PG2 graphics can display data from your Basic History using trend aspects, but cannot access the history data directly to perform calculations on it. In any case, doing any type of calculations like this in an operator graphic is bad practice.
800xA Property Translations aspects can do simple calculations on data but probably cannot do this type of calculation. You should do this type of recording in your controller.