Sorry for my sloppy terminology. My servo has 3 input pins, enable/step/dir. If enable is asserted it holds the position, otherwise the shaft can be turned freely. Which is the behaviour I am looking for. I want the spindle to not be engaged for manual tool changes, touch offs and such. But then I want the spindle to hold its position for tightening the drawbar and things like that, kinda like a poor man's version of a spindle lock.
Unfortunately the pin motion.spindle-on does not assert just because I issue a M3 or M4 command, it also requires S to be non 0. This is the behaviour I see on the oscilloscope which is not good because I need the enable pin of the servo to be asserted for it to hold its position. Hope this makes more sense. On Sat, 18 Jul 2020 17:11:20 -0400 justin White <[email protected]> wrote: > motion.spindle-on is a pin, "spindle-enable" is your signal. > > You don't need to trip the "....stepgen.NN.enable" pin to have a > step/direction servo hold position, you just stop sending it pulses > which "m3 s0" should do with no further interaction. disabling the > stepgen does not cause the servo to go limp because the drive should > be setup in position mode and stepgen only sends steps to alter > position. Holding a position is always assumed in position mode > servos. > > What may be happening that you didn't mention is that when you enter > M3 S0 it trips the motion.spindle-on pin and since it is connected to > the stepgen.enable pin it may be causing your drive to fault out. If > your spindle is at speed and you immediately disable the stepgen > there is no (de)accelleration curve and your drive may fault. > > Otherwise you can connect the stepgen.enable to > "motion.motion-enabled" or motion.power-on(or something like that) > depending on how you want it to work. > > On Sat, Jul 18, 2020 at 12:08 PM markus <[email protected]> wrote: > > > I replaced my spindle with a servo motor and was hoping to use "M3 > > S0" to hold the current position of the spindle. The signal > > "motion.spindle-on" however only asserts if S>0, when S==0 the > > signal is not asserted. > > > > Is there a different signal I could use? Should this work? > > > > Thanks in advance, > > Markus > > > > ... > > # ################ > > # Spindle [3] > > # ################ > > > > newsig spindle-enable bit > > sets spindle-enable FALSE > > > > # spindle wiring > > net spindle-enable <= motion.spindle-on > > 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.control-type 1 > > setp hpg.stepgen.03.steppin 833 > > setp hpg.stepgen.03.dirpin 835 > > > > # 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 > > > > -- > > website: http://www.machinekit.io blog: http://blog.machinekit.io > > github: https://github.com/machinekit > > --- > > You received this message because you are subscribed to the Google > > Groups "Machinekit" group. > > To unsubscribe from this group and stop receiving emails from it, > > send an email to [email protected]. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/machinekit/20200716210622.1fcc780f%40yolanda > > . > > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/20200718145232.7b0800be%40yolanda.
