You might have noticed in the coding examples on the pages for the G-codes on this website that I use the code G41, G42 and ending with G40 on nearly every contour that I have written. On this page I will go deeper into the meaning of these and how to use them. I will start with a very basic example to explain how radial compensation works. Also in the section on G76 there is an example that show the difference between unsing and not using radial compensation.
I will give a short example on what the difference is between using and not using radial tool compensation with a simple contour.
G0 Z5 X10
G1 Z0 F0.1
G1 X25
G1 Z-15
G0 X40
In the above example I make a simple corner with absolutely nothing fancy. This is not good regardless of application and will make a sharp corner on the position X25 Z0 which will likely give you a little cut when handling the part. Using tool compensation and/or G75/G76 we can remedy this problem. First I will rewrite the code and only add tool compensation.
G0 Z5 X10
G1 Z0 F0.1 G42
G1 X25
G1 Z-15
G0 X40
G40
In this case the direction of the tool is right which means I use G42, if it were left I would use G41, the direction is VERY important when using tool compensation. And I then end the contour by writing G40, end tool compensation.
What the compensation does compared to the previous code is that the tool will travel in a small quarter circle when getting to the X25 Z0 corner, the radius of this quarter circle will be the radius on the tool. But despite this the edge is very likely to remain sharp and to remedy this we use G75 or G76, I will continue this discussion with G76 as it makes the point clearer.
So let's return to the example above but replace the sharp corner with a fillet and switch between the using and not using G42. First the same code as above but with a G76.
G0 Z5 X10
G1 Z0 F0.1 G42
G76 X25 L0.3
G1 Z-15
G0 X40
G40
The code will make a fillet with radius 0.3mm at the given corner and now I will give an example which may look like it will make the same thing and explain why it won't.
Also, assume that the tool has a radius of 0.4mm
G0 Z5 X10
G1 Z0 F0.1
G76 X25 L0.3
G1 Z-15
G0 X40
Notice that I have only removed the G40's from the code but the corner will be very different when you machine it. The corner is this case will actually be sharp because the tool radius is larger than the radius of the fillet, 0.4 > 0.3, and this will make the tool travel outside the corner when going around it. One remedy to this is of course the coding example given above using G42 but there is another way, which as mentioned earlier is touched upon in the section on G76.
Here is "the other way" to remedy a sharp corner
G0 Z5 X10
G1 Z0 F0.1
G76 X25 L0.7
G1 Z-15
G0 X40
Notice that I have only raised the L-value compared to the code above which gave me a sharp corner, the key here is the amount I raise the value of L. The value of L is now 0.7 compared to 0.3 as it were above, this will allow the tool to make a fillet with size 0.3 on the corner because the tool has radius 0.4 and 0.7 - 0.4 = 0.3 so hence the size of the fillet.
These numbers only work under this particular condition, let me generalize the situation.
Let's use the code from before as base but lets generalize the radius of the tool and the size of the fillet.
Let the tool have radius R_t and let the fillet have radius R_f
G0 Z5 X10
G1 Z0 F0.1 G42
G76 X25 LR_f
G1 Z-15
G0 X40
G40
The above code will make a fillet with radius R_f regardles of the radius of the tool, this is the effect of radial tool compensation. If I want to get the same result witout using radial compensation I can write the code like this.
G0 Z5 X10
G1 Z0 F0.1
G76 X25 LR_f+R_t
G1 Z-15
G0 X40
This give me a fillet with radius R_f just like in the previous code. The downside of using this method is that I will have to check and problably change the L-value in the program every time I use a tool with a different radius. This will be very tedious and I would recommend using radial tool compensation with the G40's any day of the week in comparison to writing out the value of the chamfer plus the tool radius.
Radial compensation is very important when making contours, one application of which is roughing, which can be done with a G81 cycle.
In the sections above I have given a solid introduction to the use of radial tool compansation but with the downside that I have only been G42 which is right tool compensation. Terefore I will now explain the diffenrence between G41 and G42.
The basic difference between G41 and G42 is that G42 that I have been using above is used when the tool is on the "right" side of the part. What this means in turning is that the tool start at the egde of the contour which is closest to the Z-axis and then go up in X so that the tool move around the part counterclockwise. The G41 on the other hand is used when the tool travels towards the Z-axis and thus moves around the part clockwise.
It is common from my experience that G41 is used when making internal contours while G42 is used when making external contours.
As G42 has already been used in an example abone I will give an example of when G41 is used.
G0 X45 Z5
G1 Z0 F0.2 G41
G75 X42 L1
G1 Z-15
G75 X35 L0.5
G1 Z-26
G1 X32
G40
G0 Z5
In the above coding example I make an internal contour which use the G41 left compensation. If I would have replace the G41 with G42 the tool would first go deeper in Z than intended and it would make the diameter of the internal contour larger. This is because the machine would interpret that the tool should travel on the right side of the contour and not the left. With cases such as the one above the easiest way to notice if you have been using G42 instead of G41 is that there is a ring with a depth of usually a little less than 0.5mm at the beginning of the contour.
The G74 expansion show how to make grooves in the end surface around the Z-axis. For this particular section we are not interested in the G74 cycle but in the contours that follow. In the code below taken from the mentioned section there are two contours with different directions and G40's.
G97 S1200 M03 M08 G95
G00 X80 Z12 T080808 (AXIAL BLADE 2.5MM)
G74 X90 Z-3 F0.09 D1 L4 E0.1 K10 I1.6 T18 (***T18***)
G00 X78 Z2 T08 (*****T08*****)
G1 Z0 F0.05 G42 (***G42***)
G75 X80 L0.5
G1 Z-3
G1 X83
G40
G1 Z2 F0.5
G00 X92 Z2 T18 (*****T18*****)
G1 Z0 F0.05 G41 (***G41***)
G76 X90 L0.5
G1 Z-3
G1 X86
G40
G1 Z2 F0.5
M09
G0 Z50
G0 X999 Z999 M9 M5
What is particularilly interesting about the example above is the switch of tool positions on the blade. Note that I am using the tool data from T08 to make the contour with G42 while I am using the tool data from T18 to make the contour with G41. This is because the T08 has been given tool position 3 and will be used to make the contour with the lower radial value(the inner side) while T18 has been given tool position 2 and is used to make the contour of the edge with the higher radius(the outer side).
Association
Ooper is associated with Foos Engineering, feel free to visit the Foos Engineering website.
2024 Copyright © All rights reserved