LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Increase many numeric in for loop ?

Solved!
Go to solution

I am having a problem with for loop, as an example
for loop 1, output 3 values of 0,1,2
loop 2, output 3 values 3,4,5
....
loop n, output 3 values of n + 1, n + 2, n + 3
Do you have any ideas on how to do that with the for loop.
Thanks

0 Kudos
Message 1 of 4
(2,270 Views)
Solution
Accepted by topic author Vu_Anh

There are many possibilities. For example you could do a 1D array three times longer, then reshape to three columns.

 

Another possibility is for example this:

 

altenbach_0-1589473562987.png

 

Message 2 of 4
(2,238 Views)

Thanks for helping me, my problem has been solved.

0 Kudos
Message 3 of 4
(2,185 Views)

Note also that my solution is what we call "scalable", meaning that very little change is needed to get a different number of columns, e.g. 0,1,2,3|4,5,6,7|8,... etc. The "3" diagram constant could even be made into a control and the entire code turned into a subVI with two inputs (# of rows, # of columns) and one output (2D array). 

0 Kudos
Message 4 of 4
(2,136 Views)