Вы находитесь на странице: 1из 23

1.

NC TECHNOLOGY

1.1 Numerical Control (NC):

It is the acronym for Numerical Control. Numerical Control refers to the use of
coded numerical information in the automatic control of equipment. NC can be
defined as a kind of programmable automation in which the process is controlled by
numbers, letters & symbols. The numbers letters & symbols are arranged as a
program of instructions for a particular job. Such a program is called a part
program.

NC can be applied to various operations in engineering, like drafting, machining, assembly,


inspection, etc. The main area of NC application is metal machining operations.
Basic Components of an NC System:

An NC system consists of three basic components.


1. Program of instructions
2. Machine control unit
3. Machine tool
PROGRAM OF INSTRUCTIONS MACHINE CONTROL UNIT

MACHINE TOOL

Above Figure shows the block diagram of an NC machine. The program of


instructions sends commands to the Machine Control Unit, which in turn controls the
machine tool.
1.2 NC Coordinate systems:
The relative movement of the machine tool spindle & worktable is due to the
individual slides being operated by instructions from the part program.
Normally, three slides are required in a NC machine tool.
Longitudinal
Vertical
Transverse
The position and direction of movement of each slide is given by the right hand
coordinate system. Here we have three axes X, Y & Z mutually perpendicular to
each other.
Position of axes: Usually the Z axis is located (positioned) along the machine tool
spindle. The X axis is positioned parallel to the machine worktable and
perpendicular to the Z axis. The Y axis is perpendicular to both Z & X axis.

Direction of axes: If the movement of the slide is such that the tool moves away
from the work piece, the direction of that slide axis is positive ( + ve). Similarly, if
the movement of the slide is such that the tool moves nearer to or into the work
piece, the direction of that slide axis is negative ( - ve).
1.3 Zero points & Reference points:

The accurate position of the machine tool slides with the machine tool is established
by the Zero Point. The Zero Points may be (a) Machine Zero Point & (b) Work Zero
Point.
Machine Zero Point is specified by the manufacturer of the machine. This is the
zero point for the coordinate systems and other reference points in the machine.
Workpiece Zero Point determines the workpiece coordinate system in relation to
the machine zero point. This point is chosen by the programmer, and input into the
CNC system when setting up the machine. The position of this point can be freely
chosen by the programmer within the workpiece envelope of the machine. Its
position is chosen such that the dimensions in the workpiece drawing can be
conveniently converted into coordinate values and also to effectively take care
about the clamping/chucking, setting up, etc.
Reference Point or Home Position serves for calibrating and controlling the
measuring systems of the slides and tool traverses. The position of the reference
point is accurately predetermined in every traverse axis by the trip dogs and the
limit switches. Therefore the reference point coordinates always have the same
precisely known numerical values in relation to the machine zero point. After
initiating the control system, the reference point must always be approached from
all axes to calibrate the traverse measuring system.
Dimension System: Dimensional information in the work piece drawing can be
stated in 2 methods Absolute Dimensioning & Incremental Dimensioning.
In Absolute dimensioning, the coordinate data are taken with respect to a fixed
reference point on the workpiece drawing (usually the workpiece zero).
In Incremental Dimensioning, the coordinate data are taken with respect to the
previous coordinate value. i.e., every coordinate programmed will be the origin for
the next coordinate to be programmed.
NC & CNC: During the early period of NC technology, most of the control activities
in the controller were performed by electronic hardware devices like diode valves.
The electronics consisted of many mechanical devices which frequently posed
problems of non-contact. The machine tools and processes then controlled by such
controllers were called as NC Machines. With the improvement of technology and

with the evolution of integrated circuits mechanical problems with electronic


devices were solved. Also with the very fast development of computers, almost all
the control activities, performed by the hardware of the controller unit, could then
be tackled by software (programs). The machine tools and processes presently
being controlled by powerful computers is termed as CNC Machines. CNC is the
acronym for Computer Numerical Control.

1.4 CNC Part Program:


It consists of a set of properly arranged sequence of instructions which when
executed initiates the controller to send various signals to different machine tool
drives in accordance with the program sequence so as to perform the desired
work/job.
The CNC program (also called as the CNC part program) is made up of number of
lines of instructions. Each line of instruction is called a Block. Each Block in turn
consists of a few alpha-numeric words called as CNC Words
Figure here shows a sample part program depicting the Blocks and CNC Words.
It may be noted that each Block ends with a
semi-colon(;) which indicates the End-ofBlock (need not always be a semi-colon,
depends upon the type of controller).
Also, it may be noted that each CNC word
starts with a Word Address (upper-case
alphabet) followed by a numeric data.
Such a CNC program format is called Word
Address Format.

N00 G00 X0 Y0 ;
N01 M03 M07 ;
N02 G01 Z-2 F30 ;
...;
...;
...;
N25 M05 ;
N26 M02 M30 ;

A Block

CNC Words

Sample Part Program

1.5 CNC Words: The different types of CNC words used in CNC programming are as
follows.

a) Sequence Number (N-word): It is used to identify a block.


b) Preparatory function word (G-code): This command prepares the
machine controller to follow a given instruction. E.g. G00 stands for Rapid
Movement (point-to-point position)
c) Coordinate Data(X, Y & Z words): These words specify the coordinate
position of the cutting tool. E.g. X15, Y-40, Z-2

Coordinate Data may also contain the I, J & K words which specify the
coordinate values of the arc. I, J & K values are also called as the
interpolation parameters.

d) Arc Radius (R-word): Instead of programming the interpolation parameters


e)
f)
g)

h)

(arc-center-coordinates) I, J & K, the arc radius can be programmed using the


