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:
Do
not confuse the terms
Skip
Command
with the term
Block Skip Command
- they have nothing to do with each other. While
block skip command is identified with a slash (usually as the first block
character), the G31 is a programmable motion command, mainly used with probing
devices on CNC machines. Other applications also include automatic tool length
measurement and part alignment, where a similar sensor is part of the
configuration. G31 in a command is very similar to G01, linear interpolation -
it cannot be used for arc motions, and it cannot be used in regular machining.
Also, it must always be used in the G40 mode (cutter radius cancel).
In
order to program probes (or other devices), you will need a really good
knowledge of custom macros as well as the methods how touch probing devices
actually function. Without going into details - and without a complete
programming example - here are some comments to offer some idea about this
command:
In
probing, the main purpose is to find a dimensional feature, for example width,
depth, length, etc. The touch probe is an electronic device that is interfaced
with the control system; it can send a signal to the control when a certain
probing (measurement) is done. The signal is sent when the probe touches the
part in a particular location, sending - for example - the XY location of the
point. In order to do that, the programmer has to provide a certain travel
motion for the probe, that covers the point to be measured. This location is
known as a general position, but not precise position - that is the job of the
probe. In other words, the precise location must be within the travel of the
probe. When the probe moves from the start point to the end point of the
travel, it encounters the measured point (feature). At that precise moment, the
probe will convey that position to the control system, to be used for further
processing However, there is some travel left - travel that is no longer
necessary. This leftover travel must be - yes, skipped. That is when the G31
command does its job.
Copyright © 2006
Industrial Press Inc.