Need help with g code for fire control pocket on AR15 lower reciver, have G code. - Page 3


Page 3 of 3 FirstFirst 123
Results 41 to 52 of 52

Thread: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

  1. #41
    Registered
    Join Date
    Jun 2006
    Location
    usa
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    thanks keebler303 for getting back so quick. already many valuable lessons learned.
    I made a note that it is better to start from 0 and work from there to the outer edge of the cut and from there to a path tool pivot point. Like you showed in case of D for Y. 0 + 0.6900/2 gets us to the outermost upper edge of the bigger cut which is on the right, - 0.0950 drops us to the upper edge of the cut on the left, -0.5000 positions us at the lower edge of the cut and +0.1875 moves our point to a desired location which is D.

    what was a bit counter-intuitive to me at first was the 0.2180 - 0.1875 = 0.0305. I added a hand scribble maybe it might help others to better grasp it as well.. i hope i got it right.

    Need help with g code for fire control pocket on AR15 lower reciver, have G code.-fig1-jpg

    heaving squared that it gets easier. so we have

    Ye is the same as Yd so we have Ye = - 0.0625, Xe on the other hand form the outer left most edge of the smaller cut is 0-3.5120 + 0.1875(tool radius) + 0.0305 (calculated delta between big radius and tool radius, same deal like between C and D) = -3.2940 so overall E ( -3.2940,-0.0625)
    Yf is the same as Yc = -0.0320, Xf going from outer left most edge of the cut is -3.5120 + 0.1875 (tool radius) = -3.3245, so F (-3.3245, -0.0320)

    i'm going to post it now, so not to loose it, and continue further on. did i got it right? if any is off, could you just point it out which i will try to figure it out..



  2. #42
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2985
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    You've got it!



  3. #43
    Registered
    Join Date
    Jun 2006
    Location
    usa
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    Thanks Matt. So for G and H is easier. Since the cut is symmetrical they are at a mirror position against F and E.. so far the tool path pivot points are as follows:

    Need help with g code for fire control pocket on AR15 lower reciver, have G code.-fig2-png

    now continuing to the right, bigger cut.

    I the Y is the same as H, so 0.0625, X is -2.080 + 0.1875 = -1.8925, so I (-1.8925, 0.0625), now X for J is the same as for I, which is -1.8925, Y for J is like Y for K minus our Delta for the big radius so:

    Yj = 0.6900/2 - 0.1875 - 0.0305 = 0.1270, so overall J (-1.8925, 0.1270), Y for K, Yk = 0.6900/2 - 0.1875 = 0.1575, Xk = Xj +Delta = -1.8925 + 0.0305 = -1.8620, so overall K(-1.8620, 0.1575)
    Q and P are mirror image to J and K so Q(-1.8925, -0.1270), P(-1.8620, -0.1575), Y for L is the same as for K, YL = 0.1575, XL is Xm - Delta = -0.1875 - 0.0305 = -0.218 so L (-0.218, 0.1575) , for M Y is YL -delta = 0.1270, M(-0.1875, 0.1270), N and O are mirror image of M and L, hence N(-0.1875, -0.1270), O(-0.2180, -0.1575) overall something like that:

    Need help with g code for fire control pocket on AR15 lower reciver, have G code.-fig3-jpg

    so if this checks out, what's the next thing to do?



  4. #44
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2985
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    I didn't check everything but we'll find out later if you made any mistakes.

    Next is to start writing some G-code to move the machine between the points you've found the coordinates for. We need G0, G1, G2, G3. You can study up on it if you want. I won't have time to contribute much for a day or so...



  5. #45
    Registered
    Join Date
    Jun 2006
    Location
    usa
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    So i looked it up, and it is as follows. A tip of the tool travel is controlled by a number of instructions comprising a G-Code programming language. The language has a set point of operational codes, op-codes.. one of them for instance would be G20, that would be an instruction to set measuring units to inches. Now we noted that we set our 0 point relative to our cut in the detail, meaning that it would be easier if we are going to compute our coordinates relative to that point and not according to a global system of coordinates that a CNC table operates by. So for that we use an op-code G91 which is suppose to set coordinates relative to a starting position of the tool which would be our (0.0000, 0.0000) point. G0 -rapid positioning. when we need to rush the tool to a location where we need to start cutting. G0 has arguments, such as coordinates and a feed rate (speed with which we are moving a tip of the tool, calculated in metric unit per minute, i've seen it is in millimeters per minute, im not sure how it is done when inches are set as measuring units, maybe mils? (which is one thousandth of an inch). same goes for G1, this is when cutting, G2 cut an arc, clockwise and G3 counterclockwise. So questions i have what is the difference between G0 and G1 if i can specify a feed rate and make G0 move as if in G1? So if we manually position a tip of our cutting tool at our (0.0000, 0.0000, 0.0000) then i think we can start like this:

    G20
    G91
    G0 Z0.25 // raise the tip quarter inch
    G0 X-1.8925 Y-0.0005 // rapid positioning to our starting point
    G0 Z-0.25 // lower the tip to the surface


    is it about right?



  6. #46
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2985
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    G0 is a rapid traverse, you don't specify a speed, just where it should go.

    G20 is for inch mode, feeds will be in inches per minute.
    G91 is incremental distance mode, you specify how far to move from the current location. You just calculated absolute coordinates so we want to use G90 for absolute distance mode.

    Depending on your machine, you might need some other preparatory codes too like G17, G40, etc.

    You would want to "touch off" your part with an edge finder to locate the spindle centerline on our (0,0) point. You can use a G54 work offset to specify where that is or in mach you can just click "Zero X" and "Zero Y" and it puts in the offset for you so it reads 0,0 at the 0,0 point on the part.

    You will also have to set the Z axis zero. which can be done with a G43 tool length offset or you can just bring the Z down to the surface of the part and click "Zero Z" in mach.

    Once you have your zeroes, you can start on the code:
    Code:
    G17 G20 G40 G90
    G0Z1.0000 //raise tool to a safe level
    M3 S10000 //turns on spindle clockwise with speed of 10,000 rpm you have to do this manually if your machine won't do this
    G0X-1.8925Y-0.0005 //rapid to point A
    G0Z0.0100 //rapid Z down near surface
    G1Z-0.1000F20 //plunge .1 deep into material
    G1X-2.6195Y-0.0005F60 //feedrate move to point B
    G1X-2.6195Y-0.0320 //feedrate move to point C
    G2X-2.6500Y-0.0625I-0.0305J0 // feedrate arc move to point D
    G1X-3.2940 // feedrate move to point E
    Keep going from there. A few notes:

    You do not need to specify a feedrate on every line. Once you specify it, the control will assume you want to use that feedrate until you tell it a new one.
    It is probably a good habit but you do not need to specify coordinates if they do not change. ie don't add a Z coordinate to every G1 line if it does not change.
    I and J are the incremental distances from the current position (point C above) to the center of the arc. We know from previous calculations that the radius is .0305 and we see from the drawing that the center is -.0305 in X away from point C and at the same position in Y. SO I should be -.0305 and J should be 0.

    Matt



  7. #47
    Registered
    Join Date
    Jun 2006
    Location
    usa
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    Hi Matt, i applogize for been away for two weeks.
    I understand the direction and the code now. Also there's this wisdom i could've not gotten easily anywhere else such as near surface approach, the plunging depth and a cutting feed rate vs RPM. I made my CNC myself, I doubt it will have enough tollerance or power to do this cut, but it is a very usefull experience for me. Great thing about the arc, i think i got it.
    From point E.. to F, feedrate set earlier to 60

    G2 X-3.3245 Y-0.0320 I0 J0.0305 // center is on the same X as E and +0.0305 on Y
    G1 X-3.3245 Y0.0320 // traverse to G, feedrate 60 as deafult
    G2 X-3.2940 Y0.0625 I0.0305 J0 // arc to H
    G1 X-1.8925 Y0.0625 // feedrate to I
    G1 X-1.8925 Y0.1270 // feedrate to J
    G2 X-1.8620 Y0.1575 I0.0305 J0 // arc to K
    G1 X-0.2180 Y0.1575 // feedrate to L
    G2 X-0.1875 Y0.1270 I0 J-0.0305 // arc to M
    G1 X-0.1875 Y-0.1270 // feedrate to N
    G2 X-0.2180 Y-0.1575 I-0.0305 J0 // arc to O
    G1 X-1.8620 Y-0.1575 // feedrate to P
    G2 X-1.8925 Y-0.1270 I0 J0.0305 // arc to Q
    G1 X-1.8925 Y-0.0005 // feedrate to A

    now i take it I plunge another 0.1000 with G0 and cut another path similar way untill all depth needed to be cut depleted?

    G0 Z-0.1000F20

    // continue the x, y arch cutting shape as before

    I will look at the rest of the shapes you drew and try to do similar exersise. Thanks again Matt for finding a time to teach.
    I'm sure this thread is helpful to others as well.



  8. #48
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2985
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    The speeds and feeds are just guesses and will obviously change based on your machine and cutting conditions. You can google search for speed and feed calculator or something similar to find the correct settings. Your stepdown amound per pass might also have to be reduced based on your machine.


    Yes, you can keep stepping down until you reach your final depth. In the real world, you almost never plunge into the part. It is much better to ramp into it. To do this, you would add a Z value to each of your moves so it would get a little bit deeper after each line of code. I didn't include this in the above work because it is not a requirement and would cause confusion. We can discuss it if you want. For an even ramp rate, the Z depth for each line of code would be different based on the length of that segment. A 1" X-Y move would go down in Z twice the amount a 1/2" move would to keep the same ramp angle. A generic example:

    Code:
    G0Z2
    G0X0Y0
    G0Z.02
    G1X5Z-.02F10
    G1Y5Z-.06
    G1X0Z-.10
    G1Y0Z-.14
    G1X5Z-.18
    G1Y5Z-.22
    G1X0Z-.26
    G1Y0Z-.3
    G1X5
    G1Y5
    G1X0
    G1Y0
    G0Z2




  9. #49
    Registered
    Join Date
    Oct 2014
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    I found this thread pretty educational.
    I am an amateur of the newest kind. So new in fact I messed up my mill (super cheap small chinese pile of crap) and am waiting on parts from a aftermarket supplier.
    I bought it with the intention of milling a ar15 80%
    haven't gotten here yet. but learning the whole code thing is daunting and confusing at times so people need resources like this to guide them.
    I understand people come to forums, get what they need and disappear. It happens.
    I had been frequenting an RC forum and saw this a lot but what I think is helpful and which I helped build was a specific "how to" thread that was stuck at the top and linked into the "topics" part.
    People come looking for specifics and never find them so they start a thread that likely has been done already and begin a new line of WHAT DO I DO! that drives the knowledgeable nuts with frustration and sometimes they forget....these people are A: at their wits end B: know nothing of the subject so spouting terms an code at them is making things worse. C: look down their noses at them and treat them like the idiots they are because they wouldn't be here looking for help if they already knew what to do but it doesn't mean you treat them that way.

    Understanding that people are looking for help and not a long term relationship is what drove me to make my "specific" type topic at the other forum. All of the things I didn't know about when I started doing multirotor aircraft from scratch build. All that I learned and the mountains of advice, help and guidance I received over the months hanging out at the forums I made many "how to" specific topics. You cant make all of them because you don't know what everyone will need before they need it. But add them as you go and you will find less and less frustrated people banging on your brain door and more and more people coming for small tips and suggestions.

    But no one needs to make those special topic threads because no one needs to want to. And no one needs to come to these calls for help if they are only going to talk badly to the person calling for help either.

    Patience, consideration and a little effort. Thats all any one is asking for unless they are the demanding type. In that case...they are only trouble waiting to happen.



  10. #50
    Registered
    Join Date
    Oct 2006
    Location
    USA
    Posts
    323
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    Give a man a fish, or teach him to fish.

    I commend Keebler and Coredump, master and student, this thread is like Kung Fu theater.

    And yes, life and all our other obligations often trump what we would rather be doing. And there are also the cases of found the answer or handout somewhere else, don't need it anymore, magic disappearing trick.

    I hope this lesson continues. The building blocks are going into place, can't wait to see the roof go own, and the student become the master.

    Kudos keebler for picking up the gauntlet and coredump for picking up the slack.



  11. #51
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2985
    Downloads
    0
    Uploads
    0

    Default Re: Need help with g code for fire control pocket on AR15 lower reciver, have G code.

    Quote Originally Posted by 123CNC View Post
    Give a man a fish, or teach him to fish.
    Exactly!

    I hope this lesson continues.
    I'm waiting for someone to pick up the torch...



  12. #52
    Member Jholcomb's Avatar
    Join Date
    Aug 2020
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    Keebler, just wanted to post a thank you...this old thread was a huge help in just getting some basic coding knowledge. I know I've got a long way to go just wanted to let you know the time you put into these threads to help is not in vane. Much appreciated, eventually I'll have the knowledge to do the same bc of helpful knowledgeable folks like you.



Page 3 of 3 FirstFirst 123

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Need help with g code for fire control pocket on AR15 lower reciver, have G code.

Need help with g code for fire control pocket on AR15 lower reciver, have G code.