LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure hangs VI

I am using Tab Controls in my VI, and want to reset some Button Controls (using property nodes) when the tab controls change value. So i have tried to use an event structure which contains a FALSE constant wired to the VALUE property of several Button Controls. It works just fine, the only problem is that i cant operate any buttons or stop the VI from the stop button. It seems like the event structure hangs the vi.

I guess there is a simple solution to this problem, but i cant find it and i am getting desperate... Please help!


0 Kudos
Message 1 of 7
(3,689 Views)
Hello Vatoloco,

I can't give a short (correct) answer but:

The vi structure will always get every event. If you have selected to 'lock front panel until event structure done' (as is by default) for this event it means that :

The front panel is unresponsive until the event has executed

This is a tricky thing because if the event structue isn't executing, it locks the front panel. A quick check for this is to deselect this option.
If that works you have to redesign your vi. Have a look at the design patterns that ship with labview. Or you could look with high-lite executing where your VI 'is' when you change the tab control.

Ton

PS For a more correct post, search this forum with a broader timespan (let's say 12 months or so) you're not the only one!

Message Edited by TonP on 04-21-2006 01:43 PM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 7
(3,682 Views)
Did you include you "STOP EVENT". You need to create an event for the value change of the stop button of your while loop.
Message 3 of 7
(3,675 Views)
I found a simple solution to my problem, although it may not be 100% "by the book"; i placed my event structure in a seperate while loop outside my main while loop....

By doing this i still cant stop the VI from the stop button, but everything else works just fine! The stop button issue does not really matter, as i am creating an application which the user cannot stop, only quit...



Message 4 of 7
(3,669 Views)

hi there

this is the correct solution! the event structure will wait for one of the defined events to occur, then execute the event code and then finishes! if you want the event structure to catch consecutive events it HAS to be placed in some kind of loop to start waiting again and again.

the "lock front panel" option takes only effect while the event code is EXECUTED, not while the event structure is waiting for the event to occur. make sure that the while loop that contains the event structure stops execution when the application is closed.

i attached a little example.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 5 of 7
(3,663 Views)
Thanks Chrisger, thats right up my alley!

Cheers mate!

0 Kudos
Message 6 of 7
(3,661 Views)
you're welcome
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 7 of 7
(3,652 Views)