LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Polar graph on Labwindows

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.Smiley Happy

0 Kudos
Message 1 of 9
(5,175 Views)

 

If anyone has already made the program of polar graph using canvas controls then please send , i am new to Labwindows.

0 Kudos
Message 2 of 9
(5,166 Views)

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

National Instruments
Applications Engineer
0 Kudos
Message 3 of 9
(5,141 Views)

 

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.

0 Kudos
Message 4 of 9
(5,133 Views)

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

National Instruments
Applications Engineer
Message 5 of 9
(5,110 Views)

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.Smiley Happy  

0 Kudos
Message 6 of 9
(5,053 Views)

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.

0 Kudos
Message 7 of 9
(5,036 Views)

 

Please illustrate with an example

0 Kudos
Message 8 of 9
(5,032 Views)

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.

0 Kudos
Message 9 of 9
(5,026 Views)