LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting data from table

Hi just have a Labview programming question that I'm not too sure how to implement.

Right now I have a VI that takes in an Excel file and dumps the values onto a 2D table. I'm extracting individual columns of values from the table by using "delete from array." I have 18 columns (18 arrays). I then group 2 arrays together to get 9 2D arrays and use them to do some mathematical analysis (polynomial fit). In addition the user can select which row in this table they want to start and the length of the array they want to use.

Ideally this is what I want to do:

Load the values onto the 2D table. The user can select (ctrl or shift?) the values they want to use and the program uses these values to do the mathematical analysis.

For example
Table

2   4   5   6   7    9    10  15
3   5   3   3   3    34  11  11
0   0   1   5   6    11    2  10
2   2   2   1   0      0    1    7

Say the user want to select all the values to do the analysis except 0.

Is this possible to do? I tried selecting values on my existing program but it seems that I can only exclude either the entire row or the entire column.

0 Kudos
Message 1 of 4
(3,070 Views)

The best way to implement this functionality would be to use a multicolumn listbox instead of a table to display your 2D data. The multicolumn listbox stores text data and outputs either a scalar or an array value for the row(s) selected.

You could first convert your numbers to strings for display purposes and input them into the multicolumn listbox by using a property node for the listbox with the Item Names property selected. Then change it to write and wire a 2D string array into it to populate the list box. Then the user can select a row, which you could index out of the 2D string array accordingly and input into a 1D listbox so the user can select a subarray for analysis. Alternatively, you could have simply have the user select an offset and length for the subarray.

Unfortunately there are no means of selecting or deselecting certain columns directly using the listbox, but this idea will at least deliver the desired functionality. I've attached a quick example that sums a selected set of numbers in LabVIEW 7.0. Let me know if you need an earlier version.

Jarrod S.
National Instruments
0 Kudos
Message 2 of 4
(3,051 Views)
Hi thanx for the reply. I only have Laview 6.1, is it possible to convert your file for me? Thanx.
0 Kudos
Message 3 of 4
(3,047 Views)
No problem...
Jarrod S.
National Instruments
0 Kudos
Message 4 of 4
(3,033 Views)