586,106 active members*
3,134 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2009
    Posts
    458

    G-Code Help Needed

    First of all let me state that I presently don't even own a CNC machine. It will be about three more months till I have the funds to buy my first CNC Mill.

    In the mean time I've been (past several months) working strictly on CNC Simulators just to try to get up to speed.

    For training purposes I started using the free "G-Simple" program offered over the internet. For the most part, I think I have it pretty well figured out except for some it's more elaborate nuances.

    After I make my drawings and converting them to G-Code, I then transfer the files over to a more detailed Simulator just to confirm that my G-Code works in Simulator programs other than the Rudimentary-Simulator that comes with the G-Simple program.(CNCesPRO)

    Lastly, I'll transfer that same G-Code over to the Mach3 program because it's the Controller program I intend to use with whatever CNC Mill I end up buying.

    Here's my Questions:

    I'm attempting to make a cast lead bullet mold. Drawing it up is easy enough. Creating the basic G-Code to machine my parts is also fairly simple.

    The point where I start running into problems is in trying to figure out how to go about milling my bullet cavities with my "Cherry."

    With my two bullet mold halves side by side I can pre-drill my bullet cavities to pretty close (dimensionally) to where I need them to be but, after that I'm not sure if I should finish these same cavities as G-Code written for a vertical "Pocket" or, if I should separate the two mold halves and machine the bullet cavities one half at a time.

    Ideally I'd like to pre-drill my bullet cavities and then, with a smaller diameter "Cherry/Reamer," insert it down into the center of my pre-drilled holes and program it to Ream-outward until I get the dimensions I'm wanting.

    Unfortunately for me, the G-Simple program will not recognize tools such as "Cherry/Reamers." And my attempt at using a substitute tool such as an end mill or drill -just so I can generate the G-Code- brings up warning messages.

    I said all of this just to ask, how would some of you more experienced G-Coders go about reaming out the final dimensions of these bullet cavities?

    I've included an image of one of the bullet molds I eventually hope to make up. My ramblings sometimes don't make any sense unless you have a visual idea of what I'm trying to accomplish.

    Thanks in advance to any who can offer suggestions.

    MetalShavings





  2. #2
    Join Date
    Mar 2003
    Posts
    35538
    Can't help you with your actual questions, but I have a recommendation.

    Download Mach3 and install it, and use that as your simulator. You'll need to set up motors as if it was running a machine, but you don't need a machine connected to use it. The demo version is limited to 500 lines of code, but you'll be learning how to use Mach3 at the same time.
    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)

  3. #3
    Join Date
    Dec 2009
    Posts
    458
    Greetings ger21:

    I had just about given up hope of anyone other than the software sales person CNCgirl34 replying to my inquiry. (even though she seems to have offered a little more help than some of the more knowledgeable and long time members of this forum.)

    I appreciate both of you taking the time to respond.

    The fact is, the Mach 3 controller program was one of the first programs I installed on my computer. I knew eventually I'd be using it on whatever CNC mill I end up with.

    As I stated above, after I make up my CAD drawings and convert them to G-Code I then transfer the files to the CNCesPro simulator because it has a more detailed screen that allows me to see my G-Code running as if it were on an actual CNC Mill.

    I can also tweak my G-Code if needed and then I load it into the Mach 3 program for a final check.

    For the most part I've more or less got the basic G-Code programming under control. (at least for the kind of parts I'll be using it for.) It's the part about the Circular Interpolation that's giving me fits.

    I can use my CAD software to make a drawing that includes the type pockets I have in mind. And I can just let my CAM software come up with the G-Code for it but, I want to learn how to write the appropriate G-Code myself. Those "I, J's and K's are driving me nuts.

    There are times when relying on a software program to write my G-Code will only get me so far. For specialized pockets like the one I described in my initial post, I have to hand write the appropriate code.

    In leu of any replies from this post I've been allowing my CAM software make up some G-Code on specific pocket shapes then going back and methodically running them one block at a time in an effort to figure out how they work.

    I must have some sort of dyslexia thing going on because, unfortunately for me, trying to learn it by reading about this kind of stuff does very little in terms of actually figuring out how it works.

    Unless I can have the subject of Circular Interpolation being explained to me at the same time it is written and then applied, it's difficult for me to comprehend.

    The fact that I suck at math doesn't help matter either.

    I'll just keep plucking away until I figure it out. Just in case there's anyone reading this who's just chomping-at-the-bit to state the obvious, I have signed up for a CNC programing class but, it doesn't start till the spring of next year.

    Thanks again for your reply.

    MetalShavings

  4. #4
    Join Date
    Mar 2003
    Posts
    35538
    The I, J, and K specify the center point of the arc.

    I=X
    J=Y
    K=Z

    ONly two at a time are used, depoending on which plane you're working in. Usually, it's the XY plane (G17?), so you use I and J.

    Now, there are two IJ modes. Absolute and Incremental. Incremental is the most common from what I've seen.

    In Absolute IJ mode, the I and J coordinates are the center point of the arc.

    Say you start at 1,0, and want a 90° arc with a 1" radius to 2,1. The center of the arc is 1,1, so:
    G1 X1 Y0
    G3 X2 Y1 I1 J1

    In incremental, the I and J are relative to the start of the arc. Subtract the start coordinate from the center coordinate. Using the same example from above, the arc starts at X=1, and the center is X=1, so I = 1-1 = 0. Arc starts at Y=0 and center is Y=1, so J=1-0 =1. So, in Incremental IJ mode, you'd have

    G1 X1 Y0
    G3 X2 Y1 I0 J1

    Make sense?
    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
    Dec 2009
    Posts
    458
    Hi Gerry:

    "Does It Make Any Sense?"

    Actually, at this point in my CNC learning curve it's like trying to read Egyptian
    hieroglyphs cause, I don't understand those either.

    Over the past month and a half or so I've tried to look up as many types of tutorials and
    written explanations of how Circular Interpolation is calculated and applied.

    Although all of these explanations and tutorials seem to be written clearly from the writer's point of view, from the point of view of the one trying to learn this stuff it is, -as I stated above- like trying to read Egyptian hieroglyphs. I feel like a Third-Grader trying to learn college level stuff.

    The frustrating thing about it is that I know it's most likely as easy as you make it out to be. At this point in time it just hasn't clicked in my mind. I can't possibly be the only one into CNC programming for whom the subject of Circular Interpolation has been a hurdle. When you're the one going through this rough spot, it sure feels like it though.

    Do you know of any online tutorials relating to Circular Interpolation? It could be that I've missed one that explains it in such a way that a Third-Grader could understand.
    (the more visuals that go along with the tutorial the better.)

    I don't want to end this reply without thanking you for your efforts. I'm afraid that in my frustration I come off sounding less than respectful and offensive.

    Many thanks for your help. If you think of something else that may be able to help me, I invite you to please let me know.

    Tim M.

    MetalShavings

  6. #6
    Join Date
    Mar 2003
    Posts
    35538
    Sounds like you need pictures. I'll try to throw something together later if I get a chance. If you don't see it, remind me and I'll do it this weekend.
    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)

  7. #7
    Join Date
    Sep 2010
    Posts
    1230
    A picture is sometimes worth a thousand words.
    Starting at X1 Y0 and moving through a CCW 90deg arc of 1, to get to X2 Y1 with a circle center of X1 Y1, is pictorially shown in the left image and the code is as ger21 stated

    (I and J indicating the arc center, absolutely)
    G1 X1 Y0
    G3 X2 Y1 I1 J1

    (I and J indicating the distance and direction from the start point to the circle center, incrementally)
    G1 X1 Y0
    G3 X2 Y1 I0 J1

    The right image shows an arc starting from, and finishing at the same points in the first example, but with different center coordinates and direction of arc. To finish at the same end point with the different circle center and still with the 90deg arc, the direction of travel needs to be CW and is programmed as follows

    (I and J indicating the arc center, absolutely)
    G1 X1 Y0
    G2 X2 Y1 I2 J0

    (I and J indicating the distance and direction from the start point to the circle center, incrementally)
    G1 X1 Y0
    G2 X2 Y1 I1 J0

    From these examples, I'm sure you will see the importance of describing to the control where the circle center is, and the direction of arc travel.

    If the control requires the circle center to be described incrementally, imagine yourself standing at the start point of the arc and determine the direction, plus or minus, and the distance along the X and Y axis you have to travel to get to the circle center.

    I hope this makes sense.

    With regards to your bullet mould, I manufacture high end target rifle actions and accordingly, I understand the requirements of the finished bullet. Put some dimensions on the projectile cavity component of your drawing, and I'll give you my opinion on the best way to machine the cavity.

    Regards,

    Bill

    [Click image for larger version. 

Name:	Circ2.JPG 
Views:	154 
Size:	8.2 KB 
ID:	118923 Click image for larger version. 

Name:	Circ1.JPG 
Views:	138 
Size:	8.7 KB 
ID:	118924

  8. #8
    Join Date
    Dec 2009
    Posts
    458
    Hi there Bill:

    I looked over your drawings and explanation last night. The images really do help a little more than simply reading about this stuff and trying to picture it in one's mind.

    I hand wrote a short sequence of G-Code using yours and Gerry's descriptions last night. I then ran it on one of my simulators and low-N-behold it seemed to work.

    Actually I ran into a couple of snags but the simulator software picked up on it and automatically calculated the correct numbers to replace the incorrect numbers I had used. I had entered incorrect "I" and "J" numbers.

    I appreciate both you guy's help. I'm starting to see faint glimmers of light at the end of this tunnel. (so to speak)

    Now I have to go back and figure out where my math went wrong.

    The sample drawing of the bullet mold I included in my initial post is just one of several that I've put together in hopes building them on a CNC Mill. To date I've been using my small bench top manual mill and metal lathe to build these bullet molds.

    When you have to work for a living and do these kinds of builds when you get a little free time, it seems to take for ever.

    I picked up a Big Bore .45 caliber Air Rifle earlier this year and these bullet molds are made to cast dedicated bullets/projectiles specifically in these Air Rifles.

    These Air Rifles will shoot just about any .45 caliber cast slugs provided they are sized correctly. The vast majority of the cast projectiles fired from these Big Bore Air Rifles are basically pistol and Black Powder Rifle bullets.

    I've been trying to come up with a bullet design that optimizes the Internal, External and the Terminal Ballistics of these Air Rifle projectiles traveling at the relatively slow velocities that they are known for.

    The incorrect numbers I eluded to above with respect to calculating the correct "Starting and Ending" points of my arcs were due to the fact that when having to make these calculations with odd numbers rather than nice round numbers like, one inch, two inches, etc., kind of throws a monkey-wrench in the works for me.

    If my simulator software hadn't picked up on it and given me the correct numbers I may have never figured them out on my own.

    I'll make up a sample drawing of the type of dimensions and pockets/bullet cavities I'm wanting to be able to write G-Code for.

    I'm a little closer to understanding how these Circular Interpolation calculations work. Maybe with these new drawing I come up with your further explanations and suggestions, it will finally get things to click in my mind to where I can move on from here.

    Thanks for your input.

    Tim M.

    MetalShavings

Similar Threads

  1. Converting Fanuc G code to Seimens 840D G code
    By Jasbinder in forum SIEMENS -> Sinumerik 802D/808D/810D/828D/840D
    Replies: 2
    Last Post: 02-20-2011, 05:02 PM
  2. Replies: 8
    Last Post: 12-15-2010, 09:32 PM
  3. Designing an 8' by 4' machine - need some wisdom!
    By elitechicken in forum DIY CNC Router Table Machines
    Replies: 17
    Last Post: 06-25-2010, 06:28 AM
  4. Ink Express/wisdom
    By pucon in forum Laser Engraving / Cutting Machine General Topics
    Replies: 23
    Last Post: 07-25-2007, 06:18 AM

Tags for this Thread

Posting Permissions

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