From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Many Sub panels to call same VI

Solved!
Go to solution

Hi,

 

I would like to create a test sequencer can test on multiple device in parellel.

 

I have just created a VI which has 2 sub panels to call the sequencer.vi, both of the sub panels able to run the test in parallel and asynchronously.

 

Now my problem comes, if my VI has to test on 50 device in parellel, is that expand block diagram the only way can do it?

 

Anyone have better idea for future easier maintainbility and sustainability?

 

Here I attached my VI.

 

Thanks.

0 Kudos
Message 1 of 8
(3,184 Views)
Solution
Accepted by topic author TanTan

It is possible, just create references to the subpanels, bundle them in an array and use a for loop.

Spoiler
Load Seqeuncer_BD.png

 

However, you may need to have some communication mechanism between the subvi's and the sequencer as you are not sure of the state of your sub panel vi when you click Exit on the Load Sequencer for example.

 

Here are some examples that may give you some poiners, there are more available if you search:

http://forums.ni.com/t5/LabVIEW/Calling-a-VI-in-a-subpanel-with-parameters-inside-an-event/m-p/23233...

http://forums.ni.com/t5/LabVIEW/Dr-Damien-s-Development-Running-Top-Level-VIs-II-SubPanel-Use/m-p/99...


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 8
(3,169 Views)

Make the test-vi reentrant and place it in a loop, configured for parallellism, done. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 8
(3,147 Views)

Hi ace,

 

Yes the array and for loop is work! Appreciate your idea, this saves me a lot of job!

 

Now I am thinking how to simplify the area as shown in picture below.

 

reference.JPG

 

If i create a string combo or numeric control in the front panel, for user to select the quantity of device to go for testing.

 

After the selection, lets say the quantity = 5 subpanels.

 

So in the block diagram, is there any way to auto create 5 reference of different subpanels, link them to 'build array function' and 'for loop'?

 

Or pre-create the references of subpanels for every single case of quantity selection, is the only solution?

 

Thanks.

0 Kudos
Message 4 of 8
(3,097 Views)
Take a look at TestStand. It will save you a ton of money and time because it has parallelism built in. The basic parallellism features that are built in already in TestStand will take months to develop from scratch in LabVIEW. If future maintainability is important, it's worth spending just a little bit of time learning to use TestStand.
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 5 of 8
(3,093 Views)

@TanTan wrote:

Hi ace,

 

Yes the array and for loop is work! Appreciate your idea, this saves me a lot of job!

 

Now I am thinking how to simplify the area as shown in picture below.

 

reference.JPG

 

If i create a string combo or numeric control in the front panel, for user to select the quantity of device to go for testing.

 

After the selection, lets say the quantity = 5 subpanels.

 

So in the block diagram, is there any way to auto create 5 reference of different subpanels, link them to 'build array function' and 'for loop'?

 

Or pre-create the references of subpanels for every single case of quantity selection, is the only solution?

 

Thanks.


You can Open reference to a file (.vi) in a loop, just add some function to generate the name of which file to open, e.g. Subpanel1.vi and so on, and it's quite simple to generate and open the references.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 8
(3,082 Views)

Bundle the references and then use a array subset or something similar to extract a portion of the array of subpanel references. So if you have 10 subpanels, and the user selects, 3. Derive the first 3 elements from the array and use it in the for loop as before. Hope this helps.

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 7 of 8
(3,056 Views)

Hi ace,

 

Your idea works! It save me a lot of jobs again!

 

Thanks a lot!

0 Kudos
Message 8 of 8
(3,033 Views)