CNC Machinist Calculator Ultra

Home › M-codes › Haas NGC › M109

M109 Interactive user input

Haas NGC M-code · Mill, Lathe

On mills: Interactive user input

Lets the program ask the operator for a one character answer, stored in a macro variable given by P.

Format

M109 P

Addresses

AddressWhat it does
PMacro variable number for the answer, in the 500 range

How it works

Not modal. Acts once on the line where it is commanded.

Example program

(PRESS Y TO RUN THE FINISH PASS)
M109 P501 (STORE THE ANSWER IN #501)
IF [#501 EQ 89] GOTO100 (89 IS THE CODE FOR Y)

Example is in inch. Check offsets and clearances first.

Watch out for

On lathes: Interactive user input

Shows a prompt and waits for the operator to press a key. The key value is stored in macro variable 500 to 549 given by P.

Format

M109 P

Addresses

AddressWhat it does
PMacro variable 500 to 549 that stores the key pressed

How it works

Non-modal.

Example program

(CUT ANOTHER PASS Y OR N)
M109 P501 (WAIT FOR KEY)
IF [#501 EQ 89] GOTO10 (89 IS Y)
M30 (END)
…

The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

M96

M109 on other controls

The same number can mean something different on another control.

ControlMeaning
Doosan (Fanuc)T.S.C coolant off(left spindle)
Mazak (EIA)Workpiece measurement DIS end
Okuma OSPCancel of M110
Heidenhain TNC (ISO)Constant feed at the cutting edge
Centroid CNC12 AcornDisable override knobs

Every M-code for Haas NGC 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 M109 in the app All Haas NGC M-codes

App Store Google Play