LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I implement a graph like a strip chart?

John,

Thanks for posting your scrolling graph code. Its a good example of what LW CVI
is capable of when a little ingenuity is applied. I noticed two minor problems
which the attached version fixes: 1) At fast update rates (e.g. sample period
of 1 ms.) the graph would flicker while scrolling and 2) the size of the graph
would get out-of-kilter when adding X-axis labels longer than six characters
long. This latter phenomenon appears to be either a bug or an undocumented
restriction in the graph library.

Off the top of my head, I can think of a number of additions that would make
this example more useful for "data exploration" R&D applications:

* The scrolling graph performance was good on my 500 MHz K6, 128MRAM PC but
slows down after
a few thousand points. Letting the user limit the no. of
points in the "sliding window" of interest to a reasonable value would help.
* Multiple traces with run-time label/line-style assignment.
* Oscilloscope-style offset and gain adjustments for each trace as well as a
virtual "DC coupling" option for each one.
* Snapshot option for saving graph images to disk, exporting to word/excel
or printing hardcopy.
* "Math functions" for doing data-smoothing, derivatives, statistics etc. on
the data like many O-scopes now support.
* Graph cursors for measuring offsets between signals, peak-to-peak volts etc.
* Annotation feature for letting the user add labels/notes anywhere on the
graph.

I'd be happy to tackle some of these items if you or anybody else is
interested in a collaborative effort.

Best Regards,
Nick

"John Sch." wrote in message
news:5065000000050000002E800000-1023576873000@exchange.ni.com...
> Attached is my demo. This demo is a graph that scrolls lik
e a strip
> chart. I would like any comments or questions.



[Attachment GraphDemo2.zip, see below]
Message 11 of 14
(2,004 Views)
Thanks for your comments.
- Your fix on the flicker of graph is great. thanks.
- The horizontal size of graph kilter. Your fix is interesting and works. I think, not sure, what is happening is that the 'plot' size of the control auto adjust to fit the label in the 'graph' size of the control. Unfortunatly you can not change the size of the difference between the 'graph' size and the 'plot' size. Another solution maybe to not add the label so close to the edge of the plot. I will work on this later, as now I have to put down the fun work to do other stuff for a couple of days.
-Other suggestions, good ideas, some of which I have already implemented. I did not include in this demo because it was kinda off on a tangent to the
orginal issue of scrolling a graph.
0 Kudos
Message 12 of 14
(2,004 Views)
Has there been any improvements in the latest versions of labwindows as far as creating a stripchart and being able to read the x,y values of a data point?  Or is this an option that could be done in labview?
0 Kudos
Message 13 of 14
(1,755 Views)
Hello mnwild14,

There are various methods for doing this either in LabWindows/CVI or LabVIEW.  I would recommend going straight to your data source to get the element you want to retrieve and then process the x,y values however you like.  By that I mean, if you are taking an array and plotting it as a stripchart, then you could just index the last element of the array to retrieve that data point.  Or if you are plotting a single point at a time, you can assign those values to 2 different variables that keep up with the last coordinate plotted.  I hope that helps!
Regards,


Marty H.
National Instruments
0 Kudos
Message 14 of 14
(1,606 Views)