I am attempting to trigger a notification when a given tag's value has not changed for a 7 day period. I have the analysis as if (TagVal('MVARs1.Value','t-7d') = TagVal('MVARs1.Value','t')) then true else false, when it is true, i want the notification to be triggered. However, doing this this way is giving errant results, when i use PI SQL Commander to go back and look at the value for the 2 times, they are not the same value. Am i missing something or is there a better way to achieve the result i am looking for? - Thanks. The value type is defined as a Double

Hi mike sherin:

I have a couple of suggestions. One is to use the 'Roundfrac' function on the results of the TagVal evaluations:

If ((Roundfrac(TagVal('TargetAttribute','T-7d'),2) = (Roundfrac(TagVal('TargetAttribute','T'),2) Then 0 Else 1

If rounding to two decimal places is acceptable then for example 7.3289756 would be 7.33 as would 7.3290756. Then the two rounded numbers will be equal in your event frame analysis. Another option would be to measure the variance between the two evaluation points. Then set up a an If - Then - Else statement based on the acceptable tolerance of variance. Again a variance past two decimal places may be acceptable, but that is strictly the domain of your organization's needs.