LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

opening a new front panel

Dear Friends

I want to have a new front panel in the main front panel such that when the user clicks on a botton the new front panel appears and when he clicks on an "OK" botton it is closed.

Considering that during the opening time of the new front panel the main program is running autonomousely.

I am using Labview2014

How do I accomplish this?

 

Sincerely

0 Kudos
Message 1 of 14
(3,494 Views)

Hi VS,

 

use a subVI in it's own (parallel running) loop. VI properties of that subVI should be "open FP when called" and "close FP after finishing"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 14
(3,492 Views)

That's called a Modal (sub)VI.  Design a subVI, and when you are done, set its Window Appearance property to Dialog.  Note on the page of options that Modal is selected (meaning the VI stays on top until it exits), Show FP when called is checked, and Close FP if originally closed is also checked.  If you design the Front Panel of this VI correctly (for example, positioning and sizing it appropriately, see the next Property tabs), it can "hide" the calling VI's Front Panel when it pops into existence.

 

BS

0 Kudos
Message 3 of 14
(3,444 Views)

 

2- Could you Please give me a simple example on parallel running loop for this problem?

 

0 Kudos
Message 4 of 14
(3,402 Views)

Click on (menu item)  file>>vi properties. Select "window appearance" from the dropdown and then click "customize".  Put a check box next to "Show front panel when called" and "close afterward if originally closed".  That will cause the subVi's front panel to be visible when it is called.  Putting the subVI in a separate loop will allow the subVI to be called without causing the main program to stop and wait for the subVI to finish. 

Message 5 of 14
(3,397 Views)

@Zwired1 wrote:

Click on (menu item)  file>>vi properties. Select "window appearance" from the dropdown and then click "customize".  Put a check box next to "Show front panel when called" and "close afterward if originally closed".  That will cause the subVi's front panel to be visible when it is called.  Putting the subVI in a separate loop will allow the subVI to be called without causing the main program to stop and wait for the subVI to finish. 


Oh  just hit Crrl+I


"Should be" isn't "Is" -Jay
Message 6 of 14
(3,387 Views)

Hi Zwired1

Thanks for the information but still there are some problems:

When I check "close afterward if originally closed" and put the sub vi in a While loop the Sub vi Front panel Flickers.

 

0 Kudos
Message 7 of 14
(3,371 Views)

Hi VS,

 

well, then you need to design your program a better way…

 

I want to have a new front panel in the main front panel such that when the user clicks on a botton the new front panel appears

You already discovered how to do this…

 

and when he clicks on an "OK" botton it is closed.

You still need that part. That "OK" button should be located on the subVI's FP and that subVI needs a loop of it's own…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 14
(3,350 Views)

 

Please check the attached image. When I press "Setting" in main VI the Sub VI appears and starts running but the main VI stops running until I press "OK" in the sub VI and it closes.

How can I chane the program such that when the sub VI starts running the main VI continue running too.

 

Regards

0 Kudos
Message 9 of 14
(3,326 Views)

V.S.,

 

No image was attached. Please attach your VIs. It is difficult to capture images of all the settings options but the VIs carry all of those with them. It is much easier for us to determine what is happening from the actual VIs.

 

Lynn

0 Kudos
Message 10 of 14
(3,319 Views)