M03
From CNC.xyz Wiki
For CNC machines equipped with a remote activated spindle, the M03 M-Command will activate the spindle in the clockwise direction. For CNC machines with a pulse width modulated (PWM) spindle, an additional parameter will set the speed, typically calculated in RPM.
Standard Format: M03 S00000
The S parameter represents the desired speed.
Code Examples
In this example, the spindle will be turned on and then turned off with command M05.
M03 M05
For spindles with a PWM speed control, this example will turn the spindle on and set the speed to 12000 rpm.
M03 S12000