# G-Code Fundamentals

Overview to Computer Aided Manufacturing ENGR-2963 - Fall 2005 Class Manager - Sam Chiappone

Rensselaer Polytechnic Institute Intro to CAM Chiappone .Numerical Control (NC) Defined  Electronics Industries Association (EIA) standard defined as “a system in which actions are controlled by direct insertion of numerical data at some point.” ……machines controlled by electronic systems designed to accept numerical data and other instructions usually in a coded form.

– G91  Machine/Tool Home Position – Internal machine reference typically used to initialize the system Rensselaer Polytechnic Institute Intro to CAM Chiappone .NC System Definitions  Absolute Programming – all tool motion is derived from the origin of the part. – G90  Incremental Programming – Next tool movement is relative to the previous position.

NC System Definitions  Floating Zero – Ability to set the machine zero to a location on a part relative to the parts datum(s) – Work Offset Coordinate Shift – The ability to shift the machines home position to set a zero point for a particular part. » G54 – 59 Rensselaer Polytechnic Institute Intro to CAM Chiappone .

NC System Definitions  Cutter Compensation – The ability to adjust the cutter location with offset values in the controller.G42 Rensselaer Polytechnic Institute Intro to CAM Chiappone . material problems. The adjustment may be necessary due to tolerance issues associated with cutter condition. or program utilization (ex. G41. family of parts) – G40.

A.Common G-Codes   G00 – Rapid positioning in mutual directions (X.Y.B) G01 – Linier Interpolation – Needs a feed rate command to execute (F)  G02 – Circular Interpolation Motion CW – R value or I and J center point values of circle » Full arc or quadrant input  G03 .Circular Interpolation Motion CCW Rensselaer Polytechnic Institute Intro to CAM Chiappone .Z.

This programming method serves to simplify input as well a reducing program size.  G80 Cancel Canned Cycle Rensselaer Polytechnic Institute Intro to CAM Chiappone .Common G-Codes    G20 – Inch Input G21 – Metric Input Canned Cycles – A predefined string of variables which allows for a predetermined sequence of events. G83 Peck Drilling. – Examples G81 Drilling.

Common M-Codes        M00 – M01 Program Stop / Optional Program Stop M02/M30 – End of Program / EOP Rewind M03 – Spindle On CW M04 – Spindle On CCW M05 – Spindle Stop M06 – Tool Change M08 /09 Coolant On/Off Rensselaer Polytechnic Institute Intro to CAM Chiappone .

Other Common Addresses     S – Spindle speed (CS or RPR) – Lathe G96 F – Feed rate input N – Program Line Number Reference – Motion Line O – Program Line – Tool Change Line / Safe Starting Point On Some Machine Tools Intro to CAM Chiappone Rensselaer Polytechnic Institute .

Program Examples   Cincinnati 5VC Milling Machine Haas Quick Code Rensselaer Polytechnic Institute Intro to CAM Chiappone .

  3/41!747.2.

30  . !#03/   \$53/0 3   \$53/0 3   \$53/0\$945   %44.

39 3. 44.

55430 . 11 #03880.3899:90 397494 .07!490.3.

3030.9035:9  !747.90742243//708808  \$ \$53/08500/ \$47#!# .230:2-07#010703.0 494330   !747.230 %44.90    00/7.

\$.30%448 397494 .793!439 3\$420 .3899:90 .3.55430 #03880.10\$9.07!490..

2508   3..3899:90 397494 ..33.9'3.4/0 #03880.30 .8":.2.3.!747.07!490.55430 .