This command summary serves as a guide for both new and experienced EIA-274D (G Codes) users. The following table lists the supported G and M codes for VisualCNC controller interface. Parameters within brackets ([ ]) are optional, the fields represented by "d.d" may be any decimal number and fields represented by "d" may be any positive integer number.
|
G00 [Xd.d] [Yd.d] [Zd.d] |
High speed move (slew or rapid), modal |
|
G01 [Xd.d] [Yd.d] [Zd.d] [Fd.d] |
Linear move (feed or machine), modal |
|
G02 [Xd.d] [Yd.d] [Zd.d] [Id.d] [Jd.d] [Kd.d] [Fd.d] |
CW 2D circular move, modal |
|
G03 [Xd.d] [Yd.d] [Zd.d] [Id.d] [Jd.d] [Kd.d] [Fd.d] |
CCW 2D circular move, modal |
|
G04 Pd.d |
Dwell (seconds) |
|
G17 |
Specify XY plane for helical & circular |
|
G18 |
Specify XZ plane for helical & circular |
|
G19 |
Specify YZ plane for helical & circular |
|
G30 |
Cancel Mirror Image |
|
G31 |
X Mirror |
|
G32 |
Y Mirror |
|
G37 |
Find home |
|
G40 |
Cancel cutter compensation |
|
G41 |
Cutter compensation left |
|
G42 |
Cutter compensation right |
|
G43 Hd |
Sets tool length offset |
|
G49 |
Cancel tool length offset |
|
G54 |
Work Coordinate (Home or Fixture Offset) #1 |
|
G55 |
Work Coordinate (Home or Fixture Offset) #2 |
|
G56 |
Work Coordinate (Home or Fixture Offset) #3 |
|
G57 |
Work Coordinate (Home or Fixture Offset) #4 |
|
G58 |
Work Coordinate (Home or Fixture Offset) #5 |
|
G59 |
Work Coordinate (Home or Fixture Offset) #6 |
|
G62 |
Clear soft home |
|
G70 |
Enter Inch Mode |
|
G71 |
Enter Metric Mode |
|
G80 |
Cancel Drilling Cycle |
|
G81 Rd.d Zd.d [Fd.d] |
Drill Cycle |
|
G82 Rd.d Zd.d Pd [Fd.d] |
Counter Bore Cycle |
|
G83 Rd.d Zd.d Qd.d [Fd.d] |
Peck drill |
|
G85 Rd.d Zd.d [Fd.d] |
Boring Cycle |
|
G89 Rd.d Zd.d Pd [Fd.d] |
Boring with pause |
|
G90 |
Absolute coordinate mode |
|
G91 |
Incremental coordinate mode |
|
G92 [Xd.d] [Yd.d] [Zd.d] |
Set soft home |
|
Sd |
Set spindle speed (rpm) |
|
M00 |
Program pause |
|
M01 |
Optional pause |
|
M02 or M30 |
Program end |
|
M03 |
Spindle on |
|
M05 |
Spindle off |
|
M06 |
Tool Change (example: T02 M06) |
|
M08 |
Mist Coolant Device On |
|
M09 |
Mist Coolant Device Off |
The
following table lists the letters used to denote various arguments.
(
) – Comments or Tool change operator message ex: (Text to
be displayed)
Q - Peck drill delta (used in G83)
F - Feed rate (used in G00, G01, G02, G03, G81, G82, G83, G85, G89) Units
per Minute
P - Dwell (used in G04)
I - Circular interpolation value in X dimension (used in G02, G03)
J - Circular interpolation value in Y dimension (used in G02, G03)
K - Circular interpolation value in Z dimension (used in G02, G03)
M - Miscellaneous function (control function)
N - Sequence number
R - Beginning Z motion dimension (used in G81, G82, G83, G85, G89)
S - Spindle rpm
T - Tool change (used in G00)
X - X motion dimension
Y - Y motion dimension
Z - Z motion dimension
The
following is a 10" square. Rapid level .5 inches above material, feed down
45 ipm, cut feed 150 ipm, rapid down to .1 above material, depth .25 inches.
Surface or Z=0 is set at the surface of the material to be cut. This is for a
single head system with no tool change.
|
G90 |
Absolute Coordinate Mode |
|
G00 S18000 M03 |
Spindle Speed Set to 18,000 RPM's |
|
G00 X0. Y0. |
Position X=0.0 and Y=0.0 |
|
G00 Z0.1 |
Position the Z axis 0.1 inches above Z=0.0 or above the
Material. |
|
G01 Z-0.25 F45 M08 |
Position the Z axis 0.25 inches below Z=0.0 or into the
Material at the feed rate of 45 inches/minute). The Auxiliary output for the selected tool is turned on.
(This output can be wired to operate a tool misting or cooling unit.) |
|
G01 X10. F150 |
Position the X=10.0 inches at the feed rate of 150
inches/minute |
|
G01 Y10. |
Position the Y=10.0 inches (feed rate will continue at last
set speed) |
|
G01 X0. |
Position the X=0.0 inches |
|
G01 Y0. |
Position the Y=0.0 inches |
|
G00 Z0.5 M09 |
Position the Z axis 0.5 inches above Z=0.0 or above the
Material. The Auxiliary output for the selected tool is turned off. (This
output can be wired to operate a tool misting or cooling unit.) |
|
G00 X0. Y0. |
Position X=0.0 and Y=0.0 |
|
M02 |
End of Program |
The
following is a 10" square. Rapid level .5 inches above material, feed down
45 ipm, cut feed 150 ipm, rapid down to .1 above material, depth .25 inches.
Surface or Z=0 is set at the surface of the material to be cut. Additionally it
calls a second tool to perform another cut of the same size elsewhere on the raw
material. This is for a single head system with auto tool change.
|
G90 |
Absolute Coordinate Mode |
|
G00 S18000 M03 |
Spindle Speed Set to 18,000 RPM's |
|
G00 T1 M06 (E-MILL .250 2FLUTE) |
Tool 1 call. Following moves will use tool one."E-MILL
.250 2FLUTE" will displayed on the keypad. |
|
G00 X0. Y0. |
Position X=0.0 and Y=0.0 |
|
G00 Z0.1 |
Position the Z axis 0.1 inches above Z=0.0 or above the
Material. |
|
G01 Z-0.25 F45 M08 |
Position the Z axis 0.25 inches below Z=0.0 or into the
Material at the feed rate of 45 inches/minute). The Auxiliary output for the selected tool is turned on.
(This output can be wired to operate a tool misting or cooling unit.) |
|
G01 X10. F150 |
Position the X=10.0 inches at the feed rate of 150
inches/minute |
|
G01 Y10. |
Position the Y=10.0 inches (feed rate will continue at last
set speed) |
|
G01 X0. |
Position the X=0.0 inches |
|
G01 Y0. |
Position the Y=0.0 inches |
|
G00 Z0.5 M09 |
Position the Z axis 0.5 inches above Z=0.0 or above the
Material. The Auxiliary output for the selected tool is turned off. (This
output can be wired to operate a tool misting or cooling unit.) |
|
G00 T2 M06 (E-MILL .125 3FLUTE) |
Tool 2 call. Following moves will use tool one."E-MILL
.125 3FLUTE" will displayed on the keypad. |
|
G00 X12. Y0. |
Position X=12.0 and Y=0.0 |
|
G00 Z0.1 |
Position the Z axis 0.1 inches above Z=0.0 or above the
Material. |
|
G01 Z-0.25 F45 M08 |
Position the Z axis 0.25 inches below Z=0.0 or into the
Material at the feed rate of 45 inches/minute). The Auxiliary output for the selected tool is turned on.
(This output can be wired to operate a tool misting or cooling unit.) |
|
G01 X22. F150 |
Position the X=22.0 inches at the feed rate of 150
inches/minute |
|
G01 Y10. |
Position the Y=10.0 inches (feed rate will continue at last
set speed) |
|
G01 X12. |
Position the X=12.0 inches |
|
G01 Y0. |
Position the Y=0.0 inches |
|
G00 Z0.5 M09 |
Position the Z axis 0.5 inches above Z=0.0 or above the
Material. The Auxiliary output for the selected tool is turned off. (This
output can be wired to operate a tool misting or cooling unit.) |
|
G00 T0 M06 |
Optional command to put current away tool |
|
G00 X0. Y0. |
Position X=0.0 and Y=0.0 |
|
M02 |
End of Program |
Cutter Compensation G40\G41\G42
Note
that all G41\G42 contours MUST start with a lead in and end with a lead out.
|
G90 G70 |
Absolute coordinate system, Inch Mode |
|
S18000 |
Set spindle speed to 18000 RPM |
|
G00 T1 M06 (.250 End Mill) |
Select Tool #1 and display “.250 End Mill” |
|
G00 Z-0.5 |
Rapid move to safe rapid level |
|
G00 X0. Y-0.25 |
Rapid move |
|
Z.1 |
Compensation entry move |
|
G41 D01 |
Turn on left tool compensation for table entry #1 |
|
Y0 |
|
|
G01 Z-.250 F30 M08 |
Feed Z to -.25 at 30ipm and turn on tool mist |
|
Y10 F200 |
Feed to Y=10 at 200 ipm |
|
X10 |
Feed move |
|
Y0 |
Feed move |
|
X0 |
Feed move |
|
G40 |
Turn tool compensation off |
|
G0 Z.5 M09 |
Rapid Z=.5 and turn mist off |
|
X -.2 |
Exit tool compensation move |
|
M02 |
End of file |
|
G90 G70 |
absolute coordinate system, inch mode |
|
S12000 |
set spindle speed to 12000 RPM |
|
G00 X0Y0 |
Rapid move |
|
G00 Z.1 M08 |
rapid Z move (note Z positive is UP), turn misting unit on |
|
G81 Z-.2 F50 |
Drill cycle next coordinates to Z=-.2 at 50 ipm |
|
X1Y1 |
Drill |
|
X2 |
Drill |
|
X3 |
Drill |
|
G80 |
Drill cycle off |
|
G00 Z1. |
Rapid Move |
|
X0Y2 |
Rapid Move |
|
G83 R.1 Z-.5 Q.1 F30 |
Peck drill cycle next coordinates to Z=-.5 at .1 lift, .1
peck, 30 ipm |
|
X1 |
Peck drill |
|
X2 |
Peck Drill |
| X3 |
Peck Drill |
|
M09 |
Mist Unit Off |
|
G80 |
Cancel Drill Cycle |
|
G00 Z-0.5 |
Rapid Z move |
|
G00 X0. Y0. |
rapid XY move |
|
M02 |
End of Job |
| HOME | TABLE | GCODES | TOOLS | LINKS |