603,359 active members*
4,842 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    169

    Question simple newbie question

    I just finished my first cnc and spent several weeks reading The cnc workbook by Nanfara,Uccello,Murphy in an attempt to learn g-codes. Thought i understood them but i was wrong.Question is im trying to cut a very simple part only using the x and y axis. I am trying to cut a part that looks like a comb. That is, the cutter starts at point a,then the y axis moves back toward the column in the + direction cutting into material, then back out, then to the right,the x+ direction, then forward again and out.Basically cutting forward,back,over in the x,forward,back,over,forward,back,over,etc. The workbook states i have to put a - or + before each axis like so-

    %
    g90 gg20 (absolute and inch programming)
    y-0.972 (moving forward)
    y+0.972(moving back)
    x+0.297(moving to the right)
    y-0.906(moving forward)
    y+0.906(moving back)
    x+0.297(moving to the right)
    y-0.873(forward)
    y+0.873(back)
    etc, forward,back,right,forward,back,right.
    I havent seen any + or - in any g-code samples anywhere except for the z-axis,and i am wondering how does the controller know to make the table move right or left, forward or back? can someone show me a brief sample of how i should be writing this? thanks for any input anyone can give.

  2. #2
    Join Date
    Dec 2003
    Posts
    24260
    With practically all CNC machines the + is not required for move in the positive dir., although it would just be ignored. In absolute positioning, which is what you are using the only time you need the - sign is if you are crossing over the zero point in the opposite direction, this applies to any axis. It looks to me as though you have mixed absolute programming with relative moves.
    Al
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Mar 2004
    Posts
    169

    Question g-codes

    Thanks Al, But im still not sure if i understand.How does the controller know which way to send an axis if there are no + or - in the code? I have seen parts cut in both directions and there were no + or - in the codes with the exception of the z-axis. Thanks

  4. #4
    Join Date
    Mar 2003
    Posts
    35494
    Because the code uses absolute coordinates. Your machine has an origin, whereX=0 and Y=0.

    G1 X6 will move it 6" in the positive direction
    G1 X12 will move it 6" more in the positive direction
    G1 X6 will now move back 6" in the negative direction

    MOst machines are set up so that all the cutting is done in the positive direction, so no - are needed. It is possible, though, for your origin to be located anywhere on the machine.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

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

  5. #5
    Join Date
    Mar 2004
    Posts
    169

    Talking g-code

    I get it now Ger, Thanks alot.

Similar Threads

  1. Compatibility question (newbie)
    By Jan-Roger in forum DIY CNC Router Table Machines
    Replies: 13
    Last Post: 10-07-2008, 02:21 PM
  2. Newbie question: how do I machine this? (Drawing attached)
    By Aegeon in forum MetalWork Discussion
    Replies: 20
    Last Post: 12-04-2005, 08:20 PM
  3. newbie AC Servo question
    By GalaticDan in forum Servo Motors / Drives
    Replies: 3
    Last Post: 10-31-2004, 05:25 AM
  4. Newbie question
    By sdrc92126 in forum Benchtop Machines
    Replies: 3
    Last Post: 09-02-2004, 08:11 AM
  5. Newbie question on drill bits
    By ezland00 in forum DIY CNC Router Table Machines
    Replies: 4
    Last Post: 02-27-2004, 09:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •