Professional Documents
Culture Documents
G Code Intro 1 PDF
G Code Intro 1 PDF
G Code Intro 1 PDF
Gcode is just the language used to control CNC machines. This course will be going over some
of the basics of Gcode and how to use it with CNC machines. If you are involved with CNC
machining then you should at least know a little bit of Gcode to understand what is going on.
This will allow you to make simple changes to Gcode, and understand what the CAM program is
doing.
Understanding Coordinate System
Make sure to note the coordinate system of your machine. This is a typical layout but whats
important to remember is even though the table may move and tool may be stationary you need
to know what respect to what your coordinate system is set up. You may see something as a
positive motion but it may actually need to be coded as a negative motion. First order of
business should always be to identify the coordinate system.
Expressing Coordinates
G code expresses coordinates by using X Y Z. What that means is you place the axis and
then the location on that axis. Here is a sample of GCode that sets a speed and position.
Pretty simple right! Take a look at some of these other letters that indicate something specific
(address specifications) in GCode.
O Program number (Used for program identification)
N Sequence number (Used for line identification)
G Preparatory function (See below)
X Xaxis designation
Y Yaxis designation
Z Zaxis designation
R Radius designation
F Feedrate designation
S Spindle speed designation
H Tool length offset designation
D Tool radius offset designation
T Tool Designation
M Miscellaneous function