LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading plots back from graphs

Is it possible to read a plot back from a graph ?

 

My aim is to avoid duplication of large arrays in memory.

 

I dynamically allocate a large amount of memory and acquire data into it.  The data is then plotted on a graph.  I have set the graph 'DataMode' to 'Retain' so the graph keeps a copy of the array which enables the user to zoom.

 

I would like to de-allocate the memory and then read the plotted data from the graph, filter it and plot on a 2nd graph.

 

Is this possible ?

 

Thanks in advance for any suggestions.

 

0 Kudos
Message 1 of 4
(3,170 Views)
Yes, you can: you must save the plot handle with which you can query some plot attributes with GetPlotAttribute. The relevant attributes are ATTR_PLOT_XDATA and ATTR_PLOT_YDATA, which return arrays of data. With other attributes which I cannot remember now you can obtain the number of ponts and datatype for each array, so you can dynamically dimension your memory before retrieving measurements from the control.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,158 Views)

Thanks Roberto.  I'll use that method.

0 Kudos
Message 3 of 4
(3,114 Views)
Can this work with strip charts...?
I have a hunch that it doesn't and I said I would have it working by today
after (mis)remembering this post... C:-(
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 4 of 4
(3,052 Views)