LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to give initial counter value for for loop.

Hi,

In Labview when i use for lopp,it is taking counter from 0 to n-1.How to make it take counter values from m to n where m >0 and n > m.

 

Thanks,

Harsha.

0 Kudos
Message 1 of 6
(3,442 Views)

You cannot do that in LabVIEW. Why do you want to initialize the iteration counter of the for loop?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 6
(3,440 Views)

Hi Harsha,

 

let's get back to elementary mathematics course at school:

check.png

Pretty easy, don't you think?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(3,439 Views)

I don't quite understand how it gives m to n loop.

 

Regards,

Harsha.

0 Kudos
Message 4 of 6
(3,435 Views)

Hi Harsha,

 


counter values from m to n


 

Set offset = m and multiplier = (n-m)/(count-1). When you don't understand that you really should go back to elementary school 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(3,431 Views)

Try this (I haven't put any range checking in there for m and n):

 

 

Counter values.png

 

 

0 Kudos
Message 6 of 6
(3,415 Views)