LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set values in 2D-Array?

Solved!
Go to solution

Hello,

I need some help in creating a 2D-array from some input-arrays

1) The string-array with three values should be in first postion

2) Then there is another 2D-array that contains 3 times 10 values.

I want to show now these ten values in the three columns.

How can this be done?

 

Thank you

 

table.jpg

0 Kudos
Message 1 of 7
(3,016 Views)

Personally, I would use a table with the colum headers visible.  You can then set your headers to be your first array.

 

As far as your numbers, use one of the functions in the String->Number/String Conversion palette to change your numbers into a string.  Choose whichever conversion you need based on the format you want.  You can then have a 2D array of strings to pass into your table.

 

Or if you insist on using an array, use Build Array to conbine your header array with your data array.


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
Message 2 of 7
(3,010 Views)

Hi One,

 

after more than 600 post in the forum and so being titled an "Active Participant" you really ask for some (very) basic array operations?

Have you ever considered to take the LabVIEW beginner courses offered by NI on their website (for free)?

 

You want to build an array so you should use the BuildArray function…

Best regards,
GerdW


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

The problem is that, if using "Build-Array", the values are going from left to right.And then they are not under the column-names.

It would be nicer if they are from top to bottom.

0 Kudos
Message 4 of 7
(3,002 Views)
Solution
Accepted by topic author OnlyOne

Hi One,

 

using "Build-Array", the values are going from left to right.And then they are not under the column-names.

You need to use BuildArray in the right order!

 

Sometimes it can be so easy:

check.png

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(2,990 Views)

solved in previous reply

 

 

0 Kudos
Message 6 of 7
(2,982 Views)

@OnlyOne wrote:

solved in previous reply

 

 


Then you should actually mark GerdW's post as a solution.


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 7 of 7
(2,979 Views)