LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running multiple copies of Sub VI in parallel

Solved!
Go to solution

I'm developing the life test of 2-way switches, my test setup consists of NI PXI system with up to 6 DMM's and up to six USB 4-way switches to control the devices under test. I have a Sub VI that sends the path word to the 4-way switch and takes a measurement with PXI. I can now run number of copies of this Sub VI in parallel and fetch the measurement from up to 24 DUT's. It's working good.

 

But I have now up to 6 separate While loops, each of them is running one statically created copy of my Switch&Measurement Sub VI. What if I want to use only 2 or 3 4-way switches? My question is, how to call my Sub VI dynamically, so it still be running in parallel with itself?

0 Kudos
Message 1 of 4
(3,209 Views)
Solution
Accepted by topic author Arkady_V

This snip shows one method of launching a dynamic number of clones of a vi.  Save the attached vi where you can find it.  Drop this snip on a blank BD.  Edit the path to point to your path to the attached vi and change Numeric control to play with it youself.

1!.PNG


"Should be" isn't "Is" -Jay
Message 2 of 4
(3,206 Views)

Jeff,

 

Thank you, I've got the idea. Is it possible to modify your example slightly to make the clones run in subpanels of the Main VI? Say I have 6 subpanels and I want first n (n<6) of them to display the clones of the Reenterant.vi.

 

UPD. I accidentally figured out myself how to do it. Required me to change options from 0xC0 to 0x80. Thank you again.

0 Kudos
Message 3 of 4
(3,176 Views)

@Arkady_V wrote:

Jeff,

 

Thank you, I've got the idea. Is it possible to modify your example slightly to make the clones run in subpanels of the Main VI? Say I have 6 subpanels and I want first n (n<6) of them to display the clones of the Reenterant.vi.

 

UPD. I accidentally figured out myself how to do it. Required me to change options from 0xC0 to 0x80. Thank you again.



yes, you can't fire and forget a vi in a subpanel.  you need to fire and remember.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(3,161 Views)