R-word.
Feed Rate (F-word): These words specify the feed rate of the tool in a
machining operation. It is usually expressed in mm/min. E.g. F30
Cutting Speed (S-word): These words specify the cutting speed of the
tool/spindle rotation in RPM. E.g. S1200
Tool Selection (T-word): This command is used to access a required tool
from a tool turret or an automatic tool changer. This command is usually used
in CNC machines with Automatic Tool Changing facility. E.g. T10 may specify
that a 10 mm drill must be selected from position number 10 of a tool
magazine (holder).
Miscellaneous Functions (M-code): These are used to specify certain
miscellaneous or auxiliary functions (coolant on, coolant off, spindle on
CW/CCW, spindle stop, etc) available on the given machine.

2. CNC LATHE
Chuck
Face

Dia

(0,0)
Z+

Length

2.1 Dimensional Notations used in CNC lathe are:

1. Absolute Dimensioning X & Z are used.


2. Incremental Dimensioning U & W are used.
P6

P5
30

P4

P3
25

P2

P1
20

25

30

25

ABSOLUTE

Point

INCREMENTAL

P1

20

20

P2

20

-25

-25

P3

25

-25

P4

25

-55

-30

P5

30

-55

P6

30

-80

-25

Note: Incremental program is easy to program but tedious to change values in


between. Error committed in any block is carried over to the consecutive blocks.
Whereas, absolute programming is a bit inconvenient as all coordinates are
measured from a fixed point. Error committed in any block will affect only that
block. Consecutive blocks are not affected.
2.2 Zero points & Reference points on a CNC lathe:
R

W
(0,0)

Max X

Max Z
M : Machine Zero PointW : Workpiece(Program) Zero Point
R : Reference point OR Home Position

Above figure shows the location and the relationship between Zero Points &
Reference Point on a CNC lathe.

3. THE COORDINATE SYSTEM


The first diagram we are concerned with is called a NUMBER LINE. This number line has a zero
reference point location that is called an ABSOLUTE ZERO and may be placed at any point along the
number line.
The number line also has numbered increments on either side of absolute zero.
Moving away from zero to the right are positive increments. Moving away from zero to
the left are negative increments. The +, or positive increments, are understood,
therefore no sign is needed. We use positive and negative signs along with increment
value's to indicate its relationship to zero on the line. If we choose to move to the third
increment on the minus (-) side of zero, we would call for -3. If we choose the second
increment in the plus range, we would call for 2. Our concern is the distance and the
direction from zero. Remember that zero may be placed at any point along the line, and
that once placed, one side of zero has negative increments and the other side has positive
increments.

The machine illustration shows


three directions of travel available on a vertical machine center. To carry the number line idea a little
further, imagine such a line placed along each axis of the machine. It shows the three directions to
position the coordinates around a part origin, which is where these number lines intersect on a vertical
machining center with the X, Y, and Z axis lines.

The first number line is easy to conceive as belonging to the


left-to-right, or X, axis of the machine. If we place a
similar number line along the front-to-back, or
Y axis, the increments (not the table) toward the operator,
from Y zero, is the negative increments. The increments on
the other side of zero away from the operator are positive
increments.
The third axis of travel on our machine is the upand-down, or Z axis. When we place a number line on the
Z travel, the positive increments are up above zero, and the
negative values are down below zero.

1 IS ON THE TOP RIGHT = X+


QUADRANT 2 IS ON THE TOP
Y+
QUADRANT 3 IS ON THE
LEFT = X- YQUADRANT 4 IS ON THE
RIGHT = X+ YRemember, when we are moving

QUADRANT
Y+
LEFT = XBOTTOM
BOTTOM

the machine, we

are concerned with positioning the

center

of

the

spindle in relation to X,Y and Z zero.

Although

machine table is the moving part, we

have to keep in

mind our coordinates are based off our

theoretical

the

spindle movement. Keep in mind that the part zero position may be defined at any point along each of the
three axes, and will usually be different for each setup of the machine.
It is noteworthy to mention here that the Z-axis is set with the machine zero position in the upward
position, or the tool change position. This will place most all Z moves in a negative range of travel.
This view shows the X,Y work zero grid from above. The work part zero for the Z-axis is usually
set at the top of the part surface, and this will be entered in the tool length offset as a negative value for
each tool. The range of Z-axis travel on the HAAS VF-1, for example, is 20 inches total; four of these
inches are above tool change position and is listed as a positive tool length offset, and 16 inches are below
tool change position and listed as a negative. The diagram shows a top view of the grid as it would appear
on the machine tool. This view shows the X and Y axes as the operator faces a vertical machine table.

Note that at the intersection of the two lines, a common zero point is established. The four areas on each
side and above and below the lines are called QUADRANTS and make up the basis for what is known
as rectangular coordinate programming.
Whenever we set a zero point somewhere on the X-axis and, a zero point somewhere on the Yaxis, we have automatically set a work zero point and an intersection of the two number lines. This
intersection where the two zeros come together will automatically have the four quadrants to its sides,
above, and below it. How much of a quadrant we will be able to access is determined by where we place
the zero point within the travel of the machine axes. For example, for a VF-1, if we set zero exactly in the
middle of the travel of X and Y (table center), we have created four quadrants that are 10 inches by 8
inches in size.

4. MACHINE HOME

