Foundation to CNC programming - Machining a full part | G-Code Tutor | Skillshare

Foundation to CNC programming - Machining a full part

G-Code Tutor, Engineering Artist

Foundation to CNC programming - Machining a full part

G-Code Tutor, Engineering Artist

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
6 Lessons (31m)
    • 1. Introduction

      1:50
    • 2. CUTTER COMP

      3:24
    • 3. MULTI TOOL

      8:09
    • 4. Widget part 1

      7:15
    • 5. Widget part 2

      7:31
    • 6. Widget part 3

      3:09
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

433

Students

--

Projects

About This Class

GCode is the basic fundamental language of CNC Machines.  It is a skill every machinist needs to have a full understanding of their machine.  Whether a hobbyist or an Aerospace machinist. It is often an area where machinist apprentices and DIY router enthusiasts get stuck on.

With this course, I will take you through the basics of understanding the G Code language by programming a part in an easy to understand, step by step process.

Each G-CODE command is discussed in an easy to follow manner with example programs written around each lesson to make learning to program GCODE easy.

Say goodbye to expensive CAD software and program your CNC machine like the experts.

Meet Your Teacher

Teacher Profile Image

G-Code Tutor

Engineering Artist

Teacher

Hello, I'm Marc.

I have studied engineering and portrait art for over 26 years. A strange mixture indeed.

See full profile

Related Skills

