Presentation is loading. Please wait.

Presentation is loading. Please wait.

Know the Code… Students will participate in an activity that will help them understand CNC programming and how machines read programmed information. CHSE-Lance.

Similar presentations


Presentation on theme: "Know the Code… Students will participate in an activity that will help them understand CNC programming and how machines read programmed information. CHSE-Lance."— Presentation transcript:

1 Know the Code… Students will participate in an activity that will help them understand CNC programming and how machines read programmed information. CHSE-Lance Tatro 2010

2 Objectives for this lesson… By the end of the lesson, students should be able to: Identify the values of typical CNC code used in simple programming. Know the roll of G code as used in Numerical control programming language Know the roll of M code as used in Numerical control programming language Interpret a simple code used for a CNC Mill CHSE-Lance Tatro 2010

3 Review… Q. How are points named? Q. What is the first number, second, third? Q. Do you need to name all the points on your design? If so, why? CHSE-Lance Tatro 2010

4 Vocabulary Terms… G-Code, or preparatory code or function, are functions in the Numerical control programming language. The G-codes are the codes that position the tool and do the actual work M Codes control the overall machine, causing it to stop, start, turn on coolant, etc. S Code controls the speed of the spindle (cutter). CHSE-Lance Tatro 2010

5 M-Code (S) (*) M codes control the overall machine, causing it to stop, start, turn on coolant, etc. CHSE-Lance Tatro 2010

6 Partial list of M-Codes M00=Program Stop (non-optional) M01=Optional Stop, machine will only stop if operator selects this option M02=End of Program M03=Spindle on (CW rotation) M04=Spindle on (CCW rotation) M05=Spindle Stop M06=Tool Change M07=Coolant on (flood) M08=Coolant on (mist) M09=Coolant off M10=Pallet clamp on M11=Pallet clamp off M30=End of program/rewind tape (may still be required for older CNC machines) CHSE-Lance Tatro 2010

7 Example…. An example of an M-Code might be M01 This would indicate the “Optional Stop” function of the machine. This function will only take place if the operator selects to do so. CHSE-Lance Tatro 2010

8 G-Codes G Code (s), or preparatory code or function, are functions in the Numerical control programming language. The G-codes are the codes that position the tool and do the actual work.Numerical control programming language CHSE-Lance Tatro 2010

9 Milling G00Positioning in Rapid G01Linear Interpolation G02Circular Interpolation (CW) G03 Circular Interpolation (CCW) G04Dwell G07 Imaginary axis designation G09Exact stop check G10Program parameter input G11 Program parameter input cancel G12Circle Cutting CW G13Circle Cutting CCW G17XY Plane G18XZ Plane G19YZ Plane G20Inch Units G21Metric Units G22Stored stroke limit ON G23Stored stroke limit OFF G-Codes for a typical Milling Machine G27 Reference point return check G28 Automatic return to reference point G29 Automatic return from reference point G30 Return to 2nd, 3rd, 4th reference point G31Skip function.. G33Thread cutting G34 Bolt hole circle (Canned Cycle) G35 Line at angle (Canned Cycle) G36Arc (Canned Cycle) G40 Cutter compensation Cancel G41Cutter compensation Left G42 Cutter compensation Right G43 Tool Length Compensation (Plus) G44 Tool Length Compensation (Minus) CHSE-Lance Tatro 2010

10 More G-Code… G45Tool offset increase G46Tool offset decrease G47 Tool offset double increase G48 Tool offset double decrease G49 Tool Length Compensation Cancel G50Scaling OFF G51Scaling ON G52 Local coordinate system setting G53 Machine coordinate system selection G54 Workpiece Coordinate System G55 Workpiece Coordinate System 2 G56 Workpiece Coordinate System 3 G57 Workpiece Coordinate System 4 G58 Workpiece Coordinate System 5 G59 Workpiece Coordinate System 6 G60 Single direction positioning G61Exact stop check mode G62 Automatic corner override G63Tapping mode G64Cutting mode G65 Custom macro simple call G66Custom macro modal call G67 Custom macro modal call cancel G68 Coordinate system rotation ON G69 Coordinate system rotation OFF G70Inch Units G71Metric Units G72User canned cycle G73 High-Speed Peck Drilling Cycle G74Counter tapping cycle G75User canned cycle G76Fine boring cycle G77User canned cycle G78User canned cycle G79User canned cycle G80Cancel Canned Cycles CHSE-Lance Tatro 2010

11 Example… G50 S2000 This code would indicate to the machine to set the spindle speed to 2000 RPMs (Revolutions Per Minute) G50 = Define the Spindle Speed S Spindle Speed of 2000 RPMs CHSE-Lance Tatro 2010

