|
From: andy p. <bod...@gm...> - 2011-03-12 17:54:12
|
On 12 March 2011 16:18, Tony Zampini <zam...@co...> 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" |