Quality of PreviousValue
Is there a way to get the quality of the PreviousValue of a tag in Calc and Events.
I try to use Quality('PreviousValue('[tag]')'), but I get an error for this.
3 replies
-
Hi ,
I can't think of a way to currently do this. The PreviousValue function only works with values. What's the use case?
-
I am writing to a tag if the current value of the tag is less than the previous value of the tag (for a tag that increases in value until a reset occurs). When either tag value is 'No Data' (if I had to make a change to the OPC collector) the calculation is not what I want. So I was hoping to avoid this by making sure the quality values for both would be 'Good'
-
Hi ,
Thankfully I misspoke. There is a way to check the previous value's quality! I was initially trying to do it in one line, but it did not like the format. The developer suggested splitting it across two expressions. See the example below:
Hope this works for you!