Technology CNC Data Science

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hello. My name is Mark. Welcome to decode Shooter. Thank you for signing up for my course. This is a foundation course. Fergie code the same that new people to the world of CNC programming on also home deal way enthusiasts that use desktop routers in this course as our institution. UGK, it's an M codes. We then put it into a program so you can see how it works in the real world environment. I started my apprenticeship in 1991 at British Aerospace, which was considered at the time to be the best apprenticeship in England. I spent 12 months learning basic engineering before I moved on to learn in manual machine in on lathes and milling machines. On my third year of my apprenticeship, I started learning how to use CNC lathes. Then eventually that progressed up the CNC machining senses. Once I finish my apprenticeship, I still had a first for learning. So I enrolled in night school learning advanced CNC programming techniques on cat can. After that, I rolled in an RNC agency engineering course on carried on studying engineering all together for 10 years, 26 years worked as an aerospace CNC machinist making parts for Boeing and Airbus. I discovered I enjoyed teaching apprentices, So I've talked many apprentices over the years, and now I'm teaching you how to program Geico. 2. CUTTER COMP: in this past. Of course, we're going to discuss what cutter compensation is in many different ways. It could be applied writing. A program without cutter compensation means we have to program from the center line off the cutter, so we have to allow for the diameter of the cutter in the cutter listed here. It's a 10 millimeter cutter so would have five millimeter radius. So as we program a profile, we would always have to program the cutter five millimeters from the edge of the job to be out to get the size we need. Let's tutorial video on slots. 1,000,000 is a good example off programming without using counter compensation as we programmed from the center line of the cutter through this lad's by programming With cutter compensation, we can program using the dimensions of the actual parts without having to worry about offsetting the cutter. We apply this by using G 41 on G 42 when programming using G 41 material has to be to the left of the cutter and G 42 to the right. For our this tutorial, we use G 42 as we assumed we would be climbing There is another section in its course to discuss climbing on its uses to turn off cutter compensation. Use the G 40 commands There is free different ways to tell the machine the radius of the tool. Let's go through them. The 1st 1 is the one I use for out his course g 42 p. Five millimeters. Here the G 42 tongues on cutter compensation on the P value is the radius off the tool? This is how the machine knows how far to offset little. Another common way I've seen him, Silas, is by using X five millimeters. The G 42 on this line 1000 machine not read the X as a dimensional value, but to apply it to the G 40 to cut a compensation radius. And finally, the way it's used on industrial machines with industrial machines. We just say G 42. This is because it takes a tour geometry from the tour table on the machine controls. When we said too tall up on the large machines, we use even touch probes or preset it'll. So we know the distance and the diameter of total. Exactly. And when we called up the toll in the program. Using a T command, the machine automatically takes a tour geometry data on deploys its little in the spindle. Here is an example of what the talk table would look like on the machine controls. We have to told number geometry in X, which is a sense of points of the total from a nine machine position. This is calculated by the touch probable by the preset fishing. The wide geometry is the same thing, but for the length of two we can end. Tweak this by using offsets with X and Y. We use these offsets to correct any dimensional areas in the part, and finally, we have the radius of the tool. This is what the machine uses to calculate cutter compensation when just using G 42 on a machine with a tall table in this section of the course. We have learned to the uses of G 40 g 41 on G 42 on why we use cutter compensation when programming up parts 3. MULTI TOOL: in this example program. I'm going to show you how to use multiple tools on one heart. I am also going to go into more depth with views and G codes and M codes, so we end up with a full phone in programme. Here is the components that we're going to machine. As the programs are starting to get a little more complex, I have added a diagram of a cutter, so we know where the cutter is in each line of the program for easy reference has before we start off with our program number. In this case, we use in program number five, followed by operators nodes telling the operator what the program is called. Well, given in number for easy search on the total number, T 01 with offset one again on operators, notes tells us what we are using here. We haven't m 06 commands m 0 6000 machines. Do it'll change to bring into one into the spindle of an automated carousel. Now we add G 21 commands. This tells the machine we're using the metric system, followed by a gene 90 commands. This tells machine we're using the absolute coordinate system G 42,000 machine. We're going to use a cutter. Compensation The P 5.0 house machine, The radius off the tool because we're using a 10 millimeter cutter. Here we put five millimeters. Now we declare our spindle speed of 700 revs per minute and turn and spindle on in a clockwise motion with M o free. Using G 00 are rapid movement commands removed to cutter in position, ready to cut. We bring down the 7 to 10 millimeters above the surface of the job. So we've got less movements, travel when we start cutting. Who finished the line off with M? I ate This turns on the coolant. Here we bring our cut it down. Six millimeters. Ready to start profile in the outside of the material here we cut off first corner rats, so we use a geo to move, which is a clockwise radius. And we states are why access to 100 millimeters, which is a top of the job. Also had in our 10 to say we have a 10 mill radius on our feed rates using a geo one move removed by cutter to the beginning off the next radius. Ready choose and I NJ value to designate the center points off that radius using a G O to move. We specify the end points off the radius using X and y axis. Then we adds an I and J value to detonate the center points of the radius. The actual our body off the radius is not needed as a machine can worked out itself. Our next radius is a smaller corner rat, so we can use a simple G A to move stating in our value off the size of the radius in millimeters. We finish our profile with a simple G a one X minus 15 move. This brings us five millimeters past the end of the job so we can safely retract her cutter without touching side of the job. Now we wrap it up. Usually G 00 commands lifting a tall 10 millimeters above the surface of the job. We also eternal couldn't off here by using an M 09 statement with the G 40 command. We turn off, cut a compensation using G 28 we tell our cutter to go back to the tool change position. M 05 Stop. Sakata now use an M 00 commands to stop the program so we could do a manual tool change. Now we specify the next block of program. Using the end to now, we can easily search for the slot drill if we need to jump into the program at a later date . Justin, machine the slots t 020 To this specifies our second tool on offset number two, which isn't eight millimeter slots. Drill the most six taels machine to do it all change with an automated carousel. This will bring talk to instill spindle But where we gonna manual tool change when we stopped for M 00 This just house machine that in Utah is in the spindle and we are ready to cup of it. G 21 housing machine were used in the metric system and G 90 tells the machine we are using the absolute cutting system. It is not necessary to add this line to this part of the program as it will still read up from the part program above. I added this here. So if we drop into the program just two machine the slots by searching for into. Then the machine will read. Read this, making it safer. It's just standard practice that everyone tends to do to make each block of program its own separate program so we can jump in and out as needed. It's just run certain tools as before we select our spindle speeds using S 500 use M O free to turn a cutter on in a clockwise motion. Using a rapid move of G O, We now bring our cutter to the position where we wish to start cutting the slots. Abort it over using the absolute system. Don't forget on were rapid it down to 10 millimeters above the job. This way, we're missing any clowns that we may need. We turned the code in on using Am I late stealing rapid travel mode. We bring to cut it down to read more on this form. Now we are ready to start cutting our slots on the right depth for the purpose of demonstration. I have now changed new machine into the incremental cutting system by using Gene 91. Now all our dimensions will come from the last known tour position and not from the data position using G 01 with a feed rate of 80 millimeters per minute. I now move to cut of 65 millimeters to the left, and though their slot is only 50 millimeters, we use 65 as I started 15 millimeters away from the side of job from the center of the cutter, using our second incremental move, we do not need to re select Geo one again as it was selected on the line. Before we simply move, I cut her up 65 millimeters to bring it 15 millimeters clear from the job. Now we change the coordinate system from Incremental Back into Absolute with G 90 to clear our cutter from the job, we use Geo rapid movement and lift the cut up 20 millimeters above the surface of the job. Now is a good time. It's eternal. Far. Coghlan's with M 09 The same is the last book of program above. We used G 28 0 y zero to tell the cutter to go home to talk to change position and my five Stop Sakata N 30 housing machine. Our program is finished. It's also rewards program. Baxter starts ready to machine the next component in this section we covered program and using incremental on absolute systems. And we also covered some um, coats recovered 10 in a Coon's on and off with M 08 on M 09 and also M 30 which tells the machine the program is finished and to rewind it back to the start. This is different from the M 00 commands, which tells the machine we wish to machine to stop drawing the program, and it is not over yet. 4. Widget part 1: in this section. We are going to put together everything we have learned in this course and construct one large program that uses multiple tools. Every Geico we've discussed on every M code here is the components we're going to machine. I decided to call it the Widget. For this part, we need to think about how we're gonna hold and clamp the job while we're machining it. Most obvious way would be to climate ability in advice or every sense drill and drill the five millimeter holes. Then we can vote. Fruita holds onto a back plate that machine the profile in the slot without having to worry about clowns being in the way. Before we start discussing a tall ing we will use, I need to highlight a few things on the drawing that may cause confusion. Hello were used in the data position in ex zero Y zero in the bottom left corner has before most of our dimensions on the Y axis actually come from 15 millimeters above that from the center of the whole. This is quite typical and engineering joins. So I've added honest rule and to show the complications in program and may cause. The reason the draftsman may have opted to use his technique is because the bottom left hand hole is a critical dimension to the rest of the components. The use of quotation marks on this dimension simply means is equal both sides. So whether Dimension both together is 40 millimeters, this means that 20 millimeters and 20 millimeters I the whole is in the center off that luck hair high showed the radius is typical again. This is typical for all under mentions. Radius is on this components. Now we need to start looking at the tall ing. We all used to be out to produce its components. Our first tool is a B s number two sense. True, it is used to spot the holes to stop the main drill from wandering off centerline. Following the center drill, we'll use a five millimeter to fluted job, a drill to drill the holes, rough machine, the profile. We're going to use an eight millimeter square corners and milk. He's got to be called Strassmann cutters or rippers toe rip away the material as fast as possible without damaging It'll all the components are finishing tool for the profile will be another eight millimeter square cornered ends mill. This time we won't use the Ripper. We reduced. Something is designed for finishing cuts, so we give a better finish on higher accuracy. And finally, we will use a 10 millimeter slot drill to cut a slot in the middle of the components. Our first few lines. The program should look familiar by now. We define it all number and give the job name followed by a search number one to number one . Offset one I named the told I began to use. And now we use an M 06 commands To tell machine is tall change time. As with the other programs used g 21 to define that the metric system and g 90 to tell the machine we are used. The absolute measuring system. Using s 700 we define our spindle speed to be 700 revolutions per minutes. Am I free times the cuts around in a clockwise motion as we drilling, we will be using the G H one command to activate the drilling cycle. So I first moved its a geo rapid move to take the drill above the top of the first hole here. We also use M 08 to turn accordance on before we love our drill into the hole. Here we activate our drilling cycle by using the GI 81 command. We also set our depth of cuts being for me. That means his deep insulin material on our feet, right. In this case, 50 millimeters per minutes. Now RG 81 command is active. The machine automatically defaults ensued. Incremental measuring system. So we just need to give it why access to the distance between the cutter on the next hole? Our next incremental move in X is 280 millimeters to the right. Moving are sensitive 165 millimeters in the minus direction on the Y gives us a sense position off our next hole Moving 80 millimeters to the left finds opposition for the next hole. Now all the holes are finished with the sense drill so we can use a G 80 command to turn off our drilling cycle. Now we want to rapid the cutter out the way above the job. 20 millimeters. It's a good clearance. We also turn off our code into this point using an m 09 commands. Now the cutter is safely out of the way. We can return it to the tour change position using the G 28 commands. Next, we use an M 05 command to stop the cutter. And finally, an optional stop commands. If the operator wishes to stop the machine at this point, to check the tool or to mention a job or to clear away swore off, you can simply pushed the optional stop button on the controls, and the machine will stop at this point. Now that we have spotted all our holes with sensitive, it's time to go in with five millimeter drill on bald. A holster size using into is a search variable used tool to offset to declare its A five millimeter drill. M 06 is our tool change, G 21 G 90 tells machine It's in the metric system on that we're using absolute measuring system. We select the spindle speed of 400 restroom in it and trying to spend along with M O free. Same as before. We select our star position of the first hole, using a rapid movement G O. We also switch on the coolant at this stage, Assuming our bill, it is 10 millimeters. We're going to drill to a depth for 13 millimeters to give us some clearance out the other sides of material. The material will be held in a vise on Parral house to make sure we have clearance below the holes for our drill to break free. Using T 81 we turned on that drilling cycle since the whole positions on exactly the same place as when we used our sense. True, we can copy and paste the last bit of the central program into our drilling cycle, as there is no need to rewrite the same bitter program again. Now our drilling operation is complete. We have run to tools for the job, creating the holes we needed. Now we can remove our billets from the vice and use the holes. It is fast in the material to the back plate while we cut a profile. As this is a large program I've divided up into sections. This is the end of section one drilling cycle. Please move on to the next section where we will profile the job using Ruffin and finishing tools 5. Widget part 2: in part two of our widget program. We're going to rough and finish the outside profile as our roughing tool. We were using eight millimeter end mill. We will call this toll free and use offset free on Put the search function as in free beginning of the line. As before, we were use D 21 to the fundamental Rick System and Jean 90 to define the absolute measuring system. Since his tours are roughing tool, we want to leave a little bit of material on for our finishing talk to take off. There are many ways to do this, but it technique I'm going to use here. It's huge. A larger offset radius. Let me explain before when we have used G 42 offset rages has been half the diameter of the tool. By telling the machine the cutter is point to larger than, actually is we, in effect, leave a little bit more material onto the job. So I finished until has something to remove next week to find out spindle speeds and turn to cut around in a clockwise motion With am I free. Using the Rapid Travis command of G 00 you move my cutter to the beginning of the job where we wish to start cutting using M 08 turn according as you can see on rapid in 20 millimeters above the surface of the job. This is to clear the bolt heads that we used to secure the job to the back plate through the holes. Now we bring our cut it down to the first depth of cuts. In this case, we're taking cuts off 3.5 millimeters using J two. We cut our first rate year, said it's up to the job police, some using the feed rate of 120 millimeters per minute. As it's a rougher, we can run it a little faster with RG two still active weaken simply given X dimension, followed by a radius. We can continue customer next ray GIs again by simply giving it a wide value. Since our radius is are still in a clockwise direction, Weaken given X value on our value to do the next radius. Now outrageous changes directions, so we have to give a G O free commands before we cut the next radius. As this radius is in a counter clockwise position We just need to get the expertise on your value again. As we continue to program the machining of the profile, we simply use the same technique for Joe to and Geo. Free to complete each section until we get a large 40 millimeter radius. As I wish to declare the center points off the larger radius. We used Geo one move to take us to the beginning of the rat using G A. Two for a clockwise arc movement are defined the end points of the radius using X and Y values on a center point of the radius using I and J. Remember, I is X and Jay is why declaring the center point of a rat. Next, we have a simple straight line cut using Geo one. This brings us to the start points of our next radius. Now, using G a free counterclockwise movement, we profile outrageous using the endpoint declared by ex and why on the center points the rages, LaVoy and J as before one last G A to movement to cut her final 10 millimeter radius, we finish off our profiling by using Geo one to bring are cutting back to start position since we decided to use free and 1/2 millimeters as a debt cuts on a Qatar is already at a debt free and 1/2 millimeters. We now bring the cut down to set to minus seven millimeters for another 4.5 mil. Cuts around the profile. A massive benefits of using a CNC machine is that we don't need to keep repeating ourselves when we type out codes here. I've copied the yellow highlighted section again. After I said Move, this saves us to problem. We're having to re type out the code every time we wish to take a cut. There is all the way says can be done, such as using macros, but that is not covered in the foundation course. Now we just need to lower kata down to 10.5 millimeters. This gives a cutter clearance below the job, so we get a nice clean edge, just like before. We can copy and paste our program to save us, having to rewrite the profile every time. Now that are part has been roughed out. We can live two cutter up to a safe 20 millimeter above part and turn the cooling off with m 09 using G 40. We now turn off our cutter compensation using G 28 x zero y zero, we send our cutter home too tall. Change position M five stops at Qatar by M. 01 has an optional stop. With our profile roughed out, it's now time to take a finishing cuts using enforce well out for easy searching we now define tool for with offset four, which is our eight millimeter finishing end mill. We tell the machine with donut all change by the M 06 commands then, as usual, followed up with G 21 G 90 to set our coordinate system on our metric system. Using G 42 we switch on the cutter compensation this time when we use G 42 to define Artal Radius, we used the exact radius off four millimeters. If the material is still oversized, once we've run our finishing tool, it could be adjusted by changing this value. Now we define our spindle speed and revs per minute using the s value and turn the cutter on in a clockwise motion using M o free using g o, we bring our cutter to the start position, keeping us at 20 millimeters above the job to Mr Bolt heads. We also turned the cooling on at this stage with my right. This time we will be using the whole length of the cutter to cut around the profile. So we go straight to death. Since we have only left 0.4 of a millimeter on the profile of job, we can do this in one pass. We have already written the program for the profile of the components when we wrote our roughing pass. So we have to do is copy that part of the program and put it into our finishing pass. Now it's just a simple case of lifting the cut off the components to a safe rapid distance at 20 millimeters above the job using G 00 and we can also turn our coolant off. Use an M nine U G 40 to cancel, cut a compensation as before G 28 takes us back to our tool change position. And we defined out with X zero y zero using M five to stop the machine on. We add an optional stop at the end just in case we need to clear, swore or check the condition of the cutter. And that concludes the roughing and finishing off the profile of these parts. For the next part where we will cut slots, please continue to part free. 6. Widget part 3: now for 1/3 and phone parts of programming The widgets. This time we're going to machine the slot the number this parcel program as n five we used to five Offset five and we're using a 10 millimeters slow trail M 0 6000 machine. It's times a total change of G 21 G 90 selects the metric system. On the absolute measuring system, we will be using a spindle speed of 500 revs per minutes Defines with the S family and with M o free tens of Carteron in a clockwise motion, a good place to start to machine. This lot is in the middle of a straight section, so we got rapid infusion. T 00 x 200 weigh 85. The reason we used in Y 85 is we're not using cutter compensation. The outside of the slot is 80 millimeters from our data position, so I cutting path will be offset by five millimeters, which is the radius off. Slow drill. We're going to machine this lot five millimeters death. We could use a slightly slower feed rate since the cutter would be cutting on both sides on the bottom of a tool we feed into the job using Geo one. Since geo one in our Federated's already defines, we moved to our first position. But surely, using an X dimension you don't need to use geo to to cut these corner radius is this time because we're using a 10 millimeters slot drill on a 10 millimeter corner radius. He moves a cutter to why 155. Now we move our cut into the beginning off the 30 millimeter arc. Since this is a clockwise radius, we use G 02 We defined our endpoint with X and Y values on our sense of points of the radius using I and J. I have also slowed the feed rate down slightly, flys past the program to reduce tour chatter. Using a G A one move, I take the cutter past, where we first plunged into the job. I've also up to feed rates of 40 millimeters per minutes because we're doing a straight line move now and no longer cussing a radius, we use G 02 rapids of the tool out of the job into a safe where can distance above the top of the material m 09 stops to Cubans G 28 x zero y zero takes us back to our tool change position as before M five stops. The cutter M 30 tells the machine that we've got to the end of the program on the job is finished so it safely rewards a program. Baxter start ready for the next component to be cut, and that concludes, machining off the widgets. In this tutorial, we used five tool changes. Cut a compensation every G code we have covered so far in this course and every M codes. We've also learned about using cutter rages, compensation to control the size of a job and to leave on extra material for when you wish to rough cuts or finish cuts.