Copyright Goodheart-Willcox Co., Inc. Chapter 9 CNC Mill Programming 187 ■ M30 stops the program and rewinds to the beginning. ■ M98 sends the machine to a subprogram in conjunction with a P address (see Figure 9-4). ■ M99 rewinds and reruns the program often called a loop. 9.5 Contouring Contouring is a commonly used toolpath, typically performed with an end mill, that follows a joined path or single piece of geometry. Simply think of this as cutting down a line around a circle or a rectangular shape. The shape can be much more complex, but the steps to creating the program will be the same. Look at the print in Figure 9-7 as we walk through a sample program for contouring. Goodheart-Willcox Publisher Figure 9-6. A commonly used M code list. Some M codes are not listed. Commonly Used M Codes M Code Function M00 Program stop. M01 Optional program stop. M03 Spindle on clockwise. M04 Spindle on counterclockwise. M05 Spindle off. M06 Tool change. M08 Coolant on. M09 Coolant off. M10 Chuck or rotary table clamp on. M11 Chuck or rotary table clamp off. M30 Program end return to start. M98 Subprogram call. M99 End of subprogram or program restart. Goodheart-Willcox Publisher Figure 9-7. A sample print for contour programming.