CAM lab

LIST OF EXPERIMENTS

  • Experiment list including staff, name of the experiment, page number and marks

Study of different CNC control systems and CNC codes.

  • Aim: To explore CNC control systems, their interfaces, features, and functionalities. Familiarize students with standard CNC codes like G-codes and M-codes for programming and operating CNC machines.

  • CNC Technology: CNC enables high precision, repeatability, and automation in manufacturing. CNC machines follow programmed instructions (CNC codes) to control tool movement, revolutionizing industries like automotive, aerospace, and electronics, reducing human error, and enabling mass production of intricate designs.

  • CNC Control Systems: They interpret CNC codes into mechanical actions.

    • FANUC: Known for reliability and user-friendly interfaces, supporting a wide range of CNC machines.
    • Siemens SINUMERIK: Advanced features with simulation capabilities, used in high-precision machining.
    • Haas: Easy-to-use, found in educational settings, offering robust functionality.
    • Heidenhain: High-precision controls used in aerospace and automotive industries.
    • Each system has its programming language or dialect, sharing common elements like G-codes and M-codes.
  • CNC Codes: Language to communicate with CNC machines.

    • G-codes (Geometric Codes): Define part geometry, control tool movement along X, Y, and Z axes, tool changes, and speed control.
      • G00: Rapid positioning.
        • Example: G00 X50 Y30 - Moves the tool quickly to X=50, Y=30 without cutting.
      • G01: Linear Interpolation
        • Example: G01 X100 Y50 F200 - Moves the tool in a straight line from the current position to X=100, Y=50 at a feed rate of 200.
      • G02: Circular Interpolation Clockwise
        • Example: G02 X70 Y30 I10 J0 - Moves the tool in a clockwise arc to X=70, Y-30 with a center offset of I=10, J=0.
      • G03: Circular Interpolation Counter Clockwise
        • Example: G03 X30 Y70 I-10 J0 - Moves the tool counterclockwise in an arc to X=30, Y=70 with a center offset of I=-10, J=0.
      • G04: Dwell
        • Example: G04 P2 - Pauses the machine for 2 seconds.
      • G20: Programming in Inches
        • Example: G20 - Sets the machine to use inches for positioning and movements.
      • G21: Programming in Metric
        • Example: G21 - Sets the machine to use millimeters for positioning and movements.
      • G28: Return to Home Position (Reference Point)
        • Example: G28 X0 Y0 - Moves the tool back to the machine's reference home position for X and Y axes.
      • G40: Tool Radius Compensation Cancel.
        • Example: G40 - Cancels any active tool radius compensation.
      • G41: Tool Radius Compensation Left.
        • Example: G41 D1 - Engages tool radius compensation to the left side of the tool, using tool offset D1.
      • G42: Tool Radius Compensation Right.
        • Example: G42 D1 - Engages tool radius compensation to the right side of the tool, using tool offset D1.
      • G83: Peck Drilling Cycle.
        • Example: G83 X50 Y50 Z-20 Q5 F100 - Performs a peck drilling operation, drilling to Z-20 in 5 mm increments at a feed rate of 100.
      • G90: Absolute Input
        • Example: G90 - Switches the machine to absolute positioning mode. All coordinates are relative to the origin.
      • G91: Incremental Input
        • Example: G91 - Switches the machine to incremental positioning mode. Each movement is relative to the current position.
      • G94: Feed Per Minute
        • Example: G94 - Sets feed mode to feed per minute.
      • G98: Return to Initial Point
        • Example: G98 - In a canned cycle (like G83), returns the tool to the initial point after completion.
      • G99: Return to R Point
        • Example: G99 - In a canned cycle (like G83), returns the tool to the R point after completion.
      • G170: Circular Pocketing
        • Example: G170 X0 Y0 D1 Z-5 I25 - Creates a circular pocket with a radius of 25 mm at X=0, Y=0, using tool D1, depth of -5 mm.
      • G172: Rectangular Pocketing
        • Example: G172 X0 Y0 Z-5 I40 J30 - Creates a rectangular pocket with dimensions 40 mm by 30 mm, depth of -5 mm.
    • M-codes (Miscellaneous Codes): Handle non-geometric aspects like spindle control, coolant flow, or program stops.
      • M00: Program Stop
        • Example: M00 - Temporarily stops the program; requires a user action to continue.
      • M01: Optional Stop
        • Example: M01 - Stops the program if the optional stop switch is ON.
      • M02: Program End
        • Example: M02 - Ends the program.
      • M03: Spindle ON Clockwise
        • Example: M03 S1500 - Turns the spindle ON clockwise at 1500 RPM.
      • M04: Spindle ON Counter Clockwise
        • Example: M04 S1500 - Turns the spindle ON counterclockwise at 1500 RPM.
      • M05: Spindle Stop
        • Example: M05 - Stops the spindle.
      • M06: Automatic Tool Change
        • Example: M06 T02 - Automatically changes to tool number 02.
      • M07: Coolant ON Mist
        • Example: M07 - Turns the mist coolant ON.
      • M08: Coolant ON Flood
        • Example: M08 - Turns the flood coolant ON.
      • M09: Coolant OFF
        • Example: M09 - Turns all coolant OFF.
      • M30: Program End & Reset
        • Example: M30 - Ends the program and resets the machine to the start.
      • M70: X Mirror ON
        • Example: M70 - Turns ON mirror imaging along the X-axis.
      • M71: Y Mirror ON
        • Example: M71 - Turns ON mirror imaging along the Y-axis.
      • M80: X Mirror OFF
        • Example: M80 - Turns OFF mirror imaging along the X-axis.
      • M81: Y Mirror OFF
        • Example: M81 - Turns OFF mirror imaging along the Y-axis.
      • M98: Subprogram Call
        • Example: M98 P1000 - Calls subprogram number 1000.
      • M99: Subprogram End
        • Example: M99 - Ends the subprogram and returns to the main program.
  • Programming in CNC: Involves writing instructions using G-codes and M-codes for the CNC machine to produce a desired part. Programs are written in a text editor and loaded into the CNC control system for execution.

  • Importance of CNC Control Systems and Codes: Selection of appropriate CNC control system and correct application of CNC codes.

  • Viva Questions:

    1. What is the purpose of using G00 and G01 codes in CNC programming?
    2. How do you ensure the accuracy of manual part programming?
    3. Explain the difference between absolute and incremental programming.
    4. What are the common errors encountered in manual CNC programming?
    5. How would you modify the program if the shaft required an additional step with a different diameter?
  • References:

    • Textbooks:
      • Groover, M.P., Fundamentals of Modern Manufacturing, Wiley.
      • Smid, P., CNC Programming Handbook, Industrial Press.
    • Web Resources:
      • MIT Open Course Ware - Introduction to Machine Tools
      • NPTEL - CNC Programming

