LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronously calling, starting, stopping and restarting Sub-Programs from the main VI

Hello everyone,

I have 6 programs which I am usually running at the same time in separate windows.

 

I would like to create a VI (MAIN Program) from where I can control these 6 VIs (Sub Programs) in one window, switching between them via TAB-control.

 

I already could create a MAIN program which calls the Sub Programs in the background and displays their Front Panel in the corresponding TAB window (see picture attached).

It works fine and I am able to use just 1 MAIN Programs and switch between Sub Programs via TAB control.

When I press the STOP button, the MAIN Program + all Sub Programs stop. I also can stop the sub-programs separately (because all of them have a stop buttons).

 

BUT there is a problem which I cannot master:

With my current solution the MAIN Program starts ALL Sub-Programs in the background. But I am not using all of them at the same time.

I cannot RESTART them separately!

And the CPU usage is quite high.

 

My Goal is:

I would like to START the Sub-programs separately! So the MAIN Program should call the Sub Programs like it is now, but without starting them.

I would like to switch between them with TAB control and start only the programs that I need, by pressing START button in the MAIN Program.

 

 

I would very appreciate if you can help me to find the solution for it.

(I am using LabVIEW 2013 and I am very new to it (beginner level)).

 

Thank you for the help!

 

 

I attached the screen shots of:

- Front Panel of the current MAIN Program

- Block Diagram of the current MAIN Program

 

Here is the Front Panel of the desired MAIN Program (On the right side there are “START” and “STOP” buttons for the Sub Programs)

Goal-Main.JPG

0 Kudos
Message 1 of 3
(2,385 Views)

Given your LV knowledge already has a solid foundation, you should attend the LV Advanced Architectures class.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(2,371 Views)

I've pasted a link to a tutorial with examples from the LabVIEW Object Oriented series that I think does exactly what you want.  It's called a "Plug-in Architecture".  This example shows how to do this using LabVIEW Objects -- if you are not ready to tackle Objects yet (and I consider myself still in that camp), studying the code and Pattern can still be helpful and give you some good ideas.

 

https://decibel.ni.com/content/docs/DOC-15014

 

Bob Schor

0 Kudos
Message 3 of 3
(2,311 Views)