From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-20-2013 05:21 AM
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.
Solved! Go to Solution.
04-20-2013 08:04 AM
It is possible, just create references to the subpanels, bundle them in an array and use a for loop.
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:
04-20-2013 04:37 PM
Make the test-vi reentrant and place it in a loop, configured for parallellism, done. 🙂
/Y
04-24-2013 10:09 AM
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.
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.
04-24-2013 10:25 AM
04-24-2013 03:24 PM
@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.
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
04-25-2013 04:32 AM
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.
04-25-2013 10:29 PM
Hi ace,
Your idea works! It save me a lot of jobs again!
Thanks a lot!