1 of 37

�����Unit – 3 ��CNC Programming

CNC Technology - Classification - Contouring - Interpolators - Open Loop and Closed Loop System - CNC Controller and Structural Members of CNC Machines - Function of Ball Screws – Automatic Tool Changer (ATC) - Feedback Devices -Fundamentals of Part Programming - Geometric Codes (G Codes) and - Miscellaneous Codes (M-Codes) - Cutter Location (CL) Data and Tool Path Simulation– Manual Programming - Canned Cycle and Subroutines. Code Generation from 3D Solid Models Using Master CAM Software

2 of 37

What is NC ?

  • Numerical control (NC) refer to control of a machine or a process using symbolic codes consisting of characters and numerals.
  • The concept of NC was proposed in the late 1940 s by John Parsons who recommended a method of automatic machine control that would guide a milling cutter to produce a curvilinear motion in order to generate smooth profiles on the work -pieces

3 of 37

Types of NC Machines

  • Direct Numerical Control (DNC)
  • Distributed Numerical Control (DNC)
  • Computer Numerical Control (CNC)

4 of 37

CNC : Computerized Numerical Control

  • Computer Numerical Control (CNC) is one in which the functions and motions of a machine tool are controlled by means of a prepared program containing coded alphanumeric data.
  • CNC is widely used for lathe, drill press, milling machine, grinding unit, laser, sheet-metal press working machine, tube bending machine etc.
  • The benefits of CNC are
    • high accuracy in manufacturing,
    • short production time,
    • greater manufacturing flexibility,
    • simpler fixturing,
    • contour machining (2 to 5 -axis machining),
    • reduced human error.

5 of 37

Elements of CNC Machine

  • Input Device
  • Machine Control Unit
  • Machine Tool
  • Driving System
  • Feedback Devices
  • Display Unit

6 of 37

Classification of CNC Machines

  • Classification based on the motion type.
  • Classification based on the control loops.
  • Classification based on the number of axis.
  • Classification based on the power supply.

7 of 37

Classification based on the motion type

  • Point-to-Point Positioning
    • Point-to-point positioning is the process of positioning from one coordinate (XY) position or location to another, performing the machining operation, and continuing this pattern until all the operations have been completed at all programmed locations.

8 of 37

Point-to-Point Systems

  • It is used in some CNC machines such as drilling, boring and tapping machines…etc.
  • The control equipment for use with them are known as point-to-point control equipment.
  • Feed rates need not to be programmed.
  • In theses machine tools, each axis is driven separately.

9 of 37

  • Continuous Path System
    • Continuous path positioning is the ability to control motions on two or more machine axes simultaneously to keep a constant cutter-work piece relationship

10 of 37

Classification based on the control loops

11 of 37

Classification based on the number of axes

  • 2&3 axes CNC Machines

12 of 37

Two Axis System

Three Axis System

13 of 37

Absolute Vs Incremental Coordinate

14 of 37

RECIRCULATING BALL SCREW

  • Actuation system are used to convert the rotational movement into translational movement.in conventional machine tools ACME thread is normal used for this purpose. Its connect with CNC table

15 of 37

  • The recirculating ball screw assembly has the flanged nut attached to the moving chamber and the screw to the fixed casting. Thus the moving member will move during rotational movement of the screw.
  • In these types of screws, balls rotate between the screw and nut and convert the sliding friction (as in conventional nut & screw) to the rolling friction. As a consequence wear will be reduced and reliability of the system will be increased.
  • The traditional ACME thread used in conventional machine tool has efficiency ranging from 20% to 30% whereas the efficiency of ball screws may reach up to 90%

16 of 37

Automatic Tool Changer (ATC)

  • Tooling used with an automatic tool changer should be easy to center in the spindle, each for the tool changer to grab the tool holder and the tool changer should safely disengage the tool holder after it is secured properly
  • Tool Turrets
    • An advantage of using tool turrets is that the time taken for tool changing will be only the time taken for indexing the turret
  • Tool Magazines
    • Circular Magazine
    • Box Magazine
    • Chain Magazine

17 of 37

18 of 37

Chain Magazine

  • These magazines can hold large number of tools and may hold even up to 100 tools.
  • In these chain magazines, tools will be identified either by their location in the tool holder or by means of some coding on the tool holder.
  • The positioning of the magazine for the next tool transfer will take place during the machining operation.

19 of 37

Circular Magazine

  • Circular magazines are similar to tool turrets, but in the former the tools will be transferred from the magazine to the spindle nose.
  • Generally these will be holding about 30 tools.

20 of 37

Box Magazine

  • In these magazines, the tools are stored in open ended compartments.
  • The tool holder must be removed from the spindle before loading the new tool holder.
  • Also the spindle should move to the tool storage location rather than the tool to the spindle. Hence, more time will be consumed in tool changing.
  • Box magazines are of limited use as compared to circular and chain type of tool magazines

21 of 37

CNC Work Holding Devices

  • Loading or unloading of the work is a nonproductive time which needs to be minimized.
  • The work is usually loaded on a special work holder away from the machine and then transferred it to the machine table.
  • The work should be located precisely and secured properly and should be well supported

22 of 37

Turning Center Work Holding Methods

23 of 37

