cancel
Showing results for 
Search instead for 
Did you mean: 

graphing partial circles

SOLVED
Chod
Member
Solved!

graphing partial circles

Hello,

 

I am creating a vi that graphs a circle from a certain interval, so like pi/3 to 2pi. I am using the sin and cos function. How can I graph these partial circles?

 

Thanks

Chod

10 REPLIES 10
muks
Proven Zealot

Re: graphing partial circles

Can you attach your vi?
MikeS81
Proven Zealot

Re: graphing partial circles

Hi Chod,

you can use an x-y-graph or you can draw the circle on a picture control.

 

Mike

srikrishnaNF
Active Participant

Re: graphing partial circles

Message contains an attachment

hi chod,

  Have at this attachment..

 

 

Thanks and regards,

srikrishnaNF

Message Edited by srikrishnaNF on 04-30-2010 03:21 AM
Regards,
Srikrishna


GerdW
Knight of NI

Re: graphing partial circles

Message contains a hyperlink

Hi Chod,

 

when using a picture indicator you can use the DrawArc function...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Chod
Member

Re: graphing partial circles

Message contains an attachment

Here is kind of what I need, although I need to be able to have a control for when to start and end the angle. I want two controls on the front panel, so when I graph it I can display any segment of the unit circle.

 

Thanks,

Chod

RavensFan
Knight of NI
Solution

Re: graphing partial circles

Message contains an image Message contains an attachment

Your For Loop just creates an array that has N of the same value.

 

Take a look at this.

 

 

Message Edited by Ravens Fan on 04-30-2010 11:08 PM
Highlighted
Chod
Member

Re: graphing partial circles

Awesome thank you! One more question about that. How do I start the circle at (1,0)?

Chod
Member

Re: graphing partial circles

and counter-clockwise
RavensFan
Knight of NI

Re: graphing partial circles

I just happened to go with the way you wired up the sin/cos function.  Looking at it more closely now, you had the output of sin going to X and cos to Y.  That's backwards from normal trigonometry.

 

Swapped the wires so that the Sine goes to the Y input and the Cosine goes to the X input, then you'll have it start at the right hand side (3 o'clock, (1,0) point) and it will go counter -clockwise.

 

Also, if you want to the center to be a different location, then you'll just have to add the new center point (currently 0,0) to the results of the sine and cosine function.