LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can i use an event structure to exit from a while loop?

hello everyone
i have no experience at all about event structures and I was wondering if you have a loop that repeats every 10 seconds can you use an event structure to exit from the loop before it is finished?
ie if you press the stop button at the 3rd second  you won't have to wait 7 seconds and then another 10 to exit from the loop?
i attach a trivial vi so if anyone has any ideas please modify this one...
thank you very much
0 Kudos
Message 1 of 7
(3,347 Views)
sorry about that the attachment is here....
0 Kudos
Message 2 of 7
(3,346 Views)
Hello,

Actually it is easier than you think !

Have a look at the VI attached. When you create an event struct, it comes with just a tineout case, if you wire a numeric to the timeout connector, the timeout case will be executed if no other defined event occurs.. I assume this is what you are asking for.



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 7
(3,343 Views)

Thanks for the immediae response...

i tried to view the vi you attached but it says that it is in version 7.1.1 and my LV is 7.0!

any way to overcome this?

0 Kudos
Message 4 of 7
(3,341 Views)
OOOPS... sory I didn't notice it was in LV 7.0...

that one should be readable for you 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 5 of 7
(3,338 Views)
TiTou that was an apocalypse!!
thank you very much that was exactly what i needed!!
cu
ioannis
0 Kudos
Message 6 of 7
(3,334 Views)
WOW... Smiley Surprised... nothing less than an apocalypse Smiley Very Happy

Well I'm glad I help you, in the future if you keep using event struct, I would recomand you have a look at the example VIs (Help >> Find Example) ; they are often a good source of inspiration for developpers. Smiley Wink



Message Edité par TiTou le 03-17-2006 09:49 AM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 7 of 7
(3,327 Views)