LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to instantiate a subvi multiple times parallely?

Hi,

 

I am developing an application which uses a set of input controls for performing a task. I have given eight such sets of these controls in the main vi. However, I want to provide user an option to add more sets if required by invoking a subvi (which will have one such set of control) and likewise invoking the same subvi to have few more sets (as windows of one set each).

 

The important things here to be noted are:

  • User should be able to invoke multiple instances of the same subvi parallely using the same menu item in the main vi(say).
  • User should be able to transfer the control from mainvi, to subvi instance1, subvi instance 2 and so on by mere mouse clicks on the respective windows.

 

How can I implement such case using labview? All suggestions are welcome.

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

Hi mnx,

 

Just to correct me if I'm wrong:

  1. You have 8 subVIs and each have their own jobs
  2. For example, you want to control a temperature, you would press a button which pops up the control for the temperature and the subvi GUI will pop up for your to control

Well, if you want to open the subVI: you can find the example code here: http://forums.ni.com/t5/LabVIEW/Call-a-SubVi-in-Labview/m-p/1590320#M580140 

 

To start 2 subvis parallely, you can use the error cluster to force execution just like the vis I modified from the example codes from the earlier link. The error cluster wires (error in and error out terminals) make use of the dataflow rule in LabVIEW to make 2 functions or subVI's to run in parallel.

 

Hope it helps

 

Warmest regards,

Lennard.C

Learning new things everyday...
Download All
0 Kudos
Message 2 of 5
(2,664 Views)

@Lennard.C wrote:

The error cluster wires (error in and error out terminals) make use of the dataflow rule in LabVIEW to make 2 functions or subVI's to run in parallel


Data flow forces sequential execution which is exactly the opposite of parallel. For parallel operation the subvis should be set to reentrant and there cannot be any data dependency.

 

(Sorry, posting by phone. Cannot look at code)

0 Kudos
Message 3 of 5
(2,656 Views)
Hi
Reentrant vi also not working because in reentrant vi I have many subvi those are not reentrant so the values which I have using is toggling each other
0 Kudos
Message 4 of 5
(2,547 Views)

@manasam191 wrote:
Reentrant vi also not working because in reentrant vi I have many subvi those are not reentrant so the values which I have using is toggling each other

This thread is half a year old.  There is no information in the discussion above that would indicate that the subVIs contain many non-reentrant subVIs. Do you know something we don't know? Do you know user mnx?

 

Is this an unrelated problem?

 

So.... What "values"? What is "toggling each other"?

 

Please start a new thread and show us your code.

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