ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple tables with multiple rows

hi,

 

I have a 1D array and I want that to be my tables ( lets say I have 11 values in it so I want 11 different tables ) and I have another set of 1D array and I want that to be my rows on every table ( so second array values will be in 11 tables 11 times ) and I have a output that comes out based on the number of my 1st and 2nd array (like if i have 2 values in both arrays then i will get output 4 times). i need to generate it in single excel or csv file can someone help me with it??

0 Kudos
Message 1 of 5
(1,632 Views)

I cannot visualize what you are describing!  Can you give a concrete example of your first "1D array" (for example, is [2, 4, 7] allowed?  Does this mean you have 3 different tables?  What do the contents of this Array, e.g. 2, 4, 7, mean?), and similarly give a concrete example of your second "set of 1D array(s)" that are the "rows on every table" (for example, show us a specific "second set of 1D arrays")?  Now, what do you do with these to get "an output based on the number of my 1st and 2nd array"?

 

Bob Schor

0 Kudos
Message 2 of 5
(1,590 Views)

Hi rk,

 

is this some homework to learn LabVIEW?

 


@rk0001 wrote:

I have a 1D array and I want that to be my tables ( lets say I have 11 values in it so I want 11 different tables ) and I have another set of 1D array and I want that to be my rows on every table ( so second array values will be in 11 tables 11 times ) and I have a output that comes out based on the number of my 1st and 2nd array (like if i have 2 values in both arrays then i will get output 4 times). i need to generate it in single excel or csv file can someone help me with it??


From what I understand from those sentences is: someone wants to teach you usage of autoindexing tunnels in loops.

Suggestion:

  • You need two (nested) FOR loops, indexing your two input arrays (correctly).
  • At the output of those loops you will receive the needed 2D array.
  • There is a ready-to-use function in the file palette to create a CSV file (aka delimited spreadsheet file) from your 2D array!
Best regards,
GerdW


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

I'll name my 1st 1D array as A; A has values 95, 90, 85... Till 5.

2nd array B has values from 15, 14,... Till 2.

Now I want separate table for every value of A which has rows of B in it like for example my first table of 95 should have all values of B in rows and 90 should also have all values in B and so on.. 

Can you help me ?

0 Kudos
Message 4 of 5
(1,581 Views)

Can You give a sketch of what that should look like? I understood this and it does not seem to be useful

 

A:
95  90  85  ...  5

B:
15  14  13 ...   2

Separate Table 95:
15
14
13
...
2

Separate Table 90:
15
14
13
...
2

More Separate Tables ...

Separate Table 5
15
14
13
...
2
0 Kudos
Message 5 of 5
(1,575 Views)