LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase number by every n'th iteration in loop

Solved!
Go to solution

Hi

 

I am trying to build a 1D array of strings containing numbers where the value inserted into the array is increased by n'th step.

E.g. the length of the array can be arbitrary, let's say an array length of 107. The values I want to fill the array with starts from "1" (including " ", therefore a string), and for each 10th iteration the value is is increase by +1.

The should look something like this then

"1"

"1"

...

"1"

"2"

"2"

...

"2"

 

and so on until an array length of 107 is reached.

 

I tried something with some for loops, but i can't seem to get it to work.

 

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 1 of 6
(5,545 Views)

Hey,

 

Try this.. you may have to insert different string functions to isolate the number if you're string is anything more then just a number.

 

- Rkll

0 Kudos
Message 2 of 6
(5,538 Views)

22651iAE6BEE2E93E941CE

 

Felix

Message 3 of 6
(5,522 Views)
Solution
Accepted by Little_Helper

Why make things complicated.

Add a number to string as needed.

22655i7956797129AC0165

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 6
(5,516 Views)

That is very neat. I just added a concatenate string to add " before and after the number, which solved my problem.

 

Thank you very much.

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 5 of 6
(5,505 Views)

I was searching like this vi. I played a little bit on it but exactly what I need. Thanks alot.

0 Kudos
Message 6 of 6
(5,242 Views)