08-02-2010 01:32 PM
Hi all
I am using Labwindows CVI 8.5 and I want to plot polar graph on LadWindows but there is no control available on Labwindows. Moreover, i want to place a marker on the polar graph, such that where ever i drag the marker on the polar graph it gets the value of ( magnitude, Theta) at any point on the polar graph.
Please give me an example on this and how to place the marker on the polar plot and how to get the values of r and 'theta'
Any help will be greatly appreciated.
08-02-2010 11:21 PM
If anyone has already made the program of polar graph using canvas controls then please send , i am new to Labwindows.
08-03-2010 11:16 AM
Hi mhs100,
I am not aware of any pre-built examples to do this, but there is a good discussion on the forums about Polar plot in LabWindows that gives some tips for using a rectangular plot to plot polar data. Hopefully this will give you a good starting point for your development.
John M
08-03-2010 01:07 PM
Hi John
Thanks for the reply
i have already viewed this thread but the problem is that i am new to Labwindows and i haven't used Canvas control before , if anyone has already done this work of plotting the polar graph and getting the values of (mag, Theta) on every point on it , then please share with me. It would be more helpful for me.
08-04-2010 06:38 PM
Hi mhs100,
I did find an example we have online that describes how to use a canvas control to plot graph data. It is not specifically for polar plots, but should at least give you a starting point for learning about programming with Canvas controls: Using a Canvas Control to Graph Data. Also, Programming with Canvas Controls in the CVI Help can be as good reference as well.
Best,
John M
08-08-2010 04:30 AM
Hi John,
Thanks for providing me the example, it does give the basic knowledge of Canvas Graph function but it contains a bulk of coding which is really difficult to understand and it is far more difficult to write it. Does anyone know the example which plots the POLAR GRAPH by using the Canvas Graph functions? If i start to write it myself then it will take a lot of time and prevents me completing the other tasks of my application.
Any help will be greatly appreciated.
08-08-2010 11:55 PM
Basically you need only two Canvas functions, CanvasSetPenPosition and CanvasDrawLineTo, plus MakePoint to generate a point structure. Then you will need to call CanvasDrawLineTo in a loop for all the data points you want to plot.
08-09-2010 01:40 AM
Please illustrate with an example
08-09-2010 02:54 AM - edited 08-09-2010 02:55 AM
Hi,
the example actually comes with CVI: Help / Example finder / search canvas yields canvas.cws. In this examples all three functions mentioned above are used. All you need to do yourself is calculating the coordinates of your plot.