Hurco M-codes – reference table
Reference table of all Hurco M-codes from M00 to M99: spindle control, coolant, tool change, rotary axis clamping, probing and laser functions explained.
On Hurco machining centers, M-codes control the machine functions: spindle, coolant, tool changes, rotary axis clamping, probing, and laser functions. The basics of tool changes and spindle commands apply here just as on any other control.
Essential M-codes
| Code | Function |
|---|---|
| M00 | Program stop – stops the spindle, coolant, and program execution. |
| M01 | Optional program stop – often used when the operator needs to re-clamp the workpiece. |
| M02 | End of program – stops spindle, coolant, and axis feed. |
| M03 | Starts the spindle clockwise. |
| M04 | Starts the spindle counterclockwise. |
| M05 | Turns off the spindle. |
| M06 | Triggers an automatic tool change. |
| M08 | Turns on coolant system 1. |
| M09 | Turns off coolant systems 1 and 2. |
| M30 | End of program – marks the end of the main program. |
| M98 | Calls a subprogram. |
| M99 | Return from a subprogram. |
Example
T1 M06 ; load tool 1
S8000 M03 ; spindle clockwise, 8000 rpm
M08 ; coolant on
G01 X50 Y20 F500
M09 ; coolant off
M05 ; spindle off
M30 ; end of programReference
| Code | Function |
|---|---|
| M00 | Program stop – stops the spindle, coolant, and program execution. |
| M01 | Optional program stop – often used when the operator needs to re-clamp the workpiece. |
| M02 | End of program – stops spindle, coolant, and axis feed. |
| M03 | Starts the spindle clockwise. |
| M04 | Starts the spindle counterclockwise. |
| M05 | Turns off the spindle. |
| M06 | Triggers an automatic tool change. |
| M07 | Turns on coolant system 2. |
| M08 | Turns on coolant system 1. |
| M09 | Turns off coolant systems 1 and 2. |
| M10 | Turns on coolant systems 1 and 2. |
| M12 | Clamps the C axis (rotary table). |
| M13 | Unclamps the C axis (rotary table). |
| M20 | Advances the indexer by one position. |
| M21 | Starts the lubrication cycle. |
| M25 | Retracts the Z axis to its home position (tool change position). |
| M26 | Selects the workpiece probing signal. |
| M27 | Selects the tool probing signal. |
| M29 | Activates synchronous tapping. |
| M30 | End of program – marks the end of the main program. |
| M32 | Clamps the A axis (rotary table). |
| M33 | Unclamps the A axis (rotary table). |
| M34 | Clamps the B axis (rotary table). |
| M35 | Unclamps the B axis (rotary table). |
| M36 | Turns off the servo drives. |
| M38 | Captures and sets the state of the laser “OK” signal. |
| M39 | Captures and sets the state of the static laser signal. |
| M40 | Captures and sets the state of the dynamic laser signal. |
| M41 | Disables two-touch probing with G31. |
| M42 | Enables automatic two-touch probing with G31: if the workpiece probe is triggered during the G31 move, it retracts automatically and probes a second time at reduced feed. |
| M43 | Increases the purge air. |
| M44 | Decreases the purge air. |
| M45 | Opens the shutter. |
| M46 | Closes the shutter. |
| M47 | Turns on the laser transmitter. |
| M48 | Turns off the laser transmitter. |
| M49 | Turns on the laser receiver. |
| M50 | Turns off the laser receiver. |
| M52 | Activates auxiliary output 1. |
| M53 | Activates auxiliary output 2. |
| M54 | Activates auxiliary output 3. |
| M55 | Activates auxiliary output 4. |
| M56 | Rotates the pallet changer for a pallet change without confirmation. |
| M57 | Rotates the pallet changer to pallet 1. |
| M58 | Rotates the pallet changer to pallet 2. |
| M59 | Starts the chip conveyor in forward direction. |
| M60 | Starts the chip conveyor in reverse direction. |
| M61 | Stops the chip conveyor. |
| M62 | Deactivates auxiliary output 1. |
| M63 | Deactivates auxiliary output 2. |
| M64 | Deactivates auxiliary output 3. |
| M65 | Deactivates auxiliary output 4. |
| M68 | Activates flood coolant. |
| M69 | Deactivates flood coolant. |
| M76 | Normal A-axis operation (default setting). |
| M77 | Reverses A-axis operation. |
| M78 | Normal B-axis operation (default setting). |
| M79 | Reverses B-axis operation. |
| M80 | Positive C-axis rotation direction (default setting). |
| M81 | Negative C-axis rotation direction. |
| M98 | Calls a subprogram. |
| M99 | Return from a subprogram. |
Machine-dependent availability
Which M-codes are actually available depends on the machine model and its equipment, such as a pallet changer, rotary table, or laser measurement system. The documentation for your specific WinMax control is authoritative.