I have a signal/status SIG where I need to capture a particular sequence, e.g.
- SIG is at least 2 hours high
- followed by SIG being at least 1 hour low
I can do 2) but have some issues with 1). All comparisons only seem to look at the duration from the CURRENT time to when something happened in the past but not what it was in the past. I can get 1) with
(#!SIG - #SIG) > 2:00:00 which is the duration when the signal last did go high until it did go low again.
For 2) I was planning to do something like
a) (#Now - #!More) > 1:00:00
b) (#Now - #!More) < 1:00:01
a) will make sure SIG was low for at least 1h. NOW evaluates a condition every minute. To limit it to 1 trigger I added b) which will disable the trigger after the first check (as it is 1 minute later).
The issue I have is that I get an error saying the comparison in b) is invalid. Also, I am not sure if I really need to break this down into multiple conditions or if I could just create one more complex condition.