Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Slide 1 - CTE Online

VIEWS: 0 PAGES: 18

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




                                          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 Code controls 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 control
  programming 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
      Milling
                                                                        Reference point return
G00             Positioning in Rapid                             G27
                                                                                  check
G01              Linear Interpolation
                                                                         Automatic return to
                                                                 G28
G02        Circular Interpolation (CW)                                       reference point
                Circular Interpolation                                  Automatic return from
G03                                                              G29
                           (CCW)                                             reference point
G04                     Dwell                                           Return to 2nd, 3rd, 4th
                                                                 G30
                   Imaginary axis                                             reference point
G07
                       designation
                                                                 G31        Skip function
G09               Exact stop check
                                                                  .                .
G10        Program parameter input
                                                                 G33        Thread cutting
           Program parameter input
G11                                                                    Bolt hole circle (Canned
                      cancel                                     G34
                                                                                    Cycle)
G12               Circle Cutting CW
                                                                        Line at angle (Canned
G13              Circle Cutting CCW                              G35
                                                                                   Cycle)
G17                   XY Plane
                                                                 G36     Arc (Canned Cycle)
G18                   XZ Plane
                                                                         Cutter compensation
G19                   YZ Plane
                                                                 G40
                                                                                  Cancel
G20                  Inch Units                                  G41   Cutter compensation Left
G21                  Metric Units                                        Cutter compensation
                                                                 G42
G22             Stored stroke limit ON                                             Right

G23         Stored stroke limit OFF                                          Tool Length
                                                                 G43          Compensation
                                                                                   (Plus)
                                                                             Tool Length
                                                                 G44          Compensation
                                         CHSE-Lance Tatro 2010
                                                                                  (Minus)
More G-Code…                                 G60
                                                       Single direction
                                                            positioning
                                             G61    Exact stop check mode
 G45     Tool offset increase
                                                      Automatic corner
 G46    Tool offset decrease                 G62
                                                            override
         Tool offset double                  G63        Tapping mode
 G47
                 increase
                                             G64        Cutting mode
         Tool offset double
 G48                                                Custom macro simple
                 decrease                    G65
                                                              call
            Tool Length
 G49         Compensation                    G66   Custom macro modal call
                 Cancel                            Custom macro modal call
                                             G67
 G50        Scaling OFF                                      cancel

 G51         Scaling ON                               Coordinate system
                                             G68
                                                            rotation ON
       Local coordinate system
 G52                                                  Coordinate system
                  setting                    G69
                                                           rotation OFF
         Machine coordinate
 G53                                         G70          Inch Units
            system selection
        Workpiece Coordinate                 G71         Metric Units
 G54
                 System                      G72      User canned cycle
        Workpiece Coordinate                       High-Speed Peck Drilling
 G55                                         G73
                System 2                                      Cycle
        Workpiece Coordinate                 G74    Counter tapping cycle
 G56
                System 3
                                             G75      User canned cycle
        Workpiece Coordinate
 G57                                         G76      Fine boring cycle
                System 4
        Workpiece Coordinate                 G77      User canned cycle
 G58
                System 5
                                             G78      User canned cycle
        Workpiece Coordinate
 G59                                         G79      User canned cycle
                System 6
                     CHSE-Lance Tatro 2010   G80    Cancel Canned Cycles
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
 Line                 Code                                       Description
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
          Rapid feed up until the tool
N11X1.0        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
Answer Descriptions to Sample Code

 Line                 Code                                                         Description
N01       M216                            Turn on load monitor
N02       G00 X20 Z20                     Rapid move away from the part, to ensure the starting position of the tool
N03       G50 S2000                       Set Maximum spindle speed
N04       M01                             Optional stop
                                          Select tool #3 from the carousel, use tool offset values located in line 3 of the program
N05
          T0303 M6                              table, index the turret to select new tool
                                          Variable speed cutting, 854 rev/min, High spindle gear, Start spindle CW rotation, Turn the
N06
          G96 S854 M42 M03 M08                  mist coolant on
N07       G00 X1.1 Z1.1                   Rapid feed to a point 0.1" from the end of the bar and 0.05" from the side
N08       G01 Z1.0 F.05                   Feed in horizontally until the tool is standing 1" from the datum
N09       X0.0                            Feed down until the tool is on center - Face the end of the bar
N10       G00 Z1.1                        Rapid feed 0.1" away from the end of the bar
          Rapid feed up until the tool
N11X1.0        is standing at the
               finished OD
N12       G01 Z0.0 F.05                   Feed in horizontally cutting the bar to 1" diameter all the way to the datum
N13       M05 M09                         Stop the spindle, Turn off the coolant
N14       G28 G91 X0                      Home X axis in the machine coordinate system, then home all other axes
N15       M215                            Turn the load monitor off

N16
          M30                             Program stop, pallet change if applicable, rewind to beginning of the program
                                         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
Teacher Information Sheet
Description:                                                              STANDARDS
   Student will be introduced to CNC                       CTE/Technology & Engineering Education
   code writing, and learn to decipher a                    Standard: 210123.02-03
   simple code using information
   learned in this lesson.                                 CTE/Manufacturing and Product
                                                            Development Industry Sector

                                                           Foundational Standards:
Materials Needed:                                          1.1 Mathematics 5.0
                                                           2.4 Listening and Speaking
 1. Paper
                                                           4.0 Technology 4.1; 4.2; 4.5
 2. Pencil                                                5.0 Problem Solving and Critical Thinking 5.1;
 3. Computer W/PowerPoint                                  5.2

 4. Worksheet/Handouts                                    10.0 Technical Knowledge and Skills 10.3; 10.5
                                                           Pathway Standards: C7.0; C7.3; C8.0
   References:
                                                           Teacher Performance Expectations: TPE 1,
   http://www.global-trade.com.tw/images                   TPE2, TPE 3, TPE 5, TPE7, TPE 9, TPE10,
   http://en.wikipedia.org/wiki/G-code                     TPE 12
   http://www.cncezpro.com/gcodes.cfm
                                                           SDAIE Strategies: modeling, bridging,
                                                            contextualization




                                CHSE-Lance Tatro 2010

								
To top