CNC | M03-M04-S Command | Spindle Speed

In this article, we describe how to use M codes to control spindle speed and functions in CNC machines with all details and examples.

0
1080

Spindle Speed Introduction

The spindle speed is programmed in revolutions per minute under the address S provided that the machine possesses a controlled spindle.

The direction of rotation and the start or end of the movement are specified via M commands.

M Codes for Spindle

M03: Spindle clockwise
M04: Spindle counter-clockwise
M05: Spindle stop


Note:
For integer S values, the decimal point can be omitted, e.g. S270.

Information: If you write M3 or M4 in a block with axis movements, the M commands become active before the axis movements.

Default setting: The axis movements only start once the spindle has accelerated to speed (M3, M4). M5 is also issued before the axis movement. However, there is no waiting for spindle standstill. The axis movements begin before spindle standstill.

The spindle is stopped at program end or with RESET.

At program start, spindle speed zero (S0) is in effect.

Note: Other settings can be configured via machine data.

You may be interested also:
“CNC Milling | G94-G95-F Command | Feedrate”

Example

N10 G1 X70 Z20 F300 S270 M3 ; Before the axis traversing X, Z the spindle accelerates to 270 rpm, clockwise
N80 S450 ; Speed change
N170 G0 Z180 M5 ; Z movement, spindle comes to a stop.


Need to More?

Our volunteers have worked together and carefully prepared the articles published here in their native language without using machine translation. You can search the entire site for more information on the subject. You can start a discussion on CNCarea.com forums and join us to get support, ask questions, improve a published article or give your opinion.


Previous articleSiemens CNC Milling | BRISK-SOFT | Acceleration Pattern
Next articleCNC Video | Haas Machine Center | The Work Beacon