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!747.2.

30  . !#03/   $53/0 3   $53/0 3   $53/0$945   %44.

39 3. 44.

55430 . 11 #03880.3899:90 397494 .07!490.3.

3030.9035:9  !747.90742243//708808  $ $53/08500/ $47#!# .230:2-07#010703.0 494330   !747.230 %44.90    00/7.

$.30%448 397494 .793!439 3$420 .3899:90 .3.55430 #03880.10$9.07!490..

2508   3..3899:90 397494 ..33.9'3.4/0 #03880.30 .8":.2.3.!747.07!490.55430 .