10-11-2014 01:15 AM
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?
10-11-2014 01:18 AM
You need a while loop to repeat the code over and over.
10-11-2014 01:18 AM
but my string indicator is just a perfect square and doesn't say "a b c" in it
10-11-2014 01:24 AM
@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?
10-11-2014 01:30 AM
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.
10-11-2014 01:32 AM
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.
10-11-2014 01:49 AM
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.
10-11-2014 02:23 AM
oh thank you, appreciate it.
10-11-2014 07:24 AM
@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.)
10-11-2014 07:30 AM - edited 10-11-2014 07:38 AM
@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. 😉