Home › M-codes › Siemens 840D 828D › M4
M4 Spindle on counterclockwise
Siemens 840D 828D M-code · Mill and lathe
Starts the master spindle counterclockwise at the programmed S. Used for left hand tools and on many lathes for turning with the insert upside down or rear tool posts.
Format
S M4
Addresses
| Address | What it does |
|---|---|
S | Spindle speed in rpm, or cutting speed in G96 |
How it works
Modal until M3, M5 or M19.
Example program
T1 D1 ; TURNING TOOL
G96 S200 LIMS=2500 M4 ; SPINDLE CCW
G0 X52 Z2
G96 S200 LIMS=2500 M4 ; SPINDLE CCW
G0 X52 Z2
Example is in inch. Check offsets and clearances first.
Watch out for
- For a second spindle write the spindle number, for example M2=3 for spindle 2 clockwise.
- Check tool hand before using M4. A right hand tool run backwards rubs and breaks.
Machine builders set many M codes, and they change by model and options. Check the M code list for your machine.
Related codes
M4 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Spindle on, reverse |
| Haas NGC | Spindle on counterclockwise |
| Doosan (Fanuc) | Left spindle reverse rotation |
| DMG Mori MAPPS (Fanuc) | Spindle start(reverse) |
| Mazak (EIA) | Spindle reverse rotation |
| Okuma OSP | Spindle counter clockwise (Lathes & Mills) |
| Mitsubishi M70 M80 | Spindle on counterclockwise |
| Brother Speedio | Spindle on counterclockwise |
| Heidenhain TNC (ISO) | Spindle on counterclockwise |
| Fagor 8055 8065 | Spindle counterclockwise |
| LinuxCNC Tormach | Spindle counterclockwise |
| Mach3 Mach4 | Spindle on counterclockwise |
| Centroid CNC12 Acorn | Spindle on counterclockwise |
| Hurco WinMax (NC) | Spindle on counterclockwise |
| Fadal | Spindle on counterclockwise |
| Swiss (Citizen Star) | Main spindle reverse |
Every M-code for Siemens 840D 828D in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open M4 in the app All Siemens 840D 828D M-codes