取消
显示结果 
搜索替代 
您的意思是: 

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

已解决!
转到解答

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 项奖励
1 条消息(共 10 条)
14,341 次查看

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

 

pointbyp.png

2 条消息(共 10 条)
14,332 次查看

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 高兴表情

 

Ben64


 

3 条消息(共 10 条)
14,306 次查看
解答
已被主题作者 ChLiu 接受

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

 

ppbbt.png

 

4 条消息(共 10 条)
14,302 次查看

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

0 项奖励
5 条消息(共 10 条)
14,296 次查看

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

0 项奖励
6 条消息(共 10 条)
14,269 次查看

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

 

 

7 条消息(共 10 条)
14,264 次查看

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)

 

 

下载全部
8 条消息(共 10 条)
14,253 次查看

@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 项奖励
9 条消息(共 10 条)
14,237 次查看

@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 项奖励
10 条消息(共 10 条)
14,234 次查看