LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multible for loops

Hi forum,

 

i have another quesiton regarding labview doing multible for loops or while loops, if i have a programm that looks like this: 

 

numConfig  = 0;

f = 40;

v = 100;

v_low = 200

f_high - 60

 

while numConfig < 11

   while v >= v_low

       while f <= f_high

       f += 5

    v += 10

numConfig += 1

 

 i want to run though each configuration (for example 11) , each v and each f can someone help in this case?

Thanks,

Martin

 

 

 

0 Kudos
Message 1 of 3
(2,236 Views)

You just embed one For loop inside of another, and then inside another.  Or while loops as the case may be.  The outer loop for numConfig seems like it should be a For Loop since it is a simple count.  The other two look like While loops since the continue or stop condition looks like a comparison.

 

For any "variable", those values that keep getting updated between loop iterations, you'll want them maintained in a shift register, possibly multiple shift registers with one on each loop as you step outwards.

 

Your "C" code looks incomplete as it doesn't clearly define where a loop ends, and also whether some values such as F should be reset each time the innermost loops gets restarted on the next iteration of the next outer loop.

0 Kudos
Message 2 of 3
(2,231 Views)