180 likes | 191 Views
In this lesson, students will learn the basics of CNC programming and how machines read programmed information. They will be able to identify typical CNC code values and understand the role of G-code and M-code in numerical control programming.
E N D
Students will participate in an activity that will help them understand CNC programming and how machines read programmed information. Know the Code… http://www.global-trade.com. CHSE-Lance Tatro 2010
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
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
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 Codecontrols the speed of the spindle (cutter). CHSE-Lance Tatro 2010
M-Code (S) (*) M codes control the overall machine, causing it to stop, start, turn on coolant, etc. CHSE-Lance Tatro 2010
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
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
G-Codes • G Code (s), or preparatory code or function, are functions in the Numerical controlprogramming language. The G-codes are the codes that position the tool and do the actual work. CHSE-Lance Tatro 2010 http://en.wikipedia.org/wiki/G-code
G-Codes for a typical Milling Machine CHSE-Lance Tatro 2010
More G-Code… CHSE-Lance Tatro 2010
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 • S2000 + Spindle Speed of 2000 RPMs CHSE-Lance Tatro 2010
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 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 http://en.wikipedia.org/wiki/G-code
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
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
Practice Code CHSE-Lance Tatro 2010
Answer Descriptions to Sample Code CHSE-Lance Tatro 2010 http://en.wikipedia.org/wiki/G-code
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
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: http://www.global-trade.com.tw/images http://en.wikipedia.org/wiki/G-code http://www.cncezpro.com/gcodes.cfm STANDARDS CTE/Technology & Engineering EducationStandard: 210123.02-03 CTE/Manufacturing and Product Development Industry Sector Foundational Standards: 1.1 Mathematics 5.0 2.4 Listening and Speaking 4.0 Technology 4.1; 4.2; 4.5 5.0 Problem Solving and Critical Thinking 5.1; 5.2 10.0 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 Teacher Information Sheet CHSE-Lance Tatro 2010