On Fri, 6 Apr 2012 19:43:33 -0400, you wrote: >Slowly hooking up the actual lathe to linuxcnc. Starting with that encoder >I made. > >1. I get it that this encoder.0.velocity is something that is reported in >rps if I have the scale set correctly, but what I am getting is an >extremely noisy reading for what looks like, and sounds like, a quite >steady rotation.
I had the same problem. Had to get some help to filter the signal somewhat. Here's the relevant bits from my hal file - the lines with # after them are the ones added. loadrt lowpass count=1 # addf parport.0.read base-thread addf stepgen.make-pulses base-thread addf encoder.update-counters base-thread addf pwmgen.make-pulses base-thread addf parport.0.write base-thread addf parport.0.reset base-thread addf stepgen.capture-position servo-thread addf encoder.capture-position servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf stepgen.update-freq servo-thread addf pwmgen.update servo-thread addf abs.0 servo-thread addf abs.1 servo-thread addf scale.0 servo-thread addf lowpass.0 servo-thread # net spindle-cmd <= motion.spindle-speed-out => abs.1.in net spindle-abs-cmd <= abs.1.out => pwmgen.0.value net spindle-enable <= motion.spindle-on => pwmgen.0.enable parport.0.pin-14-out net spindle-pwm <= pwmgen.0.pwm setp pwmgen.0.pwm-freq 0.0 setp pwmgen.0.scale 18000 setp pwmgen.0.offset 0 setp pwmgen.0.dither-pwm true net spindle-cw <= motion.spindle-forward net spindle-ccw <= motion.spindle-reverse setp encoder.0.position-scale 500.000000 net spindle-position encoder.0.position => motion.spindle-revs net spindle-velocity encoder.0.velocity => motion.spindle-speed-in net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable net spindle-phase-a encoder.0.phase-A net spindle-phase-b encoder.0.phase-B net spindle-index encoder.0.phase-Z setp lowpass.0.gain 0.01 # net spindle-velocity encoder.0.velocity => lowpass.0.in # net spindle-rpm-filtered <= lowpass.0.out # Steve Blackmore -- ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
