09-24-2016 02:22 AM
A group of numbers is used as my input. Currently I want to set my code as: when the input is greater than a threshold number (4 for example) it will display true, and it will not change to false until another input larger than 4 appears. Our current problem is it will display false if the input is less than the threshold(4) when we want it to remain true.
Please help me, thanks.
Solved! Go to Solution.
09-24-2016 03:14 AM - edited 09-24-2016 03:14 AM
Usually what comes first to my mind is not the shortest solution, but anyway, it might give you some idea:
09-24-2016 06:02 AM
09-24-2016 06:09 AM - edited 09-24-2016 06:12 AM
I should have warned the OP I love Rube-Goldbergs... 😄 Yep, a XOR function should be used there 🙂
09-24-2016 06:35 AM
Thank you a lot Blokk!! You are so nice:) I'm gonna try this
09-24-2016 01:09 PM - edited 09-24-2016 01:15 PM
Instead of XOR I typically use a "not equal". Same difference but less nerdy. 😄
09-24-2016 01:15 PM - edited 09-24-2016 01:19 PM
Hmm, i think the Truth table is the same in both cases, no?
edit: ah, i see you edit your post. And yep, the not equal is the same 🙂
09-24-2016 02:08 PM - edited 09-24-2016 02:11 PM
Yes, the're the same. I would probably create a subVI as follows. No telephone wires across the loop 😄
(Note that the subVI needs to be reentrant to retain state per instance)
09-24-2016 02:57 PM
@altenbach wrote:Instead of XOR I typically use a "not equal". Same difference but less nerdy. 😄
Except knowing that True is "greater than" False adds some nerdiness back in.
09-24-2016 03:19 PM
@RavensFan wrote:
Except knowing that True is "greater than" False adds some nerdiness back in.
... but if somebody says that something is going to be great(er), it might not necessarily be true. 😄