LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to front load a stripchart history buffer

Solved!
Go to solution
Highlighted

My use case is to read data from a TDMS file as it is being written. The data is then put in a stripchart. When the user selects another group and channel(s), I need to read the last N data points (where N is the stripchart history length), and front load the stripchart (so the history buffer is full). The next data point added to the chart should cause the chart to scroll left one data point.

I can set the History, but the chart does not scroll when I add new data points. For example, if the chart length is 10, and I load 10 data points into the history buffer, the next data point is simply displayed along with the other 10 points, rather than scrolling the first data point off the chart.

The chart only seems to work if one point is added at a time and the history buffer is not touched.

Is this normal behavior?

0 Kudos
Message 1 of 4
(1,264 Views)
Highlighted

Interestingly enough, this works as I expect when using scalar array data, but not with waveform data.

0 Kudos
Message 2 of 4
(1,193 Views)
Highlighted
Solution
Accepted by topic author BillMe

That's because a Chart generally takes a point-at-a-time, whereas a Waveform, by design, is an array of points.  The Chart History, of course, is an array of the basic Chart Element, a point, so you can load the Chart History with an array of points, but not with some other type (such as a Waveform).  If you do have a Waveform, you can extract its array Component (Y) and use that to initialize your Chart History ...

 

Bob Schor

Message 3 of 4
(1,176 Views)
Highlighted

@Bob_Schor wrote:

That's because a Chart generally takes a point-at-a-time, whereas a Waveform, by design, is an array of points.  The Chart History, of course, is an array of the basic Chart Element, a point, so you can load the Chart History with an array of points, but not with some other type (such as a Waveform).  If you do have a Waveform, you can extract its array Component (Y) and use that to initialize your Chart History ...

 

Bob Schor


That's precisely what I ended up doing....I found that one waveform, whether it has one Y component or many, is considered one data point in the history buffer......but thanks.

0 Kudos
Message 4 of 4
(1,106 Views)