We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
9128/2018 G-2090- Wikipedia
G-code
From Wikipedia, the free encyclopedia
For other uses, see G-code (disambiguation) and G programming language (disambiguation)
"RS-274" redirects here. For the photoplotter format, see Gerber format.
G-code(also RS-274), which has many variants, is the
G-code
common name for the most widely used numerical
Paradigm Procedural, Imperai
control (NC) programming language. It is used mainly nest vocsaurah imperaive
Incomputersided manufacturing to contol automated | Pestaned by Massachusetts Institute of Technology
First appeared 1950s (rst eaiton)
machine tools.
Filename extensions mot, mpf.nc and several others
G-code is a language in which people tell
computerized machine tools how to make something many,
The *how" is defined by g-code instructions provided to | mainly Siemens Sinumerik, FANUC, Haas, Heidenhain, Mazak
a machine controller (industrial computer) that tells the ‘Generally here is one international standard—ISO 6983,
motors where to move, how fast to move, and what path
to follow. The two most common situations are that, within a machine tool such as a lathe or mill, a cutting tool is
moved according to these instructions through a toolpath cutting away material to leave only the finished workpiece
and/or, an unfinished workpiece is precisely positioned in any of up to 9 axis"! around the 3 dimensions relative to a
toolpath and, elther or both can move relative to each other. The same concept also extends to noncutting tools such
as forming or burishing tools, photoplotting, additive methods such as 3D printing, and measuring instruments.
Major implementations
Contents [hide]
1 Implementations,
2 Specific codes
2.1 Lelter addresses
2.2 List of G-codes commonly found on FANUC and similarly designed controls for milling and turning
2.3 List of M-codes commonly found on FANUG and similarly designed controls for milling and turning
Example program
Programming environments
Abbreviations used by programmers and operators
See also
6.1 Extended developments
6.2 Similar concepts
6.3 Concerns during application
7 References
oane
8 Bibliography
9 External links.
Implementations [ecit}
ntosden.wikipeda.orgwiklG-code setsrsin018 6-080 - Wikipedia
The first implementation of a numerical control programming language was developed at the MIT Servomechanisms
Laboratory in the late 1950s. In the decades since, many implementations have been developed by many
(commercial and noncommercial) organizations. G-code has often been used in these implementations. The main
standardized version used in the United States was settled by the Electronic Industries Alliance in the early
1960s.(tation needed] nal revision was approved in February 1980 as RS-274-D.I In other countries, the
standard /SO 6983 is often used, but many European countries use other standards, For example, DIN 66025 is
Used in Germany, and PN-73M-55256 and PN-93/M-55251 were formerly used in Poland.
Extensions and variations have been added independently by control manufacturers and machine tool
manufacturers, and operators of a specific controller must be aware of differences of each manufacturer's product.
One standardized version of G-code, known as BCL(Binary Cutter Language), is used only on very few machines,
Developed at MIT, BCL was developed to control CNC machines in terms of straight lines and ares."
During the 1970s through 1990s, many CNC machine too! builders attempted to overcome compatibility difficuties
by standardizing on machine tool controllers built by Fanuc, Siemens was another market dominator in CNC
controls, especially in Europe. In the 2010s, controller differences and incompatibility are not as troublesome
because machining operations are developed with CADICAM applications that can output the appropriate G-code
called a post for a specific machine tool
‘Some CNC machines use “conversational” programming, which is a wizard-like programming mode that either hides
G-code or completely bypasses the use of G-code, Some popular examples are Okuma's Advanced One Touch
(AOT), Southwestern Industries’ ProtoTRAK, Mazak's Mazatrol, Hurco's Ultimax, Haas’ Intuitive Programming
‘System (IPS), and Mori Seiki's CAPS conversational software.
G-code began as a limited language that lacked constructs such as loops, conditional operators, and programmer-
declared variables with natural-word-including names (or the expressions in which to use them). It was unable to
encode logic, but was just a way to “connect the dots" where the programmer figured out many of the dots' locations
longhand, The latest implementations of G-code include macro language capabilities somewhat closer to a high-level
programming language. Additionally, all primary manufacturers (¢.g., Fanuc, Siemens, Heidenhain) provide access
to PLC data, such as axis positioning data and tool data, I via variables used by NC programs. These constructs
make it easier to develop automation applications.
Specific codes [ecit)
G-codes, also called preparatory codes, are any word in a CNC program that begins with the letter G. Generally itis
a code telling the machine tool what type of action to perform, such as:
+ Rapid movement (transport the tool as quickly as possible in between cuts)
+ Controlled feed in a straight line or arc
+ Series of controlled feed movements that would resutt in a hole being bored, a workpiece cut (routed) toa
specific dimension, or a profile (contour) shape added to the edge of a workpiece
+ Set tool information such as offset
+ Switch coordinate systems
There are other codes; the type codes can be thought of like registers in a computer.
People have pointed out over the years that the term "G-cod:
term, referring to one letter address and to the specific codes that can be formed with it (for example, G00, G01,
is imprecise. It comes from the literal sense of the
ntosden.wikipeda.orgwiklG-code 2249128/2018
G-2090- Wikipedia
G28). But every letter of the English alphabet is used somewhere in the language. Nevertheless, "G-code" is
established as the common name of the language.
Letter addresses |edit)
‘Some letter addresses are used only in
ing or only in tuming; most are used in both. Bold below are the letters
seen most frequently throughout a program.
Sources: Smid 2008;!5! Smid 2010;{51 Green et al. 199671
Variable
Description
Corollary info
A
‘Absolute or incremental
position of A axis (rotational
axis around X axis)
Positive rotation is defined as a counterclockwise rotation looking from X
positive towards X negative.
‘Absolute or incremental
position of B axis (rotational
axis around Y axis)
‘Absolute or incremental
position of C axis (rotational
axis around Z axis)
Defines diameter or radial
offset used for cutter
compensation, D is used for
depth of cut on lathes. It is
used for aperture selection
and commands on
photoplotters.
G41: left cutter compensation, G42: right cutter compensation
Precision feedrate for
threading on lathes
Defines feed rate
‘Common units are distance per time for mills (inches per minute, IPM, or
millimeters per minute, mm/min) and distance per revolution for lathes.
(inches per revolution, IPR, or millimeters per revolution, mm/rev)
‘Address for preparatory
commands
G commands often tell the control what kind of motion is wanted (e.9.,
rapid positioning, linear feed, circular feed, fixed cycle) or what offset
value to use.
Defines tool length offset;
Incremental axis
corresponding to C axis
(e,g,, on a tumemill)
G43: Negative tool length compensation, G44: Positive tool length
‘compensation
Defines arc center in X axis
for G02 or G03 arc
‘commands.
Also used as a parameter
within some fixed cycles.
‘The arc center is the relative distance from the current position to the are
center, not the absolute distance from the work coordinate system
(wes),
Defines arc center in Y axis
for G02 or G03 are
‘commands.
Also used as a parameter
within some fixed cycles.
Same corollary info as | above
Defines arc center in Z axis
for G02 or G03 arc
‘commands.
Also used as a parameter
within some fixed cycles,
equal to Laddress,
Same corollary info as | above
L
Fixed cycle loop count;
Intosden wikipeda.orgwiklG-code
Fixed cycle loop count:Defines number of repetitions ("loops") of a fixed
sat9128/2018
G-2090- Wikipedia
Specification of what cycle at eachposition. Assumed to be 1 unless programmed with another
register fo edit using G10 _ integer. Sometimes the K address is used instead of L. With incremental
positioning (G81), a series of equally spaced holes can be programmed
‘as a loop rather than as individual positions.
610 use: Specification of what register to edit (work offsets, tool radius
offsets, tool length offsets, etc.)
M ‘Action code, auxiliary command; descriptions vary. Many M-codes call for
Miscellaneous function machine functions, which is why people often say that the "M'" stands for
"machine", although it was not intended to.
N Line (block) numbers:Optional, so often omitted. Necessary for certain
tasks, such as M99 P address (to tell the control which block of the
Line (block) number in program to retum to if not the default) or GoTostatements (ifthe control
prograt supports those). Nnumbering need not increment by 1 (for example, it
System parameter number | can increment by 10, 20, or 1000) and can be used on every block or
to change using G10 only in certain spots throughout a program,
System parameter number: G10 allows changing of system parameters
under program control.!®)
° For example, 04501, For many years it was common for CNC control
Program name displays to use slashed zero glyphs to ensure effortless distinction of
a letter "0" from digit “0”. Today's GUI controls often have a choice of fonts,
like @ PC does.
P + With G04, defines dwell time value.
Serves as parameter * Also serves as a parameter in some canned cycles, representing
address for various Gand M| dwell times or other variables,
codes + Also used in the calling and termination of subprograms. (With M98, it
specifies which subprogram to call; with M99, it specifies which block
number of the main program to return to.)
Q eeeenrerert incanned For example, G73, G83(peck driling cycles)
R Defines size of are radius, or | For radii, not all controls support the R address for G02 and G03, in
defines retract height in| which case IJK vectors are used. For retract height, the "R level", as it's
milling canned cycles called, is returned to if G99 is programmed
s Data type = integer. In G97 mode (which is usually the default), an
integer aftor S is interpreted as a number of revimin (rpm). In G96 mode
Defines speed, either (CSS), an integer after S is interpreted as surface speed—sfm (G20) or
spindle speed or surface
speed depending on mode min (G21), See also Speeds and feeds. On multifunction (turn-mil or
millturn) machines, which spindle gets the input (main spindle or
subspindles) is determined by other M codes.
T To understand how the T address works and how it interacts (or not)
with M06, one must study the various methods, such as lathe turret
Tool sek programming, ATC fixed tool selection, ATC random memory tool
fool selection selection, the concept of "next tool waiting", and empty
tools 81Programming on any particular machine tool requires knowing
which method that machine uses. (51
U Incremental axis
corresponding to X axis
eee only lathe group A tn these controls, X and U obviate G90 and G91, respectively. On these
Ken sctnes dwell time on | lathes, G90 is instead a fixed cycle address for roughing
some machines (instead of
"P" or "X’).
v Until the 2000s, the V address was very rarely used, because most
lathes that used U and W didn't have a Y-axis, so they didn't use V.
Incremental axis (Green et al, 1996!” did not even list V in their table of addresses.) That
corresponding to Y axis__ is still often the case, although the proliferation of live lathe tooling and
turn-mill machining has made V address usage less rare than it used to
be (Smid 2008! shows an example). See also G18,
Intosden.wikipeda.orgwikiG-code
49128/2018
w Incremental axis
corresponding to Z axis
(typically only lathe group A
controls)
G-2090- Wikipedia
In these controls, Z and W obviate G90 and G91, respectively. On these
lathes, G90 is instead a fixed cycle address for roughing,
x ‘Absolute or incremental
position of X axis.
Also defines dwell time on
some machines (instead of
position of Z axis
"or "U"),
Y Absolute or incremental
position of Y axis
z ‘Absolute or incremental ‘The main spindle's axis of rotation often determines which axis of a
machine tool is labeled as Z.
List of G-codes commonly found on FANUC and similarly designed controls for milling
and turning [edit]
Sources: Smid 2008;!5 Smid 2010;(61 Green et al. 1996.(7)
Note: Modal means a code stays in effect untl replaced, ar cancelled, by another permitted code. Non-Modalmeans it executes
only once. See, for example, codes G08, GBI & G64 below.
Code Description
Milling | Turning
(M) (T)
Corollary info
G00
Rapid positioning
(On 2- or 3-axis moves, G00 (unlike G01)
traditionally does not necessarily move in a single
straight line between start point and end point. It
moves each axis at its max speed until its vector
quantity is achieved. Shorter vector usually finishes
first (given similar axis speeds). This matters
because it may yield a dog-leg or hackey-stick
motion, which the programmer needs to consider,
depending on what obstacles are nearby, to avoid a
crash, Some machines offer interpolated rapids as a
feature for ease of programming (safe to assume a
straight line).
Got
Linear interpolation
The most common workhorse code for feeding
during a cut. The program specs the start and end
points, and the control automatically calculates
(interpolates) the intermediate points to pass
through that yield a straight line (hence "linear",
The control then calculates the angular velocities at
which to turn the axis leadscrews via their
servomotors or stepper motors. The computer
performs thousands of calculations per second, and
the motors react quickly to each input. Thus the
actual toolpath of the machining takes place with
the given feedrate on a path that is accurately linear
to within very small limits.
G02 Circular interpolation,
clockwise
Intosden wikipeda.orgwiklG-code
Very similar in concept to G01. Again, the
control interpolates intermediate points and
commands the servo- or stepper motors to rotate
the amount needed for the leadscrew to translate
the motion to the correct tool tip positioning. This
process repeated thousands of times per minute
generates the desired toolpath. In the case of G02,
the interpolation generates a circle rather than a9128/2018
G-2000- Wikipedia
line. As with G01, the actual toolpath of the
machining takes place with the given feedrate on a
path that accurately matches the ideal (in GO2's
case, a circle) to within very small limits. In fact, the
interpolation is so precise (when all conditions are
correct) that milling an interpolated circle can
obviate operations such as driling, and often even
fine boring. Addresses for radius or arc
center: G02 and G03 take either an Raddress (for
the radius desired on the part) or IJKaddresses (for
the component vectors that define the vector from
the arc start point to the arc center point). Cutter
‘comp: On most controls you cannot
start G41 or G42 in G02 or GO3 modes. You must
already have compensated in an earlier G01 block
Often, a short linear lead-in movement is
programmed, merely to allow cutter compensation
before the main action, the circle-cutting,
begins. Full circles: When the arc start point and
the arc end point are identical, the tool cuts a 360°
arc (a full circle). (Some older controls do not
support this because arcs cannot cross between
quadrants of the cartesian system. Instead, they
require four quarter-circle arcs programmed back-
to-back.)
G03
Circular interpolation,
Intosden wikipeda.orgwiklG-code
Sr ae M ‘Same corollary info as for G02.
G04 Takes an address for dwell period (may be X, U,
cr P). The dwell period is specified by a control
parameter, typically set to milliseconds. Some
machines can accept either X1 0 (s) or P1000 (ms),
which are equivalent. Choosing dwell duration:
Often the dwell needs only to last one or two ful
spindle rotations. This is typically much less than
Dwell M
one second. Be aware when choosing a duration
value that a long dwell is a waste of cycle time. In
some situations it won't matter, but for high-volume
repetitive production (over thousands of cycles), itis
worth calculating that perhaps you only need
100 ms, and you can call it 200 to be safe, but 1000
is just a waste (t00 long).
‘G05P10000 Uses a deep look-ahead buffer and simulation
coreapea M processing to provide better axis movement
acceleration and deceleration during contour milling
605.101. | 4) agvanced Preview Uses a deep look-ahead buffer and simulation
Conteh M processing to provide better axis movement
acceleration and deceleration during contour milling
06.1 Non-uniform rational B- Activates Non-Uniform Rational B Spline for
spline(NURBS) M complex curve and waveform machining (this code
Machining is confirmed in Mazatrol 840M ISO Programming)
Gor Imaginary axis M
designation
G09 Exact stop check, non- yy The modal version is G61
modal
G10 Programmable data Modifies the value of work coordinate and tool
input offsets!%°)
cn Data write cancel M
G7 XY plane selection M9128/2018 G-2000- Wikipedia
oe ZX plane selection | M T
cre YZplane selection | M
G20 ‘Somewhat uncommon except in USA and (to lesser
extent) Canada and UK. However, in the global
marketplace, competence with both G20 and G21
always stands some chance of being necessary at
any time. The usual minimum inerement in G20 is
Programming in inches | M T cone ten-thousandth of an inch (0.0001"), which is @
larger distance than the usual minimum increment
in G21 (one thousandth of a milimeter, 01 mm,
that is, one micrometre). This physical difference
sometimes favors G21 programming
21 Prevalent worldwide, However, in the global
Programming M T marketplace, competence with both G20 and G21
in milimeters (mm) always stands some chance af being necessary at
any time
28 Return to home position Takes X Y Z addresses which define the
(machine zero, aka | yy t intermediate point thatthe tool tip will pass through
machine reference on its way home to machine zero. They are in terms
point) of part zero (aka program zero), NOT machine zero.
G30 Takes a P address specifying which machine zero
point to use ifthe machine has several secondary
points (P1 to P4). Takes X Y Z addresses that
define the intermediate point that the tool tip passes:
through on its way home to machine zero. These
are expressed in terms of part zero (aka program
zero), NOT machine zero.
Return to secondary
home position (machine | jy r
zero, aka machine
reference point)
G31 Feed unti skip function | M Used for probes and tool length measurement
systems.
G32 Single-point threading, Similar to G01 linear interpolation, except with
longhand style (if not T automatic spindle synchronization for single-point
using a cycle, e.g., G76) threading.
G33 Constant-pitchthreading | M
G33 Single-point threading,
Tonchand style (not t Some isthe controls aosign ths madi to G38 rathar
using a cycle, e.g., G76)
G34 Variable-pitch threading | M
G40 Tool radius M t Tum off cutter radius compensation (CRC). Cancels
‘compensation off G41 or G42,
Gat Tool radius M T Tum on cutter radius compensation (CRC), left, for
‘compensation left climb milling
Milling: Given righthand-helix cutter
and M03 spindle direction, G41 corresponds
to climb milling (down milling). Takes an address
(Dor H) that calls an offset register value for radius.
Turning: Otten needs no D or H address on lathes,
because whatever tool is active automatically calls
its geometry offsets with it. (Each turret station is
bound to its geometry offset register.)
G41 and G42 for milling has been partially
automated and obviated (although not completely)
since CAMprogramming has become more
common. CAM systems let the user program as if
using a zero-diameter cutter. The fundamental
concept of cutter radius compensation is stil in play
(ie., that the surface produced will be distance R
Intosden wikipeda.orgwiklG-code 719128/2018 G-2000- Wikipedia
away from the cutter center), but the programming
mindset is different. The human does not
choreograph the toolpath with conscious,
painstaking attention to G41, G42, and G40,
because the CAM software takes care of that. The
software has various CRC mode selections, such
as computer, control, wear, reverse wear, off, some
of which do not use G41/G42 at all (good for
roughing, or wide finish tolerances), and others that
use it so that the wear offset can stil be tweaked at
the machine (better for tight finish tolerances).
Gaz ‘Tum on cutter radius compensation (CRC), right, for
conventional milling. Similar corollary info as
for Ga. Given righthand-helix cutter and M03
spindle direction, G42 corresponds to conventional
milling (up milling).
Too! radius
compensation right M v
G43 Takes an address, usually H, to call the tool length
Too! height offset M offset register value. The value is negative because
‘compensation negative itwill be added to the gauge line position. G43 is the
commonly used version (vs G44)
G44 Takes an address, usually H, to call the tool length
Tool height offset u offset register value. The value is positive because
‘compensation positive
it will be subtracted from the gauge line position,
G44 is the seldom-used version (vs G43).
Gas ‘Axis offset single M
increase
G46 Axis offset single ”
decrease
GAT ‘Axis offset double M
increase
G48 ‘Axis offset double M
decrease
G49 Tool length offset
compencation cancel | Cancels G43 or G44.
G50 Takes an S address integer, which is interpreted as
Define the maximum r rpm. Without this feature, Gaémode (CSS) would
spindle speed rev the spindle to “wide open throttle" when closely
approaching the axis of rotation.
G50 Scaling function cancel_| M
G50 Position register is one of the original methods to
relate the part (program) coordinate system to the
tool position, which indirectly relates it to the
machine coordinate system, the only position the
control really “knows”. Not commonly programmed
anymore because G54 to G59 (WCSs) are a better,
newer method. Called via G50 for tuning, G92 for
Position register milling, Those G addresses also have aliernate
(programming of vector T meanings (which see). Position register can stil be
to) Part ze i useful for datum shift programming. The “manual
absolute" switch, which has very few useful
applications in WCS contexts, was more useful in
position register contexts, because it allowed the
operator to move the tool to a certain distance from
the part (for example, by touching off a 2.0000"
gage) and then declare to the control what the
distance-to-go shall be (2.0000),
G52 Local coordinate system | M Temporarily shifts program zero to a new location. It
hitos fen wikipedia orgviklG-code at9128/2018
G-2000- Wikipedia
Intosden wikipeda.orgwiklG-code
(cs) is simply “an offset from an offset", that is, an
additional offset added onto the WCSoffset. This
simplifies programming in some cases. The typical
example is moving from part to part in a muttipart
setup. With G5dactive, G52 X140.0 Y170.0shifts
program zero 140 mm over in X and 170 mm over
in Y. When the part "over there” is done, G52 X0
Yoretums program zero to normal G54 (by reducing
G82 offset to nothing). The same result can also be
achieved (1) using multiple WCS origins,
(G54/G55/G56/G57/G58/G59; (2) on newer controls,
654.1 P1/P2IP3/etc. (all the way up to P48); or (3)
using G10 for programmable data input, in which
the program can write new offset values to the
offset registers! The method to use depends on
shop-specific application
653 Takes absolute coordinates (X,Y,Z.A,B,C) with
reference to machine zero rather than program
Machine coordinate zero. Can be helpful for tool changes. Nonmodal
system and absolute only. Subsequent blocks are
interpreted as "back to G54" even if itis not
explicitly programmed
G54 to G59 Have largely replaced position register
(G50 and G92), Each tuple of axis offsets relates
re ewes) program zero directly to machine zero. Standard is
6 tuples (G54 fo G59), with optional extensibility to
48 more via G54.1 P1 to P48.
(654.1 PI to Up to 48 more WCSs besides the 6 provided as
Pas standard by G54 to G59. Note floating-point
Extended work extension of G-code data type (formerly all
coordinate systems integers). Other examples have also evolved
(e.g., 684.2). Modem controls have the hardware to
handle it.
G61 Exact stop check, modal an be canceled with 64. The non-medal vrson
G62 ‘Automatic comer
override
G64 Default cutting mode
(cancel exact stop Cancels G61.
check mode)
668 Rotates coordinate system in the current plane
given with G17, G18, or G19. Center of rotation is
given with two parameters, which vary with each
vendor's implementation. Rotate with angle given
Rotate coordinate with argument R. This can be used, for instance, to
ysl align the coordinate system with a misaligned part.
itcan also be used to repeat movement sequences
around a center. Not all vendors support coor
system rotation.
G69 Turn off coordinate
system rotation Cancels G68.
G70 Fixed cycle, multiple
repetitive cycle, for
finishing (including
contours)
ert Fixed cycle, multiple
repetitive cycle, for9128/2018
G-2000- Wikipedia
Intosden wikipeda.orgwiklG-code
roughing (Z-axis,
emphasis)
G72 Fixed cycle, multiple
repetitive cycle, for
roughing (X-axis
‘emphasis)
G73 Fixed eycle, mulliple
repetitive cycle, for
roughing, with pattern
repetition
73 Peck diiling cycle for Refracts only as far as a clearance increment
milling - high-speed (system parameter). For when chipbreaking is the
(NO full retraction from main concer, but chip clogging of flutes is not.
pecks) Compare G83.
G74 Peck driling cycle for
tuning
G74 Tapping cycle for
milling, lefthand
thread, M04 spindle See notes at G84.
direction
G75 Peck grooving cycle for
tuning
76 Fine boring cycle for Includes OSS and shift (oriented spindle stop and
milling shift tool off centerline for retraction)
G76 Threading oycle for
turning, multiple
repetitive cycle
G80 Willing: Cancels all cycles such as G73, G81, G83,
etc. Z-axis returns either to Z-iitial level or R level,
as programmed (698 or G99, respectively)
Cancel canned cycle Turning: Usually not needed on lathes, because a
new group-1 G address (G00 to G03) cancels
whatever cycle was active,
cat Simple diling cycle No dwell built in
a2 Dwells at hole bottom (Z-depih) for the number
of milliseconds specified by the P address. Good for
wien hole bottom finish matters. Good for spot
Drilling cycle with dwell drilling because the divot is certain to clean up.
evenly, Consider the "choosing dwell duration" note
at Go4
cas Pack driling cycle (ull Retums to R-lovel after each peck. Good for
retraction from pecks) Clearing flutes of chips. Compare G73.
cas G74 and G84 are the righthand and lefthand “pair*
Feng cyce, datthnand for old-school tapping with a non-rigid toolholder
Ghection pi ("tapping head" style). Compare the rigid tapping
"pair’, G84,2and G84.3,
684.2 See notes at G84, Rigid tapping synchronizes
speed and feed according to the desired thread
Tapping cycle, righthand helix. Thats, it synchronizes degrees of spindle
thread, M03 spindle rotation with microns of axial travel. Therefore, it
direction, rigid can use a rigid toolholder to hold the tap. This
toolholder fealure is not available on old machines or newer
low-end machines, which must use “tapping head”
motion (674/684)
G84,3_| Tapping cycle, lefthand ‘See notes at G84 and G84.2.
thread, M04 spindle
sor9128/2018
G-2000- Wikipedia
direction, rigid
toolholder
G85 * Good cycle for a reamer.
+ In some cases good for single-point boring tool,
i although in other cases the lack of depth of cut
poring oyde, feed on the way back out is bad for surface finish, in
which case, G76(OSSishift) can be used
instead
+ If need dwell at hole bottom, see G89.
G86 Boring tool leaves a slight score mark on the way
boring cycle feed back out, Appropriate cycle for some applications;
p irae for others, G76 (OSS/shift) can be used instead.
G87 For backboring. Retums to intial evel only (G98);
, this cycle cannot use G99because its R level is on
boring cycle, backboring the far side of the part, away from the spindle
headstock.
688 boring cycle, feed
in/spindle stop/manual
operation
cao boring cycle, feed G89 is ike G85 but with dwell added at bottom of
inidwellfeed out hole.
G90 Positioning defined with reference to part zero,
Milling: Always as above.
Turning: Sometimes as above (Fanuc group type B
and similarly designed), but on most lathes (Fanuc
group type A and similarly designed), G80/G91 are
‘Absolute programming (8) | not used for absolutesincremental modes.
Instead, U and W are the incremental addresses
and Xand Z are the absolute addresses. On these
lathes, G90 is instead a fixed cycle address for
roughing.
G90 Fixed eycle, simple
‘cle, for roughing (2- (A) | When not serving for absolute programming (above)
axis emphasis)
cat Positioning defined with reference to previous
position
Milling: Always as above.
Turning: Sometimes as above (Fanuc group type B
Incremental 1 (@) __ andsimilaty designed), but on most lathes (Fanue
programming group type A and similarly designed), G80/G91 are
not used for absolutefineremental modes
Instead, U and W are the incremental addresses
and Xand Z are the absolute addresses, On these
lathes, G90 is a fixed cycle address for roughing,
G92 ‘Same corollary info as at G50 position register.
Position register Milling: Always as above.
(programming of vector +(@) | Turning: Sometimes as above (Fanuc group type B
from part zero to tool and similarly designed), but on most lathes (Fanuc
tip) group type A and similarly designed), position
register is G50,
92 Threading cycle, simple
oe TA)
Gea Feedrate per minute T(B)__| Ongroup type A lathes, feedrate per minute is G98.
Goa Fixed cycle, simple
cycle, for roughing (X- T(A) | When not serving for feedrate per minute (above)
axis emphasis)
Intosden wikipeda.orgwiklG-code
se9128/2018
G-2000- Wikipedia
G95 Feedrate per revolution | M T(B) | On group type Alathes, feedrate per revolution
is G99.
G96 Varies spindle speed automatically to achieve a
Constant surface speed T constant surface speed. See speeds and feeds.
(css) Takes an S address integer, which is interpreted
as sfm in G20mode or as m/min in G21mode.
or Takes an S address integer, which is interpreted as
Constant spindle speed | M T revimin (tem). The defaull speed mode per system
parameter if no mode is programmed
G98 Return to initial Z level M
in canned cycle
G98 Feedrate per minute
T(A) Feedrate per minute is G94on grouy ye B.
(aroup type A) “ ps group typ
G99 Return to R levelin. mM
canned cycle
G99 Feedrate per revolution
TIA) Feedrate per revolution is G95 on grouy ye B.
(group type A) “ La group typ
G10 Tool length u
measurement
List of M-codes commonly found on FANUC and similarly designed controls for milling
and turning [ edit)
Sources: Smid 2008:!51 Smid 2010;!1 Green et al, 1996.(71
‘Some older controls require M codes to be in separate blocks (that is, not on the same line).
Code
Deserption | Mung
Turning
(T)
Corollary info
Moo
Compulsory stop_| M
Non-optional—machine always stops on reaching M00 in the
program execution.
Mot
Optional stop. = M
Machine only stops at M01 if operator pushes the optional stop
button.
Moz
End of program | M
Program ends; execution may or may not return to program top
(depending on the control}; may or may not reset register values.
M02 was the original program-end code, now considered
obsolete, but stil supported for backward compatibility."°IMany
modern controls treat M02 as equivalent to M30.!"°l See M30 for
additional discussion of control status upon executing M02 or
M30.
M03
Spindle on
(clockwise M
rotation)
‘The speed of the spindle is determined by the address S, in
either revolutions per minute (697mode; default) or surface feet
er minute or [surface] meters per minute (G96mode [CSS] under
either G20 or G21). The right-hand rule can be used to determine
which direction is clockwise and which direction is counter-
clockwise,
Right-hand-helix screws moving in the tightening direction (and
right-hand-helix flutes spinning in the cutting direction) are defined
as moving in the M03 direction, and are labeled “clockwise” by
convention. The M03 direction is always M03 regardless of local
vantage point and local CW/CCW distinction.
Mod
Spindle on
(counterclockwise | M
rotation)
‘See comment above at M03.
Intosden wikipeda.orgwilG-code
som