LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I operate front panel controls when a subvi is running

I have a main application where I can call different tests. When I start a test, a subVI front panel opens and start running. When the subVI is running I can't change the value of the main application front panel controls. I remember having a similar issue a few years ago but I can't remember how I fixed it, probably by changing a setting somewhere but I went through all the menus and didn't find anything.

 

Anyon can help?

 

Thanks

 

Ben

 

(I'm using LabVIEW 8.6.1)

0 Kudos
Message 1 of 4
(2,516 Views)

There is no setting that will fix this. If the subVI is statically called (i.e., it's on the block diagram and you're basically using a case structure to call a specific one), then the calling VI must wait until the subVI finishes before it can continue. You have two ways to fix it:

  1. Call the subVI dynamically.
  2. Have the code that calls the subVI run in an independent, parallel loop.  
Examples ship with LabVIEW that show you how to do both.
0 Kudos
Message 2 of 4
(2,506 Views)

Thanks fo your answer smercurio but I finally found out why I was not able to modify the controls on the front panel. I'm using an event structure and I added some event cases without unchecking the "lock front panel until event case for this event completes" box.

 

So, for other people who may encounter a similar issue, you have to right click the event structure, select "edit events handle by this case..." and uncheck the "lock front panel until event case for this event completes" box.

 

Ben

0 Kudos
Message 3 of 4
(2,457 Views)
I am well aware of that setting. What you are doing is not good design. An event case should not be calling a VI that takes a long time to execute. An event case should return quickly back to handling events. Even if you uncheck the box, all that will do is queue up the event. It won't get handled until the subVI completes. If you have calls to subVI that take a long time then you should really be using a producer-consumer architecture.
0 Kudos
Message 4 of 4
(2,436 Views)