Define the terms MODAL as it applies to G codeSolutionModal
Define the terms MODAL as it applies to G code.
Solution
Modal codes are like a light switch. Flip it on and the lamp stays lit until someone turns it off. For example, the coolant commands are modal. If coolant is turned on, it stays on until it is explicitly turned off. The G codes for motion are also modal. If a G1 (straight move) command is given on one line, it will be executed again on the next line unless a command is given specifying a different motion (or some other command which implicitly cancels G1 is given).
The modal groups used in the interpreter are shown in Table 6.
| Group 1 | {G0, G1, G2, G3, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89} - motion | 
| Group 2 | {G17, G18, G19} - plane selection | 
| Group 3 | {G90, G91} - distance mode | 
| Group 5 | {G93, G94} - spindle speed mode | 
| Group 6 | {G20, G21} - units | 
| Group 7 | {G40, G41, G42} - cutter diameter compensation | 
| Group 8 | {G43, G49} - tool length offset | 
| Group 10 | {G98, G99} - return mode in canned cycles | 
| Group 12 | {G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3} coordinate system selection | 
| Group 2 | {M26, M27} - axis clamping | 
| Group 4 | {M0, M1, M2, M30, M60} - stopping | 
| Group 6 | {M6} - tool change | 
| Group 7 | {M3, M4, M5} - spindle turning | 
| Group 8 | {M7, M8, M9} - coolant | 
| Group 9 | {M48, M49} - feed and speed override bypass | 

