AnsweredAssumed Answered

Capture variable changes in PI (True to False)

Question asked by qalbiol on Feb 27, 2019
Latest reply on Feb 28, 2019 by Dan Fishman

Good morning,


It's my first question here. I am developing PI screens for the plant operators & maintenance team.


Here we have a machine that rotates clockwise (directo) or anticlockwise (inverso), and I would like to capture the number of chages that machine has varied rotation direction. For this, our control system has 2 variables that capture with "True / False" in which direction it is rotating.


I have tried the following without success ...


REF_EQ = IF PrevVal('PREPARACION/KE-0310145-08/DIG_MON.Q')<>TagVal('PREPARACION/KE-0310145-08/DIG_MON.Q') THEN 1 ELSE NoOutput()

NUM_CHANGES = EventCount('REF_EQ',FindEq('PREPARACION/KE-0310145-08/DIG_MON.Q','-1d','*',"True"),'*')


It should be working I think, but REF_EQ does not seem to be capturing "True" -> "False" -> "True" changes from this variable (PREPARACION/KE-0310145-08/DIG_MON.Q).


Thank you for your time!!

Best regards,