|
In lugnet.org.ca.rtltoronto, Chris Magno writes:
> BTW in other news
>
> Iain, someone sent me this "math formula: to make x/y plotter circles.
>
> let me run it by you:
> > The basic circle formula is
> >
> > x**2+y**2=R**2
> >
> > where x and y are the Cartesian coordinates and R is
> > a constant, the radius.
> >
> > This would draw the circle where the center is (0,0)
> >
> > If you want translation on a coordinate plane then:
> > (x+X)**2+(y+Y)**2=R**2
> >
> > where the center is now at the point (X,Y)
> I'm not near my plotter, thoughts?
I'm trying to think back to A+G but that seems to make sense. There are
others who post here who are far superior to me at math so I'll leave that
to them. So now you can find points on a circle. Here's the problem:
a) How do you divide up what points you want to use?
b) How do you get your axes to move in unison with relation to each other
at the required speed?
The key to all of this isn't necissairily finding where the points are;
that's half of it. The other half is to continuously monitor the position
of *both* motors. You have to have one act as a slave and the other move
synchronously to it but at an *acceleration* in relation to it which is
proportional to the curve you're trying to represent.
You could fairly easily have it "jump" from point to point, but then you
have a tradeoff. Higher speed means crap resolution, but a higher
resolution means more servo moves that you have to program and you may run
out of time, memory, or patience.
To do that, you'd set up two servo tasks that run simultaneously and
continuously and monitor the position of the motors via the encoders. You
have a variable which you can change which is your desired position to be
at, in your servo task you are awlays monitoring that and comparing it to
the actual position of the encoder. Any difference should be automatically
corrected by the servo task. You initiate a move by modifying that
variable; the motor will move. You set a few flags so that when the motor
encoder comes within a specified acceptable window parameter of your desired
position, you know it and can continue on with the next move.
Now imagine trying to do all that, while monitoring the position of the
other motor and step this one in sequence at some mathematically-determined
relative velocity. That's what you'll have to do to plot a curve.
Iain
|
|
Message is in Reply To:
| | Re: Good luck?
|
| you people really need a life!!! BTW in other news Iain, someone sent me this "math formula: to make x/y plotter circles. let me run it by you: (...) I'm not near my plotter, thoughts? Chris Why do solar calculators have an off button? (22 years ago, 6-Jan-03, to lugnet.org.ca.rtltoronto)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|