eric carlson wrote: > Does anyone have any hal code to share for electronic gearing? > > I'm trying to sync two spindles together at different ratios using > psuedo-servos (step & direction) > > I have a quadrature encoder on the master but think that I have to take the > commanded position for the slave and feed this into the encoder_ratio.c > function for > the slave encoder phase A and B?
If you are using step/dir servos, you are going to have to jump through some hoops - step/dir is just a horrible way to talk to servomotors. The encoder ratio component is intended to take encoder feedback from the master and the slave, and produce a position difference that would become the feedback to a PID loop for the slave. Probably the best documentation for encoder-ratio is the comment block at the beginning of the code: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/components/encoder_ratio.c?rev=1.14 Regards, John Kasunich ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
