M109 Interactive User Input

Classic Control - Mill Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue
P - A number in the range (500-599) representing the macro variable of the same name.

M109 allows a G-code program to place a short prompt (message) on the screen. A macro variable in the range 500 through 599 must be specified by a P code. The program can check for any character that can be entered from the keyboard by comparing with the decimal equivalent of the ASCII character (G47, Text Engraving, has a list of ASCII characters).

The following sample program asks the user a Yes or No question, then waits for either a Y or an N to be entered. All other characters are ignored.

% o61091 (M109 INTERACTIVE USER INPUT) ; (This program has no axis movement) ; N1 #501= 0. (Clear the variable) ; M109 P501 (Sleep 1 min?) ; N5 IF [ #501 EQ 0. ] GOTO5 (Wait for a key) ; IF [ #501 EQ 89. ] GOTO10 (Y) ; IF [ #501 EQ 78. ] GOTO20 (N) ; GOTO1 (Keep checking) ; N10 (A Y was entered) ; M95 (00:01) ; GOTO30 ; N20(An N was entered) ; G04 P1. (Do nothing for 1 second) ; N30 (Stop) ; M30 ; %

The following sample program asks the user to select a number, then wait for a 1, 2, 3, 4 or a 5 to be entered; all other characters are ignored.

% O00065 (M109 INTERACTIVE USER INPUT 2) ; (This program has no axis movement) ; N1 #501= 0 (Clear Variable #501) ; (Variable #501 will be checked) ; (Operator enters one of the following selections) N5 M109 P501 (1,2,3,4,5) ; IF [ #501 EQ 0 ] GOTO5 ; (Wait for keyboard entry loop until entry) ; (Decimal equivalent from 49-53 represent 1-5) ; IF [ #501 EQ 49 ] GOTO10 (1 was entered go to N10) ; IF [ #501 EQ 50 ] GOTO20 (2 was entered go to N20) ; IF [ #501 EQ 51 ] GOTO30 (3 was entered go to N30) ; IF [ #501 EQ 52 ] GOTO40 (4 was entered go to N40) ; IF [ #501 EQ 53 ] GOTO50 (5 was entered go to N50) ; GOTO1 (Keep checking for user input loop until found) ; N10 ; (If 1 was entered run this sub-routine) ; (Go to sleep for 10 minutes) ; #3006= 25 (Cycle start sleeps for 10 minutes) ; M95 (00:10) ; GOTO100 ; N20 ; (If 2 was entered run this sub routine) ; (Programmed message) ; #3006= 25 (Programmed message cycle start) ; GOTO100 ; N30 ; (If 3 was entered run this sub routine) ; (Run sub program 20) ; #3006= 25 (Cycle start program 20 will run) ; G65 P20 (Call sub-program 20) ; GOTO100 ; N40 ; (If 4 was entered run this sub routine) ; (Run sub program 22) ; #3006= 25 (Cycle start program 22 will be run) ; M98 P22 (Call sub program 22) ; GOTO100 ; N50 ; (If 5 was entered run this sub-routine) ; (Programmed message) ; #3006= 25 (Reset or cycle start will turn power off) ; #1106= 1 ; N100 ; M30 (End Program); %

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.

Feedback