Hi John,
motion.spindle_brake - genius! Tried it out and it does exactly how I
wanted it. BTW, break signal seems to be active when machine is
off/e-stop.
Adapted spindle section below. Now I just need to add in a ramp down,
the servo takes the stop a bit too seriously for my taste ;)
Thanks a lot!
Markus
# ################
# Spindle [3]
# ################
newsig spindle-enable bit
sets spindle-enable FALSE
# spindle wiring
net spindle-enable <= motion.spindle-brake
net spindle-enable => bb_gpio.p8.out-37
net spindle-enable => hpg.stepgen.03.enable
net spindle-velocity <= motion.spindle-speed-out-rps
net spindle-velocity => hpg.stepgen.03.velocity-cmd
setp hpg.stepgen.03.dirpin 835
setp bb_gpio.p8.out-37.invert 1
# timing parameters
setp hpg.stepgen.03.dirsetup [SPINDLE]DIRSETUP
setp hpg.stepgen.03.dirhold [SPINDLE]DIRHOLD
setp hpg.stepgen.03.steplen [SPINDLE]STEPLEN
setp hpg.stepgen.03.stepspace [SPINDLE]STEPSPACE
setp hpg.stepgen.03.position-scale [SPINDLE]SCALE
setp hpg.stepgen.03.maxvel [SPINDLE]STEPGEN_MAX_VEL
setp hpg.stepgen.03.maxaccel [SPINDLE]STEPGEN_MAX_ACC
setp hpg.stepgen.03.control-type 1
setp hpg.stepgen.03.steppin 833
On Sat, 18 Jul 2020 16:41:22 -0700
"John Dammeyer" <
jo...@autoartisans.com> wrote:
> Hi Markus,
> I've been mulling over the same thing with my new Spindle Servo
> that's currently running PWM but will eventually be switched over to
> Step/Dir.
>
> The enable to it is the same one to all the other servos and stepper
> drive.
>
> What I was thinking of doing was using the compliment of the brake
> signal to gate the enable to the drive. While the BRAKE is ON the
> ENABLE is OFF. Set RPM to 0 without an M5 and the BRAKE doesn't come
> ON and the spindle is still held in position by the servo. Issue an
> M5 and the brake is ON which shuts off the ENABLE. An M3 with any
> Sxxx will disable the BRAKE and setting the ENABLE ON.
>
> In either case I still have to bring out a separate output to the
> servo enable rather than the common output to all the drives. And
> with that said it would be possible to just use the BRAKE as the
> servo enable. I suspect BRAKE is not asserted during ESTOP so the
> spindle would continue to spin. Not a good thing.
>
> John Dammeyer
> >
https://groups.google.com/d/msgid/machinekit/20200718145232.7b0800be%40yolanda.
> >
>