LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I Create a Table that Updates

I have a numerical data cluster that is outputting XY data to a Graph
that updates using a Chart Buffer. I also want this data cluster to
display the XY data on a Table (indicator). I debundled the cluster
and converted the X data and the Y data into strings. I then ran both
strings to a build array. Now I can get the data to display on the
Table if the Table is outside the For Loop I am collecting data on,
but this doesn't help. I want the data to appear on the table when it
is collected (point for point). When I try to wire the Array to the
table if it inside the For Loop I get a broken wire saying a Wire
Dimension Mismatch: "You have two or more array data types wired
together, but the arrays have different numbers of dimens
ions. Show
the Help window to see how many dimensions are required." I think
this has something to do with Labview not knowing the size of the
array since all the data has not been collected yet. Is there some
other way to get the Table to update point for point. I am new with
Labview, so please don't go over my head with a responce.
0 Kudos
Message 1 of 5
(3,110 Views)
Here is a really basic example. Because the table is a 2D array and you are doing a point-by-point acquisition, you would first make a 1D array from the string values of the XY data, and then use an append array to the table value that is maintained in a shift register. This is not necessarily the most effecient method but should work unless your for loop iterates a large number of times.
0 Kudos
Message 2 of 5
(3,111 Views)
It sounds like the array you are building from your XY data is 1D array, and the table needs a 2D array to fill it. It probably works outside the loop because you have auto indexing on the loop tunnel which would create a 2D array from your 1D array automatically.

If you really want to update the table point by point, you would have to insert the newest data into the array that contains the older data, then write to the table. I would hold the current table data in shift register, and insert or replace the new data into the array, then update the table. Be carful here, if you are constantly inserting into an array, it can cause memory management and performance issues.

If none of this makes sense and I've gone over your head, maybe you need to take a st
ep back and run through the Getting Started with LabVIEW section in the documentation. It really helps if you have a good grasp of the basics. The easiest way to find this document is from the LabVIEW Help menu, select "Search the LabVIEW Bookshelf". A .PDF will open, and one of the links on the first page is, "Getting Started with LabVIEW".

Good Luck

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 5
(3,109 Views)

hi Mr. Dennis,

 

can U pls post the VI XY Chart Buffer... it's missing, so I can't understand Ur code.

Rgds,

Partha.

- Partha ( CLD until Oct 2027 🙂 )
Message 4 of 5
(2,878 Views)
You should have it. It's a file that has shipped with every LabVIEW version for as long as I can remember. Look in Examples\General\Graphs\charts.llb.
Message 5 of 5
(2,865 Views)