On 31 March 2014 19:08, Florian Rist <fr...@fs.tum.de> wrote:

> A small DC motor with encode, now connected to a 7i39 and controlled via
> a 5i23. Currently the drive is set-up as a angular axis A. See the
> "Improvised DC Motor Control using Mesa 7i39?" Thread.

I would suggest a second PID controller set up so that the feedback is
from the encoder velocity pin. Connect both PIDs to a mux2 HAL
component and switch between them that way.

Preventing LinuxCNC from triggering a following error is actually the
hard part. The simplest solution is probably just to short-circuit the
feedback in HAL (net feedback-loop axis.3.motor-pos-cmd =>
axis.3.motor-pos-fb )

The right way to do it is probably to add the PID error to the
position command then feed it back, but some masking using more muxes
is likely to be necessary.

An alternative might be to use the "offset" component. You could
potentially feed the offset pin from a sum2 component looped into
itself and controlled from a G-code output (or the spindle speed, if
you aren't using it).

net sum2-loop sum2.0.out => sum2.0.in0  offset.0.offset
net vel-cmd sum2.0.in1 <= motion.analog-out-00

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to