LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help the Newbie, plz

I have another question. Let say that I ave 6 channels for testing and I have the VI to do I/O for the each channel. However, depending on the testing period, it sometimes takes a long time. So, how can I automate the process. Let say for channel 1, it gets the defaulted I/O paths and moves onto Channel 2 once channel 1 is done without me being there to do it manually? Thank you in advance.
0 Kudos
Message 1 of 2
(2,481 Views)

First thing to do is to go to http://www.ni.com/devzone/lvzone/fundamentals.htm and check some of the resources available for training. As far as answering your question directly, you can use any number of methods. One is to put you existing program inside a for loop. If you create an array of test setups and put it outside the loop and wire the array through the for loop, the auto-indexing feature of a for loop will automatically extract each element, run the test, extract the next, run the new test, etc. until all of the array elements have been extracted. The for loop will then automatically stop. You can also use a while loop. This will give you a bit more flexibility but you have to do some more coding. You would bascially get the array size, and tell the while loop to stop when the iteration count is greater than the array size. The advantage of a while loop is that you can add a stop button if you want to prematurely stop. A while loop will not automatically auto-index and array but it can be selected by clicking the entry tunnel and selecting it.

 

0 Kudos
Message 2 of 2
(2,473 Views)