G & M Code - Advanced Manual Programming Trick - TITANS of CNC Vlog #51

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
oh man what's up everybody this is Titan titans of CNC and I'm gonna teach you a crazy hand programming technique but first a word of caution if you don't have a lot of experience this technique is probably not for you and if you're going to attempt it make sure that you get one of your seasoned machinists to come beside you double-check your program run your program above the part before actually engaging that metal alright we're gonna show you some advanced techniques alright and and if you do something wrong you can crash that machine so don't do it alright before we teach some hand programming and crank off some chips I want to invite you to hit that subscribe button hit the like button and put your comments down below ask me questions asked me about techniques and you'll probably see it in a future video all right so I just want to explain a few things about the setup and the approach real quick okay so we're gonna actually cut into this piece of material right here is three and a quarter square stock alright it's 5 inches long and then the material is gonna be actually held in this shunk vise right here locked and loaded alright so when the material is locked down in the shunk vise we're basically the 0 the X and Y and C is gonna be upper left-hand corner so right here alright so it's gonna be like boom now when I program it what I'm gonna do is I'm gonna have a starting point that's a half an inch off this surface okay so if this is three and a quarter we're going to 3.75 and we're dropping down over here full depth and then this technique is gonna allow me to actually start down here and basically just come back and forth and rock at an angle at a 45 degree angle taking all of this material off quickly alright and not only quickly but with just a little bit of code so we start here and I'm gonna overtake it the same length point five and we're going to come back come back and each time you go down and come back it'll raise and see so it'll be like boom boom boom boom boom boom so this technique is gonna allow us to write just a little bit of code and machine off a lot of material okay and it's it's it's cool a couple of things that we're gonna incorporate when I said we're gonna use some advanced techniques meaning just upper level I don't usually teach this stuff to beginners is sub programming using subs and also incremental programming alright so G 92 a g91 where when you go into incremental if you don't come right back with a g90 you can crash that machine alright so you got to make sure that your numbers are perfect that you double check everything and that you have a seasoned machine has come behind you and test out and check it but once you get this technique down it's gonna open your mind to a million other things that you can do with g9e ones and sub programs all right so you guys ready let's do this alright so let me explain basically what we're gonna do we're gonna create a program then we're gonna call up a sub program another program in the main we're gonna say run that sub a whole bunch of times over and over and over but it's gonna be an incremental so every time you run the sub it's gonna keep moving keep moving keep moving alright I know it doesn't make a lot of sense but think about this 3d adaptive right like fusion 360 programming and adaptive roughing you see these steps like boom boom boom or 3d you can see a tool that just walks up a surface that's what I'm gonna teach you manually how do we walk up a surface in 3d using just a few lines of code alright so here's the program let's go get tool 1 so we say em SiC tea one bone all right sometimes I put Anna block but if you just hit enter it'll just put the end the block alright and again I want to I want to mention I'm doing this on a horse so the way the elves work it works on some machines and not others so make sure that you change up the style to suit your machine and you can talk to the top machinist in your shop about how to actually do that okay but this works on a horse alright so now I'm going to move to location so I'm gonna head G 0 G 90 absolutely G 50 for my work offset then I'm gonna hit X I'm using a 3/4 inch tool my cuts gonna be 50 thousands in so since half of the tool is 375 and I'm in by 50 we're gonna call the tool out at X negative point 3 to 5 okay so I'm gonna hit this guy and I'm gonna say X negative point 3 to 5 my stock material is 3 and a quarter so I'm gonna add a half an inch to that so we'll say Y negative 3.75 turn on my spindle speed bone alright now I'm going to turn on my coolant m8 now I'm gonna go grab my tool I'm gonna call it my height offset so I'm gonna go G 43 h 1 z point 1 boom I'm gonna give myself some space by hitting and the block bone alright so now now before I call up the sub program I actually want my tool to actually drop down to the proper Z starting point okay so I'm gonna drop it down to Z negative so I'm gonna go G 1 z negative 2.25 bead 100 inches per minute enter I'm gonna create space boom now I'm gonna call up my sub okay so I'm gonna call up G 54 m 97 now here's a little bit of information you can call up a sub in a horse with an M 97 or M 98 and m 98 calls up a sub with an O value at the beginning which when it comes into the machine it separates the program so you'd have a main program and all your subs would be separate so when you want to add it you got to go from one to the other to the other all right I like em 97's because the m 97 calls up an end value and an N value just shoots up and stacks in the same program below the main so when you stop at M 30 it'll be like N 1 n 2 and 3/4 sub-1 sub-2 sub-3 okay so we're gonna say m 97 call up the sub we call up P 1 for sub 1 and now how many times do I want it to run I want it to run 23 times so I'm gonna hit L 23 enter so i got g 54 m 97 call up the sub sub number the p 1 calls up an N 1 since I'm using an m 97 and then it's gonna run it 23 times now in my sub I'm gonna be in incremental okay and that's a dangerous place because instead of reading from an absolute number it reads from where it's at boom boom boom ok so like you're in the pocket down below and you say Z point 1 and usually you mean like top surface and Z point 1 above if you're in a g91 it'll just go point 1 from there so you could be negative and still be negative and then if you move over you crash does that make sense so just be very careful use it when you need it and always come back with a g90 as a safety code to get back in the haps all right so because I know that the sub program is gonna be an incremental when it finishes the 23 times I'm instantly gonna come back with a g90 to get it back in absolute okay so next thing over here I'm just gonna say g9 t-bone all right now I'm gonna create space because I like it clean so now let's stop the main program so I'm simply going to say g0z point one bone now I'm gonna raise my tool up and since I zero my tool with a probe I'm gonna hit G 0 G 91 g28 go to home and then Z 0 and the block and then what's next I just used the gene 91 so now I'm gonna hit a gia 90 get back to absolute boom I'm gonna shut it down boom M 30 all right crate space now what's next let's actually do our sub program alright so let's think about what we're doing I got my part here my 0 is over here I'm why- I'm Way over here and then I'm down I'm starting in position ok so what I want to do from here is I simply want to just start moving in the Y direction because my starting location is set okay so I'm just gonna simply hit n for sub 1 1 enter and I'm going to hit G 1 G 91 incremental now my part is three and a quarter or three point two five I've added a half an inch where I brought my tool down so I want to actually over take it back to zero and overtake it by a half an inch - so I have to say three point seven five plus 0.5 E schools 4.25 okay so I'm going why 4.25 bead 300 let's get after it right we're gonna take small cuts like fifty thousand is going to step up boom boom boom boom boom boom boom okay feed 300 points now g91 is modally it just keeps going okay until you shut it off so now that I went up I simply want to move my X and my Z so I'm gonna hit X point zero 50 Z point zero 50 enter moved up now let's go back to where I started so I was at Y four point two five so let's simply go Y negative four point two five okay enter now we're gonna go up one more time we're gonna go over an X end up in Z at the same time boom so I'm gonna go X point zero 50 Z point zero 50 bone and that's where I'm gonna leave it I start here I go down I move up I come back and make that cut now I simply go over an X and up in Z at the same time boom and I'm exactly where I started okay but I'm just over and up so now think about it you're an incremental it's just boom boom boom boom boom boom boom boom boom boom boom boom because I told it 23 times because like calculated those steps and how high needed to step up makes sense so I'm simply gonna end my sub with an m99 enter that's the program look at that look at how small it is right a lot of people say oh you need to put more safety lines and stuff I put the g90 as a safety line I want to keep this thing nice and clean you guys do whatever is good for your machines as far as safety lines horses when you change tools that it'll shut everything off and change that tool right so you don't have to like shut everything off and do all these things and when you hit it em 30 it's gonna shut everything off anyway right so on a horse that does a lot of that stuff for you so I don't worry about it okay so let's go run the program this is gonna be sick oh let's get after it [Music] [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] [Applause] [Applause] [Music] [Applause] [Music] all right and there you have it check it out buh buh buh we just walked right up the surface 3d kind of adaptive but we hand programmed it with just a little bit of code right we added in absolute positioning and incremental programming and cautioned everybody right make sure you come back with that g9 TN and here's how subs work and you can learn a whole bunch of them right so it's cool a lot of people are learning Pam and we teach Pam but I think it's also important that you learn the G and M codes so if there's ever a mistake you can actually see it right if you don't understand it you won't see it and you could actually crash that machine and make a big mistake okay and here's a message to all the journeyman machinists out there all the experienced guys if you got cool technique so you got something to tell the young guys in the comments below let us know what's up like what kind of tricks do you use to increase productivity and speed to make things happen on a daily basis let's pour into the next generation all right so just as a reminder go ahead and hit that subscribe button so you don't miss another video until the next vlog I will see you guys later have a great day I am how you
Info
Channel: TITANS of CNC MACHINING
Views: 151,827
Rating: 4.9096045 out of 5
Keywords: titans of cnc, cnc machine, academy, manufacturing, machining, tutorial, cad, cam, cnc, kennametal, haas, dmg mori, autodesk, fusion 360, ny cnc, solidworks, mastercam, engineer, engineering, machinist, 3d programming, manual, programming
Id: 4xNMYLPE_jM
Channel Id: undefined
Length: 16min 11sec (971 seconds)
Published: Fri Feb 08 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.