Every
CNC programmer and most of CNC machine operators have a simple chart of all
common G-commands (G-codes) and M-functions (M-codes), usually tucked away
somewhere under the lid of their tool box or they have them posted on any
convenient machine side or cork board. This chapter covers most of those
G-codes that are either uncommon, seldom used, special, or outright mysterious.
Keep in mind that machine manufacturers often add G-codes and M-codes of their
own. These special codes or functions cannot be covered in a general
publication, such as this handbook.
Miscellaneous
functions (M-functions) are not covered here at all, as they are often very
much dependent on the machine tool manufacturer - for that reason, they are not
part of this chapter. The situation is much different with various G-codes,
some standard, some optional - they are covered here.
These
special and less frequently used G-codes are as important as those used on a daily
basis, even if only as accepting them for possible future use. Programmers
often forget that there are many preparatory commands available that are not
used very frequently. In this chapter, the focus will be on those G-codes that
may sometimes become the key to solving a particular problem or achieving a
particular programming goal. Some of these preparatory G-codes have a direct
relationship with each other, in which case, all related commands will be
considered together and explained together.
Divided
into seven groups, seventeen preparatory commands covered in this chapter are:
Fanuc
controls provide several features that can be considered together under the
general description
special
cutting modes
. The term
'cutting mode' refers to the status of the control selected for the cutting
toolpath. Combined to a table, there are five cutting modes available:
All
commands in the G61 to G64 series belong to the same modal G-code group, so one
mode cancels another mode. Only one special cutting mode can be in effect at
any moment, and all modal commands are cancelled by each other - or brought to
normal cutting mode by programming G64.
Exact Stop Check G09 - G61
Commands
G09 and G61 are used for the same purpose - to control the positioning accuracy
at the end of cutting motions (at sharp corners). The difference between the
two commands is modality:
-
G09 - Exact stop check ...
non-modal - effective for one block only
-
G61 - Exact stop check mode ...
modal - remains effective until canceled
Either
command can be used to control how the cutting tool approaches the programmed
end point. When used in the program, the control system provides a slight
deceleration before reaching the contour end point. Both G09 and G61 will cause
the control system to check if the cutting tool is positioned exactly where it
should be. When the position is confirmed, the next program block will be
processed. The illustration shows
(greatly
exaggerated)
the effect of
normal cutting and cutting with exact check programmed.
Use only when necessary!
Once
the exact position has been reached, the control system will automatically
accelerate at the beginning of the next block. Exact check (single or modal) is
normally programmed for linear motion (G01) as well as circular motions (G02
and G03). It is most effective at sharp corners (intersections), not at
tangencies (blend radius), particularly when fast cutting feedrate is used.
A
simple 75
_
50 mm rectangle has four corners, but only three
may require the use of exact check command - there is no corner cutting at the
beginning and at the end:
Expect
a very short delay at each corner, while the G61 command remains in effect. The
modal mode G61 is canceled by G62, G63 or G64 commands and no other values are
required in the block.
Automatic Corner Override - G62
G62
is another not very common G-code that may come useful under the right
circumstances. It is defined as
automatic
corner override
command. The
main purpose of G62 is to control the federate for inside corners
(sharp inner corners)
, when the cutter radius offset is in effect.
G62 will force an adjustment to the feedrate, resulting in an improved quality
of the surface finish and improves the tool life at the same time. Once
activated in the program, the override of inner corners is automatic, until another
cutting mode is used (G61, G63, or G64). There are no other values programmed
with G62. In terms of contour change, see illustration for the possibilities.
There are four types of inner corners that are supported by the G62 command -
listed in the direction of cutting motion:
-
Inner corner between a line and
another line
... Line-Line transition
-
Inner corner between a line and an
arc
...
Line-Arc transition
-
Inner corner between an arc and a
line
... Arc-Line transition
-
Inner corner between an arc and
another arc
... Arc-Arc transition
Tapping Mode - G63
Feedrate
override switch and the feedhold button are not active in the tapping mode G63.
In tapping mode, the tool does not decelerate at the contour change point - the
next block is processed immediately. There are no other values programmed with
G63.
In
practical usage, this command can be used when a tapping sequence needs to be
programmed the
long
way
- without the benefit of
cycles (G74 or G84). Such a sequence will include standard G00 and G01
commands, which can be manipulated during machining operation. G63 command
prevents such manipulation, eliminating source of a possible problem. A typical
programming example when this mode will be very useful is when the tapping
requires different feedrate on the way in than on the way out. This technique
is often employed for very small and fine threads, usually less than 0.5 mm
pitch. In the example, 0.35 mm pitch will be used, at 700 r/min. The
requirement is 80% of the feedrate in, 120% of the normal feedrate out, so G84
cycle cannot be used. Illustration is not necessary.
G90 G54 G00 X50.0 Y60.0
S800 M03 (HOLE LOCATION)
G43 Z4.0 H03 M08 (START
POINT AT X50.0 Y60.0 Z4.0)
G63 (TAPPING
MODE BECOMES EFFECTIVE)
G01 Z-12.0 F224.0 M05 (FEED-IN
AT 80 PERCENT OF FEEDRATE)
Z5.0 F336.0 M04 (FEED-OUT
AT 120 PERCENT OF FEEDRATE)
G64 (NORMAL CUTTING MODE - G63 MODE CANCELED)
M05 …
Standard
tapping feedrate is
800
r/min
_
0.35 pitch = 280 mm/min
. To feed-in at 80%, the federate will be 224
mm/min, and to feed-out at 120%, the feedrate will be 336 mm/min.
Normal Cutting Mode - G64
This
is the mode that is used in programming the most often. If you never use other
modes listed in this chapter, you may not even need G64. When the power is
supplied to the control system, the control starts in the state of
'normal cutting mode'
. Normal cutting mode means there are no special
conditions required to accommodate single direction positioning, stop check,
corner override, or tapping modes. In this case, there is no need to include
G64 in the CNC program, unless one of the special cutting mode is used or the
programmer chooses to include it. In that case, the G64 should always be included
at the program start, along with other initialization commands:
G21
G17 G40 G64 G80 (CUTTING MODE AT
THE START)
...
G61 (EXACT
STOP CHECK MODE IN EFFECT)
...
<machining uses
the exact stop check mode>
...
G64 (CUTTING
MODE CANCELS G61 - NORMAL MODE)
...
Including
the cancellation at the beginning (G64), the program is guaranteed to start in
the normal cutting mode. G64 also cancels all other modal commands (G61, G62,
and G63).
Copyright © 2006
Industrial Press Inc.