M109 lets a G-code program place a short prompt (message) on the screen. You must use a P code to specify macro variable in the range 500-549 or 10500 through 10549. 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).
|Macro Variables 540-599 and 10549-10599 are reserved for the WIPS (probe) option. If your machine is equipped with WIPS only use P500-539 or P10500-10599.|
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.
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.