LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure freezes after double click

Hi,

 

I use event structure for 2 events. Event #1 has an attached while loop. If I click on the button of event #2 or if I click once again on the button of event #1 Labview freezes without any respond. 

I just want to run event #1 OR event #2 untill each of them stops THEN run the same event or another.

 

Please help,

Thanks, Gregory.

0 Kudos
Message 1 of 8
(4,735 Views)

The general behaviour of the Event structure is it will lock the front panel when one event is executing and release it once it is done. Don't use while loop inside an event case, if you want to iterate you can use the timeout event (which automatically comes by default). Please post the code in 2011 version

-----

The best solution is the one you find it by yourself
Message 2 of 8
(4,713 Views)

This seems eerily similar this the problem in this thread:http://forums.ni.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2481312#M758418.  You might want to go read up on that one.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 8
(4,712 Views)

Please post the code in 2011 version

 

Attach version for 10.0.

 

Thanks, Gregory.

0 Kudos
Message 4 of 8
(4,695 Views)

Its still 2012 version

-----

The best solution is the one you find it by yourself
Message 5 of 8
(4,689 Views)

> if you want to iterate you can use the timeout event

 

What is "timeout event"? How can I use it here? Could you give an example?

 

> This seems eerily similar this the problem in this thread

 

If I understood rightly, the solution is "use loops", isn't so? 😃 

I want to use event structure just to have immediate response to mouse click.

 

Its still 2012 version

 

I used "File -> Save for previous version... -> Number". Here I tried to save in 8.6 version. Anyhow attach screenshots.

Spoiler
img1.jpgimg2.jpgimg3.jpg

 

0 Kudos
Message 6 of 8
(4,680 Views)

Hi Gregory,

 

The user interface is freezing because you have set the Event structure to lock the front panel until the event completes (right click on the title of the even structure, go to edit events for this case and look at the check box at the bottom).  You could uncheck this - but then these clicks will be stored until the action loops stop, and then they will be run.

 

Alternatively, if you want to prevent the user from clicking on buttons while something else is happening, you can use property nodes to disable certain controls whilst the action loops are running.

 

To do this - right click on the icon of a control and "Create property node".  One of the properties you can change is "Disable".  Don't forget to turn them back on again.

 

Obviously, this would be a pain if there were lots of controls, but in this case, it should be OK.

 

Hope this helps,

 

David

Message 7 of 8
(4,659 Views)

Hey,

 

Check the attached vi. I'm not very sure what exactly you are trying to do but the vi i posted does whatever your vi wants to do without freezing labview. Also I have put some comments on the block diagram which may help you. I'm using the shift registers to detect the start and stop. 


regards,
NitzZ

(Give Kudos to good Answers, Mark it as a Solution if your problem is Solved:smileywink:

Message 8 of 8
(4,645 Views)