




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Haas CNC Mill Programming Training Manual
Typology: Exams
1 / 107
This page cannot be seen from the preview
Don't miss anything!
Welcome to Productivity, Inc., your local Haas Factory Outlet (H.F.O.) for the Mill Programming Class. This class is intended to give a basic understanding of the programming of a Haas Machining Center.
After 1945 design of wings for the US Air Force were becoming extremely complex and hard to manufacture using conventional machine tools. MIT developed a machine that was able to control a cutting tool path with a series of straight lines defined by axial coordinates at prescribed feed rates. The first NC machine tool was introduced to the defense and aerospace industry by MIT in 1952. The contour of a constantly changing curvature could be described by a series of short lines determined by a series of coordinate in three axes.
The first machine tools were run with instructions or programs punched out on paper tape. The files of the early machine tools were often in the format which later became known as G-code. The reason for the name being that many of the lines of text began with the letter G.
In an NC machine, the tool is controlled by a code system that enables it to be operated with minimal supervision and with a great deal of repeatability. "CNC" (Computerized Numerical Control) is the same type of operating system, with the exception that a computer monitors the machine tool.
The same principles used in operating a manual machine are used in programming a NC or CNC Machine. The main difference is that instead of cranking handles to a position on a slide to a certain point, the dimension is stored in the memory of the machine control once****. The control will then move the machine to these positions each time the program is run.
The operation of the VF-Series Vertical Machining Center requires that a part program be designed, written, and entered into the memory of the control. There are several options for getting these programs to the control. RS-232 (serial port with a computer), 3.5” Floppy Disk, Ethernet / Networking/ and USB are all viable ways to transmit and receive programs.
In order to operate and program a CNC controlled machine, a basic understanding of machining practices and a working knowledge of math are necessary. It is also important to become familiar with the control console and the placement of the keys , switches, displays, etc., that are pertinent to the operation of the machine.
This manual is intended to give a basic understanding of CNC programming and its applications. It is not intended as an in-depth study of all ranges of machine use, but as an overview of common and potential situations facing CNC programmers. Also use of the new Haas Control feature “Intuitive Programming System” or (IPS) will be demonstrated. It will produce G-Code programs for simple machine operations.
Updated CK 11/14/11; Rev 02/19/
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 required when you power on machine, all three axes are moved to extreme positive locations until limit switches are reached. The reason the machine does this is to double check its position with the “Home” switches of the machine.
This is crucial to the operation and function of a CNC machine as all of our programs, fixturing, and tooling are based off of machine home.
Above: The relationship of machine home to “work home”, otherwise know as “work offset”
G43 Tool Length Compensation
G43 is the code we use to establish a tool length to the control. Upon setup, the operator will determine the tool length and input that dimension into the Tool Offset Memory for that tool. Each tool in the machine will have a defined tool length, and this will be presented to the control in the form of an “H” value. (H1 is equal to tool length offset #1, H2 = length offset #2, etc…….)
The programmed code would be:
Canceling Tool Compensation (G49 or H00)
To cancel tool length compensation, we can either use the code of G49, G28 (Go to machine home position) or use an H value of H00. M30 (program end) or depressing the reset button will also cancel tool length compensation.
There are two different systems used in positioning our machine. Both will “steer” the machine where we need it to go, both can net the same results. The reason we use more than one, is flexibility. Below we will talk about both, and they are the first two “G-Codes” that we are going to talk about.
Absolute Positioning: With absolute positioning, we tell the machine where to move based on a common point, called X0 Y0 and Z0. Every time we need to move to a certain position, the ending point of that move is in direct relationship to this “common point”
G90 Absolute Positioning
Program to move the machine to these 4 hole locations when using G90 (Abs.)
Incremental Positioning: With incremental positioning, we are telling the machine where to go in relationship to where it currently is at. Basically like a set of directions given from where the machine stopped last.
G91 Incremental Positioning
Program to move the machine to the same 4 hole locations using G91 (Incr.)
When do we decide which to use?
We switch between the two when it is more convenient. Once example is look at the above 2 prints. Sometimes the print doesn’t call out the hole-locations, but will give the distance between the holes.
This unit will give a broad overview of word address programming; all alpha codes and their basic functions will be discussed.
Upon completion of this unit, the student will:
Understand the purpose or role of each alpha character involved in word address programming.
Understand the concept of Modal and Non-Modal commands.
Have a basic idea of the function of G and M codes.
Have an overall understanding of the basic theory of G and M code programming.
A CNC Mill program is defined as a set of instructions given to the machine control to move the positioning of the machine spindle, changes to the spindle RPM, and changes to the machine’s other features (Tool Changes, Coolant System, Chip Control, etc……)
Tool movements consist of rapid positioning commands, straight line movement of the tool at a controlled speed, and movement along an arc.
The machine has three (3) linear axes named X, Y, and Z. The X-axis moves the table left and right, the Y axis moves it to and from the operator, and the Z moves the milling head up and down. The machine zero position is where the tool is at the right corner of the mill table farthest away from the front doors. Motion in the X-axis will move the table to the right for negative numbers and to the left for positive numbers. Motion in the Y-axis will move the table away from the operator for negative numbers and toward the operator for positive numbers. Motion in the Z-axis will move the tool down for negative numbers and up for positive numbers.
The optional fourth, or rotary, axis can be programmed for both rapid positioning commands and for feed commands either by itself or in conjunction with the other axes.
In addition to the above , there may be up to five external axes that can be programmed for rapid or feed motions , but only one axis at a time.
To accomplish all of these functions, we use machining “G-Code” often referred to as “Fanuc” G-Code or ISO G-Code. This code is just a simple language. It is a simple language that consists of less than 300 words. As compared to English, Spanish, French, German, etc… which contain thousands of words, but are easily taught every day.
We are going to work with this language to train on Haas programming. In order to understand what a program is doing, we need to talk about several subjects:
Word Address Assignments (The ABCs of CNC) Spindle Commands Tool Change Commands Creating Tool Path with Linear and Circular Interpolation G Code Definitions M Code Definitions Machine Defaults Program Format Canned Cycles and Hole Definition Canned Cycle Modifiers (Bolt Hole Circles, Bolt Arcs, Lines of Holes) Cutter Compensation Circular Pocket Milling Helical Motion and Thread Milling Circular Plane Selection Subprograms and Subroutines Haas Pocket Milling Cycle (G150) Haas Text & Serial Number Engraving
G Codes establish Modes of Operation. When we define a G Code, think of it like we are flipping a rotary switch on a TV to another mode (channel). For example, G83 is the code for Deep Hole Peck Drilling. We tell the machine “G83” and then tell the machine where the holes are located since we are in Drilling Mode. When done, we take the machine out of Drilling Mode with a “G80” which means Canned Cycle Cancel. G codes are used to establish what “Mode” the machine is in.
The H is used to tell the machine what tool length value to use from the Tool Offset page. If we define H01, we are telling the machine to use the value that is located under Tool Length #01. H02 = Tool Length Value #
The letter I is used two different ways. It can be used in canned cycles (Drilling Operations) and it is used in defining arcs, in that we tell the machine incrementally from the start point of an arc, where the center of the arc is. I is used to tell the machine how far away the center of the arc is in the X axis.
The letter J is used two different ways. It can be used in canned cycles (Drilling Operations) and it is used in defining arcs, in that we tell the machine incrementally from the start point of an arc, where the center of the arc is. J is used to tell the machine how far away the center of the arc is in the Y axis.
The letter K is used two different ways. It can be used in canned cycles (Drilling Operations) and it is used in defining arcs, in that we tell the machine incrementally from the start point of an arc, where the center of the arc is. K is used to tell the machine how far away the center of the arc is in the Z axis.
The L address character is used to specify a repetition count for some canned cycles and auxiliary functions. It is followed by an unsigned number between 0 and 32767.
M codes are used to turn on and off functions specific to that of the machine. For example, M3 and M turn the spindle on, M5 turns the spindle off. M8 turns coolant on, M9 off. Think of it like M means “Machine Function”.
N NUMBER OF BLOCK
The N address character is entirely optional. It can be used to identify or number each block of a program. It is followed by a number between 0 and 99999. The M97 functions may reference an N line number.
The O address character is used to identify a program. It is followed by a number between 0 and 99999. A program saved in memory always has an Onnnnn identification in the first block; it cannot be deleted. Altering the O in the first block causes the program to be renamed. A program can only have one O address.
P is another dual function letter in that it can be used to define a pause with a G04 code, or it is used with a M97 or M98 code to tell the machine to “jump” from it’s current place in a program to another place in the program (in the case of M97 P100 = Jump to line N100) or to another program entirely (with M P520 = Jump to program O520). A length of a pause can be defined two different ways, in Seconds (with a decimal point) or Milliseconds (without a decimal). G4 P.1 would mean wait .1 seconds, and G4 P (without a decimal) would mean wait 100 Milliseconds. Both .1 Seconds and 100 Milliseconds are the same amount of time.
The letter Q is used in canned cycles, most often as the “Peck” distance in a drilling cycle.
R is another dual role character. It can be used in canned (drilling) cycles to define the “Rapid Plane” (how far above the part to rapid the tool to), or it is used I defining an arc’s radius (replacing the I, J, and K method). Refer to the Line and Arc Interpolation Section of this manual for more detail.
S defines the spindle rpm. We can use a value anywhere between S0 – S99999. If we define a speed higher than the capacity of the machines spindle, it will max out the machines RPM and start cutting. For example, a standard VF spindle is 7,500 RPM. If we tell the machine S15000 M03 (turn on the spindle forward at 15,000 RPM) the machine will go to the 7,500 and start cutting. Be aware of your machine’s capabilities (4k, 7.5k, 10k, 12k, 15k or 30k) before programming speeds and feeds.
A standard Haas VMC can be equipped with a 10, 20, 24, 30, 40, etc…. Tool Changers, but the control has the capability of saving in its memory up to 200 Tools. It is possible to STORE tool number 121 in a machine that only has a 24-tool Tool Changer. A T code tells the machine what tool we want to put in the spindle. NOTE on Haas machines with a side mount tool changer (Tool are stored randomly in the magazine) a “Tool Pre-Call” may be necessary to “Stage” the tool change.
The definition of “G” code is typically referred to as a “preparatory function”. They establish the mode of operation that the machine needs to be in to accomplish what the programmer intends. Imagine a rotary switch like that on an older TV; we are just turning the switch to different “modes”.
Before considering the meaning and the use of codes, it is helpful to lay down a few guidelines:
Codes come in groups. Each group of codes will have a specific group number. (Imagine each group of codes as a knob on a TV)
A “G” code from the same group can be replaced by another code in the same group. By doing this, the programmer establishes modes of operation. The universal rule here is that codes from the same group cannot be used more than once on the same line. (We cannot have a knob in two different positions)
There are modal G codes , which, once established, remain effective until replaced with another code from the same group (Like a light switch on a car, turn the switch on it stays on till it is turned off)
There are non-modal G codes which, once called, are effective only in the calling block and are immediately forgotten by the control (Like a horn in a car, it is only on momentarily)
The rules above govern the use of all codes for programming the Haas (and other) controls. The concept of grouping codes and the rules that apply will have to be remembered if we are to effectively program the machine tool. The following is a discussion of the codes most basic to the operation of the machine.
The following two pages display a summary of the G codes, A " * " indicates the default within each group, if there is one:
Code: Group: Function:
G70 00 Bolt Hole Circle (Yasnac) G71 00 Bolt Hole Arc (Yasnac) G72 00 Bolt Holes Along an Angle (Yasnac) G73 09 High Speed Peck Drill Canned Cycle G74 09 Reverse Tap Canned Cycle G76 09 Fine Boring Canned Cycle G77 09 Back Bore Canned Cycle G80 *09 Canned Cycle Cancel G81 09 Drill Canned Cycle G82 09 Spot Drill Canned Cycle G83 09 Peck Drill Canned Cycle (for deep holes) G84 09 Tapping Canned Cycle G85 09 Boring Canned Cycle G86 09 Bore/Stop Canned Cycle G87 09 Bore/Manual Retract Canned Cycle G88 09 Bore/Dwell Canned Cycle G89 09 Bore Canned Cycle G90 *03 Absolute positioning G91 03 Incremental positioning G92 00 Set Work Coordinates - FANUC or HAAS G92 00 Set Work Coordinates - YASNAC G94 05 Feed per minute G95 05 Feed per revolution G98 *10 Initial Point Return G99 10 R Plane Return G100 00 Disable Mirror Image G101 00 Enable Mirror Image (comes with probing) G102 00 Programmable Output to RS- 232 G103 00 Block Look ahead Limit (used in conjunction with P value) G110-G129 Select Coordinate System 7 thru 26, group 12 G154 P1-P99 Select Coordinate System 7 thru 106 (Newer Machines) group 12 G136 00 Automatic Work Offset Center Measurement G150 00 General Purpose Pocket Milling G18 7 00 Accuracy Control for High Speed Machining
M Codes are used by the programmer to turn on and off certain functions of the machine. Think of M codes as codes that turn on and off different Machine Functions.
M00 Stop Program The M00 code is used to stop a program. It also stops the spindle and turns off the coolant and stops interpretation look ahead processing. This is used to force the operator to interact with the machine (such as check a dimension, flip a part over, blow chips from a hole to tap, etc…)
M01 Optional Program Stop M01 works much like M00, providing the OPT STOP mode is ON. If this mode is turned on, the machine will stop at M01, if it is turned off, it is ignored. Often used when the operator has discretion on stopping the machine or not (usually at a tool change)
M03 Spindle Forward The M03 code will start the spindle moving in a clockwise direction at whatever speed was previously set. The machine will stop and wait for acceleration of the spindle to full speed prior to moving to ensure the spindle is ready to make a cut.
M04 Spindle Reverse The M04 code will start the spindle moving in a counterclockwise direction at whatever speed was previously set.
M05 Spindle Stop The M05 code is used to stop the spindle. The block is delayed until the spindle slows below 10 rpm.
M06 Tool Change The M06 code is used to initiate a tool change. The previously selected tool (Tn) is put into the spindle. If the spindle was running, it will be stopped. No previous axis commands are required before the tool change unless there is a problem with tool/part/fixture clearance. The Z-axis will automatically move up to the machine zero position and the selected tool will be put into the spindle. The Z-axis is left at machine zero. The spindle will not be started again after the tool change but the Snnnn speed and gear will be unchanged. The Tnn must be in the same block or in a previous block. The coolant pump will be turned off during a tool change and a air purge will open to keep chips out of the spindle.
M08 Coolant On The M08 code will turn on the coolant supply. Note that the M code is performed at the end of a block so that if a motion is commanded in the same block, the coolant is turned on after the motion. The low coolant status is only checked at the start of a program so that a low coolant condition will not stop a program which is already running.