LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Set a Boolean That Only Changes Its True/False When There is a "true" Input?

Solved!
Go to solution

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.

0 Kudos
Message 1 of 10
(12,704 Views)

Usually what comes first to my mind is not the shortest solution, but anyway, it might give you some idea:

 

pointbyp.png

Message 2 of 10
(12,695 Views)

Blokk a écrit :

Usually what comes first to my mind is not the shortest solution, but anyway, it might give you some idea:

 

The Inverter and the select functions can be replace by a single xor Smiley Happy

 

Ben64


 

Message 3 of 10
(12,669 Views)
Solution
Accepted by topic author ChLiu

I should have warned the OP I love Rube-Goldbergs... 😄 Yep, a XOR function should be used there 🙂

 

ppbbt.png

 

Message 4 of 10
(12,665 Views)

Thank you a lot Blokk!! You are so nice:) I'm gonna try this

0 Kudos
Message 5 of 10
(12,659 Views)

Instead of XOR I typically use a "not equal". Same difference but less nerdy. 😄

0 Kudos
Message 6 of 10
(12,632 Views)

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 🙂

 

cscs.png

 

 

Message 7 of 10
(12,627 Views)

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)

 

 

Download All
Message 8 of 10
(12,616 Views)

@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.

0 Kudos
Message 9 of 10
(12,600 Views)

@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. 😄

0 Kudos
Message 10 of 10
(12,597 Views)