LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed strip chart ?

Hello all,
looking for suggestions on how to make a properly timed strip chart of
unsynchronous event.
Say I have an event at time 0, 1 and 10, I want them to be spaced
accordingly, not just one pixel apart each time I update the strip chart.

I was thinking along the line of using a timer to update the chart with the
last known value.
Or using a circular array of time vs value and display that in a normal
graph.

Suggestions ?
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 1 of 4
(3,363 Views)
Hello Guillaume,
 
Thank you for posting on the NI Discussion Forums.  You could definitely use a timer to keep track of the time, and then use the PlotXY() function to make sure that your data is properly spaced.  Also, with waveform data, the timing information is already given, so you could use PlotWaveform() to plot the data from one single acquisition.
Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 2 of 4
(3,332 Views)
> Thank you for posting on the NI Discussion Forums.  You could
> definitely use a
> timer to keep track of the time, and then use the PlotXY() function to
> make sure that
> your data is properly spaced.  Also, with waveform data, the timing
> information
> is already given, so you could use PlotWaveform() to plot the data from
> one single
> acquisition.

Well, PlotWaveform wouldn't fork too well if the data is irregularly spaced.
PlotXY would do the job but then you have to keep up a moving array. It's
more work but I may end up having to do that in the long term. Also I guess
having to redraw the array each time with PlotXY is probably no slower than
PlotStripChart, after all it's exactly what the strip chart does internally,
or is it ?

For now the timer solution and a simple strip chart works well enough.
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 3 of 4
(3,310 Views)
Guillaume,

A strip chart does have some drawing optimizations that preclude having to redraw traces as they scroll. With a graph you would lose those optimizations. But if you're going to use a graph, I'd suggest that, instead of PlotXY, you use PlotLine to append the new point (assuming you're only adding one point at a time to each trace). That way you won't have to replot data that's already been plotted.

Luis
0 Kudos
Message 4 of 4
(3,299 Views)