LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please check it is not a bug.

Solved!
Go to solution

Hey,

 

First the event structure should be in a while loop. If you're not too familiar with event structures, I recommended doing a bit of research on the knowledge base on the structure. They're not as simple to use as the other structures.

 

If you want to test your code, remember to make that timeout time a little longer, say 5000ms, otherwise you'll consistantly get that dialog box telling you there's timeout.

 

Hope this helps

Jevon

0 Kudos
Message 11 of 16
(1,269 Views)

Your while loop will never display a message to the user, as Coq mentioned since the check is always false (You've just written an advanced False-constant).

The event structure has a 100ms timeout meaning it'll loop once after 100ms and never again (unless you manage to press the button before that), so chances of it handing your button press is slim, or you'll have to be very fast.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 12 of 16
(1,263 Views)

Yes, Jevon, it helps (while loop), thanks.

Yamaeda, thanks!

 

Is there any way to restore standard handler for event when leaving Event Case Structure?

And why labview vm deletes all event handlers for all objects thus we replace only one of them after leaving the structure?

 

 

Message Edited by kolan on 03-26-2010 06:02 AM
0 Kudos
Message 13 of 16
(1,248 Views)
Hm, I just asked. May be it's normal behaviour... Sorry if I said something wrong.
0 Kudos
Message 14 of 16
(1,230 Views)
Solution
Accepted by topic author kolan

Hi,

I was just checking your code, as due to empty array the search array always return -1 your code always execute the false case.

The problem of hanging arises after you press the button is due to event structure. when you generate an event which is registered( in your case in event sturcture), Labview locks the front panel to generate any further events. thats the reason why your application looks like hanged. Right click on event structure and click on edit events handled by event structure. you will see lock front panel on the bottom of the window, uncheck it. and run your program again you will not see the hanging issue. but the events are buffered in the labview memory, since your program will never go to true case with loop iteration "0"

Regards

....

Message 15 of 16
(1,226 Views)

>>Right click on event structure and click on edit events handled by event structure. you will see lock front panel on the bottom of the window, uncheck it. and run your program again you will not see the hanging issue.

 

IMpossible1, Thanks a Lot! That is what I want to know. :smileyhappy:

0 Kudos
Message 16 of 16
(1,215 Views)