LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Load 2D Arrays%27 columns with 1 X 2 array elements

Solved!
Go to solution

Hi, this is my first post to the forums and I'm pretty new to labview so please bear with me.

 

I am currently attempting to create an array that is 10 X 4 that will be loaded with 1 X 2 array elements for a signal analyzer. My goal is for 2 sets of the 1 X 2 arrays to be loaded side by side which would create the top column of the 10 X 4.

 

However, when I attempt to index the "insert into array" icon, I am unable to do so. Currently the vi file generates the two 1 X 2 elements (created by the for loop to simulate two sets of data readings) on top of one another i.e.: one at row 0, the second at row 2. I'm aware that the indexing is currently set to do so, but I can't figure out how to set it to what I actually need.

 

I have included the vi file I'm creating as well as a png file with a visual representaion of what is currently happening, and what is required.

 

The file i am working with is only a small scale version of what I actually need, to make it easier to work with. In the end, I will need a 360 X 22 array to be filled and sent out as a spreadsheet file (which I have got working but have omitted it from the included files)

 

Any help would be awesome, thank you.

 

Noodle00 

Download All
0 Kudos
Message 1 of 3
(2,873 Views)

I've just realised that I've mixed up "rows" and "columns" a bit during the explanation, my apologies.

0 Kudos
Message 2 of 3
(2,860 Views)
Solution
Accepted by topic author Noodle00

Hi Noodle,

 

why do you use InsertIntoArray when you want to replace array elements?

And why do you insert at "row 0" when you want to put those values in column 2/3?

 

You already created an array of 10×4 elements (using InitArray) so you need to replace elements [0, 2] and [0, 3] with those random values! Just try it with ReplaceArrayElement…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 3
(2,825 Views)