Programming and simulation for turning, taper turning, circular interpolation, thread facing and parting operations.

  • Aim: Provide hands-on experience in programming and simulating various CNC machining operations. Including turning, taper turning, circular interpolation, thread cutting, facing, and parting. Students will gain practical skills in developing and executing CNC programs, understanding machining processes. And using simulation tools to visualize and validate the machining operations before physical execution.

  • CNC Part program:

    • The dimension of BILLET: X22 and Z60
  • Example Codes:

    • SIMPLE FACING:
      • O1001: Program number or identifier.
      • BILLET X22 Z60: Indicates the initial workpiece dimensions: diameter 22 mm, length 60 mm (not an executable command).
      • G21 G98: Sets unit of measurement to millimeters (G21) and return to initial point mode for canned cycles (G98).
      • G28 U0 W0: Commands the machine to return to the home position with X (U) and Z (W) axes moving to zero.
      • M06 T0101: Tool change command to select tool number 01 with offset 01.
      • M03 S1500: Starts spindle rotation clockwise at 1500 RPM.
      • G00 X22 Z1: Rapid positioning to X position 22 mm and Z position 1 mm.
      • G01 Z-0.5 F45: Linear interpolation to Z position -0.5 mm with a feed rate of 45 mm/min.
      • G01 X0: Linear interpolation to X position 0 while maintaining Z position -0.5 mm.
      • G01 Z1: Linear interpolation to Z position 1 mm.
      • G00 X22: Rapid positioning back to X position 22 mm.
      • G01 Z-1 F45: Linear interpolation to Z position -1 mm with a feed rate of 45 mm/min.
      • G01 X0: Linear interpolation to X position 0 while maintaining Z position -1 mm.
      • G01 Z1: Linear interpolation to Z position 1 mm.
      • G00 X22: Rapid positioning back to X position 22 mm.
      • G01 Z-1.5: Linear interpolation to Z position -1.5 mm.
      • G01 X0: Linear interpolation to X position 0 while maintaining Z position -1.5 mm.
      • G01 Z1: Linear interpolation to Z position 1 mm.
      • G00 X22: Rapid positioning back to X position 22 mm.
      • G01 Z-2: Linear interpolation to Z position -2 mm.
      • G01 X0: Linear interpolation to X position 0 while maintaining Z position -2 mm.
      • G01 Z1: Linear interpolation to Z position 1 mm.
      • G00 X22: Rapid positioning back to X position 22 mm.
      • G28 U0 W0: Commands the machine to return to the home position with X (U) and Z (W) axes moving to zero.
      • M05: Stops spindle rotation.
      • M30: Ends the program and resets the program counter to the beginning.
    • SIMPLE TURNING:
      • O1002: Program number or identifier.
      • BILLET X22 Z60: Specifies the initial dimensions of the workpiece: diameter 22 mm, length 60 mm (this line is a comment and not an executable command).
      • G21 G98: Sets unit of measurement to millimeters (G21) and sets the return to initial point mode for canned cycles (G98).
      • G28 U0 W0: Commands the machine to return to the home position with X (U) and Z (W) axes moving to zero.
      • M06 T0101: Tool change command to select tool number 01 with offset 01.
      • M03 S1500: Starts the spindle rotation clockwise at 1500 RPM.
      • G00 X22 Z1: Rapid positioning to X position 22 mm and Z position 1 mm.
      • G01 X21: Linear interpolation to X position 21 mm while maintaining the current Z position.
      • G01 Z-30 F45: Linear interpolation to Z position -30 mm with a feed rate of 45 mm/min.
      • G00 X22: Rapid positioning back to X position 22 mm.
      • G00 Z1: Rapid positioning to Z position 1 mm.
      • The reamining codes repeat the procedure above.
      • G28 U0 W0: Commands the machine to return to the home position with X (U) and Z (W) axes moving to zero.
      • M05: Stops spindle rotation.
      • M30: Ends the program and resets the program counter to the beginning.
    • Circular interpolation:
      • O1003: Program number. Identifies this CNC program.
      • BILLET X50 Z100: Describes the billet/workpiece dimensions. Here, the billet is 50 mm in diameter and 100 mm in length.
      • G21 G98: G21 sets the machine to metric units (mm). G98 uses feed per minute (as opposed to feed per revolution with G99).
      • G28 U0 W0: Sends the tool to the machine home position (X=0, Z=0).
      • M06 T0101: M06 changes the tool to tool number 01. T0101 selects tool 1 with offset 1 (correct geometry for the tool).
      • M03 S800: Starts the spindle in the clockwise direction at 800 RPM.
      • G00 X52 Z2: Rapid move to X=52 mm and Z=2 mm above the part. This positions the tool safely above the workpiece.
      • G01 Z0 F50: Linear feed to Z=0 mm with a feed rate of 50 mm/min. This moves the tool to the face of the workpiece.
      • G02 X40 Z-20 R10 F50: Clockwise (CW) circular interpolation from the current position to X=40 mm, Z=-20 mm with a radius of 10 mm.
      • G03 X30 Z-40 R15 F50: Counterclockwise (CCW) circular interpolation from X=40 mm, Z= -20 mm to X=30 mm, Z=-40 mm with a radius of 15 mm.
      • G01 Z-50 F50: Linear feed along the Z-axis to Z=-50 mm with a feed rate of 50 mm/min. This finishes the straight section after the arc.
      • G00 X52: Rapid move to a safe position at X=52 mm away from the workpiece after cutting.
      • G28 U0 W0: Send the tool back to the machine's home position (X=0, Z=0).
      • M05: Stop the spindle.
      • M30: End the program and reset the machine for the next operation.
    • Taper turning operation:
      • O1002: Program number. This is the identifier for the CNC program.
      • BILLET X50 Z100: Describes the workpiece dimensions. In this case, the billet is assumed to be 50 mm in diameter and 100 mm in length.
      • G21 G98: G21 sets the machine to metric units (millimeters). G98 uses feed per minute for cutting (as opposed to feed per revolution with G99).
      • G28 U0 W0: Sends the tool to the machine home position (X=0, Z=0) to ensure a safe starting point before tool changes or operations.
      • M06 T0101: M06 changes the tool to tool number 01. T0101 selects tool 1 with offset 1 (the correct geometry for the tool).
      • M03 S1200: Starts the spindle in the clockwise direction (M03) at a speed of 1200 RPM (S1200).
      • G00 X50 Z2: Rapidly moves the tool to X=50 mm and Z=2 mm. This positions the tool at a safe distance above the workpiece to avoid collision.
      • G01 Z0 F100: Performs a linear feed (cut) towards Z=0 with a feed rate of 100 mm/min. This brings the tool into contact with the workpiece along the Z-axis.
      • G01 X30 Z-50 F50: Moves the tool in a linear motion to X=30 mm and Z=-50 mm, cutting a taper. The feed rate for this cut is 50 mm/min, which is slower for more control.
      • G01 X30 Z-60: Continues the motion along the Z-axis to Z=-60 mm at the same X=30 mm position. This creates a straight cut after the taper.
      • G00 X50: Rapid return of the tool to X=50 mm after completing the cut. This is done quickly to minimize the time spent moving the tool away from the workpiece.
      • G28 U0 W0: Sends the tool back to the machine's home position (X=0, Z=0). This ensures the machine is safe for the next operation or tool change.
      • M05: Stops the spindle rotation.
      • M30: Ends the program and resets the machine to the start. This prepares the machine for the next program or operation.
    • Parting Operations
      • O1002: Program number for parting operation.
      • BILLET X22 Z60: Define the billet size (22 mm diameter, 60 mm length).
      • G21 G98: Set metric units (G21) and feed per minute mode (G98).
      • G28 U0 W0: Move to machine home position.
      • M06 T0202: Tool change (Tool 2, parting tool).
      • M03 S1000: Spindle ON at 1000 RPM.
      • G00 X22 Z2: Rapid traverse to X22 (safe distance from the billet) and Z2.
      • G01 X0 Z0 F30: Feed towards the center (X0) for parting operation with feed rate 30 mm/min.
      • G01 X-2 F30: Feed deeper into the workpiece (cutting through) with feed rate 30 mm/min.
      • G00 X22 Z5: Rapid retract to X22, Z5 (safe position after cutting).
      • G28 U0 W0: Return to machine home position.
      • M05: Spindle OFF.
      • M30: End of program.
    • Thread cutting operation
      • O1005: Program number for thread cutting with G92.
      • BILLET X22 Z60: Define billet size (22 mm diameter, 60 mm length).
      • G21 G98: Set metric units (G21) and feed per minute mode (G98).
      • G28 U0 W0: Move to machine home position.
      • M06 T0303: Select tool (Thread cutting tool, Tool 3).
      • M03 S500: Spindle ON at 500 RPM.
      • G00 X22 Z2: Rapid move to X22, Z2 (starting position for threading).
      • G92 X20 Z-20 F2: G92 command for threading: Start threading at X20, Z-20 with a 2 mm pitch.
      • G00 X22 Z5: Rapid retract after the first threading pass.
      • G00 X22 Z2: Move back to starting position for the second threading pass.
      • G92 X20 Z-20 F2: Perform the second pass of threading with the same settings.
      • G00 X22 Z5: Rapid retract after the second threading pass.
      • G28 U0 W0: Return to home position.
      • M05: Spindle OFF.
      • M30: End of program.
  • Viva Questions:

    1. What is G-code, and why is it important in CNC programming?
    2. Which G-code is used for linear interpolation, and how is it different from circular interpolation?
    3. Explain the purpose of the G02 and G03 commands in CNC programming.
    4. How would you program a taper turning operation using the CNC machine?
    5. What M-code is used to start and stop the spindle in CNC programming?
    6. Describe the function of the G92 command in thread cutting.
    7. What is the difference between incremental and absolute positioning in CNC programming?
    8. Which G-code would you use to perform a facing operation, and how would you specify the depth of cut?
    9. How does the T (tool) command function in a CNC program?
    10. What is the role of simulation in CNC programming, and how does it help in identifying errors?
  • References:

    • Textbooks:
      • "CNC Programming Handbook" by Peter Smid
      • "Manufacturing Processes for Engineering Materials" by Serope Kalpakjian and Steven Schmid
      • "Machining and CNC Technology" by Michael Fitzpatrick
    • Web Resources:
      • MIT Open Course Ware - Introduction to Machine Tools
      • NPTEL CNC Programming

