S (Tool intensity/spindle speed)
The S parameter in G-code can be described as a value that controls the primary output intensity or speed of the machine's tool or device, such as spindle speed in milling machines, or laser intensity in laser cutters and engravers. This parameter can be adapted to suit different machines and is used to manage the performance or effectiveness of the working tool or device within the machine's operation.
To set the speed in revolutions per minute (rpm) of the spindle, program S.... The spindle will turn at that speed when it has been programmed to start turning. The S-word can be used regardless of whether the spindle is turning or not. If the speed override switch is enabled and not set at 100%, the speed will be different from what is programmed.
It is permitted to program S0; the spindle will not turn if that is done. The controllers that support PWM output will have their PWM value set corresponding to the requested spindle speed if the spindle is turned on. An error is issued if: • the S value is negative.