LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to update individual rows of a Table?

Solved!
Go to solution

I've taken a look at some examples, though haven't gotten any clarification on this.  I am looking to have something close to a listbox or table to where I can update just a single column of row values at a 1 time per second pace.  I am looking to display our data-acquisition values in a table or listbox.  The single listbox seemed to work good for this, but I was unable to use row headers to list the channel names next to the channel values.  I was thinking about connecting the cursor values of two list-boxes to do this, but didn't find any info on this for the single list-box.

 

I have a few questions:

 

1) I have a 1D array to where I want to use that array of data to constantly update the first column (with a multitude of rows) of a table.  I am looking for the best route so as not to take up too much processing time in doing this.

 

What is the best way to update individual rows of a table?   Invoke Node "Set Cell Value" ... or is there another method?

 

2) Why is it that after every other iteration the row values are erased? 

 

Also, for adding additional strings to the original arrray ... is it best to use the "Array Subset" and then the "Build Array" function, or the "Array Subset" and "Insert Into Array" function?

 

See the attached example.

 

Thanks.

0 Kudos
Message 1 of 3
(2,614 Views)

2) Why is it that after every other iteration the row values are erased?

 

Classic race condition.  dump the for loop and p-node and just wire the 2D array to the table terminal.!


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(2,597 Views)
Solution
Accepted by topic author jonathanupr

@JÞB wrote:

2) Why is it that after every other iteration the row values are erased?

 

Classic race condition.  dump the for loop and p-node and just wire the 2D array to the table terminal.!


I'm not seeing the race condition.  What I am seeing is the table emptying after the last element was written to it on every other run.  I saw watched this with highlight execution on.

 

But I'm in full agreement with just writing to the terminal.  It is a 1D array, so you will need to use a build array and transpose 2D array in order for it to write properly.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,584 Views)