03-16-2013 10:52 AM
I'm trying to create sort of life test for series of 1-way mechanical switches. In this test I need to measure insertion loss of my devices under test while repetitiously switching them. I use USB controlled 4-way switch to test 4 DUT's at the same time. I built a Sub VI that switches to the selected path (S-1, S-2, S-3 or S-4) and takes a measurement. It works pretty well.
Now I'm adding another 4-way switch to test another 4 DUT's. And I have a plan to add up to 8 4-way switches running in parallel. It works. But I was surprised that the measurement time doubled. And I figured out that my second Switch&Meas Sub VI can't be called from a parallel While Loop simultaneously with the first one. It waits until the first one finishes its routine.
Ok. I saved a copy of the Sub VI and call it from a second loop. And now it works in parallel, both 4-way switches are switching like crazy. But I feel that I just made another stupid thing.
Please take a look at the example. I removed any device specifics, replacing them with delays and random numbers. Can you suggest any way of running the same Sub VI in parallel without creating multiple copies?
Solved! Go to Solution.
03-16-2013 11:00 AM
Read up on re-entrant VIs. I think that will do what you want. The setting is in VI Properties >> Execution.
Lynn
03-16-2013 11:10 AM
Thank you for fast reply, that was simple and worked just well!