Andy, Thanks! I'm away for the weekend. When I get back, I'll try what you suggested. I thought that -700 looked a little fishy :)
Thanks again, Tony ----- Original Message ----- From: "andy pugh" <bodge...@gmail.com> To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net> Cc: "Tony Zampini" <zampi...@cox.net> Sent: Saturday, March 12, 2011 1:54 PM Subject: Re: [Emc-users] Help with PWM spindle control > On 12 March 2011 16:18, Tony Zampini <zampi...@cox.net> wrote: > >> addf pwmgen.make-pulses base-thread >> addf pwmgen.update servo-thread >> net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value >> net spindle-enable <= motion.spindle-on => pwmgen.0.enable >> net spindle-pwm <= pwmgen.0.pwm >> setp pwmgen.0.pwm-freq 10.0 >> setp pwmgen.0.scale 4000.0 >> setp pwmgen.0.offset -700.0 >> net spindle-cw <= motion.spindle-forward > >> setp parport.0.pin-01-out-invert 1 >> net spindle-pwm => parport.0.pin-01-out > > That ought to be enough. > I am a little surprised to see that the output is being inverted, so > that 0 spindle speed will give 5V. > > I think the problem is the offset. You would need (spindle/4000) - 700 > to be > 0 for any actual PWM. > > So, M3 S2802000 should give you a 50% duty cycle :-) > > I would suggest setting the offset to zero and removing the pin-invert. > > -- > atp > "Torque wrenches are for the obedience of fools and the guidance of wise > men" ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users