LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why this while loop can be stopped in the event strucure?


wbcat wrote:

...

But I hate laser fires without control: when I set "others", it will fire once. I donot like that


Hi wbcat,

i don´t understand it. Do you mean because the loop runs ones? Where do you want to fire the event. Only the selected event runs.

Mike 

0 Kudos
Message 11 of 17
(733 Views)
If you fire the laser inside the correct event, it will not fire if other events are triggered.
0 Kudos
Message 12 of 17
(732 Views)

  ,

I can put the code for one single fire inside a event, it will not be triggered.  the problem is, you want it fire continuously, that is why I need the while loop. otherwise, you can not check how good it is working. I can use a for loop, but it is not that convenient

0 Kudos
Message 13 of 17
(728 Views)

wbcat wrote:

 I can put the code for one single fire inside a event, it will not be triggered.  the problem is, you want it fire continuously, that is why I need the while loop. otherwise, you can not check how good it is working. I can use a for loop, but it is not that convenient


 

 

Then, I don't uderstand what the problem is if the laser should fire continuously anyway. 😉

 

What if you put the laser in the timeout case?

0 Kudos
Message 14 of 17
(720 Views)

I am a moronSmiley Surprised

by the way, why you donot like the solution, uncheck 'the front panel lock' of the event case

0 Kudos
Message 15 of 17
(718 Views)

wbcat wrote:

by the way, why you donot like the solution, uncheck 'the front panel lock' of the event case


Because what good is an event structure if it cannot react to events at all time, e.g. during the time the code is running the inner loop?

 

There is a danger that you accumulate an infinite number of events in the event queue. Imagine you have an event for a certain button press, but the code is running the inner while loop. Every time you press that button, it will get queued up, because the event structure is not ready for it yet.

0 Kudos
Message 16 of 17
(709 Views)

I see..

Thanks a lot

 

0 Kudos
Message 17 of 17
(704 Views)