AnsweredAssumed Answered

Recording an analog value based on another tag transitioning from high to low

Question asked by JMyers on Feb 17, 2017
Latest reply on Feb 20, 2017 by tswift


I am pretty new and have a question about PI tags.

I have a process that I only want to record an analog value when a valve
transitions from high to low (Open to close). My approach so far has been to
write a performance equation that looks at Valve value being either 1 or 0
to detect the transition. I was working on the equation in AF and saving the
value back to a PI tag.

if TagVal('Fill Valve','*') <  PrevVal('Fill Valve','*-1s') Then
'Previous Weight' Else 0

There is an issue with this approach in that I believe I would get value 1,
zero, value 2, zero,etc...

Is there an easier way to achieve this? I can't use the archive tab to filer
out to look for unique values. The value that is read into the PLC
has only one decimal place, this means we have a lot of our finished product
has the same weight value  (we may have 6 in a row with the same weight).
We want to record each finished product weight. There is only a couple seconds
before the next product starts filling.

I was also trying to see if we could look at one tag in the processor and use
that as a trigger. This leads me to another question. How to only log the
value once for each finished product with several in a row with the same
weights without using the filters on the archive tab in point builder.

Any help would be greatly appreciated!

Thank you for taking time to read my question.