The principle of machine home may be seen when doing a reference return of all machine axes at
machine start-up. A zero return (POWER UP/RESTART) is performed when you power on machine, all
three axes are moved to extreme positive locations until limit switches are reached. When this condition is
satisfied, the only way to move any of the three axes is in the negative direction (except for a positive four
inches in Z-axis). This is because this position is defined as your MACHINE HOME for each of the three
axes automatically when the machine was sent home with the POWER-UP/ RESTART key. In effect, now
the positive quadrants cannot be reached from machine home position in X and Y axes, and all the moves
will be found to be in the X-, Y- quadrant. It is only by setting a new part zero somewhere within the
travel of each axes that other quadrants are able to be reached. Sometimes it is useful in the machining of
a part to utilize more than one of these X,Y quadrants. An example of this is a round part that has its
datum lines running through the center. The setup of such a part may need machining to be performed in
all four quadrants of a part. This is why you would want to make use of all four quadrants of the X and Y

axes on a milling machine. As you gain more experience in machine tool programming and of setup
techniques, you'll have a better understanding of how to position your machine tool and how to define a
part zero origin and how to position a tool around that origin.

4.1 ABSOLUTE & INCREMENTAL POSITIONING


In absolute positioning, all coordinate positions are given with regard to their relationship to a
fixed zero, origin point that is referred to as part zero. This is the most common type of positioning.
Another type of positioning is called incremental positioning. Incremental positioning concerns itself
with distance and direction from the last position. A new coordinate is entered in terms of its relationship
to the previous position, and not from a fixed zero or origin. In other words, after a block of information
has been executed, the position that the tool is now at is the new zero point for the next move to be made.
An example of the use of the incremental system is below. Note that to move from X4.25 to X2.025 on
the scale, an incremental move of X-2.225 is made, even though the move still places the tool on the plus
side of the scale. Therefore the move was determined from the last point, with no regard for the part zero
position. The + and - signs are used in terms of direction, and not in regard to the position of the part zero.

Keep in mind that


when

positioning in

absolute, we are concerned with distance and direction from a fixed zero reference point, and when
positioning in incremental we are concerned with distance and direction from the last position.

4.2 G90 ABSOLUTE POSITION COMMAND


When using a G90 absolute position command, each dimension or move is referenced from a
fixed point, known as ABSOLUTE ZERO (part zero). Absolute zero is usually set at the corner edge of a
part, or at the center of a square or round part, or an existing bore. ABSOLUTE ZERO is where the
dimensions of a part program are defined from. Absolute dimensions are referenced from a known point
on the part, and can be any point the operator chooses, such as the upper-left corner, center of a round
part, or an existing bore. The Key to understanding ABSOLUTE dimensions is that they are always in

reference to the ABSOLUTE ZERO (part zero). This part zero (work offset G codes G54-G59 and G110G129) are set by the operator in the offset display using the Handle Jog operation mode. It can also be
switched to a new part zero position during the program using a different work offset G code that defines
in it, another location (when machining with multiple vises and/or fixtures at separate locations on the
machine table.) Each dimension or X-Y point is known as a coordinate. If a position 2 inches to the right,
and 2 inches down (toward you) from part zero was programmed, the X coordinate would be X2.0 and
the Y coordinate would be Y-2.0. And the machine would go to that exact location from part zero,
regardless of where it began, within the travel of the machine tool. X2.0 Y-2.0 could be a hole location, an
arc end point, or the end of a line which are known coordinate values.

4.3 G91 INCREMENTAL POSITION COMMAND


This code is modal and changes the way axis motion commands are interpreted. G91 makes all
subsequent commands incremental. Incremental dimensions are referenced from one point to another.
This can be a convenient way to input dimensions into a program (especially for G81-G89, G73, G74,
and G77 canned cycles) depending on the blueprint.
When using a G91 incremental position command, each measurement or move is the actual
distance to the next location (whether it is a hole location, end of arc, or end of line) and is always in
reference from the current location. If you programmed a G91 with an X coordinate of X2.0 and a Y
coordinate of Y-2.0, the machine would go that exact distance from where it is, regardless of where it
began, within the travel of the machine tool.

4.4 PROGRAMMING WITH CODES


The definition of a part program for any CNC consists of movements of the tool, and speed
changes to the spindle RPM. It also contains auxiliary command functions such as tool changes, coolant
on or off commands, or external M code commands.
Tool movements consist of rapid positioning commands, straight line moves or movement along
an arc of the tool at a controlled speed.
A program is written as a set of instructions given in the order they are to be performed.
The instructions, if given in English, might look like this:
LINE #1 = SELECT CUTTING TOOL.
LINE #2 = TURN SPINDLE ON AND SELECT THE RPM.
LINE #3 = RAPID TO THE STARTING POSITION OF THE PART.
LINE #4 = TURN COOLANT ON.
LINE #5 = CHOOSE PROPER FEED RATE AND MAKE THE CUT(S).
LINE #6 = TURN THE SPINDLE AND COOLANT OFF.

LINE #7 = RETURN TO CLEARANCE POSITION TO SELECT ANOTHER TOOL.


And so on. But our machine control understands only these messages when given in machine code, also
referred to as G and M code programming. Before considering the meaning and the use of codes, it is
helpful to lay down a few guidelines.

4.5 PROGRAM FORMAT


