What Gcodes I will need:
After some reading, there are a couple functions that have to do with offsets: G43, G52, G54-59 and G92.
For my purposes, being a simple home cnc'r, I am most interested in just using G43 for my tool offsets and possibly G54 for when I want to replicate a part a few times on one blank piece of aluminum.
G52 is a temperary offset that I can't really image a use for yet and G92 is an obsolete command that was a predicecor to G50 (at least from what I have read on the interweb)
How G43 (on the RS274/Kflop) works for me:
The way the G43 works is that you will find 0 for the z-axis (I'll get into that later) then take each tool you want to use and find out the offset from what we are calling 0.
Since I don't have a "master" tool that I will use for finding 0 on the z-axis, I will always calibrate 0 on the z-axis with tool #1. So, I put tool 1 in the machine, run the z-axis until the tip touches the top of the piece (I use the top of the piece as 0 for my plastic molds). Then, set the axis to 0 in Kflop.
Then, I take each remaining tool and touch them to the work piece. I read the z-axis position from the screen and enter that value into the tool setup table.
What actually happens during production:
Now that I have set up the tools, all I need to do is tell the program how to adjust the tool height in order to make the tool cut at the right depth.
I put the following code in the program: G43 H[tool number]
This will cause the z-axis to move to the appropriate position. For example. If the z-axis is at 0 and the execute a G43 command on tool 3 (with an offset of .5"). The z-axis will move up .5" and assume that is the new 0.
Additionally, you can add a move command into the G43 command to take the z-axis to a starting or safe position:
G43 Z0.4 H3 //This command would offset for Tool 3 and move the Z axis to 0.4 which is my clearance height.
How to remove the offset:
Once I am done with the offset, I can either enter a new tool offset or disable the offset using the G49 command:
G49
From http://en.wikipedia.org/wiki/G-code
G43 | Tool height offset compensation negative | M | Takes an address, usually H, to call the tool length offset register value. The value is negative because it will be added to the gauge line position. G43 is the commonly used version (vs G44). |
G50 | Position register (programming of vector from part zero to tool tip) | T | Position register is one of the original methods to relate the part (program) coordinate system to the tool position, which indirectly relates it to the machine coordinate system, the only position the control really "knows". Not commonly programmed anymore because G54 to G59 (WCSs) are a better, newer method. Called via G50 for turning, G92 for milling. Those G addresses also have alternate meanings (which see). Position register can still be useful for datum shift programming. | |
G52 | Local coordinate system (LCS) | M | Temporarily shifts program zero to a new location. This simplifies programming in some cases. |
G54 to G59 | Work coordinate systems (WCSs) | M | T | Have largely replaced position register (G50 and G92). Each tuple of axis offsets relates program zero directly to machine zero. Standard is 6 tuples (G54 to G59), with optional extensibility to 48 more via G54.1 P1 to P48. |
G92 | Position register (programming of vector from part zero to tool tip) | M | T (B) | Same corollary info as at G50 position register. Milling: Always as above. Turning: Sometimes as above (Fanuc group type B and similarly designed), but on most lathes (Fanuc group type A and similarly designed), position register is G50. |