# Thread: Variable Maximum over 1 day with time stamp of when the maximum was recorded

1. Bronze Partner
Join Date
25.05.2016
Posts
7

## Variable Maximum over 1 day with time stamp of when the maximum was recorded

I have been asked to make an alarm list entry of a maximum value over 1 day from PLC variable with time stamp of when the maximum was recorded, so the user can look back at the last 30 alarms that will show the maximum value and time the value was recorded for the last 30 days.

So far i have a system math variable looking fo the MAX of the PLC variable over 1 day then i would like to record the time stamp to another variable then a new maximum is reached. some how then push these two variables in to a alarm that sets once a day.
not sure if this is the right way to approach this issue?

Thanks James.

2. ## Re: Variable Maximum over 1 day with time stamp of when the maximum was recorded

Hello James,

If I understand your request correctly, a MAX formula with the following settings:
Time Interval: 1 Day
Result Output: At the end of the interval
Initializing at the beginning of the interval: with new value

and a reaction matrix on the max variable that treats any value as a limit violation and has "In Alarm Message List" configured should suffice.

After each day there will be an alarm with the maximum value and the 'received' timestamp of the actual time the maximum was reached, and not when the interval ended, which is what you want as far as I understand. I don't know why you would need to map it to another variable. If you really do, it might be tricky to also map the timestamp as the received time, so please clarify if that is really the desired behavior.

Best Regards
Lukas
Last edited by LukasRotter : 31st October 2018 at 11:17

3. Bronze Partner
Join Date
25.05.2016
Posts
7

## Re: Variable Maximum over 1 day with time stamp of when the maximum was recorded

Originally Posted by LukasRotter
Hello James,

If I understand your request correctly, a MAX formula with the following settings:

Time Interval: 1 Day

Result Output: At the end of the interval

Initializing at the beginning of the interval: with new value

and a reaction matrix on the max variable that treats any value as a limit violation and has "In Alarm Message List" configured should suffice.

After each day there will be an alarm with the maximum value and the 'received' timestamp of the actual time the maximum was reached, and not when the interval ended, which is what you want as far as I understand. I don't know why you would need to map it to another variable. If you really do, it might be tricky to also map the timestamp as the received time, so please clarify if that is really the desired behavior.

Best Regards

Lukas

Working well now thanks.