Copyright Goodheart-Willcox Co., Inc. Chapter 9 CNC Mill Programming 183 G91 G28 Z0. is a safe zero return move in the Z axis. This is a safety move to prevent any initial movement of the spindle or tool that is close to the fixture, part, or clamping. It will return the spindle to its Z-axis home position. ■ G91 places the machine in incremental mode. ■ G28 returns the axis to zero. ■ Z0. defines the axis position to which the machine will return. In this instance, the G28 will return the Z axis to its Z0. position. 9.3.2 Program Body The body is the heart of the program, defining all of the tools and move- ments to create a part according to the print. The program for each tool will also have an opening statement, body, and closing statement within the larger program. Consider the following example: T1 M6 G0 G90 G54X_____ Y_____ M3 S5000 OPENING STATEMENT G43 H1 Z2. M8 T1 M6 calls tool #1 and tool change. G0 G90 G54 X_____ Y_____ M3 S5000 executes a rapid move in abso- lute mode to XY location and turns on the spindle clockwise to 5,000 rpm. G43 H1 Z2. M8 turns on tool height offset for tool #1, positions the tool at Z2., and turns on coolant. G01 Z−.5 F30. X_____ BODY: ALL MOVEMENTS Y_____ G01 Z−.5 F30., in a feed-rate mode, moves the tool to Z−.5 at 30 inches per minute. X_____ moves the tool to an X position (still in a feed-rate mode). Y_____ moves the tool to a Y position (still in a feed-rate mode). G80 G91 G28 Z0. CLOSING STATEMENT G28 Y0. G80 turns off canned cycles. G91 G28 Z0., in incremental mode, return to Z0. G28 Y0., in incremental mode, return to Y0. Any additional tools should follow this repetitive format for each tool’s code. Consistently programming in this manner will allow you to easily scan your work and see any deficiencies, preventing missing information and ensuring a successful program. 9.3.3 Closing Statement The closing statement contains the last lines of the program and prepares the machine to run the next part in a safe manner. It should also define the