ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphing partial circles

Solved!
Go to solution

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

0 Kudos
Message 1 of 11
(4,745 Views)
Can you attach your vi?
0 Kudos
Message 2 of 11
(4,705 Views)

Hi Chod,

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

 

Mike

0 Kudos
Message 3 of 11
(4,696 Views)

hi chod,

  Have at this attachment..

 

 

Thanks and regards,

srikrishnaNF

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


0 Kudos
Message 4 of 11
(4,682 Views)

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
0 Kudos
Message 5 of 11
(4,665 Views)

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

0 Kudos
Message 6 of 11
(4,631 Views)
Solution
Accepted by topic author Chod

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
Download All
Message 7 of 11
(4,571 Views)

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

0 Kudos
Message 8 of 11
(4,565 Views)
and counter-clockwise
0 Kudos
Message 9 of 11
(4,562 Views)

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.

Message 10 of 11
(4,522 Views)