Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

Unit 5 CNC Programming - Stu

Uploaded by

Vishal Deshpande
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Unit 5 CNC Programming - Stu

Uploaded by

Vishal Deshpande
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

UNIT 5

Computer Numerical Control and


Part Programming
S .S MUNDRA
Introduction
• CAM- Use of computer systems to plan, manage, and control manufacturing
operations
• CAM automates the manufacturing of CAD-generated product designs
• CAM softwares: DelCAM, ProCAM, MasterCAM, WebNC etc.
• Automation
– Automated production equipment like transfer lines, assembly lines
– Programmable automation like special purpose m/c, NC, PLC, Robots
• NC Machines
• Control of machine tools involves:
(a) The applying of power
(b) The guiding or limiting of the movement of the tool or work
(c) The selection of the rate of movement of the tool and/or work
(d) The selection of manufacturing facilities, the clamping of work or tool, and so
on.
• System in which actions are controlled by direct insertion of
numerical data at some point.
• Mechanical actions of a machine tool controlled by programs
(To start or stop the m/c tool spindle, to control spindle speed,
to change the tool, feed rate, coolent on/off etc)
• It is flexible method of automation that can change as per
product design changes
• Automation of medium and small volume production
• Numerical Control (NC) is defined as a form of software
controlled automation, in which the process is controlled by
alphanumeric characters.
BASIC COMPONENTS OF NC SYSTEM
• Part program
– Detailed step by step set of operations
– Part program written in alphanumeric coded form
– Instructions punched on punched card (binary format),
magnetic card.
– Tape reader reads codes and sends to MCU which converts
them into machine tool movements.
– Two methods to program for NC: Manual part programming,
Computer aided part programming
Issues with NC
• Part programming mistakes
• Punched tape
• Tape reader
• Controller
• Management information

The first NC machine developed by John


T. Parsons, an early computing pioneer at
MIT (1949),
• Machine Control Unit (MCU)
– Consists of electronics and hardware that reads the NC program,
interprets and translates it into appropriate movement of slides.
– uses the coded part program to control and position the cutting
tool and w/p.
– Also controls non-machining activities like tool change, coolant
on/off, part loading/unloading etc.
– Data Processing unit (DPU) and Control Loop unit (CLU)
• DPU consists of Input/Reader unit, Memory, processor, decoding
circuits, Output channels
• CLU consist of Position control unit with a feedback device like linear
encoders, velocity control unit with feedback device like rotary encoder,
acceleration, retardation and backlash correction units, auxiliary
function control unit like coolant ON and OFF etc.
– Ex: FANUC, Supercut
• NC Machine Tool
– Quality of product demands use of expensive tooling
– Cost implications of component
– Primary objective of NC machines: reduce the cost of production,
to improve the quality of the product, and decrease the
manufacturing lead times
– Modifications required in conventional ones
– May consists of work-table, cutting tools, jigs and fixtures, motors
for driving spindle, coolant and lubricating system
– Additional features like Tool magazine, loading, unloading pallets
– Latest NC m/c tool is the versatile machining center capable of
performing number of operations like milling, boring, drilling,
reaming, tapping by automatic tool changer (ATC) under the
control of tool selection instruction.
• NC Cutting tools
– ISO procedure adopted for designation of the cutting tools.
– The programmer obtains the history of the tools such as tool
number, cutter compensation from the tool files.
NC-CNC-DNC Machines
• NC Machine tools
– Electronic control system, processes numeric input
to control position
– Selection of tool, cutting parameters (speed, feed,
depth of cut) selected by operator
– Limited programming capabilities, less memory
space
– Run tape repeatedly for number of parts
– Whole tape discarded for any minor changes
• Computer Numerical Control (CNC) Machine tool
CNC Machines
DelCAM, ProCAM, MasterCAM, UgCAM, WebNC
cnc-machine-m3x-3s

Servo Motors

Display Console Coolant


control
Slides Automated
Tool changer

Controller

Chip collection and removal


