Copyright Goodheart-Willcox Co., Inc. 184 CNC Manufacturing Technology optimum position to remove the part from the fixture and load new mate- rial. For example: M9 G91 G28 Z0. M5 G28 Y0. CLOSING STATEMENT M30 M9 turns off coolant. G91 G28 Z0. M5 incrementally moves the tool to Z0. home and turns the spindle off. G28 Y0. moves the tool to Y0. location. M30 rewinds the program. The story is now complete. This is the format this text will use going forward to create all programs. 9.4 Address Codes Address codes are single-letter characters at the beginning of each word that define what the computer should do with the numerical data that follows. They are used to designate commands or machine functions. Figure 9-4 lists the available address codes and their functions. 9.4.1 G Codes The program address G is commonly referred to as the preparatory command. The G code puts the CNC control in a specific mode or state of operation. For example, G00 places the machine in a rapid mode, and G01 places the machine in a feed-rate mode. G codes can also be used to command canned cycles, or abbreviated multi-movement cycles, such as G83, which commands a drilling cycle but does not produce any machine movement. The table in Figure 9-5 lists the most commonly used G codes, which can be used to produce most programs. There are more G codes avail- able, including machine-specific G codes for special functions. For specific codes for different controls, refer to the user’s manual for that particular machine. The Function column of Figure 9-5 can help you decide when to use each G code. Categorizing G codes by function and using them to create some sample programs will help clarify the programming process. G00, G01, G02, and G03 are all movement commands: rapid, straight lines, and arcs. G28 sends the machine home. G40, G41, and G42 are commands for cutter compensation. G43 is tool height offset, or how far your tool tip is from home. G54–G59 are work coordinate offsets, or where your part is in the machine. G73–G86 are canned cycle commands. G90 and G91 establish incremental or absolute programming mode. G98 and G99 are used in canned cycles to establish safe return planes.
Previous Page Next Page