LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closing multiple vis

I am designing a vi which opens various subVI front panel during run time. every subvi is opening different ports (Com or ehternet) on PC. I want to close all the vis by clicking the window close, andure that every port has been closed by the program before exiting

Labview user
0 Kudos
Message 1 of 7
(2,750 Views)

Handle the port close in Panel close event of event structure in each Sub VI

 

http://zone.ni.com/reference/en-XX/help/371361E-01/lvprop/vi_e/

Message 2 of 7
(2,740 Views)

Hi Sc,

 

use a global "stop" flag. All subVIs will look at that flag and will close their ports (and windows) before exiting...

Best regards,
GerdW


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

Can you tell me, How to generate panel close event of sub vi from main VI or any other vi.

Labview user
0 Kudos
Message 4 of 7
(2,734 Views)

hi

Labview user
0 Kudos
Message 5 of 7
(2,731 Views)

Hi Sc,

 

when asking for help it is always a good idea to present as much information as possible...

 

Use the panel close event in each (sub)VI as mentioned before!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,727 Views)

HI everyone,

I think I got the solution.

I will use stop flag as suggested by

Labview user
0 Kudos
Message 7 of 7
(2,724 Views)