Sample CNC Machines
• Principal functions of CNC
– Machine tool control
• conversion of part program instructions into machine tool
movements through computer interface and servo system
– In process compensation
• adjustment of errors sensed by inspection probes and
gauges, adaptive control adjustments to speed/feed
– Improved programming and operating features
• editing of part programs, graphic display of tool path,
– Diagnostics
• minimize downtime, fault finding, redundancy of
components
• Advantages of CNC
– Faster production rates; less time spent on the positioning of tools or work; less
work in progress.
– Flexibility
– Improved cutting efficiency; speeds and feeds are controlled.
– Reduced data reading error, reliable
– Improved quality of work. Components are more consistently accurate, resulting in
less scrap and less reworking.
– CNC programming features that are not supported by NC
• Subroutine macros to execute frequently-used cutting sequence
• Inch-metric conversions, interpolation functions (such as cubic interpolation)
• Absolute or incremental positioning / PTP or contouring mode
• The part-program can be edited (correction/optimization of tool path, speeds,
and feeds) at the machine site
• Tool and fixture offsets can be computed and stored
• Tool path can be verified using graphic display.
• Diagnostics are available to assist maintenance and repair.
• Disadvantages of CNC
– High initial cost
– Higher maintenance cost
– Skilled operators required
• Direct Numerical Control (DNC) Machine tools
• Networking CNC machine tools
• Manufacturing system, several CNC machines are
controlled by a remote central processor via
communication lines.
• Part programs stored in memory of central processor,
transmitted via transmission lines as required.
• Components of DNC
– Central Computer
– Bulk memory
– Telecommunication lines
– Machine tools
– Post processor
• Advantages of DNC
– Data collection, processing and reporting like tool usage,
machine utilization, production piece counts
– Immediate Design changes
– Greater flexibility and computational capabilities
– Supports FMS system
• Disadvantages of DNC
– High cost of computer hardware
https://www.youtube.com/watch?v=FNYEXjRmDtI
CLASSIFICATION OF NC MACHINE SYSTEMS
Maximum benefits of NC technology can be reaped only when it can
cater to a vast range of machining and manufacturing processes.
• Factors
– Variety and complexity of geometry of components
– Tolerances to be maintained
– Availability of funds
• Based on Work and tool relationship
– Machines with rotating tools ex: Milling, Drilling m/c
– Machines with rotating work pieces ex: Lathe m/c
– Machines with non-rotating work piece and non-rotating
tools ex: Shaper, Planner
– Unconventional NC machines ex: EDM, ECM, LBM
– Drafting m/c, Inspection m/c , CMM
• Based on motion control system
– Point to point motion control system (PTP type)
• To move tool positioned to a predefined location w.r.t the
w/p
• Tool required to move to particular pre-defined position in
shortest time
• No machining while traverse from one to another point so
moved rapidly
• Cycle consists of positioning-machining-retracting
• Best suited for drilling, boring, tapping, punch presses etc

Point to Point motion control


• Straight line motion control system (L type)
– Tools moves in a straight line parallel to one of the major
axes at a controlled feed rate.
– Can move along a diagonal line by calculating and
displacing the slide continuously to reach the desire point
– An NC capable of L type movement is also capable of PTP
motion control
– Ex: Turning, face milling, vertical and horizontal milling

Straight line motion control


• Contouring/Continuous path motion control system
– Tool motion in more than one axis controlled simultaneously.
– Position of the table along with speed and feed is under
continuous control ie cutting takes place while the position of
w/p and tool are changing.
– Several axis movement controlled simultaneously, their relative
position and velocity established at every point and continuously
– Ex: Profile Milling, machining of contours and curved surfaces
– Accomplished by linear, circular and parabolic interpolations

Continuous motion control


• Based on feedback control system
• Position and velocity of m/c tool controlled by group of electro-
mechanical/pneumatic/ hydraulic components called servo
mechanism.
• Data about each axis movement passed to servo through separate
channels that in turn drive the m/c slide.
• Open loop Control system
– Final output value not directly measured and checked against the
desired value.
– No feedback device to measure the actual position of tool
slide/work table. So can’t be compared with the positional values
as given in the command.
– Backlash errors in lead screw due to wear and tear
– Accuracy depends on calibration. Periodic calibrations required
Open loop system