Automatic Jaw & Chuck Changing

  • Advantages
    • Adaptable for a range of work-piece shapes and sizes.
  • Disadvantages:
    • High cost of jaw/chuck changing automation. Resulting in a more complex & higher cost machine tool.

24 of 37

Indexing Chucks

Advantages:

  • Very quick loading and unloading of the work piece can be achieved. Reasonable range of work piece sizes can be loaded automatically

Disadvantages

  • Expensive optional equipment. Bar-feeders cannot be incorporated. Short/medium length parts only can be incorporated.
  • Heavy chucks.

Advantages:

  • Very quick loading and unloading of the work piece can be achieved. Reasonable range of work piece sizes can be loaded automatically

Disadvantages:

  • Expensive optional equipment. Bar-feeders cannot be incorporated. Short/medium length parts only can be incorporated. Heavy chucks.

25 of 37

Pneumatic/Magnetic Chucks

Advantages:

  • Simple in design and relatively inexpensive. Part automation is possible. No part distortion is caused due to clamping force.

Disadvantages:

  • Limited to a range of flat parts with little overhang. Bar-feeders cannot be incorporated.
  • Parts on magnetic chucks must be ferrous. Heavy cuts must be avoided.

26 of 37

Encoders

  • A device used to convert linear or rotational positionn information into an electrical output signal.

Rotary Encoders

  • Rotary Encoders are sensors that detect position and speed by converting rotational mechanical displacements into electrical signals and processing those signals.
  • Absolute Encoders
  • Incremental Encoders

27 of 37

Incremental Encoders

28 of 37

Absolute Encoders

29 of 37

Linear Encoders

30 of 37

CNC Programming

  • During secondary motion, either the tool moves relative to the work piece or the work piece moves relative to the tool.
  • In NC programming, it is always assumed that the tool moves relative to the work piece no matter what the real situation is.

Sequence and format of words:

N3 G2 X+1.4 Y+1.4 Z+1.4 I1.4 J1.4 K1.4 F3.2 S4 T4 M2

sequence no

preparatory function

destination coordinates

dist to center of circle

feed rate

spindle speed

tool

Other function

31 of 37

  • Programming consists of a series of instructions in form of letter codes
  • Preparatory Codes:
  • G codes- Initial machining setup and establishing operating conditions
  • N codes- specify program line number to executed by the MCU
  • Axis Codes: X,Y,Z - Used to specify motion of the slide along X, Y, Z direction
  • Feed and Speed Codes: F and S- Specify feed and spindle speed
  • Tool codes: T – specify tool number
  • Miscellaneous codes – M codes For coolant control and other activities

32 of 37

  • O - Program number (Used for program identification) 
  • N - Sequence number (Used for line identification) 
  • G - Preparatory function 
  • X - X axis designation 
  • Y - Y axis designation 
  • Z - Z axis designation 
  • R - Radius designation 
  • F – Feed rate designation 
  • S - Spindle speed designation 
  • H - Tool length offset designation 
  • D - Tool radius offset designation 
  • T - Tool Designation 
  • M - Miscellaneous function

33 of 37

  • Part program: A computer program to specify

  • - Which tool should be loaded on the machine spindle;
  • - What are the cutting conditions (speed, feed, coolant ON/OFF etc)
  • - The start point and end point of a motion segment
  • - how to move the tool with respect to the machine.

Important things to know:

  • Coordinate System
  • Units, incremental or absolute positioning
  • Coordinates: X,Y,Z, RX,RY,RZ
  • Feed rate and spindle speed
  • Coolant Control: On/Off, Flood, Mist
  • Tool Control: Tool and tool parameters

34 of 37

Basic G Codes

  • G00 – Preparatory code to control final position of the tool and not concerned with the path that is followed in arriving at the final destination.
  • G01 – Tool is required to move in a straight line connecting current position and final position. Used for tool movement without any machining- point to point control. (linear interpolation)
  • G02 – Tool path followed is along an arc specified by I, J and K codes.( circular interpolation

35 of 37

G00 Rapid Transverse G50- Maximum Spindle speed

G01 Linear Interpolation G96- Constant surface speed

G02 Circular Interpolation, CW G97- Constant rpm

G03 Circular Interpolation, CCW G98- Feed per minutes

G17 XY Plane,G18 XZ Plane,G19 YZ Plane G99 – Feed per revolution

G20/G70 Inch units G28- Return to zero

G21/G71 Metric Units G27- Zero return check

G40 Cutter compensation cancel

G41 Cutter compensation left

G42 Cutter compensation right

G43 Tool length compensation (plus)

G43 Tool length compensation (plus)

G44 Tool length compensation (minus)

G49 Tool length compensation cancel

G80 Cancel canned cycles

G81 Drilling cycle

G82 Counter boring cycle

G83 Deep hole drilling cycle

G90 Absolute positioning

G91 Incremental positioning

36 of 37

M Codes

  • M00 Program stop
  • M01 Optional program stop
  • M02 Program end
  • M03 Spindle on clockwise
  • M04 Spindle on counterclockwise
  • M05 Spindle stop
  • M06 Tool change
  • M08 Coolant on
  • M09 Coolant off
  • M10 Clamps on
  • M11 Clamps off
  • M30 Program stop, reset to start
  • M98 Subprogram call
  • M99 sub program end

37 of 37