(Part A) Machinerys Handbook 31st Edition Pages 1-1484

CNC PROGRAMMING CODES Table 2. Typical Milling G-Codes Table 2. (Continued) Typical Milling G-Codes Machinery's Handbook, 31st Edition

1358

G-Code

Description

G-Code

Description

G20 US customary units of input (G70 on some controls) G21 Metric units of input (G71 on some controls) G22 Stored stroke check ON

G65 Custom macro call

G66 Custom macro modal call

G67 Custom macro modal call—cancel

G23 Stored stroke check OFF G68 Coordinate system rotation G25 Spindle speed fluctuation detection ON G69 Coordinate system rotation—cancel G26 Spindle speed fluctuation detection OFF G73 High speed peck drilling cycle (deep hole) G27 Machine zero position check G74 Left hand threading cycle G28 Machine zero return (reference point 1) G76 Fine boring cycle G29 Return from machine zero G80 Fixed cycle—cancel G30 Machine zero return (reference point 2) G81 Drilling cycle G31 Skip function G82 Spot-drilling cycle G40 Cutter radius offset—cancel G83 Peck-drilling cycle (deep hole drilling cycle) G41 Cutter radius offset—left G84 Right hand threading cycle G42 Cutter radius offset—right G85 Boring cycle G43 Tool length offset—positive G86 Boring cycle G44 Tool length offset—negative G87 Back boring cycle G45 Position compensation—single increase (obsolete) G88 Boring cycle G46 Position compensation—single decrease (obsolete) G89 Boring cycle G47 Position compensation—double increase (obsolete) G90 Absolute dimensioning mode G48 Position compensation—double decrease (obsolete) G91 Incremental dimensioning mode G49 Tool length offset cancel G92 Tool position register G50 Scaling function cancel G98 Return to initial level in a fixed cycle G51 Scaling function G99 Return to R level in a fixed cycle Note that some G-codes are optional and some will vary from one control system to another. A typical example of using G-codes is a simple program entry, such as X18.0. X-address is mainly used as a dimension, but not exclusively. The amount of 18.0 could be in milli­ meters or inches, it can be an absolute location from part zero or an incremental distance and direction from current point. In addition, the same address can be a dwell time in seconds (a pause). Using one or more G-codes will narrow down the options to only those required by the program. Here are some examples: G21 G90 G00 X18.0 … rapid to absolute location of 18 mm G20 G91 G01 X18.0 F10.0 … feed by the distance of 18 inches in positive direction G04 X18.0 … dwell for 18 seconds Miscellaneous Function (M-Codes).— Along with G-codes (preparatory commands), a CNC program requires a number of miscellaneous functions, called M-codes or M-functions. These auxiliary functions fall into two groups—those that control various machine functions and those that control program flow. Miscellaneous functions are the least standard words in CNC applications and vary greatly between control systems. Those that are typical to most controls are: Three-digit M-codes are normally specific to a particular machine and various functions associated with it.

Copyright 2020, Industrial Press, Inc.

ebooks.industrialpress.com

Made with FlippingBook - Share PDF online