06-23-2013 12:19 AM
I am making a vi in which we need to execute listbox items according to loop values defined at the begining( shown in the image attached below) , it's like that we start a loop with some values in it e.g loop(2,4,5) and loop ends with END string and all the items between loop and END we need to execute number of times the values we have defined within loop , e.g in this case since only three values are there within loop 2,4,5 so any items present between loop and END we need to execute 3 times, it could be nested loop also, we tried so many solutions but not getting how to do this, some guidance would be great help.
function of the values defined within loop bracket is that we are having instryment list defined within loop and End and we having kept one constant x with every instrument , this x ( and the values defined within loop) are different voltages, x would be replaced every time by the newq loop value until all values are not executed.
below i am attaching the sequence list image.
06-23-2013 11:38 AM
For Loop.
Auto-indexing tunnel on an array that contains all the values you want to work with.
06-23-2013 12:26 PM
i am doing auto indexing but it not working correctly, below attached is the image of what i am doing.
06-23-2013 12:53 PM
No.
Put the 2, 4, 6, 8, 10, ... in an array and autoindex that into the for loop and act on those numbers.
06-23-2013 05:20 PM - edited 06-23-2013 05:21 PM
@Ritu wrote:
i am doing auto indexing but it not working correctly, below attached is the image of what i am doing.
Like this. (However you'll need more algorithm for this to work in nested loops - you'll have to keep a track of outside loop iterations while you execute inside loops.)
-DP
07-03-2013 04:36 AM
Sorry for the late reply,
Thankyou RavensFan and BTC_Admin
BTC_Admin
I tried the code as you mentioned but it is not working correctly even for single, i am not getting why you are using 2 for loops in the Loop case structure, the second fro loop is runnig twice the number of values i am keeping in loop bracket.
07-03-2013 07:03 AM
it is working fine, i was doing some mistake, but i am not getting any idea how to do it for nested loops.