LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert level selector and make a loop stop on its own

Hi, I'm having problems.. how do I put in a level selector for my whack a mole game, where level 1 is 750ms, level 2 is 500ms and level 3 is 250ms? I've tried several ways but none seem to work.. and I want the game to last for 1 minute then automatically stop by itself. Tried wiring a greater than 0 boolean to the loop condition but doesn't work too.. can someone help me? thanks
0 Kudos
Message 1 of 2
(2,096 Views)

First of all, your three level buttons are outside the loop and thus will never get read except once at the start of the program.

 

A logical AND with a TRUE diagram constant is the same as a plain wire from the terminal. Simplify!

 

Why don't you use a radio button with the three level selectors. It is more appropriate because only one level can be active at any given time. Use it to index into an array of delays.

 

You can use the "elapsed time" express VI and "OR" the "elapsed?" output to the wire currently going to the stop terminal of the loop.

0 Kudos
Message 2 of 2
(2,092 Views)