Home › M-codes › LinuxCNC Tormach › M4
M4 Spindle counterclockwise
LinuxCNC Tormach M-code · Mill and lathe
Starts the spindle counterclockwise at the active S speed.
Format
M4 [S] [$]
Addresses
| Address | What it does |
|---|---|
S | Spindle speed |
$ | Spindle number, default 0, -1 for all |
How it works
Modal, spindle group. Stays on until M3 or M5.
Example program
G20 G17 G40 G49 G54 G80 G90 G94 (INCH, SAFE START)
T6 M6 G43 (LEFT HAND TAP)
S400 M4 (SPINDLE CCW)
G0 X1 Y1 Z0.5
T6 M6 G43 (LEFT HAND TAP)
S400 M4 (SPINDLE CCW)
G0 X1 Y1 Z0.5
Example is in inch. Check offsets and clearances first.
Watch out for
- Used for left hand tapping with G74 and some lathe tool setups.
- A normal tool run in M4 rubs and breaks.
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 |
| Siemens 840D 828D | Spindle on counterclockwise |
| Heidenhain TNC (ISO) | Spindle on counterclockwise |
| Fagor 8055 8065 | 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 LinuxCNC Tormach 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 LinuxCNC Tormach M-codes