LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph display problem

I'm using labwindows CVI 6.0 full release and win 2k.

I have a multiplot, a CWGraph with 6 plots and 6 Y axes. I plot near 160000 points for each plot. The problem is that I would like to be able to set the CWGraph to display all the data once. What happens now its computing plotting the first graph, then starting to compute and display the second one etc...and each time it takes a lot of time and its lagging. Can the control plot them all togheter once ? or what should I do for it....
0 Kudos
Message 1 of 11
(5,212 Views)
Hi. In order to plot all the lines together, you need to use the PlotY function of the CWGraph. Make sure that you are using the PlotY function of the CWGraph and not the PlotY function of CWPlot. The function name should be CWUIControlsLib__DCWGraphPlotY after you insert the function into your code.

Using the PlotY function of CWPlot, pass in a 2D array of all the plot data as the yData parameter. For your case, you will have a 2D array with dimensions of [near 160000][6]. Each row will have the data that would be a seperate line on the graph. Make sure that you set bPlotPerRow to True. If your 2D array has the transposed dimensions of [6][near 160000] then the bPlotPerRow value should be set to False.

This should plot the first data element of all 6 of th
e plot lines, then plot the second element, and the third, and so on resembling how a Strip Chart would normally plot.

Hope this helps!

Shannon R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(5,210 Views)
I'm using PlotYvsX, I have no choice...

Thanks anyway,
0 Kudos
Message 3 of 11
(5,210 Views)

Hi,

    Could you provide me a example on CWGraph? I don't know how to use this ActiveX control only from your talking. 

    It is better if you could send it to me. my Email is joey.ding@cooperasia.com

Thank you very much.

joey

0 Kudos
Message 4 of 11
(5,024 Views)
Hi Joey,
Are you attempting to use the CWGraph in CVI?  If so, I was wondering why you were not using the built in graphs within CVI.  We have several examples customizing these graphs within the example finder.  You can get to the CVI example finder by going to Help>>Find Examples.

If you are not using the CWGraph in CVI, which programming environment are you using it in?  In general there are examples installed for the CWGraph in the Measurement Studio directory.  The graph examples will be located in the "Examples\UI\Graph" folder within the Measurement Studio directory.
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 5 of 11
(5,009 Views)

hi, Patrick,

    Frankly, I just want to use CWGraph in CVI7.0. But I couldn't get the example in my CVI7.0 enterprise edition. My measurement studio7.0 couldn't setup since it is necessary to install vc or vb firstly. So I wonder whether I can get the example in CVI only after measurement studio being setup. 

    Another 2 questions.

    1. How to come true the feature of displaying and plot the multi Y axies(more than 2 ) on a common graph?

    2. How to come true the feature to zoom a area selected by mouse on a comon graph?  don't use the "Ctrl + mouse Click" to Zoom.

Thank you.

joey

0 Kudos
Message 6 of 11
(4,996 Views)
Hi Joey,

You will have to install VB or VC++ to allow Measurement Studio to install.  However, I don't think there are any examples that install with Measurement Studio that show how to use the CWGraph in CVI.  Your two questions are addressed below.

Question 1:
There are a couple of different ways to do this within CVI. Normally the built in CVI graph only supports two axes. This discussion forum actually gives an example of the CWGraph in CVI as well as how to do it with the native CVI graph.

Question 2:
You will have to add some additional code to do this with the CVI graph. I have listed a discussion forum here that talks about how to create your own zoom method for the graph. If you are using the CWGraph, you should be able to enable zooming, and it will zoom with just left clicking.
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 7 of 11
(4,982 Views)
hi, Patrick ,
 
   Thanks very much for your reply.
   Let me try again.

Cheers

joey


0 Kudos
Message 8 of 11
(4,963 Views)
Hi Patrick!

Do you have an example of the use of the cwgraph in cvi? I would like to plot a chart in realtime mode.. I wrote something that I am trying to do in this topic.

I looked for some examples, but my code didn´t work.

Thank you


0 Kudos
Message 9 of 11
(4,896 Views)
Hello,
 
I wanted to check in and make sure that your question has been answered. I noticed on your other forum post topic that you seem to have accomplished what you were trying to do; can I help you further with this CWGraph question?
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 10 of 11
(4,862 Views)