Unit 5 CNC Programming - Stu
Unit 5 CNC Programming - Stu
Servo Motors
Controller
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
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)
• 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