Results 1 to 5 of 5

Thread: Basic CNC code question from a novice

  1. #1
    Registered
    Join Date
    Jul 2008
    Location
    US
    Posts
    2
    Downloads
    0
    Uploads
    0

    Basic CNC code question from a novice

    I have what is probably a basic CNC question with regards to code for a plasma machine. I am not an operator, but do nests for plasma cutting by using software that does all the work for me. But I would like to better understand the code that the software is spitting out to me, in particular the g-code for kerf compensation left. Suppose I have the partial CNC output below for a 6" square cut from steel.

    I know for fact the G41 code is kerf compensation left. I understand the amount of compensation is dependent on the settings by the CNC operator. When the machine reads the code and gets to the G41 code, what actually happens? The coordinates for linear movement are 6" for each side of the square. However because of kerf compensation, the plasma should actually cut slightly larger so my finished part is 6". However the coordinates remain at 6" in each direction. I am thinking the theoretical cut line must remain the point of reference for the entire program, even though the plasma tip is no longer on this reference line. Otherwise the linear movement coordinates would be more than 6". Its the only way I can make sense of what is happening, but am looking for confirmation from someone who is knowledgable with this. I apologize for the long winded explanation. Hope sense can be made of it. I appreciate any input offered.

    G00X3.0469Y2.9063
    T21
    G41
    M07
    G01X0.Y0.1875
    G01X0.Y6.
    G01X6.Y0.
    G01X0.Y-6.
    G01X-6.Y0.
    G01X-0.0938Y0.
    M08
    G40


  2. #2
    Registered
    Join Date
    Jul 2008
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0
    I don't do plasma but tool width compensation is common.

    You have a pretty good idea of what happens already. It is pretty logical in nature. The compensation is set in the machine as a tool definition. In your example, T21.

    The actual work is done by the software where is looks at the tool path supplied (the g01 codes), looks at the next code to know which is left and right as it depends on the direction it is moving, and then does the compensation based on those values.

    The tool definition is used until it is changed, the compensation is canceled, or program is ended. These are things that are software/machine dependent and most can be changed in how it behaves. Without my reference, I think the G40 is where the compensation is turned off in your code. I run a mill so there are some differences but the basic concept is the same.

    Hope this helps. If I'm off base, I'm sure someone will correct me. This is how I understand things and it seems to work for what I need.


  3. #3
    Registered
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    14
    Downloads
    0
    Uploads
    0
    Compensation works properly when you climb mill.
    You are prob missing the tool diameter or radius designation code in your program (D=whatever) but that depends on your controller.


    G00 G90 X3.0469 Y2.9063 (center point of square?)
    T21
    M07
    G1 G41 G91 X3. F100. D21
    Y3.
    X-6.
    Y-6.
    X6.
    Y3.
    G1 G40 X-3
    M08
    M30

    ... run a test first I wrote this in 10sec so its possibly needs re-work (usually i go off absolute and sub-routine it incrementally)

    Last edited by Abacus; 07-17-2008 at 06:33 PM.


  4. #4
    Registered
    Join Date
    Jul 2005
    Location
    USA
    Posts
    101
    Downloads
    0
    Uploads
    0
    piaengr,

    The software of the controller "offsets" the path to suit the kerf comp value by the operator's input. This allows kerf comp to be adjusted at any point in running the nest tape. Also, the controller "looks ahead" at the programed path and adjust to suit inside/outside corners & "bird-bills" (pointed wedge shape)

    Most controllers transision to kerf comp offset on the first move after the comp code. You will find that kerf comp is turned-off after each part. This is a common practice and is strongly recommended. I don't have an exact answer to why, but all cutting machines I have programmed, whether by "hand" or with post-processor, kerf comp is turned off after each part.

    James


  • #5
    Registered
    Join Date
    Jul 2008
    Location
    US
    Posts
    2
    Downloads
    0
    Uploads
    0

    Thanks to everyone who commented.

    I appreciate your comments.


  • Similar Threads

    1. a very basic fan question.
      By cyclestart in forum General Electronics Discussion
      Replies: 2
      Last Post: 07-06-2008, 07:43 PM
    2. Basic G-Code Question
      By Tazzer in forum G-Code Programing
      Replies: 11
      Last Post: 05-18-2008, 10:21 PM
    3. Very Basic Question
      By H2ODiver in forum General CAM Discussion
      Replies: 4
      Last Post: 07-27-2007, 09:51 AM
    4. REALLY basic Question
      By Dongle in forum Mechanical Calculations/Engineering Design
      Replies: 25
      Last Post: 03-14-2006, 04:47 PM
    5. real basic question.
      By quammi in forum Autodesk Software (Autocad, Inventor etc)
      Replies: 6
      Last Post: 08-21-2005, 04:28 PM

    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.