Lesson 4: Essencial Stuff about Work Offsets, Tool Length Offsets, G54-G59, Part Zero, G43 HOctober 3, 2015, 9:03 pm
October 3, 2015, 9:03 pm
May 19, 2017, 9:10 pm
Sat January 25, 2020, 4:45 am
Sat January 25, 2020, 4:45 am
Before we run any G-Code program, we need to tell the machine where our part zero is.
A Part Zero is simply a bunch of numbers that offset axis to give machine a new coordinate point to work from.
Work Offsets is one of the most basic pieces of knowledge any machinist must have.
Let us account for all the basic coordinate systems and definitions, available in a generic CNC machine
- Machine Home and (Absolute) Machine Coordinates
- Work Offset Coordinates
- Tool Length Offsets
Machine Home and Machine Coordinates: G53
Machine Coordinates (or Absolute Coordinates) is the absolute and constant representation of machine axis position.
These coordinates never change between Machine Restarts and must remain such. In fact there is often no way for an operator to adjust Absolute Machine Axis Home position.
Machine Home is simply that magical place where all Machine Coordinates should become Zero.
To Home the Machine is to start a machine operation, that will move all Axis to their soft limit position where X,Y and Z axis reading will be set to zero.
Homing must be done every time you restart your machine. Without it machine does not know where is the position of its table or spindle.
When homed your machine coordinates will read X=0 Y=0 and Z=0 and it is going to look like this:
The point where Machine X and Y intersect is called Table Home Position and the one where the Machine Z axis starts from is called Spindle Home.
Now, there is no agreement between machine tool manufacturers on where the machine home should be.
Many manufacturers put home in the position where i show on the picture - this way all our Machine Coordinates will be negative.
Others put Table Home to the lower left corner and then X and Y Machine coordinates will be positive.
There are few sick ones, who will put their machine's home position on other (Top Let or Bottom Right) corners and then one of the Axis will be positive while the other one-negative.
But in the end it does not really matter. As nobody uses Machine Coordinates to machine their parts. All it does however is confuses operators and sometimes makes them do silly mistakes.
It does not mean, however, that Machine Coordinates are useless for the operator. They are often used to position table at the end of the operation for easy loading/unloading or whenever a table needs to move to a safe place for extra-long tool change: any place where absolute nature of Machine Coordinates is a benefit.
Absolute Movement can be programmed with G53 code. It is often NON-modal and requires either G01 or G00 motion mode enabled and at least one of the X,Y or Z coordinates.
(move table close to the operator)
G00 G53 X-20.0 Y0
This brings us to the...
Work Offset G54 - G59
Also called Part Zero.
As mentioned before, Work Offsets allow us to specify new coordinate systems based of the relative distance of our Part Zero from the Home Position:
In this picture G54 offset will be X=-20.000 and Y-11.000
Each Work Offset is stored in Machine Work Offset Table. This way our program do not need to specify where the part is in relation to the Machine Home.
Your typical Work Offset Table will look like this:
Work Offsets are activated using G-Codes G54 through G59
A proper Work Offset should be commanded before any absolute move is made.
Typically Work Offset is commanded right after a tool change is made:
G54 G0 G90 X0 Y0 S1500 M3
Work Offset commands are modal and they persist until another work offset command cancels it, machine gets rebooted, or it gets overridden by a work offset modifier.
X and Y axis Offsets signify the distance from the Machine Home to the Part Zero and Z-Offset value signifies the distance from the Part Zero to the spindle nose in Z Direction.
Looking at the table above it is obvious that something does not quite match the picture: Indeed we have a tool in the spindle.
And because different tools tend to have different Lengths, distance the Spindle has to travel from its Home to the Top of the part will vary as well!
Thus, to account for different Tool Lengths another offset table was introduced.
Tool Length Offset: H1-H99
Tool length offsets allow machine control to account for the fact that different tools have different Tool Lengths.
Application of Tool Length Offset ensures that Programmed Depth of the cut matches the actual depth of machine movement into the work piece (or above it).
In other words: Both the T01 that is 3.0 inches long and the T02 that is 5.0" long will move to exactly 0.2" above the part when commanded G00 Z0.2
When the Tool Length Offset is applied, machine adds the Tool Height to the Work Z-Axis Offset. In such case Tool Offset means the distance from the Spindle Nose to the tip of the cutter:
(Please Note that the setup method shown above, while easy to comprehend and wrap ones mind around, is not the most practical in terms of manual setup and is mostly used on machines, equipped with an ON-Line or OFF-Line tool pre-setter and/or work probe.
Please see the next article where we explore and compare the two different tool set-up methods.)
Tool length offset is activated with a G43 code, followed by the letter H and then by the address of the length offset in the Machine' Tool Length offset Table.
Typically during programming, in order to prevent crashes and mishaps, Tool Length Offset always matches the Tool Number. But nothing stops you from not following this rule when the situation calls for that.
Tool Length offset must be applied of the very first absolute Z-Axis Move after the tool change:
T15 M6 (tool change)
G54 G0 G90 X0 Y0 S1500 M3 (Apply work offset, Turn on the Spindle)
G43 H15 Z2.0 (Apply Tool Length Offset while Moving to the Clearance Height)
This is a very quick overview of the basic Work and Tool offsets available for a CNC Milling Machine.
In later articles i will explore alternative methods offsetting Tool and Work Offsets, Work offset modifiers and extended work offsets available on most machines.