LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using event structure for timed events, stop button not working

Hello,I currently have a little problem with a little homework I have, I'm new to LabView and I have a homework in which by using the event structure I must make a LED turn on/off each t interval of time (t: time in milliseconds defined by the user).

 

I made it work but I have a little problem, I have two buttons, the start and stop button, the first one works fine, but the second doesn't, I believe it is because inside each event there's no delay so the program keeps changing between the ON/OFF events. I already tried to put a delay on the events (50,100 ms) but it didn't work, any ideas?

 

*I know there are specific time structures but I was specifically asked to use the events structure.

 

I attached my work so far below.

 

Thank you.

0 Kudos
Message 1 of 3
(2,544 Views)

Use the timeout event. (Almost) never us signaling value properties. What's the purpose of the OK button and the two numerics? They seem unrelated to the problem.

Use a shift register to toggle the boolean.

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

Follow Altenbach's advice.  But the reason your stop button is not functional is because you have all of those event cases set to lock the front panel until the case completes.  Since one event is firing the other before it is done, and the second is firing the first before it is done, you've blocked yourself off with a locked up front panel to ever have control where you can hit the stop button.

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