CNC_B020

OTHER: CNC Work Station - G-code & Related Codes

Codes:

 

A

angular axis around X axis

 

B

angular axis around Y axis

 

C

angular axis around Z axis

 

D

tool radius compensation

 

F

number

 

G

feed rate

 

H

general function (see below) &tool length offset

 

I

X-axis offset for arcs & X offset in G87 canned cycle

 

J

Y-axis offset for arcs & Y offset in G87 canned cycle

 

K

Z-axis offset for arcs & Z offset in G87 canned cycle

 

L

number of repetitions in canned cycles & key used with G10

 

M

miscellaneous function (see below)

 

N

line number

 

P

dwell time with G4 &

 

Q

key used with G10 & canned cycle

 

R

arc radius & canned cycle plane

 

S

spindle speed

 

T

tool selection

 

X

X-axis of machine

 

Y

Y-axis of machine

 

Z

Z-axis of machine

The above table should be checked for errors.

Classes of G-code:

There are actually 9 classes of G-codes, and one from each class may be active at the same time.

G0 through G9 is the motion class, only G0, G1, G2, G3 and G4 are commonly supported.

G10 through G19 are plane class, usually G17, G18 and G19 (arcs in XY, XZ, and YZ planes) are supported.

G20 through G29 are ????

G30 through G39 are for feed per rev, G33 is clockwise threading.

G40 through G49 are for offsets, G40, G41 and G42 are cutter comp, G43 loads Z axis (tool) offsets, etc.

G50 through G59 are for coordinate systems, G51 rotation, G5 scaling, G53 through G59 for coordinate system selection.

G60 through G69 ????

G70 through G79 are for repetitive moves, such as bolt hole circles, etc.

G80 through G89 are for canned cycles, such as hole drilling and boring.

G90 through G99 are for move types, G90 absolute, G91 incremental, G90.1 absolute with absolute I and J, etc.

________________________

The following codes are from Gcode2000 documentation.

CNC G-CODES Typical on a Milling machine.

Red Codes are used by this program

CODE FUNCTION

G0 Rapid Traverse

G1 Linear Interpolation (Feed)

G2 Circular Interpolation Clockwise

G3 Circular Interpolation Counterclockwise

G4 Dwell

G8 Modal Deceleration Override Off

G9 Modal Deceleration Override On

G12 Helical Interpolation CW

G13 Helical Interpolation CCW

G17 XY Plane Selection

G18 ZX Plane Selection

G19 YZ Plane Selection

G22 Circular Interpolation, Fillet Input CW

G23 Circular Interpolation, Fillet Input CCW

G30 Mirror Image Off

G31 Mirror Image X On

G32 Mirror Image Y On

G40 Cutter Diameter Offset Off

G41 Cutter Compensation Left

G42 Cutter Compensation Right

G44 Cutter Compensation, Normal Feedrate

G45 Cutter Compensation, Modify Feedrate

G48 Corner Rounding in Cutter Comp Off

G49 Corner Rounding in Cutter Cornp On

G70 Input in Inch

G71 Input in Millimeter

G72 Transformation Off

G73 Transformation Rotation, Scaling

G74 Multi-quadrant Circle Input Off

G75 Multi-quadrant Circle Input On

G77 Zig-Zag Mill Cycle

G78 Pocket Mill Cycle

G79 Bore Mill Cycle

G80 Drill Cycle Off

G81 Z Cycle, Drill (Feed In, Rapid Out)

G82 Z Cycle, Spot Face (Feed In, Rapid Out)

G83 Z Cycle, Deep Hole (Peck, Rapid Out)

G84 Z Cycle, Tap (Feed In, Feed Out)

G85 Z Cycle, Bore (Feed In, Feed Out)

G86 Z Cycle, Bore (Feed In, Stop-Wait, Rapid Out)

G87 Z Cycle, Chip Break (Peck, Rapid Out)

G89 Z Cycle, Bore (Feed In, Dwell, Feed Out)

G90 Absolute Programming

G91 Incremental Programming

G92 Preset Part Programming Zero Point

G94 Feedrate Per Minute Mode

G95 Feed Per Spindle Revolution (pitch) mode.

G96 Restore Base Part Program Coordinate System

G97 Set Work Coordinate System

G99 Deceleration Override

G170 Outside Frame Mill

G171 Inside Frame Mill

G172 Pocket Frame Mill

G173 Outside Face Mill

G174 Inside Face Mill

G175 Outside Circle Mill

G176 Inside Circle Mill

G177 Pocket Circle Mill

G179 Slot Mill

G181-189 Z Cycle (Same as G81-G89) Multi-Hoic

G191-199 Z Cycle (Same as Gg I -Gg9) Frame of floles

M0 PROGRAM STOP (NON MODAL)

M1 OPTIONAL STOP (NON MODAL)

M2 PROGRAM REWIND(NON MODAL)

M3 SPINDLE ON CLOCKWISE **

M4 SPINDLE ON COUNTER-CLOCKWISE **

M5 SPINDLE OFF **

M6 TOOL CHANGE (NON MODAL) **

M7 MIST COOLANT **

M8 FLOOD COOLANT **

M9 COOLANT OFF ** only two of these are used to swap from blue to red

plotting.

M19 SPINDLE ORIENT

M20 PROGRAM STOP; GO TO CLEAR POINT (NON MODAL)

M21 OPTIONAL STOP; GO TO CLEAR POINT (NON MODAL)

M22 END OF PROGRAM; GO TO CLEAR POINT (NON MODAL)

M25 QUILL OR HEAD UP (NON MODAL)

M26 TOOL CHANGE; GO TO CLEAR POINT (NON MODAL)

M28 RIGID TAPPING OFF

M29 RIGID TAPPING ON

M30 REWIND TO TOP OF LOCAL PROGRAM ( DEFINED BY NUMBER)

M51 AUXILARY FUNCTION TO INDEXER (NON MODAL)

______________________________________________________

CNC WORDS

: DEFINE PROGRAM NUMBER FOR MULTI-PROGRAM STORAGE

/ SLASH - BLOCK DELETE OR VALUE SEPARATION

**N SEQUENCE NUMBER

**F FEED RATE

**I,J,K, ARC CENTER OFFSETS

**X,Y,Z, AXIS COMMANDS

**S SPINDLE SPEED

T TOOL SELECT (Tl THRU T99)

**A ANGLE ( IN DECIMAL DEGREES)

**B INCREMENTAL ANGLE

**E ANGLE (COLATITUDE); ABSOLUTE AND DECIMAL DEGREES

**R RADIUS VECTOR DISTANCE Negative for arcs > 180'

U,V,W, INCREMENTAL VALUES FOR X,Y,AND Z RESPECTIVELY

**P PARAMETERS USED IN CANNED CYCLES

**Q DWELL TIME VALUE; USED WITH G4 AND THE G89 CYCLES

D DIAMETER OF CUTTER

**INPUT VALUES VARY FROM MACHINE TO MACHINE.

CONSULT YOUR MANUAL FOR USAGE

More Information:

RS274NGC G-code Programming Basics

NC Code

Tesko

Back to top | SynchroLite Home Page | UniCopter Home Page

Last Revised: June 18, 2005