From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY plot to polar plot

Solved!
Go to solution

The plot required is a polar plot to plot the targets a radar sensor is identifying. I have plotted an XY graph with co-ordinates obtained from distance and angle measurements.

 

I want to plot this X and Y positions in the polar plot. THe source to the XY graph is a cluster of 2 elements whereas the connection to the polar plot needs an 1D array of cluster. The individual data wires are 1D array of double and making a bundle does not solve the problem.

 

 

Please let me know how to construct the polar plot with the distance and angle data. 

 

 

 

Regards,

 

0 Kudos
Message 1 of 16
(7,801 Views)

@Red43 wrote:

The plot required is a polar plot to plot the targets a radar sensor is identifying. I have plotted an XY graph with co-ordinates obtained from distance and angle measurements.

 

I want to plot this X and Y positions in the polar plot. THe source to the XY graph is a cluster of 2 elements whereas the connection to the polar plot needs an 1D array of cluster. The individual data wires are 1D array of double and making a bundle does not solve the problem.

 

 

Please let me know how to construct the polar plot with the distance and angle data. 

 

 

 

Regards,

 


As always please post your VI to show your attempt.

 

 

0 Kudos
Message 2 of 16
(7,793 Views)

I am new to Labview environment, and just started following the Core1 and Core2 courses. 

 

Here are the pictures of part of my VI's

Download All
0 Kudos
Message 3 of 16
(7,787 Views)

Just post the part of your program in a VI that has the graphing.

Use dummy data.

0 Kudos
Message 4 of 16
(7,777 Views)

Hi Red43,

 

can i ask a question not much related to your xy and polar plot?

 

i am new to LabVIEW as well, i am currently trying to switch to LabVIEW from another software i am currently using as data acquisition and analysis software for my turbine and generator testing program. In your post, you metioned you are taking Core1 and 2 courses, how do you feel, it is better than watch the video clips? are you taking these on line or in classroom? i am curretnly watching the NI webcast and videos and sample codes. but i am thinking to take these course as well.

 

Thank you for your help.

 

regards,

Yutao

0 Kudos
Message 5 of 16
(7,761 Views)

I did the tutorials, and white papers at the begining. It's good but the Core1 and Core2 are exercise based courses. It is much better to learn while using the software than listening to videos. I was accessing it through my regular account but student accounts can access them for free. 

 

 

0 Kudos
Message 6 of 16
(7,745 Views)

Hey,

 

I use a direct stream from a CAN interface. The code I posted was via my PC which cannot be connected to the CAN device. 

It would be very helpful if you could help me with the conversion from where I use X and Y co-ordinates to polar plots. 

 

In the figure, it is seen that I convert distance and angle to cartesian co-ordinates. Is it possible to use that data to plot in polar plot directly?

 

 

0 Kudos
Message 7 of 16
(7,742 Views)

Hi,

The input data type of a polar plot is a cluster that contains 4 elements: magnitude, phase, time/rev/rpm and attributes. The input you connect to your polar plot should be of the same datatype, so a cluster with these 4 elements. The  'attributes' you can leave empty, but the other three elements should contain data for a point to be plotted. Have a look at the attached example VI (for LV 2013). You can get the info about the input data type of any Vi or indicator by opening Context Help (ctrl+h) and hoovering over the bject with you mouse.

 

Another option is to use Polar Plot.vi (also included in the example VI). See the help file for this VI: http://zone.ni.com/reference/en-XX/help/371361L-01/lvpict/polar_plot_with_point_options/ (and optionally: http://digital.ni.com/public.nsf/allkb/9CEC8B2C1E67039586256DEF006F9A0E)

 

Let me kow if this helps.

 

Cheers,

 

Jos

0 Kudos
Message 8 of 16
(7,717 Views)

From the figure, it is seen that I get the magnitude(distance) and phase(anglein deg). these are 1Darrays of double, but the input must be a different format. How to make that conversion?   

0 Kudos
Message 9 of 16
(7,704 Views)

Hi,

By hoovering over a wire with Contect help visible, you will see the exact data type that's in the wire. Also, if you would ight-click the inpu terminal of a function or indicator that you would like to create an input for and choose Create>Constant, you will get a constant of the right datatype (and dimension) so you can see what input is required. 

 

So you need to use arrays of clusters. See the attached example how to do that, for a single point in the Polar Plot(s).

 

With kind regards,

Jos

0 Kudos
Message 10 of 16
(7,694 Views)