CAD CAM EDM DRO - Yahoo Group Archive

Programming question

on 1999-06-09 20:29:18 UTC
I have a 3 axis stepper controller from eggert electronics and I am
trying to
write some software for it. I have everything working except one part
that I can't
figure out. Perhaps one of the programming gurus here can help.


The controller is somewhat smart in that you send it a command such as
move X axis
1000 steps ccw and the Y axis 7000 steps cw at so and so speed. All
pulses are generated inside the controller.

when setting up the controller a base speed is set for all motors. This
would be the
fastest speed that all the motors can run reliably. When sending speed
commands to the
controller in preperation for a move a divisor of the base speed is sent
to each motor.

a divisor of 1 is base speed / 1 (full speed)
a divisor of 2 is base speed / 2 (1/2 speed)
a divisor of 3 is base speed / 3 (1/3 speed)
.
.
.
a divisor of 255 is base speed / 255 (1/255 speed)

Therefore if I needed to move the X axis 10000 steps and the Y axis 5000
steps I would
divide 5000/1000 and come up with .5. So Y axis needs to run .5 times
the speed of the X axis giving me X divisor = 1 and Y divisor = 2.
Simple enough.

Now for the problem. The above example works fine because the division
works out even.
If I need to move X axis 10000 steps and Y axis 7256 steps I get
7256/10000 = .7256
or Y axis needs to move .7256 times the speed of the X axis, but that
number can't be sent to the controller so I will have a rounding error
on all moves that don't come out even. One axis will finish before the
other axis.

Any suggestions (besides throw the controller in the trash)

I can always use it as a drill controller since any moves on the X and Y
axis will be with the tool up and it will not matter if the axis' do not
arrive at the same time.

I hope my explaination of this is somewhat clear.

Thanks
Bill

Discussion Thread

William Scalione 1999-06-09 20:29:18 UTC Programming question Jon Elson 1999-06-09 23:18:29 UTC Re: Programming question