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

I have already tried that method. But here is a screenshot of my latest attempt. 

This is quite frustrating. 

0 Kudos
Message 11 of 16
(1,800 Views)
Solution
Accepted by Red43

HI,

You are clustering two 1D arrays of numeric values. Polar Plot.vi requires a 1D array of clusters of 2 scalar values. Have a look at the attached example again. The first FOR loop creates two 1D arrays, like you have. To be able to plot those, you need to put the elements of those arrays one by one into a cluster. Then you can create an array of those clusters to plot multiple points.

 

Cheers,

Jos

Message 12 of 16
(1,795 Views)

Thank you Jos. 

It is working now. 

The direction is not correct but I'm trying to transpose the array to get it pointing in the right direction.

 

 

0 Kudos
Message 13 of 16
(1,788 Views)

@Red43 wrote:

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?

 

 


XY to polar is a mathematical equation.  http://www.mathsisfun.com/polar-cartesian-coordinates.html

 

 

0 Kudos
Message 14 of 16
(1,779 Views)

I convert from polar to cartesian for the XY plots. 

The issue was with data types. 

It's solved now.

0 Kudos
Message 15 of 16
(1,775 Views)

@Red43 wrote:

I convert from polar to cartesian for the XY plots. 

The issue was with data types. 

It's solved now.


Data types?

0 Kudos
Message 16 of 16
(1,772 Views)