The accuracy of components produced on machine tools with open loop systems
is well within accepted machining quality levels.
Open loop systems are quicker at manufacturing components than manually
operated machine tools.
• Closed loop Control system
– Actual displacement of m/c slide compared with input signal
– positional feedback devices like transducers to measure and
monitor the displacements of slide
– Velocity feedback devices to measure and control speed of
drives.
– DC servo motors are used as drive motors.
– Capabilities upto 0.0001 mm resolution and speeds upto 10
m/min
• Advantages of NC/CNC machines
– Smaller batches
– Production of complex parts
– Reduced set up time
– Effective machine utilization
– Consistency and Machining accuracy
– Longer tool life
– Lesser scrap
– Reduced inspection
– Lesser human error
• Method of listing coordinates of points in NC/CNC
system
– Absolute Coordinate system
• W.r.t the same datum defined by user
• Easy error detection and correction
– Incremental Coordinate system
• Coordinates of any point calculated w.r.t previous point
• Axis Nomenclature in CNC machines
– 3D Cartesian coordinate system (3 axes at 90 0 from each
other)
– Each slide fitted with control system
– for every slide movement, axis identification required
– 3 linear axes of movements X, Y, Z
– Rotary movements about X, Y, Z are A, B, C

Possible linear and rotary


movements of machine slide
• Right hand rule of coordinates
– Hold thumb (x axis), index finger (y axis), middle finger (z
axis) at 90 deg to each other

Right hand rule of Coordinates


• To identify axes,
• Firstly Z axis identified, followed by X and Y.
• Z along spindle axis or parallel to it (spindly may carry
cutting tool or w/p!)
• On vertical machining centre, Z is vertical and on
horizontal machining centre and turning centre, Z is
horizontal.
• + Z in a direction to increase distance from w/p towards
tool
• X always horizontal and always parallel to work holding
device.
• For horizontal axis tool, + X is to the right when viewed
from spindle towards w/p. For vertical axis tool, +X to
right when viewed from spindly towards column.
• For Y axis, apply right hand rule
Axis nomenclature for vertical spindle milling m/c
+ve Z of cutting tool is
away from headstock. X
is parallel to the cross
slide. +ve X when the
tool recedes outward.

Axis nomenclature for a CNC Lathe


Axis nomenclature for horizontal spindle milling m/c
Constructional Details of CNC machines
– CNC m/cs are operated automatically
– Manual hand wheels controls replaced by axis drive
motors
– faster wear of slideways, lead screw and gears.
– Special considerations required for:
• Machine structure
• Slideways
• Spindle mounting
• Drive units
• Location of transducers
• Tool and work holding devices
• Swarf removal
• Safety
• Main Machine Structure
– High precision and repeatability, Reliability
– Static forces and Inertia forces. M/c structure should be robust,
strong, torsionaly stiff to withstand high cutting speed and feed
– Cooling, lubrication system
– Automatic chip removal, ATC
– Rapid movements and higher m/c utilization so slideways
designed to reduce friction, reduce wear, improve smoothness of
drive.
– Hydrostatic slideways so no physical contact, provides a
frictionless movement for the slide,
– Use of recirculating anti friction
ball/roller bearings
– Guiding surfaces coated with low
friction material like
Polytetra fluoroethylene (PTEE)
• Spindle
• Its an expensive part, live part, gets power from drive unit and
delivers to w/p or tool
• Main functions: Centering the job/tool, holding the job/tool,
rotating the job/tool
• Subjected to deflection and thrust forces
• Should be stiff and short in length to get stability and minimize
torsional strain
• Supply of adequate lubrication to spindle bearings
• Drive system
– To drive spindle, to drive saddles/carriage (axis drive)
– Cutting speeds 10 to 1000 m/min (or more), provided by
rotation of spindle by directly connecting to motor or
through belt/gear transmission.
– should be able to provide infinitely variable speeds using
either AC induction / DC motors or fluid motors
– All axes in CNC controlled by servomotors/stepper motors.
– On receiving a signal/pulse from control unit, motor spindle
rotates by through a specified angle called step. (usually
between 1.8 deg to 7.5 deg)
• Control unit generates pulses as per the programmed value.
• Linear distance moved by slide/carriage calculated by known
values of lead of lead screw and no. of pulses.

