02-25-2009 03:47 PM
Hello all,
Can anyone help me in describing or posting an example of the equivalent of a do loop with increment?
do i = 1, 110, 11
....
enddo
I searched the past posts without clearly seeing an example.
Thanks
Pecan204
02-25-2009 04:06 PM - edited 02-25-2009 04:07 PM
If you mean you want a loop that will execute three times, with the values 1, 110, and 11, create a constant array containing those values, and connect it to a for loop. LabVIEW will auto-index through the array, executing the loop once for each value the array contains.

02-25-2009 04:32 PM
I was trying to insert values 1,11,22,33,44, etc to 121 duplicating the fortran do loop wuth optional increment. Any other thoughts?
Thanks
02-25-2009 04:33 PM
Hello,
see this example !!
Phil
NTA-Automation
02-25-2009 04:51 PM
Try this.
You could also use the conditional stop terminal or a while loop.
02-26-2009 06:39 PM
Thanks Dennis for the example.
The equivalent for a do while loop in LabVIEW is the While loop. The while loop in LabVIEW executes atleast one similar to the do while in text based programming languages.
Taken from the For Loop and While Loop Structures help file:
Similar to a Do Loop or a Repeat-Until Loop in text-based programming languages, a While Loop, shown as follows, executes a subdiagram until a condition occurs.
The While Loop executes the subdiagram until the conditional terminal, an input terminal, receives a specific Boolean value. The default behavior and appearance of the conditional terminal is Stop if True, shown as follows.
Hope this helps!