LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert value in table

Hi everybody

I have a problem with the table block.

I want each loop , The data will insert to table follow columns, not follow rows.

Best regards
Van Phu
0 Kudos
Message 1 of 8
(7,240 Views)

Van Phu,

 

A table is just a 2D array of strings.  So just convert the numeric array to strings.

 

Lynn

 

Array to Table.png

0 Kudos
Message 2 of 8
(7,237 Views)

Hi

Best regards
Van Phu
0 Kudos
Message 3 of 8
(7,216 Views)

Van Phu,

 

I do not understand exactly what you want.  You want to duplicate column 1 and create a column 2 with the duplicate?  If your array gets large this seems wastefull of memory and processing time.

 

Try this.

 

Lynn

 

2D Array.png

0 Kudos
Message 4 of 8
(7,210 Views)

If you want to flip columns and rows just transpose the array, as shown in the last post from Lynn.

0 Kudos
Message 5 of 8
(7,205 Views)

Dear everybody,

 

As in the example below.

In the example I used 3 case,

Case 1. The value will show on 2 columns

Case 2: The value will show on 4 columns

.....

 

Now I don't want use many case so.

I want only use for loop to.

Loop 1: The value will show on 2 columns

loop 2 : The value will show on 4 columns.

Best regards
Van Phu
Download All
0 Kudos
Message 6 of 8
(7,172 Views)

Vanphu,

     I'm curious as to why you're using dynamic data for your table of doubles. I think the way you want to approach this would be to use an array of strings. You would then insert your random numbers into the string array and pass the array to the next iteration of the for loop using a shift register. Hope this helps.

 

Ryan Sparks

Applications Engineer

National Instruments

0 Kudos
Message 7 of 8
(7,150 Views)

Hi Ryan_S,

Thahk you very much.

Best regards
Van Phu
0 Kudos
Message 8 of 8
(7,111 Views)