Results 1 to 4 of 4

Thread: G40 G41 G42 cutter diameter compensation not working

  1. #1
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    82
    Downloads
    0
    Uploads
    0

    G40 G41 G42 cutter diameter compensation not working

    Hello all,

    I'm attempting to get cutter diameter compensation working in Linux EMC but I don't think it's working. First off i'm doing a very simple program, 2 squares with G42 enabled while doing one, and G40 (disabling compensation) for the other. After cutting the 2 squares they are identical in nature, meaning there was no compensation. If i bring up my tools menu it shows Tool #1 as a 0.25 (inch) diameter tool. I set this, closed it, and re-opened and it remembered my value, so i'm pretty sure it realized T1 is 0.25 diameter. Here is the G-Code i'm using:

    %
    (offsettest.dxf)
    G17 G20 G42 G64
    G00 F120 T1
    Z1.050000
    G00
    X0.000000 Y0.000000
    G01 F60
    Z0.000000
    G01 F30
    X1.000000 Y0.000000
    X1.000000 Y1.000000
    X0.000000 Y1.000000
    X0.000000 Y0.000000
    G01 F60
    Z1.050000
    G00 G40
    X2.000000 Y0.000000
    G01 F60
    Z0.000000
    G01 F30
    X3.000000 Y0.000000
    X3.000000 Y1.000000
    X2.000000 Y1.000000
    X2.000000 Y0.000000
    G01 F60
    Z1.050000
    %


    As you can tell in the begining i'm using G42 to cut the first square, and then G40 for the second one to cancel it out. The first G00 line sets the tool as T1, perhaps I should set T1 on the first G01 line? I wouldn't think that I would need to set it multiple times...

    I'm not expert at G-Code by any means at all, I'm hoping i've done somethign stupid, the g-code was generated from a custom program I wrote. The setup line is just what I saw somewhere else, read all the codes and made sense for my application. I can generate G-Code for many other things, and actually wrote an algorithm for compensation in my program, but would like to use the offset as that would allow multiple tool diameter's for the same g-code.

    Any help is appreciated,
    Thanks,
    Ross


  2. #2
    Registered
    Join Date
    Sep 2004
    Location
    USA
    Posts
    149
    Downloads
    0
    Uploads
    0
    Try this:

    %
    (offsettest.dxf)
    G17 G20 G64
    G00 F120 T1
    Z1.050000
    G00
    X0.000000 Y0.000000
    G01 F60
    Z0.000000
    G01 F30
    G42 D(***whatever your tool number is***) X1.000000 Y0.000000
    X1.000000 Y1.000000
    X0.000000 Y1.000000
    X0.000000 Y0.000000
    G01 F60
    Z1.050000
    G00 G40
    X2.000000 Y0.000000
    G01 F60
    Z0.000000
    G01 F30
    X3.000000 Y0.000000
    X3.000000 Y1.000000
    X2.000000 Y1.000000
    X2.000000 Y0.000000
    G01 F60
    Z1.050000
    %


  3. #3
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    82
    Downloads
    0
    Uploads
    0
    I think i just realized you have to use D codes in order to get the compensation to work. But there were 2 different statements I read. D uses either the specific radius like D0.25 or the tool number like D1.

    I'll go ahead and try both, not sure if some packages work differently, I used Linux EMC, so i'll try D1 first then if if doesn't seem right i'll try D0.25

    Ross


  4. #4
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,286
    Downloads
    0
    Uploads
    0
    You need to add a leadin move or 2 for comp to work right in EMC, I believe. Look at the examples shown in the docs.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.