Stop during stepper motor operation
-
I want to stop a running step motor without an external sensor.
I'm trying to use a step motor like a spindle, but I can't find a way without using an extra board.
Is it possible to operate a motor connected to the step driver at a constant speed and stop the motor when a specific command is sent?
I don't want the system to shut downI am using Duet 3 Mainboard 6HC.
-
@Dennis_kim The simplest approach is to define the stepper motor as a spindle and then you can set the spindle to a specific speed (and cw or ccw). On my CNC (a Duet3d 6xd) I use the fan2 port because I'm driving a relay, but the 6HC will drive a stepper just fine. The following code sets up the spindle (yours will differ).
; Spindle definition M950 R0 C"out7" L1000 ; use the fan2 port for spindle, M563 P0 S"Spindle 0" R0 ; create a spindle #0 named spindle 0
Then, in CNC mode the user interface will add a spindle control like this:
and check out the M3, M4, and M5 GCode commands. Also, see here: https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_CNC
-
@markz unfortunately you cant define a spindle using a stepper motor output using M950
@Dennis_kim you can set up the stepper motor as an extruder possibly? you would need to send extruder commands along with the movement commands though.
-
@T3P3Tony Whoa my apologies. I just assumed it extended.
-
@Dennis_kim HF020 Pulse Driver Speed Motion Controller
It's an external board, but it is the best solution to make it act like a spindle, could be controlled with a digital output/heater/fan output. I believe @dc42 said that this was potentially a feature to be added in 3.5, but I think it might not be ready in time (as well as feed hold, which is also useful in places where you have a spindle).