Programming and simulation using Canned cycles for CNC Lathe.

  • The aim of this experiment is to create and simulate CNC lathe programs using canned cycles for various turning operations such as turning, grooving and threading. The goal is to understand how canned cycles optimize the machining process by reducing the length and complexity of CNC programs.

    • The dimension of BILLET: X22 and Z60
    • Example 1
      • O1009: Program number (01009).
      • BILLET X22 Z60: Initial billet dimensions (22mm diameter and 60mm length).
      • G21: Metric units (mm).
      • G98: Feed per minute mode.
      • G28 U0 W0: Rapid move to home position (XO, ZO).
      • M06 T0101: Tool change to Tool 1 (offset 1).
      • M03 S1500: Spindle on clockwise at 1500 RPM.
      • G00 X22 Z1: Rapid positioning to 22mm diameter and 1mm away from the workpiece face.
      • G71 U0.5 R1: Stock removal cycle. Each pass takes 0.5mm off the diameter, with a retract of 1mm between cuts.
      • G71 P10 Q20 U0.1 W0.1 F35: Defines roughing area between N10 and N20 with 0.1mm finishing allowance on X and Z axes, feed rate of 35 units per minute.
      • N10 G01 X10: Linear move to X10 (start of roughing cycle).
      • Z0: Move to ZO along the Z-axis.
      • X12 Z-1: Diagonal move to X12 and Z-1.
      • Z-20: Move to Z-20 along Z-axis.
      • G02 X16 Z-30 R25: Clockwise circular interpolation from current position to X16 and Z-30 with a radius of 25mm.
      • G01 Z-40: Linear move to Z-40 along Z-axis.
      • G03 X22 Z-50 R25: Counter-clockwise circular interpolation from X16 to X22 and Z-50 with a radius of 25mm.
      • N20 G01 Z-55: Linear move to Z-55.
      • G28 U0 W0: Return to home position.
      • M06 T0202: Tool change to Tool 2 (offset 2).
      • M03 S1700: Spindle on clockwise at 1700 RPM.
      • G00 X22 Z1: Rapid positioning to 22mm diameter and 1mm from the workpiece.
      • G70 P10 Q20 F25: Finishing cycle between points N10 and N20, with a feed rate of 25 units per minute.
      • G28 U0 W0: Return to home position.
      • M06 T0303: Tool change to Tool 3 (offset 3).
      • M03 S500: Spindle on clockwise at 500 RPM.
      • G00 X13 Z-20: Rapid positioning to X13 and Z-20.
      • G75 R1: Peck grooving cycle, retract 1mm between pecks.
      • G75 X9 W-1.3 P100 Q1500 F15: Groove to final diameter of X9, depth of -1.3mm, depth of cut 100 microns, groove length of 1500 microns, feed rate of 15 units per minute.
      • G28 U0 W0: Return to home position.
      • M06 T0404: Tool change to Tool 4 (offset 4).
      • M03 S500: Spindle on clockwise at 500 RPM.
      • G00 X13 Z1: Rapid positioning to X13 and Z1.
      • G76 P031560 Q20 R0.15: Thread cutting cycle with initial depth and thread parameters.
      • G76 X9.853 Z-19 P1073 Q30 F1.75: Thread cutting cycle with final depth of 9.853mm, thread pitch of 1.75mm.
      • G28 U0 W0: Return to home position.
      • M05: Spindle stop.
      • M30: Program end and reset.
  • Viva Questions

    1. What is the purpose of the G71 command in CNC programming?
    2. What is the difference between G02 and G03 in CNC programming?
    3. What is meant by "thread pitch" in thread cutting, and how is it controlled in CNC?
    4. What does the G28 command do in CNC machining?
    5. Explain the purpose of the M06 command in CNC.
  • References Textbooks:

    • "CNC Programming Handbook" by Peter Smid
    • "Manufacturing Processes for Engineering Materials" by Serope Kalpakjian and Steven Schmid
    • "Machining and CNC Technology" by Michael Fitzpatrick
  • Web Resources:

    • MIT Open Course Ware - Introduction to Machine Tools
    • NPTEL - CNC Programming

