LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close one vi and open another

Hi
 
Is it possible to open another vi when I click a button and close the current vi.
 
thanks 
0 Kudos
Message 1 of 10
(4,595 Views)
Sure, all you have to do is:
  1. From the current VI, open a VI reference to the new VI
  2. Run it using the Run VI method (be sure to wire a "false" to the Wait until Done input)
  3. Open its front panel using the Front Panel: Open method
  4. Close the current VI's reference to the new VI
  5. Close the current VI's front panel using the Front Panel:Close method
  6. Stop the current VI
Be sure to do steps 2 and 3 in the order shown here - it looks better.

Mike...

Message Edited by mikeporter on 07-01-2007 08:25 AM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 10
(4,590 Views)
Hi sujeep,

what about using 2 subvis connected by good dataflow (error cluster?!) to ensure sequential processing?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 10
(4,564 Views)
Hi Mr. Mike
 
Cn u explain me about the reference to vi. Where do I kind that.
 
Also can I get the values that I enter in the first vi to the second vi other than to store in a file and then retrive in the second vi.  
 
thanks in advance.
0 Kudos
Message 4 of 10
(4,547 Views)
Hi sujeep,

again: why not use subvis with proper dataflow?
See this codesnippet:

the first vi is getting some data, after closing the vi the next vi is started and gets the data from the first one...

Message Edited by GerdW on 07-02-2007 02:15 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 10
(4,543 Views)
Thanks a lot  I got the concept.
0 Kudos
Message 6 of 10
(4,537 Views)
Here, try this. Enter the path to the VI you want to launch and run the program. When you press the button, the VI you specified will be launched and the program will be closed.

Mike...

Message Edited by mikeporter on 07-02-2007 07:43 PM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 10
(4,508 Views)

Hello Mr. Mike

As my labview version is 8, I am not able to see the vi attached by u. So cn u explain me.

Thanks

 

 

0 Kudos
Message 8 of 10
(4,489 Views)
Here.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 10
(4,479 Views)
Thanks Mike - excellent instructions.
 
Thought I'd include a screenshot of your code in my application.
 
(Ignore the case structure: it was purely for timing purposes)
0 Kudos
Message 10 of 10
(4,125 Views)