• Location of Transducers/Control Unit


• Control unit should be situated at a convenient location
centrally for easy operation.
• Linear transducers placed near to the sliding surface and lead
screw
• In an accessible position for maintenance purpose
• Swarf removal
• CNC m/cs operate continuously for long duration, Volume of
swarf generated is high
• If swarf not removed quickly and efficiently, will affect cutting
process and quality of finished product
• Also auxiliary functions like automatic tool change, automatic
part loading/unloading may be affected by accumulation of
swarf
• Taken care by design configuration of m/c
• Slope downward (slant bed)
• Multiple coolant jets around cutting tool
to take away accumulated swarf
• Safety of operator
• CNC m/c tools provided with metallic/plastic guards
• Pressure mats placed around m/c (in milling, drilling,
grinding machines)
• Light barriers
Fundamentals of Part Programming
• Part programming considered turning point of metal cutting
industry to meet demands of intricate designs with tight
tolerances
• Standalone NC softwares like MASTERCAM, SURFCAM
Or via IGES or STEP
• Preparing data for NC
– Part data must be accurate
– Part data should be toleranced properly
– Separate drawing annotation from drawing data
– Establish standards for layer assignments
– Profile entities must connect
– Avoid overlapping drawing entities
– Dimensionality requirements must be specified
– Input part geometry in manufacturing order
• Part program is a set of instructions that instructs the
machine tool about the processing steps to be performed for
manufacturing of a component.
• Part program can be further broken down into separate lines
of data called blocks
• A block of data contains NC words
• Types of Part Programming
– Manual Part Programming
• Time consuming, needs expert/skilled part programmer
• Format of NC programs required may be different for
machines
– Computer aided Part Programming
• Complex geometry
• Simplified geometry (using English terms)
• Efficient and saves time, less errors as all arithmetic
calculations done by computer
• More than three axes
• Ex: APT, AUTOMAP, COMPACT II
Process of Manual Part Programming

Information needed by a CNC


• Preparatory Information: units, incremental or absolute positioning
• Axis designation and coordinates
• Coolant control: On/Off, Flood, Mist
• Tool control: Tool and tool parameters
• Cycle Functions: Type of action required
• Miscellaneous Control: Spindle on/off, direction of rotation, stops for
part movement
This information is conveyed to the machine through a set of instructions
arranged in a desired sequence – Program
• NC Words
• Combination of binary digits (bits) in a row on tape denotes a
Character.
• Collection of characters used to form an instruction.
• Collection of NC words called block
• Sequence Number (N Word): First word in every block. To identify
block, like N0001, N0002
• Preparatory function (G Words): Prepares the control unit to
execute the instructions that are to follow , represented by two
digits preceded by G ie G00…G99. Ex: G01 for linear interpolation
• Coordinates (X, Y and Z Words): Final coordinate positions for X, Y,
Z motions. For angular motion around the three coordinates ie a-
word, b-word, c-word. I, J, K used to specify position of arc centre
in case of circular interpolation
• Feed Function (F-Word): To specify feed rate in the
machining operation (mm/min or mm/rev) like F200.
G codes G94 or G95
• Spindle Speed Function (S Word): in rpm, m/min. Say, S800
means 800 rpm
• Tool Selection Function (T Word): Only with ATC. Each tool
pocket on ATC has distinct tool number. Specifies tool to be
used for an operation. T00 to T99
• Miscellaneous (or machine) Function (M Word): spindle
start, spindle stop, coolant ON/OFF, like M02 indicates end
of programme
• End of Block (EOB): identifies end of instruction block
• G and M codes are controller manufacturers’ specific
Preparatory Functions (G Codes)
CODE FUNCTION
G00 Rapid traverse (non-machining move)
G01 Straight line interpolation
G02 Circular interpolation (clockwise)
G03 Circular interpolation (c-clockwise)
G04 Dwell

