Skip to content

M10 / M11: opening and closing the chuck, collet or workholding

M10 and M11 are the pair of auxiliary functions many lathe builders assign to opening and closing the chuck, the collet or the hydraulic workholding, but which one opens and which one closes is decided by each machine's PLC, not by any standard. On some lathes M10 opens and M11 closes, on others it is the reverse, and on some the pair is assigned to a different auxiliary device. This is a code you never copy from a program for another machine without first checking the auxiliary function list in the manual.

For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.

The brands and control names mentioned belong to their owners and are used only to identify the equipment. GetGCode is not affiliated with or endorsed by any manufacturer, ISO or ASME: this is our own content, not official documentation. Legal notice.

Family
Auxiliary
Machine
Turning, Mill-turn
Risk
High
Example
M10 / M11

Syntax by control

Haas lathe
M10 / M11
On Haas lathes they are usually tied to chuck clamping, but the exact behavior and the interlocks depend on the model and the options. Confirm it in the M-code list in your machine's manual.
Lathe with Fanuc control
M10 / M11
Fanuc does not define these numbers: they are builder functions interpreted by the machine's PLC. Two lathes with the same control can have them assigned to different things if they come from different builders.
Mill with rotary table
M10 / M11
On some mills with a fourth axis, the same pair is used to engage and release the rotary table brake. That is a completely different function sharing the same numbers, and that is the danger of generic tables.
Checking at the machine
MDI with the machine empty
The safe way to find out: with no part loaded, run each M-code in MDI and watch the workholding. Write the result down in the machine's binder so you do not have to repeat the test six months from now.

Address letters used with it

LetterWhat it setsUnit
M10One of the two positions of the workholding, or of whatever device it is assigned to on that machine. There is no way to tell which one without checking the documentation.no parameters
M11The opposite position to M10, with the same associated safety interlocks.no parameters
InterlocksThe PLC makes execution conditional on the state of the spindle, the door and the hydraulic pressure. If any condition is missing, the machine alarms instead of moving the workholding.PLC signals
Actuation timeA hydraulic chuck takes a few tenths of a second to complete its stroke. Some machines wait for the end-of-stroke confirmation and others need a programmed dwell after the M-code.seconds

Worked example

A workholding change on a lathe, with a programmed stop so the operator can flip the part and clamp it again. The example uses M11 to close and M10 to open because that is how the manual for this particular machine has it, although here the chuck is opened with the foot pedal during the stop and the program only runs M11; the first thing the program does is put that in writing for whoever reads it.

O0110 (SEGUNDA OPERACION - VERIFICAR M10/M11)
( The program name warns that the workholding M-codes are specific to that machine. )
(EN ESTA MAQUINA M10 ABRE Y M11 CIERRA)
( Essential comment: it turns a fact buried in a manual into something visible in the program itself. )
G21 G40 G99
( Standard lathe header. )
(primera operacion mecanizada)
( Stands in for the work already done before the workholding change. )
G00 X200. Z150.
( Moves the turret away to a clear position so the operator has room to work. )
M05
( Spindle stop. You never open the workholding with the spindle running, even if the interlock prevents it. )
G04 X1.0
( One-second dwell to make sure the spindle has come to a complete stop before touching the workholding. )
M00
( Programmed stop: the machine halts and waits for the operator to press cycle start. This is where the operator opens the chuck with the foot pedal and flips the part by hand. )
M11
( Closes the chuck on the flipped part. On this machine M11 closes; on another it could open. )
G04 X0.5
( Waits for the workholding to build pressure before starting the spindle. )
G50 S2000
( RPM limit for the second operation. )
G96 S180 M03
( Constant cutting speed and spindle on, with the part now clamped. )
(sigue el mecanizado de la segunda cara)
( Rest of the program. )
M30
( End of program. )
Open the simulator to check the example

Practical keys to using M10/M11 in the workshop

Why the same number does different things

M-codes above the standard ones are not standardized: the builder assigns them through the PLC to whatever the machine has. M10 and M11 are low, convenient numbers, which is why many builders have used them for workholding, the most common auxiliary function on a lathe. But that overlap is habit, not a standard, and all it takes is a different brand or model year for the meaning to flip or for the pair to be assigned to a tailstock or a steady rest. The only reliable source is the machine's auxiliary function table.

Workholding is the most dangerous auxiliary function

A wrong coolant M-code gets the floor dirty; a wrong workholding M-code lets go of a spinning part. The PLC interlocks cover the obvious cases, like opening with the spindle at high speed, but not all of them: a heavy part with the spindle only just stopped still has inertia, and closing on a badly seated part leaves an imbalance you will notice when it accelerates. That is why serious programs stop the spindle, dwell explicitly and only then touch the workholding, instead of chaining blocks together and trusting the machine to watch everything.

How to document this in the program

The habit that saves you nasty surprises is to write in the program header what each builder M-code does on that specific machine, and to repeat the comment next to every use. It costs two lines and turns a fact hidden in a manual into something the next operator sees on opening the file. When the shop has several machines, it also pays to note in the program name which one it was written for, because sooner or later someone will try to run it on the other one, and that is where the reversed mapping does its damage.

Mistakes that cost you a part (or a tool)

  • Copying M10 and M11 from a program for another machine: on the new one they may be reversed or assigned to a different device.
  • Opening the workholding without having stopped the spindle and without waiting for it to come to a complete stop.
  • Chaining the M-code straight into the next move with no dwell: the hydraulic actuator takes time and the program can get ahead of it.
  • Confusing the chuck clamping pair with the one for the tailstock or the steady rest, which have their own M-codes.
  • Trusting a generic M-code table found on the internet instead of the machine's manual.
  • Assuming M10 and M11 do the same thing on a mill with a fourth axis as on a lathe: there they are usually the table brake.
  • Leaving the program with no comments explaining what each M-code does, forcing the next person to figure it out all over again.

Frequently asked questions

Does M10 open or close?

It depends on the machine, and there is no way to know without looking it up. It varies by machine: on Haas lathes, for example, M10 clamps and M11 unclamps, and on other models it is the reverse. You check it in the auxiliary function list in the manual or by testing it in MDI with the machine empty, which takes two minutes and removes all doubt.

Are they the same on Haas, Fanuc and Mazak?

The number exists on all of them, but what it does is defined by each builder's PLC. It is not even guaranteed within the same brand across models and years. This is exactly the kind of code you never transplant between machines without verifying it.

Can I open the workholding from the program with the spindle turning?

The machine's interlock should prevent it, and on any properly configured machine it does. But you do not program counting on that: you stop the spindle, wait until it has truly stopped and only then command the M-code. The inertia of a heavy part does not vanish the instant the rotation command drops.

Do I need a G04 after it?

On many machines, yes. If the PLC waits for the end-of-stroke confirmation before finishing the block, you do not need one; if it just sends the command and moves on, the program can start the spindle before the chuck has pressure. A half-second dwell is cheap and covers both cases.

Where is the M-code list for my lathe?

In the operator's manual, in the auxiliary functions chapter, and sometimes on a sticker inside the electrical cabinet. If the machine is second-hand and came without documentation, the builder's service department can usually supply it from the serial number.

Related codes

DN M10/M11M21/M22M00/M01M43/M44M13/M14

Other codes in Auxiliary

See the full list of G and M codes

Related apps