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/CA%2BQ02MPdeT7RXNYjUXp1onx1-BiBMfj%2B8US6MnQLztMjvGTJtg%40mail.gmail.com.

Reply via email to