There is no positional requirement for the address codes. They may be placed in any order within
the block. Each individual can format their programs many different ways. But, program format or
program style is an important part of CNC machining. Their are some program command formats that can
be moved around, and some commands need to be a certain way, and there are some standard program
rules that are just good to follow. The point is that a programmer needs to have an organized program
format thats consistent and efficient so that any CNC machinist in your shop can understand it.
Some standard program rules to consider are:
Program X, Y and Z in alphabetical order on any block. The machine will read Z, X or Y in any
order, but we want to be consistent. If more than one of X, Y or Z is on a line, they should be listed
together and in order. Write X first, Y next, then Z. You can put G and M codes anywhere on a line of
code. But, in the beginning when N/C programming was being developed G codes had to be in the
beginning of a line and M codes had to be at the end. And this rule, a lot of people still follow and is a
good standard to continue.
Some CNC machines allow you to write more the one M code per line of code and some wont.
On the HAAS, only one M code may be programmed per block and all M codes are activated or cause an
action to occur after everything else on the line has been executed. Program format is a series and
sequence of commands that a machine may accept and execute. Program format is the order in which the
machine code is listed in a program that consist of command words. Command words begin with a single
letter and then numbers for each word. If it has a plus (+) value, no sign is needed. If it has a minus value,
it must be entered with a minus (-) sign. If a command word is only a number and not a value, then no
sign or decimal point is entered with that command. Program format defines the "language of the machine
tool."
N1 (MILL OUTSIDE EDGE) ;

T1 M06 (1/2 DIA. 4 FLT END MILL) ;


G90 G54 G00 X-2.3 Y2.3 S1600 M03 ;
G43 H01 Z0.1 M08 ;
G01 Z-0.625 F50. ;
G41 Y2. D01 F9.6 ;
X2. ;
Y-2. ;
X-2. ;
Y2.25 ;
G40 X-2.3 Y2.3 ;
G00 Z1. M09 ;
G28 G91 Y0. Z0. M05 ;
M01 ;
4.6 DEFINITIONS WITHIN THE FORMAT
1. CHARACTER: A single alphanumeric character value or the "+" and "-" sign.
2. WORD: A series of characters defining a single function such as a, "X" displacement, an "F" feedrate,
or G and M codes. A letter is the first character of a word for each of the different commands. There may
be a distance and direction defined for a word in a program. The distance and direction in a word is made
up of a value, with a plus (+) or minus (-) sign. A plus (+) value is recognized if no sign is given in a
word.
3. BLOCK: Series of words defining a single instruction. An instruction may consist of a single linear
motion, a circular motion or canned cycle, plus additional information such as a feedrate or miscellaneous
command (M-codes).
4. POSITIVE SIGNS: If the value following an address letter commands such as A, B, C,
I, J, K, R, U, V, W, X, Y, Z, is positive, the plus sign need not be programmed in.
If it has a minus value it must be programmed in with a minus (-) sign.
5. LEADING ZEROS: If the digits proceeding a number are zero, they need not be programmed in.
EXAMPLE: G0 for G00 and M1 for M01,
Trailing zeros must be programmed: M30 not M3, G70 not G7.
6. MODAL COMMANDS: Codes that are active for more than the line in which they are issued are
called MODAL commands. Rapid traverse, feedrate moves, and canned cycles are all examples of modal
commands. A NON-MODAL command which once called, are effective only in the calling block, and are
then immediately forgotten by the control.
7. PREPARATORY FUNCTIONS: "G" codes use the information contained on the line to make the
machine tool do specific operations, such as:
1.) Move the tool at rapid traverse.
2.) Move the tool at a feedrate along a straight line.
3.) Move the tool along an arc at a feedrate in a clockwise direction.

4.) Move the tool along an arc at a feedrate in a counterclockwise direction.


5.) Move the tool through a series of repetitive operations controlled by "fixed cycles" such as, spot
drilling, drilling, boring, and tapping.
8. MISCELLANEOUS FUNCTIONS: "M" codes are effective or cause an action to occur at the end of
the block, and only one M code is allowed in each block of a program.
9. SEQUENCE NUMBERS: N1 thru N99999 in a program are only used to locate and identify a line or
block and its relative position within a CNC program. A program can be with or without SEQUENCE
NUMBERS. The only function of SEQUENCE NUMBERS is to locate a certain block or line within a
CNC program.

4.7 AN EXAMPLE OF THE PROGRAM'S FIRST COUPLE OF LINES


The FIRST line or block in a program should be a tool number (T1) and a tool change (M06)
command.
The SECOND line or block should contain an absolute (G90) command along with, a work offset
(G54 is the default), part zero command . A rapid (G00) command to position to an X Y coordinate
location, a spindle speed command (Snnnn), and a spindle ON clockwise command (M03), or you could
have the spindle speed and clockwise command defined on a separate line.
The NEXT line or block contains a Read tool length compensation command (G43), a tool length offset
register number (H01), a Z-axis positioning move (Z1.0), and an optional coolant ON command (M08).
The tool start-up lines with the necessary codes for each tool are listed below. These formats are a good
example for the start-up lines that are entered in for each tool.
T1 M06 (TEXT INFORMATION IN
PARENTHESIS) ;
G90 G54 G00 X0.5 Y-1.5 S2500 M03 ;
G43 H01 Z1. M08 ;
Another format you might choose is:
M06 T1 (Text Information);
G00 G90 G54 X-1.5 Y2.5 ;
S2500 M03 ;
G43 Z1. H01 M08 ;
4.8 OFTEN USED PREPARATORY "G" CODES
The first group (Group 1) control the manner in which the machine moves. These moves can
be programmed in either absolute or incremental. The codes are G00, G01, G02, and G03.

Code Group Function


G00* 01
G01 01
G02 01
G03 01
G04 00
G09 00
G10 00
G12 00
G13 00
G17* 02
G18 02
G19 02
G20* 06
G21 06
G28 00
G29 00
G31** 00
G35** 00
G36** 00
G37** 00
G40* 07
G41 07
G42 07
G43 08
G44 08
G47 00
G49* 08
G50* 11
G51** 11
G52 12
G52 00
G52 00
G53 00
G54* 12
G55 12
G56 12
G57 12
G58 12
G59 12
G60 00
G61 13
G64* 13
G65** 00
G68** 16
G69* 16
G70 00
G71 00
G72 00
G73 09

