Stop stepping motor
-
I need to stop one motor to control it manually.
The command M18 X doesn't stop the motor turning
Any suggestion will be appreciated -
M18 will disable the motor(s), but as soon as they are commanded to move they will be enabled again. To prevent a motor moving when RepRapFirmware tries to move it, use M584 to map that axis temporarily to an unused driver number, e.g. 11. To move it manually, use M584 to create a new axis (e.g. U) that is mapped to the real driver.
-
Thanks for your answer A little bit disappointed by your solution. I am sure you feel that is not a clean way to work. Please update me once you have developed a better way to stop a motor . I have used Minitronics for years and stopping a motor is clean. Anyway many thanks for the time spent to study my request
-
Theo,
G-Code, and G-Code controllers, tend to follow standards. One very strong standard is the NIST G-Code interpreter. De-Facto standards include the way that many industrial controllers, and many widespread software controllers (Mach, Grbl, TinyG, Marlin, etc, etc) work.
NONE of these specifies any way to "stop a motor". In fact, the entire philosophy of G-Code is "move according to commands".
All of these standards DO define the way that "move commands" are mapped to the actual physical movements of the machine. That definition involves a "configuration" that "maps" motors, steps per mm, etc, etc. to machine coordinates. This allows the controller to take a command such as "G1 X10 Y20" (assuming that we are starting at X0Y0) and issue pulses to the motors in such a way that the 'control point' arrives at X10 and Y20 at the exact same instant.
So... "changing the configuration" is the "philosophically correct" way to command the controller to do something specific with a motor. Something like issue zero pulses to that motor during a given move.
Many controllers configuration is entirely static (static in relation to the execution of a G-Code program). Duet/RepRap has the powerful advantage of configuring via G-Code (M commands to be specific) so that the configuration CAN change during execution of a G-Code program.
Summary: G-Code standard and philosophy mandate that the correct way to change what a motor does in relation to the movement commands issued IS to change the machine configuration. Duet allows this to happen in real time, between move commands.
-
@theo said in Stop stepping motor:
Thanks for your answer A little bit disappointed by your solution. I am sure you feel that is not a clean way to work. Please update me once you have developed a better way to stop a motor . I have used Minitronics for years and stopping a motor is clean. Anyway many thanks for the time spent to study my request
I think it's a pretty good idea. It can all be done in a macro.