CNC Lathe 2 Axis programming using G-Code | G-Code Tutor | Skillshare

CNC Lathe 2 Axis programming using G-Code

G-Code Tutor, Engineering Artist

CNC Lathe 2 Axis programming using G-Code

G-Code Tutor, Engineering Artist

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
8 Lessons (52m)
    • 1. Intro

      2:38
    • 2. Header info

      4:44
    • 3. Drilling operation

      9:41
    • 4. Tapping operation using G32

      5:11
    • 5. Boring Operation

      5:16
    • 6. Roughing Operation

      12:43
    • 7. Finishing Operation

      5:21
    • 8. Parting off

      6:05
  • --
  • 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.

42

Students

--

Projects

About This Class

Programming CNC Lathes and machining centres is a critical skill needed to work in a machine shop.

This course will teach you all the operations needed to machine a part on a 2 Axis CNC lathe. 
Whether you are new to the world of CNC turning or need to brush up on your skills this is the course for you.

This course includes:

  • Program Layout
  • Centre line drilling and tapping
  • Boring
  • Roughing cycles
  • Finishing cycles
  • Screw cutting
  • Parting off

And much, much more!


The techniques and practices used in this course will set you up for a lifelong career as a CNC machinist.

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

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.

phone

Transcripts

1. Intro: Hi, My name is Mark. Welcome to Geico Cheese. This course will teach you how to program CNC lathes and CNC machining centres using G coat . The CNC lathes she find in a modern machine shop have a lot more than just two axes. Most have more than one spindle live tooling, and some have more than one's hurt. Explain how to program these machines, as well as a to access slave, go into detail over how would live told him works and how we use it to create sports and holes in different parts of the machine, including 1,000,000 flats using the Y axis. This course will take you for every operation you need to know from basic boring on drilling in the face of the material to complex life tooling. Why access 1,000,000 onset axes off center tapping. I go over each command in each cycle, explaining what each part does there also to play handouts so you can keep notes on your phone or in your toolbox as a reference for when you're programming. We look at the C axis, which is the rotation of the Chuck and also a Y axis, as well as our X and said axes discuss different operations. Such a rigid tapping, not only in the main sense line of the parts, will also cross holes and tapping along the face of a part in a bolt hole circle. I discussed milling using 50 set access on the Y axis. I also include many Screw Fred reference charts. Cover metric BSF B S W B SC Metric Find. A metric course are designed his course for C and C machine apprentices, the L Y enthusiasts, machine operators that wish to learn to program the machines on also experienced CNC guys that wish to brush up on a few techniques they may not have used for a while. His course comes every operation that you need to know. Setting up the head of correctly boring a pre drilled hole, tapping using Ruffin cycles, using finishing cycles, parting off machining, using the sub spindle screw cutting, using two separate techniques, drilling both whole circles, cross axes, drilling y axes 1,000,000 said axes, Mylan are going to great detail on how each cycle works. Give me the confidence to program the machine. On completion of this course, you'll be well on your way. Its bid and professional G code programmer on a CNC lave or a CNC machining centre in a factory environment. I have 26 years experience working as a CNC machinist. Now I'm teaching you everything I know about programming G coat. 2. Header info: when starting to write a new program. I had information to the head of section at the front of the program explaining different information the operator may need when he's setting the machine. In this lesson, I'm going to go over the different information that I put in this header. The program starts off with a percentage symbol. This is only needed if we write in the program off line, for example, on a PC. If we're writing at the machine controls, the machine automatically puts its in. In fact, it doesn't even display it on the machine. The reason for this is a handshake command. So when we upload the program from the NC to the machine, the machine seizes. Command knows that has to load the program. This is our program number has to be a unique number. So when we're saving the program on DNC, it doesn't override some think we have already written. I normally find the best way to keep track of these numbers is have a spreadsheet and every time you operate to rights in your program, we add to the program and the program number to the bottom of the spreadsheet and also includes the name of the parts, the part number on any other information. We may need location of set up sheets or tooling directly following our program. Number is where we put in a part number. This is the individual number that comes with the parts so we can identify each component as customer needs them. This is usually the number found on the engineering drawings. As you can see, every fingers inside brackets, this is seven. Machine doesn't read. This information is purely for the operator. So here I have put our search number and are told number This way we can search straight to any past the program. We wish to go Teoh just by glancing at the beginning of the program. I've also added to the operation. So for example, here we have rough time underneath that I have are tool number that we use, So it's easy to locate the right tool holder. On also the tip number, we use lots of different grades of tips and engineering. If we cut in aluminium or titanium, you might use a different tip than staying the still. So this helps us identify the correct tip to use here is another example of the information I used when doing the finish. 10 procedure. Most of the time, it's best to keep certain tools and Saturn positions within the tall turret. It saves us, keep happen to unload them and reload the same tools in between each component. So, in this example, I always keep till one is my rough incidental and talk to you. It's my finishing time. The drill. She can leave drill holders and toll free two or four until five, for example, this way, where only happens, changed a drill and call it and not the entire assembly to separate different sections of the program and make things clear, it's read. We sometimes use an end of block command to separate different parts of the program for different lines. Here I've used it to separate Are Talking Information toe are datum information. Whether we're using an automated bar feeder or billets in the spindle off the machine, it's good to know the distance between the front of material on the nine point I normally used to face of the Chuck over. It's a collet chuck or freed your Chuck by putting this information at the beginning of the program. We know where the tool its first coming in and where expects, said zero to be on our datum shift. So it gives us a good idea before we take a face and cut that we're not going to be removing too much material on overloading a tool. Finally, I have my work shift Datum Information. G 54 is a datum position. Same SG 55. I usually work G 54 on the main spindle on G 55 off the sub spindle at the other side of the machine. These are two known points, so we can talk about this in to the information in the controls. So the machine knows where I zero is set. I would also like to take a sub chains. He discussed the M 30 command. We used M 30 on the very last line of the program to tell the machine that it's finished its components. And now it's time to rewind back to the beginning of the program, ready to start our next one. We've all CNC machining centres and CNC lathes. We have a continuous cycle button on the controls by activating this button on an M 30 command at the end of the program. The machine will just keep making parts until we tell it to stop. In this brief lesson, I discussed how I set up the head of section of my programs. A lot of companies like to you set up sheets as well. It's good for even more information, but without a set up sheet, you can supply all the information you're pretty needs just within the header. 3. Drilling operation: in this lesson, I'm going to demonstrate out into the hole in the front of the town's component. I'm also going to different drilling cycles on different G case that we can use to do this . We always start each block of program off the same. In this case, we're using in four for a search number so we can locate this part of the program what we need to and then it operates his notes. In this case, we're using a five millimeter drill. Now we add G 54 which is our datum call command in the machine. We have already preset the datum to be the front face of the job. So zero is the front face of the job. On this block, we give the machine a few different commands. We start with G O. This tells machines, go into the rapid mode. This is for future movements that we're gonna use after this block Eugene 97,000 machine. Now we're in normal revs per minutes mode Regarding the spindle speed, the alternative splices G 96 which is constant service cutting speed. This is explained in different parts of the course in this case, Jane 97,000 machine. We're using 1000 rpm spindle speed, and it maintains that as accurately as it can throughout the drilling process. This T value defines tool number on the offset number. In this case with the finding tool for on off set forth, aren't we always located in position for on the machine Torit on we're calling upon, offset for by glancing inside our machine, we can see our drill is in position for on the tyrants. This is what we use. Informants are such value. It makes it easy to remember where are tall is on where to search in the program to find it . And finally, on this block retelling machine to turn the spindle on in a clockwise motion by using M O free X zero takes her talk down to the center line of the components. As is standard on Alaves, the center line is normally known. Its X zero. The set position, said five, brings us five millimeters off the data position. You set the data position in the machine using G 54 so the machine knows the end of the component is zero. So this brings us five millimeters off the face of the job. The machine will move to these coordinates using the rapid travel commands. This was already to find in the line above using the G o command. Finally, the emirate is tons of Cuban on. It's always a good idea to have clued in on when drilling a hole or any turning operation. Still, under the rapid travel, commands are now rapid in the tall one millimeter off the face of a job. I tend to do it on a separate line to bring it in this closely components just in case I've miss read little measurements on and the tall was not set up right. When 1st 1 in the machine will be running, it's on single block. This gives us ample time to see that the tool is in the right position, so it stops any chance of collision. It's more of a safety thing that I personally do. Now it's time to start cutting metal using a Geo one command. This is our feed rate command. We're bringing the Tallinn Zed minus 50 millimeters to the depth of the whole. We declare the feed rate using the F value in this case It's not points, not eight millimeters per revolution of the spindle to bring the drill out of the job. We bring it out using the rapid travel commands G O, and we bring our five millimeter clearance from the face of the job. Let's make sure any swath can be relieved from the board before we move away. Little back to its toll change position. G 50 Free changes are working data to the machine data. This means the machine has a separate zero X zero position. That's we tend to use for two or change. But in this case I have moved the dead position 210 millimeters into the center of the machine. This keeps tools away from the sub spindle. When we're doing tool changing. It's purely a safety thing, and it's different for every machine. I just like to keep the tar away from any spindles. Walden. It'll change. As with all operations within the program, I like to end each operation with an M 01 commands. This way we can choose to stop the machine. Using an option stop if need be, makes it easy to jump in and out of different parts of the program on also, so we can check the quality of the tools and the quality of the components after we finish cutting it. If we feel the need now, drilling a hole 50 millimeters deep with a five millimeter drill is probably not a good idea. One. The sore for start ups, trucks and cooling so coolant is not getting through its simple. It all increases a chance to talk about burnout and snap. And also this wolf is getting built up inbound inside that hole. So we're not relieving it on. After drilling, 50 millimeters is going to snag on again the call to talk to break. So what can we do to relieve that? The answer is using the Pecker drilling operation. This is where we peck it. A whole raveling just drilling in one go. This helps relieve this wolf and also helps cool and gets the tip of the drill and keeps everything cool and cutting. Nice. But how do we know when we need to use petrol in on not normal drilling? Drilling 50 millimeters with a five millimeter drill is classed as a deep hole. A deep hole is defined by any hole that is greater than five times the diameter off the drill. So, for example, in this case, we're using a five millimeter drill. Five times five millimeters is 25 millimeters, so any hole over 25 millimeters would be classed as a deep hole for any deep hole, or would definitely use a pectoral in cycle even know materials such as nylon. But this is just a rule of thumb. It depends on the material you're cutting. For example, if you're cutting titanium, it might be best to peck even a 10 millimeter hole or maybe even a five. It really depends on what you're cutting on the speed you're cutting at. So let's look at how we depict drilling. There are many different kinds of picking cycles. In this case, I'm gonna demonstrate to most use ones in turning. Start with Let's discuss the G 80 free. The G eight e Free is used for deep hole drilling. It returns the peck outside the born each time it pecks. In other words, it retracts right outside the job before it goes back in and starts cutting again. This is great for clearing, swore for and getting cooling to the tip of the tool after the G 80 free command, as usual to give the full depth off the debt for the hole. In this case, it's 50 millimeters for 50 millimeters deep hole. The our value is our retract value. In this case, we're using five millimeters. This brings a drill five millimeters outside the job. On each pack, it's usually beneficial toward a dwell on the bottom of the hole. When the drill was at full depth. We know we like to dwell for a few milliseconds. This cleans up the whole on makes it more accurate and more consistent with our accuracy. To do that, we use a P value. In this case, I've decided to use 500. That's in milliseconds. So at the bottom of a hole, the drill would dwell for half of seconds before it retracts the key value house a drill. How deep to make each pec. Since we using the metric system, this is given in microns. So in this case, every two millimeters the drill willfully retract. At the end of this block, we issue a feed rates using an F command. In this case, we're using the same feed rate as before, with north points, not eight millimeters per revolution after the pectoral in cycle is complete. The machine we were attracted to the glass, Given said movement. In this case, it was one millimeter off the face of a job. We can't solve the drilling cycle by usin G 80. The code cancels all cycles. Now, as I drill is only one millimeter off the face. Little I look too rapid it away to at least five millimeters clearance. This insures it can safely rapid to the machine home position about getting caught up in school when drillings shorter holes in harder material. We might not necessarily need to attract the drill from the job each time we peck, so it's just a small peck with inside the material. This is called a chip peck a trillion cycle. We define this by using G 70 free. We don't need an R value because that's how is its health far to attract outside of the job . But everything else means exactly the same. The P value it's a time of dwell at the bottom of the ball on the Q value is a depth of cuts between each pick. I tend to use this peck in cycle. When I'm drilling at center drill in titanium, it stops to drill from burning out, increasing your tour life In this section, we discussed how to drill a hole on the set access off a slave, using not only standard drilling procedures but also to different kinds of Pec drilling operations. 4. Tapping operation using G32: in this lesson, I'm going to go over how to do Richard tapping on a lave using G 32 commands with the new Alaves and Machining centers. This is the preferred method of tapping. Using a tapping head for small holes may still help as it stops the tap from breaking at the bottom of the ball. But for general purpose tapping, we tend to use widgets happing. I'm going to call our search number flys tour in five, then in brackets on the operators note. We explain what all it is and size of the tap. We tell the machine what presets data position we are using by using the Command G 54. We can also have G 55 g 56 G 57 G 58. G 53 is reserved for the machine. That data position, which is usually where we do that all change Geo tells machine now onwards, were using the Rapid Travel command unless otherwise stated. The GE 97,000 machine that were using a spindle speed in revs per minute and that's we're not using constant surface speeds that would be jean 96 tall 0505 There's a next total number and offsets number, and finally M 06 tells a machine to do. It'll change when this line we bring it all into X zero, which is a center line of the components on the machine. Zed. Five Talents with five millimeters off the data musician, which was sets in the front of the job with the G 54 command. Hello, Unnecessary. To state it again, I have put a T zero beginning this line. To demonstrate G zero is the same as G 00 is just a shorthand way of writing. It's with most encodes and decodes. You can miss a zero here. I put a Nemo Command to tell the machine to stop Stop the machine here because I wish to add tapping compound to the tap rather than news and coolant. With some materials, it's better to use tapping oil or a certain compounds that works better with the material. This is also why I have not started the spindle yet, which I would normally do on the same line as I do. Little change. Now we have applied arts happen compounds we can close the machine door and press cycle start again. This will run this next line s 1 50 is 100 50 reps per minute spindle speed. We don't wish to go too fast because we're tapping on an M o free time to spend it on a clockwise direction. Now it's time to begin our tapping G 32 housing machine that were about to tap using the rigid tapping operation cycle Lizette minus 20 millimeters is a debt for friends that we wish to tap to go. We're using a feed rate of 1.0. This is the picture of the tap on Fred. We're using a six millimeter tap, so the pitch is one millimeter and finally using M 05 command. This tells a machine to stop when their tap is at the bottom of the fret. This can also be put on the line below on its own. Here we reverse the spindle and bring the tap out of the component. M 04 reverses a spindle in a counterclockwise direction, Onda said. Move brings the chapel still at the act of feed rate of one millimeters per revolution. As for the drilling cycle, I like to use the rapid movement to bring the tall away from the face the job before I send it back home to its tour change position. Are you sad? Usin G zero, Remember, G zero is just an abbreviation of G 00 The Rapid Travel Command not pulled out 10 millimeters off the face of job G 50 Free tells a machine that I wish to use the machine data position on not the data position we set at the end of the job using G 54 taken a tool to x zero said minus 210 is my tool change position. That's the machine rapids to away from the part Here is a safe position to do. That'll change without striking that sub spindle the main spindle, Any parts of the machine or a component in the chuck M I five stops the spindle. This line could just easy been placed on either of the two lines above How long is the M code is on a line on it. Same with no other M codes. It could be placed anywhere and finally are optional. Stop command of M 01 This is so we can check the top with the screw gauge after it's cut to make sure it's the right size in this lesson, demonstrated how we tap a whole using a rigid top command of G 32. 5. Boring Operation: In this lesson, we will discuss how to borehole using a boring bar and also how to calculate sham fits to the bed, front of the ball and the maths involved with calculations as usual, our first line we had a search number were using to five. So in this case is in five, followed by operators. Notes of What's All We're using the 54,000 machine. What work shift dates and we're using. In other words, how we set the front of the job to be zero within the machine controls. And G 42 turns on a cutter Compensation for our tour. Nice radius of our boring Bob. This is always set to the radius off the tip off. Born by that we are using and it's done inside the machine controls during set up t 055 towns machines. He's two or five offset. Five sixes. That'll change. I plan to use constant surface cutting speed while the boring So we use G 50 to set a spindle clamp so the machine does not go above 3000 rpm 18 96 house machine. We will be using constant surface cutting speed on the S 2 60 sets off speed for the surface. M o Free starts a spindle in a clockwise motion using the rapid travel command of G 00 No move up tool into position of our start point off a sham. For that, we're going to use Teddy Bear in front of the ball. First, I looked to cut a small shop for on the face. Laborde, this DeBose our board for us to save us manually working. It's at a later date when the components is finished. Let's go into more detail on how I do this. This diagram shows and a large picture of the ball so we can see what's going on with the angle and how I calculated were using the 45 degree angle to make things nice and simple. Rx dimension is one millimeter larger than our board diameter. This gives us our start point of our 45 degree triangle. I've bought our rapid in on set point free off the face the job. I would explain why in a second when we start cutting, bring our X down to our board diameter off 16 millimeters. I make a 0.0, too deep into the components. This means rd bearing sham for his point. Oh, too deep, since a 45 degree triangle is equal in both X and said dimensions, we have to remember we are cutting on a lave, so we double it because our triangle only works on one side of the shallow, for our X dimension has to be doubled. This is why we believe the X in one millimeter, Onda said only in half a millimeter by reducing the said 2.0 free rival in 0.5 in our start position, we can move our 0.5 degree triangle into the job by Zed minus 0.2 after we have machine there shall for it's just a case of moving, I said. Dimension down to the death of a bore in this case is 20 millimeters deep. To face off the bottom of the board, I bring the X dimension slightly past the center line. This clears up any pips more, so ensure your boring by it's small enough so it doesn't collide on the other side of the ball. Now we can activate rapid travel. I've shortened rgl oh commands to G zero. It's the same thing. I bought the tool out five millimeters off the face of the components. Do you 50 free tells the machine we're not using our work shift datum on that. We're using the machine datum command. So our X and said dimensions are taken from machine zero and not our work shift zero at the face of the component um 09 times off equipment As we use cut compensation during this procedure, we now turn it off with G 40 m i five is RM code to stop the spindle rotating 18 97 turns off constant surface cutting speed command that we issued it beginning with program with G 96. This puts a machine back into revs per minute mode Raval in constant surface cutting speed . So Jean 97 activates the revs per minute spindle speed mode quote. Often a boar has a very high tolerance. So we will need detectable using the plug age quite regularly during the operation procedures by putting an M 01 operation stop at the end of a boring cycle, we can stop the machine and check the board's correct. But before we continue to machine the rest of the components in this lesson demonstrated the finish bore operation using a boring bar on the flat bottom hole and also how to be by the front of the board using geometry. 6. Roughing Operation: in this lesson, we're going to discuss how to do a roughing operation using a right hand knife to on the lave. The easiest way to do this is using a roughing cycle G 71. I'll go into debt from how that works and maybe handouts after the lesson, so you can use it as a reference I first look. Program uses Thean number so we can search for the rough tongue operation in the program later on. Now these same numbers. When I first started programming a long time ago with CNC machines, we used an end number for each line. Now it's boiling, just used for a search number at the beginning of each section of program so we can jump into the program easily just by title in the end number on the down arrow on the planet controls and that such is straight to our line. We need to get it next. We have an operator's note so we know what we're doing in the program. So I've just put rough tongue. We can put the tool details here. Some people like to put in a lot of information about it all in, but I put that at the beginning of the program, so we couldn't reference that while we're setting the machine, I don't find it, too. Need to add it in the program. Further down my first command on the next block, G 54 which tells machine that were called in upon a datum that we've already said when we set the machine up a standard practice. The front of the job is zero on this case. Some people used apart in off position for the data position, but it's always use the front face that way. If we using it said minus value. We know we're cutting material on that way into the material. The G 40 cancels any cutter compensation from previous operations. We will be using cutter compensation in this operation, but this cancels it from before. If it's still life are rough until is in position one on the tire it. So we called position one by using T one and then we take our offset. It's also one so first command is T 0112 a one off set one. Then we used m 06 to tell the machines to a tall change. This is where the tar it will rotate to the main tool that what you wish to use is in position to cut the G 50 command is a speed clamp. What this means is machine will not go about 2500 rpm in the G 50,000 machine. It's maximum rpm cannot go above 2500 revs per minute. The reason we use the speed club is because on this operation we're going to be used in constant surface cutting speed. What this means is, as material gets smaller, the surface on the diameter would be going slower. So the machine compensates for this by speeding up the spindle. So as a material touches a tool, it's at a constant speed, no matter what the diameter off the job. The G code Phyllis is G 96 which is the code for constant surface cutting speed. Following the G 96 we had our surface speed. In this case, we used s to 80 the M o free turns on the direction spindle in a clockwise motion. Now it's time to bring our tour into position to start cutting. So we use our rapid command G 00 I'm bringing it into x 70 millimeters. We're assuming the billet of the material is 60 millimeters as on the drawing. That position is five millimeters clear from the front of the job and we used m 08 which is a coons on command. I like to approach the job using the feed rate command. So we use G 01 I do listen, so we have more control over the tool using the feed over right knob on the controls of the machine. That way, if something is wrong, we have plenty of time to react and stop it before collision. I'm bringing the total in their 0.1 off. The data musician. This is so we can clean up the front face of the components, leaving on 0.1 of a millimeter for our finishing operation. I'm using the feed rate a 0.1 millimeters per revolution for this. Now we face off the front of the components Argo point No, to pass a sense line of the component just to clean up any pips that maybe left over. This assumes that all is perfectly set on center hope, which is a must other words, you will leave a pip, which could affect the center drill later on. When we drill a hole in the face have slowed the feed right down 2.5 In this case, as the two approaches that center line, the spindle will speed up to its maximum rpm of 2500 revs per minute. Because we have surfaced cutting speed on this is what we set it speak lamp. Otherwise, the machine will attempt to go up to an infinite speed. Using G 00 we now rapid Artur away to a safe position before we start roughing cycle. The next two blocks of code is where we define our roughing cycle. Newsome G 71. There's a lot of information in this section, so let's make that larger and go over it. Part by part. This slide is available for download. When I was first learning in CNC programming, I kept something very similar it Listen, my toolbox. It's really good reference guides, so I recommend Prince and out and keep it in your nights. The G 71. It's a diameter roughing cycle G coat. This tells a machine that we're gonna be cutting with a roughing cycle. Do you? One point? No. That means the death of cuts for each cut. In this case, we're cutting one millimeter. We follow that with er value, which is how much we retract the tool from the material after each roughing pass. And the following line is where we give it some information about where our subroutine is. A subroutine would be the profile off. The parts are going to more detail with that when we go back to the main program. So again we use the G 71 command up he 100 Q 100 is our first line in our last line of the subroutine. We detonate this in the main program, using an end number like our search number beginning of the block. So, for example, roving use an end one for our search number. We use N 102 hundreds to tell the machine the part of the program where the Ruffin Subroutine lies. This will become more clear when we go back into the main program. Next value is your value again. This time it doesn't mean death of cuts. This is where it can get confusing with CNC programming, it means the amount left on for finishing in X. So basically, as we cut the profile, it will leave 0.2 millimeter on the material so we can come in with a finishing tool on clean up the job afterwards. So this is our finish allowance. The W command is the same, but for our sense of direction. This is how much it leaves on the face off the job as it profiles so we can clean up their faces without finishing toll on the following operation and finish off this block. We define a feed rates using the N F L E. In this case, we're cutting that 0.2 of a millimeter per revolution. Now we can start our subroutine. This is defined by the end 100 value. It could be any number you like. We tend to use free digit number. That way it doesn't get confused with our search and number were used at the beginning of each parcel program. If we wish to use more sub retains, it gives us more options. So in this case, I've used in 100 the P 100 commands that we mentioned just now on the line above. This points to the end 100 number. In the beginning of our celebrity, we can give this any value. It could just be easy in n 530 on P 530 would point to it. Using a rapid command, we come into x 19 millimeters. This is one millimeter below the diameter that we wish you start cutting. This is because we have a 45 degree sham for that's one millimeter deep on the front of the part. I haven't labeled that with dimensions for clarity. So everything is more visible on the drawing. The Geo one command is our feed rate commands on. We turn on the cutter compensation using G 42. Now we bring this head into the face of the part that said 00 Since we have a Geo one command, I've added the feed rate of F 0.2 millimeters per revolution. Here we bring our talk to the end of the 45 degree sham for we do that, but bring the total up to 20 millimeters which is a damaged her. We wish to cut on within Zed minus 0 00.5 millimeters. This is a death off the sham for are going to more detail discussing the maths on and the calculations behind cutting champers on the face of the part in the boring operation lesson . In this block, we move out all 20 millimeters towards a chuck using ZED minus 20. This takes a cutter to start point of our angle. We don't need to know the exact angle off this part of the program. We have our start diameter on our finished diameter and also the left off the angle. So we have all the information we need to be on the program. This part, our X dimension 40 millimeters andare said dimension is minus fatty. As we can see from the drawing. There are many ways to program a radius on a CNC machine. We could use G O to geo free with the I N K value. We could use geo to within our value, for example. But in this case was simply the finding. The Zed live then added the radius value with a comma preceding it, certainly slowing, reads said. Minus 65 Comma are five point notes. Here we program Artal to come up to the size of the billet Exit 60 millimeters, and that brings us to the end of our subroutine. So using the in number and 200 as we spoke about on the G 71 line when we had the values P 100 Q 200 a Q 200 references this number the end of 200 again, it could be any free digit number you like. In this case, I've used 200 to define it. The G 40 turns off cutter compensation on the X value brings our total up away from the damage to the job. I always say rapid, it'll five millimeters off the face of a job. Our program this move using the feed rate as we're still under geo one have used to feed rate of 200 millimeters per revolution. This is a very fast feed, right, and we take the machine up to almost rapid speed. But it's a lot more controllable by using the feed override switch on the front of the machine controls. This move can also be done using a G 00 rapid command instead of a feat right as in the yellow lessons. We now telling machine to use the machine data musician and not our work shift data position by the funding G 53. Now we can use X zero, which takes machine to the machines they're out point on. I resented. Dimension is are safe working distance in between the two spindles Here we can also turn after coolant by using M 09 Now it's a good time to turn off the spindle, so we use an M I five command to stop the spindle. Since we turned on constant surface cutting speed at beginning of this section, it's best that we turn it off. That way, we have no surprises. If we jump into the program and find constant surface cutting speed is still active. So we turn it off with Jean 97 and finally in m 01 optional stop just so we can stop the program at this point if we need to thank you for watching this lesson in this lesson, we covered a full Ruffin cycle on a CNC lave and how to use subroutines within the program on how to define them in our next lesson will be covering the finishing cuts using the finishing cycle, we will be calling upon this subroutine again without having to do too much more programming from finishing cycle. Since the profile has already been programmed, watch the next lesson to see how that's done. 7. Finishing Operation: Now that we have roughed are components, I'm going to demonstrate how we can do a finishing operation to clean up our faces to give us dimensional accuracy and good surface finish. I will be using two or two in position two of our tyrants this time. So our end number, which we use for searching, is to then operators notes on brackets, so the machine doesn't read it. I'm just gonna put finishing time here. We tell the machine we're using the work shift datum under G 54 and that's our cutter. Conversation is off G 40. Now, we define our tool with a T O to offset number Oh to And we also use em a six to do. It'll change. I will be using cutter compensation again on this operation. So G 50 turns on this maximum speed clamp on we're safe s 3000 as a maximum speed, so the machine cannot go above 3000 rpm. Jean 96,000 machine. We're using constant surface cutting speed. I'm good to find off surface speed as free 100 using s 300. You also time to spend one at this point with M o free which turns on clockwise. Here we rapid to our start position of X 70 and gives us 10 millimeters clear of the billets and said five millimeters off the front. This gives us five millimeters away from the front part to give us plenty of clearance. M 08 tons of Cubans on and, of course, G o. At the beginning of the line is a rapid travel move. Using Geo one, we set a feed rate of F 10.1 and bring the cut it down to face the job, it said. Zero feeding down the face The job two X minus North Point to Slade to feed right down 2.5 . So we take a nice finishing cuts down the face of job, leaving the good surface finish on dimensional accuracy using G o rapid commands a rapid taught away from a safe distance away from the components. In this case, I got two x 70 millimeters and two millimeters off the faceless job. Instead, as we're about to start cutting the diameter, I wish to turn on cutting compensation for that. I use G 42. Now it's time to activate finishing cycle. The G code finishing cycle is G 70. Now the two numbers. Next to that, you may recognize my Ruffin cycle. Let's bring out a program of our Ruffin cycle to have a look. Well, it's fits in when we use the coat P 100 Q 2 hundreds within a cycle such as a roughing or finishing the control systems will look for the program to see if it finds an end number that corresponds to that. Since we have already written a sub rooting for profile off the part, we can call upon that again to save us rewrites in the program. So using the code G 70 p 100 q 2 hundreds I thought we need to do to make a finishing cycle for our parts, since we already program the profile in the rough and cycle. When the machine reads this line, it would go ahead and turn the profile for us to finish size. Using the rapid command of G 00 are now move the right hand knife tool away to a safe distance away from chuck on the parts, using X 70 off the diameter on five millimeters off the face of the components few 50 Freeze house a machine that we're using the machine datum and not the work shift data. We can use this to move to cut away total change position that we've defined with x zero zed minus 2 10 Andi m 09 tons of food in tough G 40 turns off the cutter compensation and M 05 stops in the spindle Jean 97 puts machine back in revs per minute. Spindle knows this turns off constant surface speed, and that way, every time we enter a speed into the machine, Nell, it takes it as revs per minute are not constant surface cutting speed. That basically turns off the G 96 that we put on the beginning of the program to define constant Cephas cutting speed. And, as usual, finally, we add an optional stop at the end of this section of program so we can stop the machine, measure the component, and if it's still oversized, we can make adjustments to offset Table on, rerun this section again, and that completes its lesson on how to turn a finishing operation. Programming using G code on a machining centre or life. In this lesson, we covered how to use the G 70 finishing cycle on how to easily use pre written subroutines from other parts of the program to save us having to rewrite the profile off the part again . 8. Parting off: the components isn't finished if it's still in the spindle. So in this lesson, I'm going to show you how to remove the component from the stock material. Also known as parting off the first line never changes. Use end nine for such number. And then the operator note part off 54 defines our work shift Datum and G 40 turns off any cuts compensation that maybe life from previous tools. We have our part enough tool in position nine on a tear it. So we define that by using ta nine million and offset number is nine in this case. So t 0909 and then m 06 to do. It'll change. I'm going to be using constant surface cutting speeds part off so we get a nice finish on the back end of the job. So G 50 is a spindle speed clamp with a maximum spindle speed off 3000 up here 15 96,000 machine began to be used in constant surface cutting speed. The speed of the material is s 250. This is measured in meters per minute, so the surface speed is covering 250 meters per minute when it touches the tool, am I free times are chock on in a clockwise direction. As you may have noticed, I've displayed my tools upside down for the direction the chuck is going. I have done this for clarity so you can see what tool amusing. It's just for demonstration purposes. Using G 00 a rapid Artal after diameter and off the face of the parts by five millimeters use emirate to turn the coutant on on a separate line are now rapid in that direction. I have stated G 00 again. Hello. It's not needed because it's still active from the line above. The reason of used two lines to rapid into this position on not straight to this point is because when the first running a job in single block, this gives me ample opportunity to stop the machine. If anything is going wrong or something doesn't look right, you may have noticed I've come point to past left the job. The job is 20 millimeters long reason for this is because we're going to cut a small group first and then I'm gonna bring the tool back out. I mean, she in a sham for to develop parts before we'd finished cut without parting off to let me show you what I mean. Geo one turns on the feed rate. Move X minus 10 millimeters at a feed rate of points. 08 millimeters per revolution brings out all 10 millimeters into the job. Taking five millimeter cut using G 00 now rapid the tool away from the parts up to five millimeters off the surface of the job here. A move into position to begin of the shout for a wish to 10 so we can debate the components . I'm bringing a toll half a millimeter off the surface of material using X 20.5 using Geo one we know machine. The shot fell in the back of the components. We already relieve some space behind the sham for using the previous group, for example, of the maths on how you calculate a 45 degree angle on the lave. Have a look in my boring operation Lesson A demonstrates. Didn't debt from there professed 10 millimeters. The parting often would only be taken off 100.2 of a millimeter of material until it reaches the parts that we have not grieved since we're using constant surface cutting. Speed activates Milady 96 Spindle will speed up as we approach the center line. If you have forgotten to add the G 50 coat, you'll notice it. At this point, the spindle would try to reach infinite speed on Make a Lot of noise. I have taken a toll half a millimeter past the center line. This gets rid of any pips. Providing the tool is on center hype. Lift the parts of safely in the bottom of the machine. We can now, Rapid told away again, I prefer to do this in two separate lines, just in case the tip melted or something happened on the part of still attached the job. So first I rapid out in X, so we're clear from the components before they visit. Move. A lot of modern day machines have worked catches Every M code is different for the work catcher, but here you can pull the work catcher out to catch the components as it falls from parts enough. It'll then retracted. It's a simple M command to extend it on another M command to retract it. Now we can rapid are tall away the machine tool change position using the machine datum of G 50 free. Now it's a good time to turn off any. Couldn't you semi knowing M a five? It's I m coated to stop The main spindle 18 97 put us back into rpm mode for the spindle is basically turns off her constant surface cutting speed and puts the machine back into normal up here mode. When we start the spindle next time here, I've added our usual optional stop at the end of the sequence. Here, I covered how she's apart, enough tool and how to write a program to shout for the back of the components before we part off. There's many different techniques to do in this. This is just one. This technique can also be used to groove into the material. There is grooving cycles, and the modern machines even have part enough cycles risking chip and have a retract value a bit like a drilling cycle. Love not demonstrates in this video also explained about using the part catcher that can collect the job before it falls into the machine