|
| ||||||
| Welcome to The FlyingGiants Community! We're all about fun, and inside you'll find the greatest, friendliest, and most helpful group of people around! If this is your first time visiting, please check out site, and click here to sign up! We hope to see you soon!! |
|
|||||||
|
|
#1 |
|
Crashing sucks!
![]() Join Date: Jun 2007
Location: Sturgis, South Dakota
Age: 40
Posts: 843
|
Intended for those who don't quite "get" all these goofy letters and stuff.
G codes can whittled down as linear movements and M codes are modal commands like "turn on coolant pump" or spindle clockwise, etc. . . There's a few more letters to learn but they are generally embedded into the parent G/M code. (F for example is a feed rate and S would be a spindle RPM) In addition to the more routine stuff listed below there are a number of proprietary codes that manufacturers use for their machines. Stuff like converting a Y axis into an A axis move, etc. EDIT: Something I neglected to mention is the coordinate system used. The 'Cartesian' system is nothing more than a point in space being chosen and then X,Y,Z,A,B,C axis's being datum'd off that point. To the left is -x, down is -Z, etc. . . Two major styles are absolute and incremental dimensions. Absolute all reference back to that 0,0,0 point for all axis'. Incremental are based off of features in the drawing/model. Holes spaced one inch from one another with the dimensions starting over at each hole would be an example of an incremental dimension. These have their place but they can really screw you too due to tolerance stack. Experience is never cheap. . . So, if you ever look at code and see something like G1 X10 Y5 F50 M03S7500 it means that we are moving 10 inches in X from the datum point (assuming we're using absolute programming which would be listed in the safety line at the beginning of the program) while also moving to a positive 5 inches in the Y axis. If we wanted to move to X and THEN Y, Y would have to be on the next line number. F is a feedrate of 50" per minute. it may also mean 50 surface feet per minute; again, all this is designated in the safety line at the beginning of the program. It just kinda maps out the basic parameters and will stay modal until a change is listed. M03 is telling the spindle to spool up clockwise. S7500 is the RPM. You can have one G code and (if memory serves me right, it's been almost three years since I've edited code) two M codes per line. Something like G0 X0 Y0 Z10 M03S7500 M08 is a Rapid movement to the X&Y zero and a positive height of 10" in Z while turning on the spindle to 7500 rpm simultanious to turning on the coolant pump. Don't forget your safety line!! Enjoy Common GCodes For Milling Machines G0 Rapid Positioning The machine moves at maximum speed to the specified locations. G0 is a modal code, rapid motion stays in effect until another motion code is encountered. Rapid motion may be linear, shortest axis completes first, or shortest of X and Y complete first, then the Z motion is executed. G0 is usually followed by one or more positions specified by X, Y, and/or Z codes. G0 is used when the tool is not cutting material, to move between cutting different areas of the part. G1 Linear Positioning The machine moves at the current feed rate in a straight line to the specified locations. G1 is a modal code, linear feed motion stays in effect until another motion code is encountered. G2 Arc Clockwise The machine moves at the current feed rate in a circular or helical arc to the specified locations. The arc motion begins at the current location and moves in a clockwise direction. G2 is a modal code, arc motion stays in effect until another motion code is encountered. Arc motion occurs in the plane specified by G17-XY, G-18-ZX, G19-YZ code (see below). Different machines can specify the center of arcs in several different ways. One way is to specify the absolute center of the arc, usually with I, J, K codes. Another way is to specify the center relative to the starting location or relative to the ending location. Another way is to specify the radius of the arc, usually with a R code. G3 Arc Counter-Clockwise The machine moves at the current feed rate in a circular or helical arc to the specified locations. The arc motion begins at the current location and moves in a counter-clockwise direction. G3 is a modal code, arc motion stays in effect until another motion code is encountered. Arc motion occurs in the plane specified by G17-XY, G-18-ZX, G19-YZ code (see below). G4 Dwell The machine remains in the current position for the specified length of time, or number of spindle revolutions. G6.2 NURB Curve The machine follows the specified curve at the current feed rate. Unlike most G codes, a NURB curve takes more than one line. The first line has the curve order (P), first knot (K), starting control point (X Y Z and weight R). The next lines contain consecutive knot values and control points. The remaining knots follow, such as: G6.2 P4 K0.0 X0.0 Y0.0 Z0.0 R1.0 K0.0 X0.1 Y0.1 Z0.0 R1.0 . . . K1.0 X1.0 Y1.0 Z0.0 R1.0 K1.0 K1,0 K1.0 G17 XY-Plane Selection Selects the XY-Plane of the current coordinate system for subsequent arc movement. G17 is a modal command which remains in effect until another plane is selected. G18 ZX-Plane Selection Selects the ZX-Plane of the current coordinate system for subsequent arc movement. G18 is a modal command which remains in effect until another plane is selected. G19 YZ-Plane Selection Selects the YZ-Plane of the current coordinate system for subsequent arc movement. G19 is a modal command which remains in effect until another plane is selected. G20 Inches Specifies that the program units are in inches. G21 Millimeters Specifies that the program units are in millimeters. G40 Cutter Compensation Off Cutter compensation that was initialized by a G41 or G42 command is turned off. Cutter compensation is used to offset the tool path by the amount specified by the current diameter offset number. The diameter offset is usually specified with a tool change as a D followed by the offset. The offset can be the diameter of the tool, but it can also be used to specify a smaller offset to account for smaller tool size due to wear. G41 Cutter Compensation Left Cutter compensation is initialized by a linear move to the specified location. The material is to the left side of the tool as it follows the path. G42 Cutter Compensation Right Cutter compensation is initialized by a linear move to the specified location. The material is to the right side of the tool as it follows the path. G43 Length Compensation Positive Tool length compensation in the Positive direction. G44 Length Compensation Negative Tool length compensation in the Negative Direction. G54 to G59 Work Coordinate System Select Selects the work coordinate system, 1 through 6. G73 Peck Drilling Cycle Indicates the start of a peck drilling canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G74 Left Tap Cycle Indicates the start of a left handed tapping canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G80 Canned Cycle Cancel Indicates the end of a canned/drilling cycle. Usually this is followed by a new motion command, for instance, G1 to return to the rapid plane. G81 Spot Drilling Cycle Indicates the start of a spot drilling canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G82 Drill Cycle Indicates the start of a drilling canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G83 Peck Drilling Cycle Indicates the start of a peck drilling canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G84 Tap Cycle Indicates the start of a tapping canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G85 Ream Drilling Cycle Indicates the start of a ream drilling canned cycle. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G86, G88, G89 Bore Drilling Cycles Indicates the start of bore drilling canned cycles. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G87 Back Bore Drilling Cycles Indicates the start of back bore drilling canned cycles. Position commands, such as X, Y, indicate the locations of holes for drilling. The canned cycle is modal - it remains in effect until it is canceled by a G80 command. G90 Absolute Positioning The coordinates specified by position commands, such as X, Y, Z, are absolute positions in the current work coordinate system. G91 Incremental Positioning The coordinates specified by position commands, such as X, Y, Z, are positions relative to the current position in the current work coordinate system. G92 Set Current Position Changes the current position to new values, so the machine thinks it is now in a different place. Maybe used in a program to machine multiple parts. G98 Cycle Full Retract Indicates a drilling canned cycle is to return to the initial rapid plane at the start of the cycle (as opposed to retracting to the cycle clearance plane). Common Usage Of The Other Letters M Codes M stands for Machine, and thus the M codes are for machine specific commands. X (and/or Y and/or Z) X designates the coordinate position of the X-Axis in the current coordinate system. It may be the coordinate of a motion command, the location of the control point for a curve, or the location of a hole for drilling. It may be absolute or relative to the current position. I, J, K I, J, and/or K are used to locate the center of arcs. The center may be in absolute coordinates, or relative to the current position. K is also used to specify the Knot value for curves. R R can be used to specify the radius of an arc to locate it's center. R is also used to specify the weight value for a control point for a curve. R is also used to specify the clearance plane for drilling cycles. O O is used at the beginning of each program to specify the program number, or program name. P P is used for curves to specify the order of the curve. The order of a curve is it's degree+1. P is also used for drilling cycles to specify a dwell time or revolutions. P is also used for calling another (sub) program. L L is used with P to specify the number of times to repeat a sub-program. Q Q is used in a drilling cycle to specify the peck increment. A, B, and/or C A, B, and/or C specify the angular position of rotary axes. D D is used to specify the diameter offset number. H H is used to specify the tool length offset number. T T is used to select the tool. F F is used to change the feed rate. S S is used to change the speed of the spindle E E is used to select a work coordinate system. Last edited by nesikachad; 01-26-2009 at 08:38 AM. |
|
|
|
|
|
#2 |
|
FREE TAVIS!!!
![]() Join Date: Mar 2006
Location: Western, pa, usa
Posts: 2,589
|
EXCELLENT description of G codes!
__________________
KUSTOM AERO DESIGNS http://kustomaerodesign.weebly.com/index.html Laser Cutting & Engraving Services From Prototype to Production |
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|