11-08-2016 11:35 PM
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?
Solved! Go to Solution.
11-09-2016 09:26 PM
Interestingly enough, this works as I expect when using scalar array data, but not with waveform data.
11-10-2016 07:55 AM
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
11-17-2016 01:36 AM
@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.