I would like to know, how to obtain the maximum or minimum value of a variable from a 2 hour time period.

Now I know, that I should probably use the historian to archive the values and set the saving time period for 2 hours. I will be registering the values every 5 seconds.

How to obtain the maximum and minimum value of it and save it to a variable?

Thanks in advance for your help.

Best regards,
Grzegorz Kaczmarczyk