M-code reference

M109 M-Code: Interactive User Input (Haas)

Interactive User Input (Haas) — Haas: shows a prompt on the screen and stores the operator's keypress in a macro variable (#500–#549), so a program can ask, for example, which part size to…

By cnccode · Updated
PropertyValue
CodeM109
FunctionInteractive User Input (Haas)
Used onMills and lathes

What does M109 do?

Haas: shows a prompt on the screen and stores the operator's keypress in a macro variable (#500–#549), so a program can ask, for example, which part size to run.

M109 example

Example
(PRESS 1 FOR SMALL, 2 FOR LARGE)
M109 P501
IF [#501 EQ 1] GOTO10

Tips

  • Put the prompt text in a comment directly before M109.

M-codes vary between machine builders. Codes from M00 to M09, M30 and M98/M99 are nearly universal; most others are defined by the machine builder. Always check the M-code list in your machine manual.

Most-used M-codes

CodeFunction
M00Program Stop
M01Optional Stop
M03Spindle On Clockwise
M04Spindle On Counter-Clockwise
M05Spindle Stop
M06Tool Change
M08Flood Coolant On
M09Coolant Off
M30Program End and Rewind
M98Subprogram Call
M99Subprogram Return / Loop

Frequently asked questions

What does M109 mean on a CNC machine?
M109 is Interactive User Input (Haas). Haas: shows a prompt on the screen and stores the operator's keypress in a macro variable (#500–#549), so a program can ask, for example, which part size to run.