Rapid Positioning Motion (X,Y,Z,A,B)(Setting 10, 56, 101)


Linear Interpolation Motion (X,Y,Z,A,B,F)
Circular Interpolation Motion CW (X,Y,Z,A,I,J,K,R,F)
Circular Interpolation Motion CCW (X,Y,Z,A,I,J,K,R,F)
Dwell (P) (P =seconds"."milliseconds)
Exact Stop, Non-Modal
Programmable Offset Setting (X,Y,Z,A,L,P,R)
Circular Pocket Milling CW (Z,I,K,Q,D,L,F)
Circular Pocket Milling CCW (Z,I,K,Q,D,L,F)
Circular Motion XY Plane Selection (G02 or G03) (Setting 56)
Circular Motion ZX Plane Selection (G02 or G03)
Circular Motion YZ Plane Selection (G02 or G03)
Verify Inch Coordinate Positioning (Setting 9 will need to be INCH) (Setting 56)
Verify Metric Coordinate Positioning (Setting 9 will need to be METRIC)
Machine Zero Return Thru Reference Point (X,Y,Z,A,B) (Setting 108)
Move to location Thru G28 Reference Point (X,Y,Z,A,B)
Feed Until Skip Function (X,Y,Z,A,B,F)
Automatic Tool Diameter Measurement (D,H,Z,F)
Automatic Work Offset Measurement (X,Y,Z,A,B,I,J,K,F)
Automatic Tool Offset Measurement (D,H,Z,F)
Cutter Compensation Cancel G41/G42/G141 (X,Y) (Setting 56)
2D Cutter Compensation Left (X,Y,D) (Setting 43, 44, 58)
2D Cutter Compensation Right (X,Y,D) (Setting 43, 44, 58)
Tool Length Compensation + (H,Z) (Setting 15)
Tool Length Compensation - (H,Z) (Setting 15)
Text Engraving (X,Y,Z,R,I,J,P,E,F) (Macro Variable #599 to Change Serial Number)
Tool Length Compensation Cancel G43/G44/G143 (Setting 56)
Scaling G51 Cancel (Setting 56)
Scaling (X,Y,Z,P) (Setting 71)
Select Work Coordinate System G52 (Setting 33, YASNAC)
Global Work Coordinate System Shift (Setting 33, FANUC)
Global Work Coordinate System Shift (Setting 33, HAAS)
Machine Zero XYZ Positioning, Non-Modal
Work Offset Positioning Coordinate #1 (Setting 56)
Work Offset Positioning Coordinate #2
Work Offset Positioning Coordinate #3
Work Offset Positioning Coordinate #4
Work Offset Positioning Coordinate #5
Work Offset Positioning Coordinate #6
Uni-Directional Positioning (X,Y,Z,A,B) (Setting 35)
Exact Stop, Modal (X,Y,Z,A,B)
Exact Stop G61 Cancel (Setting 56)
Macro Sub-Routine Call
Rotation (G17,G18,G19,X,Y,Z,A,R) (Setting 72, 73)
Rotation G68 Cancel (Setting 56)
Bolt Hole Circle with a Canned Cycle (,I,J,L)
Bolt Hole Arc with a Canned Cycle (,I,J,K,L)
Bolt Holes Along an Angle with a Canned Cycle (,I,J,L)
High Speed Peck Drill Canned Cycle (X,Y,A,B,Z,I,J,K,Q,P,R,L,F) (Setting 22)

G74 09
G76 09
G77 09
G80* 09
G81 09
G82 09
G83 09
G84 09
G85 09
G86 09
G87 09
G88 09
G89 09
G90* 03
G91 03
G92 00
G92 00
G93 05
G94* 05
G95 05
G98* 10
G99 10
G100 00
G101 00
G102 00
G103 00
G107 00
G110 12
G111 12
G112 12
G113 12
G114 12
G115 12
G116 12
G117 12
G118 12
G119 12
G120 12
G121 12
G122 12
G123 12
G124 12
G125 12
G126 12
G127 12
G128 12
G129 12
G136** 00
G141 07 3D+
G143** 08 5
G150 00

Reverse Tapping Canned Cycle (X,Y,A,B,Z,R,J,L,F) (Setting 130, 133)


Fine Boring Canned Cycle (X,Y,A,B,Z,I,J,P,Q,P,R,L,F) (Setting 27)
Back Bore Canned Cycle(X,Y,A,B,Z,I,J,Q,R,L,F) (Setting 27)
Cancel Canned Cycle (Setting 56)
Drill Canned Cycle (X,Y,A,B,Z,R,L,F)
Spot Drill / Counterbore Canned Cycle (X,Y,A,B,Z,P,R,L,F)
Peck Drill Deep Hole Canned Cycle (X,Y,A,B,Z,I,J,K,Q,P,R,L,F) (Setting 22, 52)
Tapping Canned Cycle (X,Y,A,B,Z,R,J,L,F) (Setting 130, 133)
Bore in~Bore out Canned Cycle (X,Y,A,B,Z,R,L,F)
Bore in~Stop~Rapid out Canned Cycle (X,Y,A,B,Z,R,L,F)
Bore in~Manual Retract Canned Cycle (X,Y,A,B,Z,R,L,F)
Bore~Dwell~Manual Retract Canned Cycle (X,Y,A,B,Z,P,R,L,F)
Bore~Dwell~Bore out Canned Cycle (X,Y,A,B,Z,R,L,F)
Absolute Positioning Command (Setting 56)
Incremental Positioning Command (Setting 29)
Set Work Coordinate Value (Fanuc) (HAAS)
Global Work Coordinate System Shift (Yasnac)
Inverse Time Feed Mode ON
Inverse Time Feed Mode OFF/Feed Per Minute ON (Setting 56)
Feed Per Revolution
Canned Cycle Initial Point Return (Setting 56)
Canned Cycle "R" Plane Return
Mirror Image Cancel
Mirror Image (X,Y,Z,A,B) (Setting 45, 46, 47, 48, 80)
Programmable Output to RS-232 (X,Y,Z,A,B)
Limit Block Look-a-head (P0-P15 for number of lines control looks ahead)
Cylindrical Mapping (X,Y,Z,A,Q,R)
Work Offset Positioning Coordinate #7
Work Offset Positioning Coordinate #8
Work Offset Positioning Coordinate #9
Work Offset Positioning Coordinate #10
Work Offset Positioning Coordinate #11
Work Offset Positioning Coordinate #12
Work Offset Positioning Coordinate #13
Work OffsetPositioning Coordinate #14
Work Offset Positioning Coordinate #15
Work Offset Positioning Coordinate #16
Work Offset Positioning Coordinate #17
Work Offset Positioning Coordinate #18
Work Offset Positioning Coordinate #19
Work Offset Positioning Coordinate #20
Work Offset Positioning Coordinate #21
Work Offset Positioning Coordinate #22
Work Offset Positioning Coordinate #23
Work Offset Positioning Coordinate #24
Work Offset Positioning Coordinate #25
Work Offset Positioning Coordinate #26
Automatic Work Offset Center Measurement
Cutter Compensation (X,Y,Z,I,J,K,D,F)
Axis Tool Length Compensation+ (X,Y,Z,A,B,H) (Setting 117)
General Purpose Pocket Milling (X,Y,P,,Z,I,J,K,Q,D,R,L,S,F)

G153** 09 5 Axis High Speed Peck Drill Canned Cycle (X,Y,A,B,Z,I,J,K,Q,P,E,L,F) (Setting 22)
G154 09
Select Work Offset Positioning Coordinate P1-99
G155** 09 5 Axis Reverse Tapping Canned Cycle (X,Y,A,B,Z,J,E,L,F)
G161** 09 5 Axis Drill Canned Cycle (X,Y,A,B,Z,E,L,F)
G162** 09 5 Axis Spot Drill/Counterbore Canned Cycle (X,Y,A,B,Z,P,E,L,F)
G163** 09 5 Axis Peck Drill Canned Cycle (X,Y,A,B,Z,I,J,K,Q,E,L,F) (Setting 22)
G164** 09 5 Axis Tapping Canned Cycle (X,Y,A,B,Z,J,E,L,F)
G165** 09 5 Axis Bore in, Bore out Canned Cycle (X,Y,A,B,Z,E,L,F)
G166** 09 5 Axis Bore in, Stop, Rapid out Canned Cycle (X,Y,A,B,Z,E,L,F)
G169** 09 5 Axis Bore, Dwell, Bore out Canned Cycle (X,Y,A,B,Z,P,E,L,F)
G174 00
Special Purpose Non-Vertical Rigid Tapping CCW (X,Y,Z,F)
G184 00
Special Purpose Non-Vertical Rigid Tapping CW (X,Y,Z,F)
G187 00
Accuracy Control for High Speed Machining (E)
G188 00
Get Program From PST (Program Schedule Table)
4.9 MACHINE DEFAULTS
A default is an automatic function of the machine tool control. After powering up the machine, the control
will recognize the default G code values. The machine will go to the part zero that was entered in for
G54 if no other work coordinate code was specified in the actual program, because the machine
automatically recognizes the G54 column upon start-up. That is a default.
The control automatically recognizes these G codes when your HAAS mill is powered up:
G00
G17
G20
G40
G49
G50 G51
G54
G64
G69
G80
G90
G94
G98

Rapid Traverse
X,Y Circular Plane Selection
Verify Inch (Setting 9 will need to be on INCH)
Cutter Compensation Cancel
Tool length Compensation Cancel
Cancel
Work Coordinate Zero #1 (1 of 26 available)
Exact Stop Cancel
G68 Cancel (optional)
Canned Cycle Cancel
Absolute Programming
Inverse Time Feed Deactivate
Initial Point Return

There is no default feed rate (F code) or spindle speed (S code) , but once an F or S code is
programmed, it will apply until another feed rate or spindle speed is entered or the machine is turned off.
4.10 OFTEN USED MISCELLANEOUS "M" CODES
All M codes are activated or cause an action to occur after everything else on a block has
been completed. And only one M code is allowed per block in a program. If there is a
(Setting number) listed next to an M code, that setting will in some way relate to that M code.

M00
M01
M02
M03
M04
M05
M06
M08
M09
M10**
M11**
M12**
M13**
M16
M17**
M18**
M19
M21-M28
M30
M31
M33
M34
M35
M36**
M39
M41
M42
M50**
M51-M58
M59
M61-M68
M69
M75
M76
M77
M78
M79
M80**
M81**
M82
M83**
M84**
M86
M88**
M89**
M93
M94
M95
M96
M97

Program Stop (Setting 39, 42)


Optional Program Stop (Setting 17,39)
Program End (Setting 39)
Spindle On, Clockwise (S) (Setting 144)
Spindle On, Counterclockwise (S) (Setting 144)
Spindle Stop
Tool Change (T) (Setting 42, 87, 155)
Coolant On (Setting 32)
Coolant Off
4th Axis Brake On
4th Axis Brake Release
5th Axis Brake On
5th Axis Brake Release
Tool Change (T) (Same as M06)
APC Pallet Unclamp and Open APC Door
APC Pallet Clamp and Close APC Door
Orient Spindle (P,R values optional)
Optional User M Code Interface with M-Fin Signals
Program End and Reset (Setting 2, 39, 56, 83)
Chip Auger Forward (Setting 114,115)
Chip Auger Stop
Coolant Spigot Position Down, Increment (+1)
Coolant Spigot Position Up, Decrement (-1)
Pallet Part Ready (P)
Rotate Tool Turret (T#) (Setting 86)
Spindle Low Gear Override
Spindle High Gear Override
Execute Pallet Change (P) (Setting 121 thru,129)
Optional User M Code Set
Output Relay Set (N)
Optional User M Code Clear
Output Relay Clear (N)
Set G35 or G136 Reference Point
Control Display Inactive
Control Display Active
Alarm if Skip Signal Found
Alarm if Skip Signal Not Found
Automatic Door Open (Setting 131)
Automatic Door Close (Setting 131)
Tool Unclamp
Auto Air Jet On
Auto Air Jet Off
Tool Clamp
Coolant Through the Spindle On (Setting 32)
Coolant Through the Spindle Off (Setting 32)
Axis POS Capture Start (P, Q)
Axis POS Capture Stop
Sleep Mode
Jump if No Input (P, Q)
Local Sub-Program Call (P, L)

M98
M99 M97
M101**
M102**
M103**
M109
** Options

Sub Program Call (P, L)


Local Sub-Program or M98 Sub-Program Return or Loop Program (Setting 118)
MOM (Minimum Oil Machining) CANNED CYCLE MODE (I)
MOM (Minimum Oil Machining) MODE (I,J)
MOM (Minimum Oil Machining) MODE CANEL
Interactive User Input (P)

MP 1:
%
N1 G21 G90 G40
N2 G10 P1 Z0.0 R1.0 T00
N3 G10 P2 Z0.0 R1.0 T00
N4 G10 L2 P1 X0.0 Y0.0 Z0.0 (Top)
N5 (DEFINE OPERATION : PROFILING OPERATION)
N6 G28 G91 Z0
N7 G28 X0 Y0
N8 G90
O9 T00 (USER DEFINED)
N10 G54 M06
N11 T00 M01
N12 S1500 M3 M41 M9
N13 G0 X22.5 Y-37.5
N14 G43 Z5.0 H00 M7
N15 Z3.0 F50.0
N16 G1 Z-2.0
N17 G17 G2 X37.5 Y-22.5 R15.0 F46.9
N18 G1 Y22.5 F50.0
N19 G3 X22.5 Y37.5 R15.0 F46.9
N20 G1 X-22.5 F50.0
N21 G2 X-37.5 Y22.5 R15.0 F46.9
N22 G1 Y-22.5 F50.0
N23 G2 X-22.5 Y-37.5 R15.0 F46.9
N24 G1 X22.5 F50.0
N25 G0 Z5.0
N26 G28 Z0 H0 M19
N27 (DEFINE OPERATION : PROFILING OPERATION)
N28 G28 Z0 H0 M19
O29 T00 (USER DEFINED)
N30 G54 M06
N31 T00 M01
N32 S1500 M5 M41 M9
N33 G0 X15.0 Y0.0
N34 G43 Z5.0 H00 M7

N35 Z3.0 F50.0


N36 G1 Z-2.0
N37 G3 I-15.0 J0.0 F46.9
N38 G0 Z5.0 F50.0
N39 G28 Z0 H0 M19
N40 G00 Z500.0 M09
N41 Z0 H00 M19
N42 M30
%

MP 2:
%
N1 G21 G90 G40
N2 G10 P1 Z0.0 R1.0 T00
N3 G10 P2 Z0.0 R1.5 T00
N4 G10 L2 P1 X0.0 Y0.0 Z0.0 (Top)
N5 G28 G91 Z0
N6 G28 X0 Y0
N7 G90
O8 T00 (USER DEFINED)
N9 G54 M06
N10 T00 M01
N11 S1500 M3 M41 M7
N12 G0 X30.0 Y10.0
N13 G43 Z5.0 H00 M7
N14 Z3.0 F50.0
N15 G1 Z-2.0
N16 X0.0 Y40.0
N17 X-30.0 Y10.0
N18 G0 Z5.0
O19 T00 (A1249TIN*3)
N20 G54 M06
N21 T00 M01
N22 S1500 M3 M41 M7
N23 G0 X-30.0 Y-30.0
N24 G43 Z5.0 H00 M7
N25 G99 G81 Z-10.0 R5.0 F50.0
N26 X-15.0
N27 X0.0
N28 X15.0
N29 X30.0
N30 X20.0 Y0.0
N31 X10.0 Y17.32
N32 X-10.0
N33 X-20.0 Y0.0
N34 X-10.0 Y-17.32

N35 X10.0
N36 G80
N37 G28 Z0 H0 M19
N38 G00 Z500.0 M09
N39 Z0 H00 M19
N40 M30
%

MP 3:
%
N1 G21 G90 G40
N2 G10 P1 Z0.0 R1.0 T00
N3 G10 L2 P1 X0.0 Y0.0 Z0.0 (Top)
N4 (DEFINE OPERATION : PROFILING OPERATION)
N5 G28 G91 Z0
N6 G28 X0 Y0
N7 G90
O8 T00 (USER DEFINED)
N9 G54 M06
N10 T00 M01
N11 S1500 M3 M41 M9
N12 G0 X-10.75 Y10.0
N13 G43 Z5.0 H00 M7
N14 Z3.0 F50.0
N15 G1 Z-2.0
N16 X-37.586
N17 G17 G2 X-38.293 Y11.707 R1.0 F37.5
N18 G1 X-11.707 Y38.293 F50.0
N19 G2 X-10.0 Y37.586 R1.0 F37.5
N20 G1 Y10.75 F50.0
N21 G0 Z5.0
N22 X10.0
N23 Z3.0
N24 G1 Z-2.0
N25 Y37.586
N26 G2 X11.707 Y38.293 R1.0 F37.5
N27 G1 X38.293 Y11.707 F50.0

N28 G2 X37.586 Y10.0 R1.0 F37.5


N29 G1 X10.75 F50.0
N30 G0 Z5.0
N31 Y-10.0
N32 Z3.0
N33 G1 Z-2.0
N34 X37.586
N35 G2 X38.293 Y-11.707 R1.0 F37.5
N36 G1 X11.707 Y-38.293 F50.0
N37 G2 X10.0 Y-37.586 R1.0 F37.5
N38 G1 Y-10.75 F50.0
N39 G0 Z5.0
N40 X-10.0
N41 Z3.0
N42 G1 Z-2.0
N43 Y-37.586
N44 G2 X-11.707 Y-38.293 R1.0 F37.5
N45 G1 X-38.293 Y-11.707 F50.0
N46 G2 X-37.586 Y-10.0 R1.0 F37.5
N47 G1 X-10.75 F50.0
N48 G0 Z5.0
N49 G28 Z0 H0 M19
N50 G00 Z500.0 M09
N51 Z0 H00 M19
N52 M30
%
MP 4:
%
N1 G21 G90 G40
N2 G10 P1 Z0.0 R1.0 T00
N3 G10 L2 P1 X0.0 Y0.0 Z0.0 (Top)
N4 (PROFILING OPERATION)
N5 G28 G91 Z0
N6 G28 X0 Y0
N7 G90
O8 T00 (USER DEFINED)
N9 G54 M06
N10 T00 M01
N11 S1500 M3 M41 M9
N12 G0 X5.0 Y-39.0
N13 G43 Z5.0 H00 M7

N14 Z3.0 F50.0


N15 G1 Z-2.0
N16 X39.0
N17 Y30.0
N18 G17 G3 X30.0 Y39.0 R9.0 F45.0
N19 G1 X-29.586 F50.0
N20 X-39.0 Y29.586
N21 Y-29.046
N22 G2 X-29.046 Y-39.0 R11.0 F45.8
N23 G1 X5.0 F50.0
N24 G0 Z5.0
N25 G28 Z0 H0 M19
N26 G00 Z500.0 M09
N27 Z0 H00 M19
N28 M30
%

MP 5:
%
N1 G21 G90 G40
N2 G10 P1 Z0.0 R1.0 T00
N3 G10 L2 P1 X0.0 Y0.0 Z0.0 (Top)
N4 (DEFINE OPERATION : PROFILING OPERATION)
N5 G28 G91 Z0
N6 G28 X0 Y0
N7 G90
O8 T00 (USER DEFINED)
N9 G54 M06
N10 T00 M01
N11 S1500 M3 M41 M9
N12 G0 X40.0 Y-40.0
N13 G43 Z5.0 H00 M7
N14 Z3.0 F50.0
N15 G1 Z-2.0
N16 Y-10.954
N17 G17 G2 X40.909 Y-9.959 R1.0 F37.5
N18 G3 X50.0 Y0.0 R10.0 F45.5
N19 X40.909 Y9.959 R10.0
N20 G2 X40.0 Y10.954 R1.0 F37.5
N21 G1 Y40.0 F50.0
N22 X10.954
N23 G2 X9.959 Y40.909 R1.0 F37.5
N24 G3 X0.0 Y50.0 R10.0 F45.5
N25 X-9.959 Y40.909 R10.0
N26 G2 X-10.954 Y40.0 R1.0 F37.5
N27 G1 X-40.0 F50.0
N28 Y10.954
N29 G2 X-40.909 Y9.959 R1.0 F37.5
N30 G3 X-50.0 Y0.0 R10.0 F45.5

N31 X-40.909 Y-9.959 R10.0


N32 G2 X-40.0 Y-10.954 R1.0 F37.5
N33 G1 Y-40.0 F50.0
N34 X-10.954
N35 G2 X-9.959 Y-40.909 R1.0 F37.5
N36 G3 X0.0 Y-50.0 R10.0 F45.5
N37 X9.959 Y-40.909 R10.0
N38 G2 X10.954 Y-40.0 R1.0 F37.5
N39 G1 X40.0 F50.0
N40 G0 Z5.0
N41 G00 Z500.0 M09
N42 Z0 H00 M19
N43 M30
%

MP 6:
%
N1 G21 G90 G40
N2 G10 P1 Z0.0 R5.0 T00
N3 G10 L2 P1 X0.0 Y0.0 Z0.0 (Top)
N4 G28 G91 Z0
N5 G28 X0 Y0
N6 G90
O7 T00 (A1141*10)
N8 G54 M06
N9 T00 M01
N10 S1500 M3 M41 M7
N11 G0 X-40.0 Y-40.0
N12 G43 Z5.0 H00 M7
N13 G99 G81 Z-12.0 R5.0 F50.0
N14 X-30.0 Y-30.0
N15 X-20.0 Y-20.0
N16 X-10.0 Y-10.0
N17 X0.0 Y0.0
N18 X10.0 Y10.0
N19 X20.0 Y20.0
N20 X30.0 Y30.0
N21 X40.0 Y40.0
N22 G80
N23 G28 Z0 H0 M19
N24 G00 Z500.0 M09
N25 Z0 H00 M19
N26 M30
%