LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure is restarting at 120? should go to 167

My case structure is restarting at 0 when it gets to case 120 instead of continuing until 167? also, how can I get my vi to execute a certain case for x amount of time, i tried the wait vi but it just wait to execute instead of executing until time is up. I would appreciate any help, thanks.

Here is my prog.
0 Kudos
Message 1 of 3
(2,501 Views)
I am not quite sure what to do for the case structure restarting at 0. Maybe you could elaborate more on this. But in terms of getting an vi to execute for x amount of time. I would put the vi in a while loop and then use the tick count function. Then use the greater than or equal to comparison function to compare the time to an amount x. Then wire the boolean output of the comparison function to the stop execution part of the while loop. The while loop should stop after you reach x amount of time.
0 Kudos
Message 2 of 3
(2,489 Views)

If you go to case 120 you'll notice that you did not wire the ring to the output tunnel. Thus it will get reset to zero.

(Just right-click on the output tunnel and deselect "use defaut if unwired". Now click on the broken run arrow and search for the error about the missing tunnel assignment and double-click the error. It will get you to the error).

Your programming style is unbelievable tedious. Why don't you follow our advice and streamline your code. Is there anything in my last example that you don't understand? 🙂

0 Kudos
Message 3 of 3
(2,486 Views)