Page 1 of 2 12 LastLast
Results 1 to 12 of 20

Thread: G2 and G3 Commands

  1. #1
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default G2 and G3 Commands

    Being new to GCode, I need some help understanding of usage of the G2 and G3 commands.

    How is G2 and G3 used with I, J, and R in controlling the size of arc generated? and... What's a good way to have my X-Y table generate a 0.500 R circle once, and one that goes infinitly in a circle?

    FYI - My application of GCode will be for controlling an X-Y table inside an electron beam machine with a fixed gun. I also prefer to use incremental movements and presently begin my circles now from a 9:00 starting position.

    Any help would be much appreciated.

    Similar Threads:


  2. #2
    Registered
    Join Date
    Oct 2006
    Location
    US
    Posts
    51
    Downloads
    0
    Uploads
    0

    Default

    for milling, g02 is clockwise, g03 is counter-clockwise.
    if this an inside circle, starting from 9:00 it would be
    x-.500y0
    g03 i.500.
    this is climb milling

    to conventional mill
    x-.500y0
    g02i.500

    think of i as x, and j as y
    x0 y.500
    g02j-.500



  3. #3
    Registered
    Join Date
    Mar 2007
    Location
    USA
    Posts
    135
    Downloads
    0
    Uploads
    0

    Default

    Hi, as Hira said on the g2 & g3. The I designates the center of the radi point on the x axis and j is for the y axis and k is for the z. If you need a r (radius) value, you are using software that is not real common, like that free stuff. I think its best you learn a fanuc post which is most common, like in Artsoft Mach3, cnc pro, Hass machines, Fadel machines, etc.. Also remember, in the LINE AFTER ANY CIRCLE (which includes a g2 or g3) make sure you put a g1 or g0 for feed or rapid, because on some machines, if that is not there, any axis will just go anywhere untill you hit a limit, even if it means crashing through things. Proof: Bridgeport boss 7.2 and i have seen this on other machines also. Good Luck.



  4. #4
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default

    Thanks you two for the explainations. I only have a bench setup to look at while making this, but I think I can go once around with this program I made...

    N10 G20 G91 F20
    N20 G03 X-0.25 Y0.0 I0.25 J0.0

    As I said, I can't see the circle generated. That, I think, will produce me a CCW 0.500 circle starting and ending from 9:00 moving incrementally.

    How can I get that circle to repeat 5 time without having to have repeat N20 5 times? And finally, how can I get that program looped infinitely? Is there a loop command thats commonly used? I tried M97, but that didn't seem to work.



  5. #5
    Gold Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    12137
    Downloads
    0
    Uploads
    0

    Default

    For a complete circle you only need I and J.

    G02 I0.0 J-0.25 will give a single circle of diameter 0.500 with the center located -0.25 away from the start point along the Y axis. At least that is how Haas machines work; some machines would put the center at 0.25 absolute.

    Again on the Haas adding an L count gives you that many circles.

    G02 I0.0 J-0.25 L10 gives ten complete circles.

    Infinity is not allowed in the L count but then you would be a bit old by the time it finished wouldn't you?

    An open mind is a virtue...so long as all the common sense has not leaked out.


  6. #6
    Registered jackson's Avatar
    Join Date
    Oct 2006
    Location
    United States
    Posts
    586
    Downloads
    0
    Uploads
    0

    Default

    N3000
    (.500 Endmill)
    G0g20g54g90g17s3000m3
    G0x0y0t4
    G43z.1h3m8
    G1z-.35f20.
    G1y.03
    G3x0y.03j-.03d03f3.
    G1x0y0f10.
    G0g40z1.
    M21
    G0g43h3z.1
    G1z-.35f20.
    G1y.03
    G3x0y.03j-.03d03f3.
    G1x0y0f10.
    G0g40z1.m9
    G91g28z0
    M1
    M6

    individual who perceives a solution and is willing to take command. Very often, that individual is crazy.


  7. #7
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Geof View Post
    Infinity is not allowed in the L count but then you would be a bit old by the time it finished wouldn't you?
    LOL, my unit is Camsoft Pro and will be operating an X-Y table of our design. I tried what you suggested Geof but it didn't work, thanks tho.

    I'm not sure what exactly that is Jackson, what is that?

    Last edited by Bohemund; 05-18-2007 at 05:51 PM.


  8. #8
    Registered jackson's Avatar
    Join Date
    Oct 2006
    Location
    United States
    Posts
    586
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Bohemund View Post
    LOL, my unit is Camsoft Pro and will be operating an X-Y table of our design. I tried what you suggested Geof but it didn't work, thanks tho.

    I'm not sure what exaclty that is Jackson, what is that?
    you just need to read to the m21, the m21 is for my 4th axis to spin the part
    but that is your g3 code

    individual who perceives a solution and is willing to take command. Very often, that individual is crazy.


  9. #9
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default

    I fail to follow what your saying.

    I'm looking for a way to loop my program without needing to repeat a program line. I'll do it if I have to, that's not a problem. Is there an alternative way that's commonly used?



  10. #10
    Registered
    Join Date
    Jun 2006
    Location
    Denton
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default

    This code is used in mech soft, your welcome to try it in your program:
    **to repeat gcode indefinitely:
    ****************************



    %
    N1 (first line of gcode)
    G20 G00 etc.
    ...
    .
    ..
    .
    .(more lines of code)
    .
    .
    M1
    M99 P1
    %



  11. #11
    Registered
    Join Date
    Nov 2005
    Location
    USA
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default

    To continuously loop your program it's just an M99 at the end. but to stop it you'd have to hit the reset button.
    You might do this instead...
    ;
    ;
    /M30;
    M99;
    %
    This way you can keep the block delete switch on and it will ignore the M30.
    When you're ready to stop the program just flip block delete to off to read the M30.



  12. #12
    Registered
    Join Date
    Mar 2005
    Location
    USA
    Posts
    1498
    Downloads
    0
    Uploads
    0

    Default

    If you have the GOTO function, then

    N100
    program
    GOTO 100

    This is an infinite loop. You stop it by turning power off or a RESET, or put a conditional test inside the program that jumps (GOTO) outside of the loop.

    .



Page 1 of 2 12 LastLast

Posting Permissions

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


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