12 Supplementary Codes (Control) X absolute position Y absolute position Z absolute position A position (rotary around X) B position (rotary around Y) C position (rotary around Z) U Relative axis parallel to X V Relative axis parallel to Y W Relative axis parallel to Z M code (another "action" register or Machine code(*)) (otherwise referred to as a "Miscellaneous" function") F feed rate S spindle speedspindle speed N line number R Arc radius or optional word passed to a subprogram/canned cycle P Dwell time or optional word passed to a subprogram/canned cycle T Tool selection I Arc data X axis J Arc data Y axis. K Arc data Z axis, or optional word passed to a subprogram/canned cycle D Cutter diameter/radius offset H Tool length offset CHSE-Lance Tatro 2010

13 Example… G01 X-1.25 Y0.75 This would tell the machine that it will be moving in a linear movement to the coordinate -1.25,.75 on the X-Y grid. CHSE-Lance Tatro 2010

14 Forming The Letter “Z” G00 X0.1 Y0.75 Initial move to start point G00 Z-0.1 Plunge the Z axis into the material G01 X1.0 Y0.75 Linear move to point (1.0,.75) G01 X0.0 Y-0.75 Linear move to point (0.0,-.75) G01 X1.1 Y-0.75 Linear move to point (1.1,-.75) G00 Z0.5 Retract the Z axis M02 Stop the program CHSE-Lance Tatro 2010

15 Practice Code LineCodeDescription N01 M216 N02 G00 X20 Z20 N03 G50 S2000 N04 M01 N05 T0303 M6 N06 G96 S854 M42 M03 M08 N07 G00 X1.1 Z1.1 N08 G01 Z1.0 F.05 N09 X0.0 N10 G00 Z1.1 N11X1.0 Rapid feed up until the tool is standing at the finished OD N12 G01 Z0.0 F.05 N13 M05 M09 N14 G28 G91 X0 N15 M215 N16 M30 CHSE-Lance Tatro 2010

16 Answer Descriptions to Sample Code LineCodeDescription N01 M216Turn on load monitor N02 G00 X20 Z20Rapid move away from the part, to ensure the starting position of the tool N03 G50 S2000Set Maximum spindle speed N04 M01Optional stop N05 T0303 M6 Select tool #3 from the carousel, use tool offset values located in line 3 of the program table, index the turret to select new tool N06 G96 S854 M42 M03 M08 Variable speed cutting, 854 rev/min, High spindle gear, Start spindle CW rotation, Turn the mist coolant on N07 G00 X1.1 Z1.1Rapid feed to a point 0.1" from the end of the bar and 0.05" from the side N08 G01 Z1.0 F.05Feed in horizontally until the tool is standing 1" from the datum N09 X0.0Feed down until the tool is on center - Face the end of the bar N10 G00 Z1.1Rapid feed 0.1" away from the end of the bar N11X1.0 Rapid feed up until the tool is standing at the finished OD N12 G01 Z0.0 F.05Feed in horizontally cutting the bar to 1" diameter all the way to the datum N13 M05 M09Stop the spindle, Turn off the coolant N14 G28 G91 X0Home X axis in the machine coordinate system, then home all other axes N15 M215Turn the load monitor off N16 M30Program stop, pallet change if applicable, rewind to beginning of the program CHSE-Lance Tatro 2010

17 Independent Practice For your assignment, you will use the coordinates developed in the “Developing CNC Code” lesson to write a complete code. You can use the practice code from this lesson and your coordinates from the previous lesson to complete the independent practice assignment. Look at the code we used for the letter “Z” and use that information to help you develop your code. CHSE-Lance Tatro 2010

18 Teacher Information Sheet Description: Student will be introduced to CNC code writing, and learn to decipher a simple code using information learned in this lesson. Materials Needed: 1. Paper 2. Pencil 3. Computer W/PowerPoint 4. Worksheet/Handouts References: STANDARDS CTE/Technology & Engineering Education Standard: CTE/Manufacturing and Product Development Industry Sector Foundational Standards: 1.1 Mathematics Listening and Speaking 4.0 Technology 4.1; 4.2; Problem Solving and Critical Thinking 5.1; Technical Knowledge and Skills 10.3; 10.5 Pathway Standards: C7.0; C7.3; C8.0 Teacher Performance Expectations: TPE 1, TPE2, TPE 3, TPE 5, TPE7, TPE 9, TPE10, TPE 12 SDAIE Strategies: modeling, bridging, contextualization CHSE-Lance Tatro 2010


Download ppt "Know the Code… Students will participate in an activity that will help them understand CNC programming and how machines read programmed information. CHSE-Lance."

Similar presentations


Ads by Google