A2oz

What is the M13 G-code?

Published in CNC Machining 1 min read

The M13 G-code is a command used in CNC machining to activate the spindle motor in a clockwise direction. This command is typically used to start the spindle rotation for cutting operations.

Here's a breakdown of its functionality:

  • M: Indicates a miscellaneous function (non-motion related).
  • 13: Specifies the specific miscellaneous function - activating the spindle in a clockwise direction.

Practical Considerations:

  • Spindle Speed: The M13 command does not specify the spindle speed. This is typically set separately using other G-codes like G97 (constant surface speed) or G98 (constant spindle speed).
  • Direction: To rotate the spindle counterclockwise, you would use the M14 G-code.
  • Safety: Always ensure proper safety procedures are in place before activating the spindle motor.

Example:

G01 X10.0 Y10.0 F100  ; Linear interpolation to X10.0 Y10.0 at feedrate 100 mm/min
M13 S1000          ; Activate spindle clockwise at 1000 RPM

This example demonstrates how the M13 command is used in conjunction with other G-codes to control the CNC machine.