Calcs and Events - Latch value
I have a complex event trigger that I am having difficulty programming. I have a trigger that when the length has been reset (Previous length > current length - which we'll call A) and then the length is greater than 200 (where now the Previous length will not be > than current length). Is there a way to latch the first constraint to True when it becomes true (A) in order to use an and A with the second constraint?
so something like
A = if(PreviousValue('Length') or A, True, False) (But we can't use A where it is defined)
B = A and (Length > 200)
3 replies
-
Hi ,
I'm having difficulty understanding what you're trying to accomplish. Could you provide some more detail or context?
-
Thanks Steve
I'll try to be more specific. I have an event I would like to capture that requires:
1) The length to be reset - PreviousValue('Length') > Length
2) The Length needs to be greater than 200
3) Then when (1) and (2) are true I want to be able to create an event if another tag goes out of a calculated range.
(1) and (2) may not all be true at the same time, so I need the ability to hold a variable True when (1) happens, then (2) and (3) will always be True at the same time (if (3) happens at all). So my problem is being able to hold a value True even after PreviousValue('Length') > Length is no longer True.
I hope that helps make it a little more clear.