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

CodeFunction
M00Program stop – stops the spindle, coolant, and program execution.
M01Optional program stop – often used when the operator needs to re-clamp the workpiece.
M02End of program – stops spindle, coolant, and axis feed.
M03Starts the spindle clockwise.
M04Starts the spindle counterclockwise.
M05Turns off the spindle.
M06Triggers an automatic tool change.
M08Turns on coolant system 1.
M09Turns off coolant systems 1 and 2.
M30End of program – marks the end of the main program.
M98Calls a subprogram.
M99Return 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 program

Reference

CodeFunction
M00Program stop – stops the spindle, coolant, and program execution.
M01Optional program stop – often used when the operator needs to re-clamp the workpiece.
M02End of program – stops spindle, coolant, and axis feed.
M03Starts the spindle clockwise.
M04Starts the spindle counterclockwise.
M05Turns off the spindle.
M06Triggers an automatic tool change.
M07Turns on coolant system 2.
M08Turns on coolant system 1.
M09Turns off coolant systems 1 and 2.
M10Turns on coolant systems 1 and 2.
M12Clamps the C axis (rotary table).
M13Unclamps the C axis (rotary table).
M20Advances the indexer by one position.
M21Starts the lubrication cycle.
M25Retracts the Z axis to its home position (tool change position).
M26Selects the workpiece probing signal.
M27Selects the tool probing signal.
M29Activates synchronous tapping.
M30End of program – marks the end of the main program.
M32Clamps the A axis (rotary table).
M33Unclamps the A axis (rotary table).
M34Clamps the B axis (rotary table).
M35Unclamps the B axis (rotary table).
M36Turns off the servo drives.
M38Captures and sets the state of the laser “OK” signal.
M39Captures and sets the state of the static laser signal.
M40Captures and sets the state of the dynamic laser signal.
M41Disables two-touch probing with G31.
M42Enables 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.
M43Increases the purge air.
M44Decreases the purge air.
M45Opens the shutter.
M46Closes the shutter.
M47Turns on the laser transmitter.
M48Turns off the laser transmitter.
M49Turns on the laser receiver.
M50Turns off the laser receiver.
M52Activates auxiliary output 1.
M53Activates auxiliary output 2.
M54Activates auxiliary output 3.
M55Activates auxiliary output 4.
M56Rotates the pallet changer for a pallet change without confirmation.
M57Rotates the pallet changer to pallet 1.
M58Rotates the pallet changer to pallet 2.
M59Starts the chip conveyor in forward direction.
M60Starts the chip conveyor in reverse direction.
M61Stops the chip conveyor.
M62Deactivates auxiliary output 1.
M63Deactivates auxiliary output 2.
M64Deactivates auxiliary output 3.
M65Deactivates auxiliary output 4.
M68Activates flood coolant.
M69Deactivates flood coolant.
M76Normal A-axis operation (default setting).
M77Reverses A-axis operation.
M78Normal B-axis operation (default setting).
M79Reverses B-axis operation.
M80Positive C-axis rotation direction (default setting).
M81Negative C-axis rotation direction.
M98Calls a subprogram.
M99Return 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.