LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting values in a table

Hi,

I'm trying to insert a set of values into a table at the specific position.

Ie. I have values 100, 35.8

Say I want to insert the value 100 at row 3, column 2 and 35.8 at row 3, column 2.

I've tried using Table Property Node (SelStart), specify 3, 2, and inserting the values into the table. But the program keeps inserting the values at position 0,0. (I did set 0,0 for IndexVals).

I went through the Labview Table example and noticed that a table is really a 2D array. Does that mean I need to initialize a 2D array and replace these values at the desired position? Is this the only way (trying not to use array if I can). Or can I somehow use the above method?

Thanx!

(Attached what I came up with).
0 Kudos
Message 1 of 5
(6,400 Views)
A table is just a fancy indicator for a 2D array of strings.

Yes, you need to operate on the 2D array using e.g. "replace array subset".
(see attached very simple example, LabVIEW 6.1).

Also remember that you are limited to the current array size with this method, so if you need to insert an element outside its current range, you need to grow the array first.

Message Edited by altenbach on 05-26-2005 03:31 PM

0 Kudos
Message 2 of 5
(6,391 Views)
You are using a 2D array in your example. The properties you're using have nothing to do with the data you've created and where you're writing it to. You could simply create an array x rows by y columns with empty strings and use Replace Array Element to modify a specific row/column value.
0 Kudos
Message 3 of 5
(6,386 Views)
Hi,

Thanx for the replies. I played around with 2D array (replace array, insert array) and now got it to work. 🙂
0 Kudos
Message 4 of 5
(6,380 Views)
Oops double post. 😞

Message Edited by Honeywell on 05-26-2005 06:16 PM

0 Kudos
Message 5 of 5
(6,380 Views)