LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an array to a specified format..

I'm trying to build an array that follows a specified output format. The user inputs columns & rows e.g. C x R...amd the the output should read
C1 C2 C3 C4.....
R1 V V V V....
R2 V V V V ...
.
.
Where each V is not a constant, but a user inputed value. Sorta like a matrix in appearance.

Any ideas??
0 Kudos
Message 1 of 3
(2,623 Views)
You can use a table control and use a property node to set the number of rows and columns. But that just sets the number of rows and columns which are visible. The user can navigate to additional rows and columns.
You could create an event structure to keep the user within the specified bounds. You could also remove the scrollbars (right-click on table, goto Visible Items, the deselect Horizontal Scrollbar and Vertical Scrollbar).
0 Kudos
Message 2 of 3
(2,623 Views)
depending on what values the V's will take on.
Define your array: "double" array[col][row]you can InsertTableRows, InsertTableColumns. initiate a for loop for the rows and another for the columns.
use array[col][row]=GetTableCellVal(panel,ControlID,MakePoint[col][row], &double variable);

Then use ArrayToFile with the correct arguments to send it to file.
0 Kudos
Message 3 of 3
(2,623 Views)