G17 XY plane
G18 ZX plane
G19 YZ plane
G40 Cancel cutter radius compensation
G41 Cutter radius compensation-offset left
G42 Cutter radius compensation-offset right
G43 Cutter radius compensation-positive
G44 Cutter radius compensation-negative
Preparatory Functions (G Codes)
CODE FUNCTION
G70 Dimension in inch units
G71 Dimension in metric units
G80 Canned cycle cancelled
G81 Canned drilling cycle
G84 Canned Tapping cycle
G85 Canned Boring cycle
G90 Specifies absolute input dimensions
G91 Specifies incremental input dimensions
G92 Preset absolute registers
G94 Feed /min
G95 Feed /rev
G97 Spindle speed in revolution per min
Miscellaneous Functions (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
• Modal/Non-Modal Commands
• Some G codes are modal, meaning they remain
active until cancelled/superceded by a G-code
of same class.
• Ex: G 90 (absolute dimensioning), it remains
active until superseded by G91 (incremental
dimensioning)
• Other examples are G00, G01, Canned cycle
• A Non-Modal code is active only in the block in
which these are programmed.
• Ex: G04 (Dwell), M00 (Programme stop), M01
(planned stop)
• Common format of a block
• Programming Formats
– Method of writing the words in a block of
instruction.
– Word address format
N070 G81 X05764 Y04750 F475 S1000 T05 M08 <EOB>

– Tab sequential format


070 > 81 > 05764 > 04750 > 475 > 05 > 08

– Fixed block format


070 81 05764 04150 475 1000 05 08 <EOB>
071 81 05764 05000 435 1000 05 08 <EOB>
– Program structure
– The main body of the program may contain commands
for positioning, various movements, miscellaneous
tasks, tool selection etc
– It may contain calls to subroutines which in their turn
contain various motion commands
– A typical Program structure may be as follows:
• linear interpolation
• Circular interpolation
• Tool length Offset
• Tool diameter Offset
• Subroutine call
• Canned cycles
• Repeat loop
• Cutter diameter compensation
• Mirror Imaging
• Cycle cancellation
– Rapid Traverse Function (G00)
– To reduce cycle time, non machining movements
executed using G00 at maximum feed rate
N – G00 X- Y- Z- EOB
In addition M, S, T functions can be given in the same
block
Before start of rapid move, ensure that it will not hit the
workpiece
– Linear Interpolation Function (G01)
– Machining along a straight line/taper lines
N – G01 X- Y- Z– F- EOB
– Circular Interpolation Function (G02/G03)
– Used when cutting tool to move along an arc/circular
motion
– G02 for clockwise (CW) and G03 for counterclockwise
(CCW) direction
– Types of Programmed motion
– 4 basic types of motion for CNC machines
– Rapid traverse motion
– The linear motion (at controlled feed rate)
– The circular clockwise motion (at controlled feed rate)
– The circular anticlockwise motion (at controlled feed rate)
• Dwell function G04
– Desired that tool shouldn’t immediately return after touching
the programmed position but should wait.
G04 U4
Reference Points
• Machine Reference
• Every m/c has fixed reference point
built in by the manufacturer
• Machine home position is zero of
the m/c coordinate system, built
into m/c tool by manufacturer
• MCU calculates all movements of
m/c tool from this position
• When command distance more
than tool movement limit, over
travel alarm given
• On VMC, m/c origin for is at top
right corner of table, z at tool
change position
M/c zero (MZ) and Work zero (WZ) of Turning Centre (Lathe)

• Work piece Reference


• Programmer can select a suitable location as work zero.
• A point/line/surface on the component to which all dimensions are
referred
• This point used to establish relation between m/c zero, reference
point of cutting tool and drawing dimensions
• Point selected in a way to give best accuracy and repeatability in the
batch
• Example for Point-to-Point machining
• To Prepare the part program for 4 holes on a part as
shown in figure. The drill diameter is 10 mm and the Z
position is zero at 50 mm above the table surface.
N01 G92 X0 Y0 EOB preset A of job under spindle at ‘B’
N02 G71 G90 G94 EOB metric mode, Absolute coordinate , Feed in mm/min
N03 M03 F150 S1000 EOB start m/c spindle at @feed (mm/min) and @speed
(rpm)
N04 G00 X20.00 Y25.00 Z-48.00 EOB position job rapidly to point P1 (20,25)
N05 G01Z-73.00 EOB drill at P1
N06 G00 Z-48.00 EOB position in rapid to 2 mm above the job surface
N07 G00 X50.00 Y70.00 EOB position job rapidly to P2 (50,70)
N08 G01 Z-73.00 EOB drill at P2
N09 G00 Z-48.00 EOB rapid move to 2 mm above job surface
N10 G00 X95.00 Y 98.00 EOB job rapid move to P3 (95, 98)
N11 G01 Z-73 EOB drill at P3
N12 G00 Z-48.00 EOB rapid move to 2 mm above job surface
N13 G00 X80.00 Y15.00 EOB rapid move to point P4(80,15)
N14 G01 Z-73.00 EOB drill at P4
N15 G00 Z-48.00 EOB rapid move to 2 mm above job surface
N16 G00 X0 Y0 Z0 EOB rapid move to zero position of job and spindle
N17 M02 EOB end of programme
• Example for part program on Lathe
• Write a part program for facing, cleaning cut, reduction
of diameter from 25 mm to 16 mm as shown. Feed 200
mm/min, speed 800 rpm and depth of cut -2 mm per
cut.

– Like in conventional machining, the depth of cut limited in CNC


also.
– So number of cuts employed (Multi pass turning)
N01 G90 G71 G94 M03 S800 EOB absolute dimension, metric, mm/min,
spindle start in CW, 800 rpm
N02 G92 X0.00 Z0.00 EOB tool preset at right end for zero position of tool
w.r.t job
N03 G01 X-12.50 Z0.00 F200 EOB linear interpolation, feed, facing
operation
N04 G00 Z1.00 EOB rapid move in Z towards right
N05 G00 X0.00 EOB tool rapid move to X=0, Z=1.00 for clearance
N06 G01 Z-100.00 EOB linear interpolation, cleaning cut in –Z
N07 G00 X1.00 Z1.00 EOB tool rapid move to clearance position
N08 G00 X-2.00 EOB rapid position to X=-2 depth of cut
N09 G01 Z-60.00 EOB linear cut for the length z=-60
N10 G00 X-1.00 Z1.00 EOB retrieve tool rapidly
N11 G00 X-3.00 EOB rapid position to X=-3 depth of cut
N12 G01 Z-60.00 EOB linear cut for the length z=-60
N13 G00 X-2.00 Z1.00 EOB retrieve tool rapidly
N14 G00 X-4.00 EOB rapid position to X=-4 depth of cut
N15 G01 Z-60.00 EOB linear cut for the length z=-60
N16 G00 X-3.00 Z1.00 EOB retrieve tool rapidly to clearance
position
N17 G00 X-4.50 EOB rapid position to X= -4.5 depth of cut
N18 G01 Z-60.00 EOB linear cut for the length Z= -60
N19 G00 X5.00 Z5.00 EOB position tool finally at X,Y giving enough
clearance for job removal
N20 M02 EOB end of programme
Programming for CNC Milling M/C Operations
• Cutter Radius Compensation
• Part program developed for the cutter path w.r.t centre of tool
rather than point on periphery where actual cutting takes place.
• cutter of suitable diameter selected, program developed for
center line of cutter.
• The difference between programmed and actual diameter is
accounted as cutter radius compensation.
• Difference entered into control system, and generates new cutter
path.
• Useful as cutters of different diameters can be used without
changing the part program
Cutter Radius Compensation

G 41 Compensation applied to shift the programmed cutter path to left.


When the cutter is on left of the programmed path when looking in the
direction of the movement.
G 42 Compensation applied to shift the programmed cutter path to right
G 40 Cancel cutter radius compensation
• Offset direction =
Left(G41)

• Offset direction =
Right(G42)

• Offset direction =
Off(G40)
• Prepare part program for job shown in figure below with cutter radius
compensation and direction of cut programmed in CCW. Thickness of job =
10 mm, programmed cutter diameter 0 mm, diameter of cutter=30 mm.
Difference in radius (0-32)/2 = -15 mm which is to be stored in memory for
cutter radius compensation under address D02, Z=0 is at the top surface of
the job.
N01 G71 G90 G94 EOB set parameters metric, absolute dimensioning,
feed in mm/min
N02 G00 X-20.00 EOB rapid move to X from SP
N03 G00 Z-10.00 EOB rapid move to Z from SP
N04 G01 G42 D02 X0.00 Y0.00 F200 S1000 M03 EOB linear,
cutter compensation (right) spindle start in CW, set tool at SP
N05 G01 X70.00 EOB st. line machining from SP to A
N06 G01 X85.00 Y10.00 I0.00 J15.00 EOB curved machining A to B
N07 G01 Y35.00 EOB St line machining B to C
N08 G01 X70.0 Y50.0 I0.00J15.00 EOB curved machining C to D
N09 G01 X60.00 EOB st. line machining D to E
N10 G01 X50.00 Y50.00 EOB st. line machining E to F
N11 G01 X45.00 Y50.00 EOB EOB st. line machining F to G
N12 G01 X35.00 EOB st. line machining G to H
N13 G01 X30.00 Y35.00 EOB st. line machining H to I
N14 G01 X15.00 Y65.00 EOB st. line machining I to J
N15 G01 X0.00 Y50.00 EOB st. line machining J to K
N16 G01 Y35.00 EOB st. line machining K to L
N17 G01 X15.00 Y25.00 EOB st. line machining L to M
N18 G01 X0.00 Y15.00 EOB st. line machining M to N
N19 G01 X0.00 Y0.00 EOB st. line machining N to SP
N20 G40 EOB Cancel cutter radius compensation
N21 G00 X-20.00 Z20.00 EOB rapid move to X, Z
N22 M02 EOB end of programme
Tool-length compensation
• In cases of more than one tool, programming
becomes cumbersome to take care of the individual
tool lengths for the purpose of programming the Z
depth in each case.
• Tool Pre-setter
• The difference in length of the tool, w.r.t to the pre-
setting tool, is manually entered and stored with the
associated tool number.
• Standard fixed cycle/Canned cycle
– Commonly used machining operations standardized
– Machining cycles identified by G codes like G81,
G82 etc
– Canned cycle is combination of machine moves
resulting in a particular machining function like
drilling, milling, boring, tapping etc
– Corresponding instructions of canned cycle stored
in the system memory
– Reduce program length, boredom of programmer
minimized, less memory required, easy to de-bug
• Drill Cycle (G81)
• Tool movements are:
– Tool moves rapidly in X and/or Y axis for reaching
the location of hole
– Rapid in Z axis to the gauge height
– At programmed feed in Z axis to the Z depth or R3
– Rapid retract to R2
– So complete drilling cycle is completed by giving
information in a single block
Without using canned cycle

For the same component, the NC program


using canned cycles is shown below:
X, Y refer to the centre coordinates of
the point where the drilling is to be
carried out.
Z refer to the final depth of the hole to
be drilled
R refer to the position of the clearance
The format to be used as follows: N G81 X Y Z R plane (same as the Z-axis position of
the clearance plane)
• Tap Cycle (G 84)
• Tool movements are:
• Rapid in X and/or direction to reach the starting point
• Rapid move in Z axis to gauge height (R2)
• Tool movement at feed in Z axis to Z depth (R3)
• Reverse spindle direction and feed retract to gauge height
• Reverse spindle direction again at gauge height

• G84 tapping cycle performs tapping operation, tapping is


performed by rotating the spindle clockwise, when bottom of the
hole has been reached, the spindle is rotated in the reverse
direction for retraction.
• Non Standard fixed cycles
• Some operations do not fit in the standardized category,
such times Do loops, parametric subroutines can be used
• Do Loop
• Enables the programmer to instruct control unit to jump
back to an earlier part of progrm and execute the
intervening blocks a specified number of times.
• Used for repetitive programming in cases like turning
and milling operations
• General format
1. Do n
2. XYZ
3. END DO
• implemented on INCREMENTAL mode as each previous
operation becomes reference for next iteration

You might also like