LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to operate main vi with active subVI dialog?

Solved!
Go to solution

Hey all,

 

I'm currently working on a user interface for a test facility. On the main screen you have all the data you want to see at a blink. However for a more detailed view I'd like to make pop up windows showing the details while still being able to control the mainVI.

I tried using a subVI with window appearance set to "Dialog Box", but this blocks the mainVI until the subVI is closed. Is there a way to have a subvi pop up like a dialog box, but without it blocking the main VI?

 

Thanks in advance. 🙂

0 Kudos
Message 1 of 5
(2,666 Views)

Hi dabrainz,

 

don't make it a "dialog" in the VI properties!

 

Instead: hide the window borders/menu/other stuff and set it to "floating"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,661 Views)

Hey GerdW, thanks for the quick reply!

It didn't fix my problem though. I still can't use the controls on the mainVI like that.

I'm calling the subVI through an event value change of the button. Button is set to switch when released. Could it be that this is blocking it? (I would'nt see how, but who am I :D)

I've attached a picture and the subVI.

Download All
0 Kudos
Message 3 of 5
(2,656 Views)
Solution
Accepted by topic author dabrainz

Hi dabrainz,

 

I cannot open your VI as stated in my signature…

 

Yes, when you call the subVI in an event case it will block the main VI by default.

You could either change the default settings of the event case to "do not block the UI". BUT: as you need to THINK DATAFLOW the subVI call will still block any DATAFLOW in your mainVI (regarding the event structure).

 

So the solution would be the one that is recommended in the LabVIEW help on the event structure: Don't call any items in an event case that will block your VI!

The subVI has to run in it's own parallel loop to not block the main VI. Use a proper programming scheme like the Consumer-Producer pattern!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,645 Views)

There would have been a chance that you could open it, since your signature says [quote](sometimes even LV2014)[/quote] 😉

 

O.T. I put it in a separate loop from the main VI, but I'll leave out the event structure. Thanks for the help!

0 Kudos
Message 5 of 5
(2,638 Views)