machines/systems/flexibot/docs/marlin/_gcode/M003.md
2025-03-11 23:32:39 +01:00

1.6 KiB

tag title brief author contrib since requires related group codes notes parameters examples
m0003 Spindle CW / Laser On Set the spindle CW speed or laser power thinkyhead shitcreek 1.1.2 SPINDLE_LASER_ENABLE
M4
M5
control
M3
S is interpeted as the configured value range: PWM (default), Percentage, or RPM. (See `CUTTER_POWER_UNIT`)
[`M3`](/docs/gcode/M003.html) and [`M4`](/docs/gcode/M004.html) aren't needed with `LASER_POWER_INLINE` and `LASER_MOVE_POWER` enabled. Power is set directly in [`G1`](/docs/gcode/G000-G001.html)…[`G5`](/docs/gcode/G005.html)
tag optional description values
S true Spindle speed or laser power in the configured value range (see `CUTTER_POWER_DISPLAY`). (PWM 0-255 by default)
tag type
power byte
tag optional description values
O true Spindle speed or laser power in PWM 0-255 value range
tag type
power byte
tag optional description values
I true Inline mode ON / OFF.
tag type
mode bool
pre code
Set spindle rotation clockwise at 50% with `CUTTER_POWER_UNIT` set to `PERCENT` M3 S50
pre code
Set spindle rotation clockwise at 6K RPM with `CUTTER_POWER_UNIT` set to `RPM` M3 S5000
pre code
Set laser power to 50% in PWM M3 O128
pre code
Turn on the laser at full / `SPEED_POWER_STARTUP` power M3
pre code
Fire laser at 80% on next G1,G2 and G3 move M3 S204 I

Wait for moves to complete, then set the spindle speed (clockwise) or laser power.