26
Computer Numerical Control (CNC) Name: ___________________________ (updated August 27, 2019 at location: http://techweb.bsu.edu/jcflowers1/rlo/NCLathe.docx ) Note: This packet contains instructional materials we will use to aid in learning to create and interpret Numerical Control (NC) programs, and in learning to program and operate our NC lathe and NC milling machine. It should be brought to lectures, demonstrations, and lab sessions. (There could be an initial zero, so G01 = G1). Some Common NC Codes: Hints (not listed on final exam): G0 Rapid traverse; point-to-point Think: GO! Moves fast, not straight. No cuts. After G0, list the destination coordinates. G1 Linear interpolation Cuts in a straight line at a given feed rate After G1, list the destination coordinates. G2 Circular interpolation arc CW Cuts circular CW arcs from Starting Point After G2, list end, then IJK of the center G3 Circular interpolation arc CCW Cuts circular CCW arcs from Starting Point After G3, list end, then IJK of the center G4 Dwell e.g., To allow spindle to reach speed After G4 list F then # of seconds: G4F2 G5 Pause Allows keyboard resume with F5 key G90 Absolute dimension input All later references are based on the origin G91 Incremental dimension input Each reference based on current 1

ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Computer Numerical Control (CNC) Name: ___________________________ (updated August 27, 2019 at location: http://techweb.bsu.edu/jcflowers1/rlo/NCLathe.docx )

Note: This packet contains instructional materials we will use to aid in learning to create and interpret Numerical Control (NC) programs, and in learning to program and operate our NC lathe and NC milling machine. It should be brought to lectures, demonstrations, and lab sessions. (There could be an initial zero, so G01 = G1).

Some Common NC Codes: Hints (not listed on final exam):

G0 Rapid traverse; point-to-point Think: GO! Moves fast, not straight. No cuts.After G0, list the destination coordinates.

G1 Linear interpolation Cuts in a straight line at a given feed rateAfter G1, list the destination coordinates.

G2 Circular interpolation arc CW Cuts circular CW arcs from Starting PointAfter G2, list end, then IJK of the center

G3 Circular interpolation arc CCW Cuts circular CCW arcs from Starting PointAfter G3, list end, then IJK of the center

G4 Dwell e.g., To allow spindle to reach speedAfter G4 list F then # of seconds: G4F2

G5 Pause Allows keyboard resume with F5 key

G90 Absolute dimension input All later references are based on the origin

G91 Incremental dimension input Each reference based on current position

M1 Program stop Halts the program

M2 End of program Ends the program. Include on final line.

M3 Spindle on CW Turns the spindle on at a set RPMAfter M3, list S then the RPM: M3S2000

M5 Spindle off Turns the spindle offAllows winding down the RPM at the end.

M6 Tool change Switches turret tools; move safe before M6.After M6 list T then new tool: M6T3

N Block number Precedes program line numbersYou can renumber automatically.

F Feed rate (usually in IPM) Speed of the tool’s relative motion during cutsAfter F, specify rate in inches per min.: F2

S Spindle speed RPM of the spindle. Use dwell to allow time.After S indicate RPM: M3S2000

T Tool selection New tool number from the turret.After M6, write T and the new tool #: M6T7

R Radius Alt. to IJK in Circ. Interpolation: G2X1Z2R.3

For a fuller description of NC codes and syntax, please consult the CNC lathe or mill operator’s manuals located next to those machines (or in Canvas).

1

Page 2: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Procedure for a typical NC lathe project (For a fuller description with some illustrations, seehttp://techweb.bsu.edu/jcflowers1/rlo/cncturning.htm)

If you have access to your own Windows computer on which you can load software, consider loading the lathe control and simulation software for the ProLight 3000 turning center. You can download it from Intelitek at the following site by clicking on Prolight_3000.http://www.intelitekdownloads.com/Software/CNC/CNC%20Control%20Software/Discontinued%20CNC%20Control%20Software/Windows/

A. Design the Part

1. Determine machine limitations. Our lathe is not set up to machine steel, or very large or long material. Make sure that our lathe can machine the part you want to create. Designs for long and thin parts may be too flexible to machine.

2. Determine cutting tool limitations. Notice the particular cutting tools that are installed in the turret, and their geometry. It is impossible to machine certain designs with these tools. Feel free to trace the outline of the tools with a pencil and paper, and to use those shapes on your full-scale drawing to see if the tool geometries could be used to machine the shapes indicated.

3. Determine stock limitations. There are some materials on-hand, including some brass, aluminum, and hardwood. Hardwood is recommended (and among these, hard maple is the best choice.) But we might not have the particular material you want in the size you want. Check first to see if we do, or purchase the material on your own. Do not purchase steel for this activity. The largest diameter that will fit into our collets is 1”.

4. Use paper or your own graph paper and sketch the part profile, keeping in mind that ½” of stock (minimum) must be inside the chuck or collet, and there must be an additional ½” between the collet and any machining that you do with the right hand, cutoff, or round nose tool. There must be at least 1” safety clearance between the collet and an area machined with the left hand tool. This is to keep the heel of the tool from hitting the collet.

5. Add the collet or chuck to the drawing, again, with at least ½" of material inside the collet and another ½” between the collet and any machining.

6. Label the origin. Make the x origin the center axis of the part, and the z origin the face of the collet or chuck.

7. Label the (x,z) coordinates of each critical point in your drawing.

8. Show your design to the instructor or lab supervisor for approval.

Page 3: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

9. Once the design is approved, cut your stock to length. Do not cut round stock on a bandsaw. Remember that at least ½” of stock must be in the collet, and an extra ½” must stick out of the collet unmachined. So if you have designed a 1” long piece, you would cut a 2” long piece of material. The workpiece may extend farther back into the headstock spindle, as long as it does not protrude from the red handle of the collet tool. It is recommended that you cut material in the Rapid Prototyping Lab, with the bench vise and a hacksaw (for metallics) or a crosscut saw (for woods and plastics.)

B. Prepare the NC Code

10. Determine the recommended maximum depth of cut and feed rate for the material you have chosen at the diameter to be machined.

11. Determine the best sequence of operations. Make believe your pencil is the cutting tool, and use your drawing to plan out the sequence of cuts and feeds. Make sure you both begin an end at the same safe location (called your Start Point)

12. Use the lathe simulator (recommended) or any text editor to write the NC code for your part. Add remarks as needed to the body of your NC code. Please include the following information in the introductory lines as remarks:

The name of the part The version number The file name Your first and last name The date The type of material, its initial diameter and length The amount of the material that is to be sticking out of the collet or chuck at

the beginning of the job The initial tool for the job The starting point of the initial tool Any special notes or instructions

13. Again, do not machine within 1/2" of the collet. That means no absolute coordinate should have a z value less than +0.5. (This is a laboratory safety issue, and it is not standard industrial practice.) Do not machine any closer than 1 inch from the collet with the left-hand tool that cuts from left to right, since the heel of that tool sticks out to the left over a half inch.

14. Save your file as a DOS text file with the extension .nc and any other filename requirements that have been made. (You might have been asked, for example, to use your last name to begin the filename.) Keep the filename short, and without

3

Page 4: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

spaces or non-alphanumerics (other than the period, hyphen, and underscore, which are okay.)

C. Verify the Code

15. Use a computer that has CNCBase for ProLight 3000 software installed. Open that software, and click File then Open to load your nc file.

16. If the NC code screen has a grey background, click Edit, Lock, to unlock it and allow editing. Rearrange the windows as needed.

17. If your computer is not physically connected to a lathe, you will be working in Simulation mode. If it is the computer connected to the lathe, you will have to turn on the lathe's power supply and to make sure the emergency stop is disengaged, which you do by pulling gently straight out.

18. There are specific tools installed in the lathe. Please do not change these without permission from the lab supervisor, since there is an in-depth process for re-setting the tool offsets. Note the tools in the lathe. Your software should show these same tools when you click Tools, Setup Library. If you are working at the computer with the lathe, please do not change these settings, but instead discuss it with the lab supervisor. If you are working at a different computer, you may change these settings, adding the correct tool for each tool number.

19. To verify your program, begin by clicking the Verify button. This brings you Verify Program dialog box. Please click on Verify Settings.

20. Under Verify Settings, Stock, Dimensions, please change the stock length to indicate how much is sticking out of the collet. This is not the length of the actual piece of material. Also, indicate the diameter of the material. Next, check to make sure that the Origin offset values are both 0. Finally, under Initial Tool Position indicate the starting tool position. Remember that the x value here is a radius measurement, not a diameter.

21. Back in the Verify Program dialog box, click Verify Program. As the computer goes through each line of your program, it shows the virtual machining in the verification window. You can use different controls at the top of that window to change the size, to move the object left or right in the window, and to slow or speed up the verification.

22. Please correct errors.

23. Re-verify the program, correcting errors and re-saving it, until you are confident it correctly machines the part with no error messages, no excessive cuts, and no unreasonable motions.

D. Prepare the Lathe

Page 5: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

24. Safety glasses are required in AT 141. Turn on the ProLight 3000 Turning Center's power supply box and the computer that controls it. Open CNCBase for ProLight 3000 and load your verified program.

25. Press the lathe’s red emergency stop button in.

26. Raise the cover and install your material into the headstock of the lathe. Use the appropriate collet or chuck and make sure your piece is held securely. Measure the stock to ensure the exact amount is sticking out of the collet and at least 1/2" is inside the collet. Make sure there is no stock protruding from the left of the collet tool.

27. Close the cover and disengage the emergency stop button on the lathe by gently pulling it straight out without twisting it.

E. Prepare the CNCBase Software Environment

28. Select Tools, Configure Turret, and then click on each of the tools to select the correctly numbered tool for that turret location.

29. Make sure there is no stock in the way of the turret if it were to turn or move to home.

30. Select “Tools,” “Operate Turret,” and click the Home icon in the window that opens. After the turret is homed, click “Done.”

31. Select “Setup,” “Set/Check Home,” or click the Home icon that appears near the top of the screen. In the window that opens, click the “Home” button.

32. Click “Tools,” “Select Tool,” find the correct tool and choose “Select Tool.”

F. Establish Known Coordinates

33. Using the computer's controls and the spindle turned off, move the tool near the stock, and scratch on a place to later be machined. Manually rotate the spindle as the tool nears. When the scratch goes 1/3 around, measure the Z distance of the scratch. Right click the position window and choose “Set Position.” Enter the new X and Z coordinates. You can find the Z coordinate by measuring the distance between the collet and the center of the scratch. For the X coordinate, enter the radius of the stock at the place where it was scratched, not the diameter.

34. For multiple tool programming, check the tool offsets for all tools to be used.

G. Make Final Preparations

35. Close the cover, back off the tool, then safely move it to its starting position.

5

Page 6: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

36. Make sure the spindle speed on the lathe is set to Computer, the shield is down, and you are wearing eye safety.

37. Visually check the code of your file. Save a copy of the file on the Lathe Control Computer in the appropriate directory.

38. Verify the code one more time. Make sure that "Single Step" is not selected in the run parameters.

39. Get the lab supervisor’s approval to machine before you run the program.

H. Run the Program, Clean Up & Power Down

40. If you have received the lab supervisor's permission and you are confident in your work, then click on the green Run button. As soon as you do, please make sure your hand is covering the Red Emergency Stop button on the lathe itself and you can press it if anything goes wrong (like if you see the stock work lose, if a tool insert is lost, if the spindle stops, or if you believe the tool will become damaged.

41. When the lathe has come to a complete stop at the very end of your program, press in the Red Emergency Stop button, lift the cover, and remove your part. Repeat as needed for additional parts.

42. Measure your part and note its dimensions. If you plan to machine it again, then readjust the known coordinates. For example, if one point of my workpiece was supposed to be machined to a diameter of 0.200” and I used a micrometer to determine it was actually 0.206”, then either there was an error in the code, or there was an error in the relative tool offsets, or (most likely) there was an error in establishing known coordinates. To reset known coordinates I would right-click on the coordinates and reset the x coordinate. Let’s say that when I right-clicked on the coordinates it said the tool was at X.250. I would conclude that the tool is really farther away from the center of the workpiece than this. Since the workpiece was machined to .206 when it should have been machined to .200 (diameter), that means that it was machined at a radius of X.103 when it should have been at X.100, and thus, the tool is .003 too far away in the x axis. Therefore, I would reset the x coordinate from X.250 to X.253. Then I could insert a new workpiece and machine it without re-establishing the x coordinate, and the area that was supposed to be .200 in diameter should be much closer to that measurement.

43. When you are done for the day, please clean the lathe. Vacuum out the debris. Put all tools and materials away. Power-down the computer and the lathe power supply/controller box.

Page 7: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe Feed Rates and Maximum Depths of Cut Recommended by Light Machines Corporation for the ProLight 3000.

Material Cut Type Dia. Feed IPM Max. Depth of Cut

Spindle RPM

Aluminum

Finish .375-.5 2 .008 2000.75 2 .005 20001.5 2 .003 2000

Rough .375-.5 2 .020 2000.75 2 .010 20001.5 2 .006 2000

Brass Finish .375-.5 2 .010 2000.75 2 .006 20001.5 2 .003 2000

Rough .375-.5 3 .022 2000.75 3 .014 20001.5 3 .007 2000

For other materials, use an experimental approach to optimize settings safely, and do not exceed .05 for a maximum depth of cut.

Sample Lathe Problem: Shaft 5

Close-up for Shaft 5

7

Page 8: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can
Page 9: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe: Bishop Project

A piece of ½” diameter brass was cut to 2” in length, and ½” of that length was placed into a collet on an NC lathe to machine the following piece. The part is to be cut off at a length of 1”. The grid below has 0.05” spacing and critical points circled.

1. Label the XZ coordinates for each critical point circled on the drawing below.

2. Beneath the grid, write the lines of NC code beginning at Block N65 for the finish pass only, prior to cutoff. Begin at X0Z1.51, and assume that all the roughing cuts have been made. Assume Tool T1 feeds right to left at a feed rate of 2 inches per minute.

N65G0X0Z1.51N66

9

Page 10: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can
Page 11: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Sample program with documentation: Bishop

N1; Part Name: BishopN2; Author: Jim FlowersN3; Filename: BishopLathe.ncN4; Class: TDPT 280 and TDPT 585N5; Date: 2/11/2021N6; Material: Free-Machining BrassN7; Dia: .5"N8; Length: .2"N9; Amount Right of Collet: 1.5"N10; Starting Point: X.25Z1.6N11; Tool 1 Right Hand Tool (Initial)N12; Tool 3: Cutoff ToolN13; Est. Minutes:Seconds: 3:08N14G90; Absolute DimensioningN15M3S2000G4F3; Spindle CW at 2000 RPMN16G0X.25Z1.6; Safety move to StartN17G0X.228; PlungeN18G1Z.5F3; Feed at 3 IPMN19G1X.26; WithdrawN20G0Z1.6; Back to starting ZN21G0X.206;N22G1Z.5N23G1X.26N24G0Z1.05; Position to rough out left arcN25G0X.21N26G3X.21Z.75I.5K.9; CCW circular N27G0Z1.6N28G0X.184; Four-line sequence to rough taperN29G1Z1.2N30G1X.194N31G0Z1.6

N32G0X.162N33G1Z1.35N34G1X.172N35G0Z1.6;N36G0X0; Reposition for end arcN37G1Z1.5N38G1X.14N39G2X.15Z1.49I0K1.35; First passN40G0Z1.51; Four line sequence to rough arcN41G0X.12N42G1Z1.5N43G2X.15Z1.47I0K1.35N44G0Z1.51N45G0X.10N46G1Z1.5N47G2X.15Z1.45I0K1.35N48G0Z1.51N49G0X.08N50G1Z1.5N51G2X.15Z1.43I0K1.35N52G0Z1.51N53G0X.06N54G1Z1.5N55G2X.15Z1.41I0K1.35N56G0Z1.51N57G0X.04N58G1Z1.5N59G2X.15Z1.39I0K1.35N60G0Z1.51N61G0X.02N62G1Z1.5N63G2X.15Z1.37I0K1.35N64G0Z1.51N65G0X.0N66G1Z1.5N67G2X.15Z1.35I0K1.35F2; Begin final passN68G1X.2Z1.05N69G3X.2Z.75I.5K.9N70G1Z.5N71G1X.26N72G0X2Z2; Move safe to rotate turretN73M6T3; Cutoff ToolN74G0X.26N75G0Z.5;N76G1X0F1; CutoffN77G1X.26F2; Back straight outN78M05; Spindle offN79G0X2Z2; Move safe to rotate turretN80M6T1; Right to Left ToolN81G0X.25Z1.6; Back to StartN82M02; Program end

11

Page 12: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

12

Page 13: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe Practice Problem 1

The piece below is drawn at full scale, so measure it precisely in decimal inches. Assume that the leftmost ½" of the stock shown below is placed in the collet or chuck. Use the collet face as Z0. Write the annotated nc code to machine the right section of this piece (between centers) from a hardwood dowel. Use a spindle speed of 2000 RPM and a feed rate of 1 foot per minute. The maximum depth of cut is 1/8", and you are to use a right-cut tool (which feeds from right to left). Please begin the tool even with the stock’s circumference and 1/8" to the right. Name your file LP1.nc, adding your last name first, so mine would be FlowersLP1.nc. Verify your file and inform the instructor when it works. (15 pts)

1. Now begin by drawing the chuck face, labeling the origin, and labeling the (x,z) coordinates for all critical points.

2. Next, use your pencil to simulate the cutting tool and plan out the moves.3. Finally, write the NC code. If you use the lathe simulator, you can verify it as you

go. But it could instead be written using any text editor or word processor, as long as it is saved as a DOS text file.

4. Verify your program. When it works, save a copy to your personal drive and tell the instructor it verified correctly to receive credit.

13

Page 14: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe Practice Problem 2

Challenge: Write efficient NC code to machine the part on our lathe using absolute coordinates. Verify your work and tell the instructor when you are successful. Save a copy of this as [name]LP2.nc, like you did for the first problem. (15 pts).

Parameters: The drawing represents a 2.9" long piece of hardwood, 1" in diameter (not necessarily drawn at full scale.) Assume the use of a right-cut tool (T1) with a maximum depth of cut of 0.1", a spindle speed of 1500 RPM, and a feed rate of 3 inches per minute. Assume ½" of the 2.9" length to be in the chuck, with the chuck face at Z=0. (The Y-axis is labeled assuming ½" is in the chuck.) Start the tool even with the edge of the stock, and 0.1" to the right. Include a cut-off routine (T3, feed rate of 1 IPM) so the final piece is 1.9” long and return to the starting point at the end of the program.Lathe Practice Problem 2

14

Page 15: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe Practice Problem 3

Challenge: This is the same part as in Practice Problem 2. But here, you are to write efficient NC code to machine the part on our lathe using relative coordinates after first establishing the initial tool position (using absolute coordinates). Verify it and tell the instructor when you are successful. Save a copy of this as [name]LP3.nc.(15 pts).

Parameters: The drawing represents a 2.9" long piece of hardwood, 1" in diameter (not necessarily drawn at full scale.) Assume the use of a right-cut tool (T1) with a maximum depth of cut of 0.1", a spindle speed of 1500 RPM, and a feed rate of 3 inches per minute. Assume ½" of the 2.9" length to be in the chuck, with the chuck face at Z=0. (The Y-axis is labeled assuming ½" is in the chuck.) Start the tool even with the edge of the stock, and 0.1" to the right. Include a cut-off routine (T3, feed rate of 1 IPM) so the final piece is 1.9” long and return to the starting point at the end of the program. Don’t forget the cutoff.

15

Page 16: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe Practice Problem 4: Hemisphere

You are to write the program that will use the right-cut tool which feeds right to left to cut a hemisphere on the right end of a piece of ½" diameter oak, 2 inches long. The hemisphere is to have a radius of 1/4". However, the maximum depth of cut is only 1/10", and the feed is 4 inches per minute. Begin with ½" in the chuck, and the origin at the chuck face. The tool is to start just even with the round edge of the stock, but 1/10" to the right. Cut off the hemisphere with Tool 3. (Don’t forget the cutoff.) Show all of your work. You are to prepare:1. a sketch of the part showing all critical point coordinates and all tool paths.2. nc code using absolute dimensioning

Verify your work. Save this as [name]LP4.nc, adding your name to the beginning of the filename. Inform the instructor when the code has been verified without errors. (15 pts.)

16

Page 17: ITDPT 303: Manufacturing Systems - Ball State Universitytechweb.bsu.edu/jcflowers1/rlo/NCLathe.doc  · Web viewFinally, write the NC code. If you use the lathe simulator, you can

Lathe Practice Problem 5: Left and Right

The following piece is shown on a 0.1” grid with the origin indicated. Using those coordinates, write the absolute dimensioning code to machine this part assuming that T1 is the tool that feeds right to left, and T5 feeds left to right. Use 0.1” as a maximum depth of cut and 5 IPM as the feed. There is no cutoff. Call this [name]LP5.nc adding your last name. Verify the code and tell the instructor when it has been verified with no errors. (15 pts).

17