4. Programming and simulation for machining of internal surfaces in CNC Lathe.

  • The aim to understand and develop CNC programs, simulation of tool paths to verify accuracy and efficiency.
  • Example 1 PECK DRILLING - (G74)
    • The dimension of BILLET: X32 Z60
    • O1010: Program number 1010.
    • BILLET X32 Z60: Comment: The billet has a diameter of 32 mm and a length of 60 mm.
    • G21 G98: Metric units programming (G21) and feed per minute mode (G98). Feed rates are defined in mm/min.
    • G28 U0 W0: Moves the machine to home position (XO, ZO) in an incremental mode (U, W).
    • M06 TO101: Tool change to tool number 1 with offset 1.
    • M03 S1500: Spindle starts rotating clockwise (M03) at 1500 RPM (S1500).
    • G00 X0: Rapid move of the tool to XO, getting it ready for machining.
    • G00 Z2: Rapid move of the tool to Z2, positioning it for internal machining.
    • G74 R1: Initiates the peck drilling cycle (G74) with a retract distance of 1 mm after each peck.
    • G74 X0 Z-5 Q500 F20: Executes the peck drilling cycle to a depth of Z-5 mm, with 0.5 mm peck depth (Q500) and a feed rate of 20 mm/min.
    • G28 U0 W0: Moves the tool back to the home position in X and Z axes.
    • M06 T0202: Tool change to tool number 2 with offset 2.
    • M03 S800: Spindle starts rotating clockwise at 800 RPM.
    • G00 X0: Rapid move of the tool to XO for the next machining operation.
    • G00 Z2: Rapid move of the tool to Z2 for positioning in the second machining cycle.
    • G74 R1: Initiates the peck drilling cycle with a retract distance of 1 mm after each peck.
    • G74 X0 Z-35 Q500 F20: Executes the peck drilling cycle to a depth of Z-35 mm, with 0.5 mm peck depth (Q500) and feed rate of 20 mm/min.
    • G28 U0 W0: Moves the tool back to the home position in X and Z axes.
    • M05: Stops the spindle.
    • M30: Ends the program and resets the machine for a new cycle.
  • Comment: The billet has a diameter of 50 mm and a length of 60 mm.
    • Example 2 Internal Thread
      • O1020: Program number 1020.
      • BILLET X50 Z60: Comment: The billet has a diameter of 50 mm and a length of 60 mm.
      • G21 G98: Metric units programming (G21) and feed per minute mode (G98). Feed rates are defined in mm/min.
      • G28 U0 W0: Moves the machine to home position in X and Z axes.
      • M06 T0303: Tool change to tool number 3 with offset 3 (internal threading tool).
      • M03 S600: Spindle starts rotating clockwise (M03) at 600 RPM (S600).
      • G00 X32 Z5: Rapid move of the tool to X32 mm (bore diameter) and Z5 mm (starting position).
      • G76 P020060 Q100 R50: Initiates a threading cycle (G76). The first line specifies thread depth control:
      • G76 X28 Z-30 P500 Q200 F2.0: Executes the threading cycle.
      • G28 U0 W0: Moves the tool back to the home position in X and Z axes.
      • M05: Stops the spindle.
      • M30: Ends the program and resets the machine for a new cycle.
  • Viva Questions:
    1. What are the main G-codes used in CNC programming for internal machining?
    2. How does the spindle speed affect internal surface machining?
    3. Explain the difference between roughing and finishing in CNC lathe machining.
    4. Why is simulation important before actual machining?
    5. What types of internal surfaces can be machined using a CNC lathe?
    6. How