From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D array to 1D

If the processing speed is not a concern you can do it with one loop by using shift reg and an insert array function. If you want to create the 1D array after your loops are done then you can do it as it is shown in the second loop. (but in this case 

 

1D.png

 

 

Message 11 of 14
(938 Views)

Ok, I finally got it working.

But... the idea to collect data this way was crap. Now I got 10 times the same values because no new data arrives *face palm*

 

Anyway I attached the solution.

 

Thank you all for helping me!

0 Kudos
Message 12 of 14
(927 Views)

Hallo Steffen,

 

even more "facepalm":

 

Whatever you do in those smaller FOR loops can be done in your bigger FOR loop before! (Rube-Goldberg-Alarm!)

And please use BuildArray to append new data to an existing array. InsertIntoArray is overkill here…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 14
(921 Views)

Like I said before, if you have LabVIEW 2012 or later, you can configure those Autoindexing tunnels to be "Concatinating".  A lot better than using more loops afterwards.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 14
(914 Views)