cncg-code

How to specify tool offset with G41 syntax


Let's say during a side milling operation, a 40mm dia tool is used, so an offset is specified using a syntax as follows:

G41 D4

From what I understand from the above syntax is that, D must be followed by a number obtained by dividing the tool dia by 10. Am I right? I've seen another example where a 25mm dia tool was used and the D there was followed by 2 and not 2.5 (25 divided by 10). How come?

Can you please explain how the number that must be followed by "D" must be obtained.


Solution

  • First of all you should consider there are many different dialects of G-code, you should always mentioned the specifications of the machine you are working with.

    The G41 as mentioned here in LinuxCNC page, indicates the tool. When the value starts with a D it refers to the tool number not the diameter. So D4 refers to the tool number 4 and D2 refers to tool number 2. Also

    if there is no D word the radius of the currently loaded tool will be used

    so I think if you want to indicate the radius of the currently loaded tool you should put

    G41 20
    

    or

    G41 12.5