I am trying to create a PE for condition below based on the same tag.
Current hour - x value
Last an hour - y value
Equation = x - y
hope someone could assist.
If you want the value 1 hr ago relative to the current time you would use y1 and if you want the value to the closest hour on the clock , then y2. Sinusoid can be replaced with a tag of your choice.
x = TagVal('sinusoid','*')
y1 = TagVal('sinusoid','*-3600')
y2 = TagVal('sinusoid','t'+Hour('*') * 3600)
PE syntax and functions
Retrieving data ...