From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect string constant to true/false boolean

Solved!
Go to solution

I can either make a while loop until the "correct" condition is met or the user can press a stop button when they are correct, while the while loop keeps going, or is the while loop not necessary if the stop button is used?

 

Can i use a while loop to make it going and then it never stops and have the user just press a stop button?

0 Kudos
Message 21 of 31
(1,281 Views)

You need a while loop to repeat the code over and over.

0 Kudos
Message 22 of 31
(1,279 Views)

but my string indicator is just a perfect square and doesn't say "a b c" in it

0 Kudos
Message 23 of 31
(1,277 Views)

@student11 wrote:

but my string indicator is just a perfect square and doesn't say "a b c" in it


This is irrelevant. However if you look at the picture you posted in the first post, it says abc. Right?

0 Kudos
Message 24 of 31
(1,273 Views)

Oh my apologies yes it does. I tried your code and it works good, but the one with the true/false booleans seems to slow and then the user probably won't be able to get the number right because it goes off to start a new number.

0 Kudos
Message 25 of 31
(1,270 Views)

I really need to learn how to make this vi with the true/false booleans. I figured how to wire the while loop to the vi, but I can't make it to stop starting new random numbers.

0 Kudos
Message 26 of 31
(1,269 Views)

Move the random generation outside of the while loop.  It will complete before the loop and the value will remain the same within the loop.

0 Kudos
Message 27 of 31
(1,256 Views)

oh thank you, appreciate it.

0 Kudos
Message 28 of 31
(1,246 Views)

@student11 wrote:

You basically connected values to a true/false function thing (too small) if it is true it will display too small. If false we get information from the other second true/false function thing that says if it is true that it is (too large) it will display too large. If it is false, then the only option left is the "right on."

 

I can't figure how to connect the while loop to this. I know the while loop has to connect from a function boolean, but since we are using 2 true/false booleans, how do I connect a while loop to this? I try connecting it to the constant indicator conected to the first true/false boolean, but it says error.


That's great!  By expaining it to me, you showed me that you understood what the code did so you "owned" it and you are not just blindly turning it in as your solution.  (The teacher would probably ask you the same thing, so it was a good exercise.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 29 of 31
(1,228 Views)

@altenbach wrote:

Here's what I would do. Less clutter. 😄

 

 

 

 


You know, my original solution was to index based on sign, but I forgot all about the sign node.  Without it, it would be impossible.  I would've used a case statement instead, though, because I wouldn't have thought about adding +1 to the output to make it indexable.

 

That's why you're a Knight and I am a minion.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 30 of 31
(1,223 Views)