0% found this document useful (0 votes)
20 views

CNC Coding

The document discusses computer numerical control (CNC) coding and programming. It defines CNC as computer numerical control and explains that CNC controllers read and store program information, interpret instructions in logical sequences, and control machine motions. The document also discusses CNC applications in milling and turning, linear and rotary axes, programming codes like G-codes and M-codes, coordinate systems, and linear and circular interpolation motions. It provides examples of programming codes and describes the components of a CNC program including programs, blocks, and words.

Uploaded by

NEF RIDERS
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

CNC Coding

The document discusses computer numerical control (CNC) coding and programming. It defines CNC as computer numerical control and explains that CNC controllers read and store program information, interpret instructions in logical sequences, and control machine motions. The document also discusses CNC applications in milling and turning, linear and rotary axes, programming codes like G-codes and M-codes, coordinate systems, and linear and circular interpolation motions. It provides examples of programming codes and describes the components of a CNC program including programs, blocks, and words.

Uploaded by

NEF RIDERS
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

COMPUTER

NUMERICAL
CONTROL (CNC)
- CODING
NORSA`AIDAH BINTI SA`AID
DJJ10033 WORKSHOP TECHNOLOGY
COMPUTER NUMERICAL
CONTROL
Upon completion of this topic, student should be to :

 Understand the concept and principles of computer numerical control


(CNC) system
I N T RO D U C T I O
N
⚫ Numerical Control (NC) is one in which
the functions and motions of a machine
tool are controlled by means of a
prepared program containing coded
alphanumeric data.
⚫ Numerical control (NC) machines are
used in manufacturing tasks, such as
milling, turning, punching,drilling and
welding
CNC
OPERATION
⚫C N C stands for Computer Numerical
Control
⚫ The functions of a C N C Controller
are:
1. To read and store programme
information.
2. To interpret the information in a
logical command sequence.
3. To control the motion of the
machines mechanical members.
CNC
OPERATION

An open-loop control system for a numerical-control


machine

A closed-loop control system for a numerical-control


machine
INDUSTRIAL APPLICATION
C N C AXIS

Milling
Turning/lathe
Linear Axes X Y Z

Rotary Axes A B C

Secondary Linear U V W

Interpolation I J K
C N C MACHINE UNIT
 Machine tool • designed to cut away surplus material and leave a component
of the required shape and size
• The function of machine tools can give the results in
consistence and reduced the machining time

• to read and decode the part programme, and to provide the


decoded instructions to the control loops of the machine
axes of motion, and to control the machine tool
Machine control unit (MCU) operations
• The main grouping of parts of a control could be considered
to be the Control Panel, the Tape Reader and The
Processors

• two types of control systems :The point-to-point system


Machine control system and the continuous-path system
• The point-to-point controls were N C controls, while
the continuous path controls could be N C or C N C
controls
C N C P R O G R A M M I N G - JOB
PLANNING
Job Planning

Sketch the part Add incremental or absolute dimensions

Ascertain Select fixtures which have minimal projections


above the part
featuring
Locate the set-up point near:
1.A corner of the part
2.A spot above the
Identify a set-up
fixture Consider space
point
requirements for:
1. Part loading
Plan operation sequence and unloading 2.Tool
change.
Mark sequence
Record necessary data for each movement pattern of sketch. Test
of the table and tool on the program program data for accuracy
sheet.
Identify,
Record instructions for the machine specific:
operator 1.Tools
needed.
2. Speed and feed
data 3.Tool change
PROGRAMMING
CODES
⚫A number of standard codes are used to
reduce the amount of programming effort
needed to command commonly used
machining operations, instructions and
conditions
 G codes – call up machining commands
 M codes – call up machine control
activities
 T codes – call up tool selection
 F codes – call up feed rates
 S codes – call up speed
G
CODES ⚫ G32 Reverses programmed
Sample G codes direction of y
⚫ G00 Rapid movement for position axis Tool radius compensation
⚫ G0ILinear interpolation used for ⚫ G41 left Tool radius
straight-line feed ⚫ G42 compensation right
⚫ G02 C ircular interpolation, ⚫ G43 Tool length compensation-
clockwise positive direction
⚫ G03 Circular interpolartion, ⚫ G44 Tool length compensation-
counterclockwise negative direction
⚫ G04 Dwell, a programmed stop ⚫ G70 Imperial unit
to the tool movement
⚫ G17 Circular interpolation xy plane ⚫ G71 Metric units
⚫ G18 Circular interpolation xz plane ⚫ G80 Cancel canned cycle
⚫ G19 Circular interpolation yz plane ⚫ G81 Drilling cycle
⚫ G20 Inch units ⚫ G82 Drilling cycle with
dwell
⚫ G21 Millimetre units ⚫ G83 Deep hole drilling
⚫ G28 Return to home position ⚫ G84 Tapping cycle
⚫ G29 Return from home position ⚫ G85 89-boring cycles
⚫ G31 Reverses programmed direction of ⚫ G90 Absolute mode
x
axis ⚫ G91 Incremental mode
M CODES

⚫ M00 Program stop


⚫ M02 End of program
⚫ M03 Spindle on, clockwise
⚫ M04 Spindle on, counter
clockwise
⚫ M05 Spindle off
⚫ M06 Tool change
⚫ M07 Oil mist coolant on
⚫ M08 Flood coolant on
⚫ M09 Coolant off
⚫ M30 End of tape
COORDINATE SYSTEM

Incremental Absolute
(G91) (G90)

movement with
the next location
respect to the
always in terms of
preceding point in
its relationship to
a prescribed
the fixed zero
sequence of points
point

In incremental All moves are


mode all moves performed with
are with respect respect to the
to the last axes zero
position reached
INCREMENTAL (G91)
INCREEMENTAL MODE
STRAIGHT LINE
FEED RATE: 300

N30

TOOL MOVEMENT
N20
N25 N35
N15
N40
N10 END OF PRGRAMME
N45
N50
ABSOLUTE (G90)

ABSOLUTE MODE
STRAIGHT LINE
FEED RATE: 300
TOOL MOVEMENT

N30

N20
N25
N15 N35

N10 N40
N45
LINEAR
INTERPOLATION
⚫ Under this command the machine
tool will move in a straight line at
a defined feed rate
⚫ Ex:

G01 X200
F250
Meaning
: G01 Move in a straight
X200. line A distance of
F250. 200mm
At a feed rate of
250mm/min
CIRCULAR
INTERPOLATION
⚫ G02 will cause the path to be transcribed in a clockwise
direction
and G03 will cause counter-clockwise motion
N20 ABSOLUTE MODE
N15 N30 STRAIGHT LINE
FEED RATE: 200
N25 CLOCKWISE DIRECTION (X AXIS, 20)
N35
RADIUS 10
ANTICLOCKWISE DIRECTION
(X AXIS,)RADIUS 10
STRAIGHT LINE
N40
CLOCKWISE DIRECTION
(Y AXIS, 90) RADIUS -10
N50 N45
N10 STRAIGHT LINE
ANTICLOCKWISE
N55 DIRECTION (Y AXIS, 90)
RADIUS -10
STRAIGHT LINE

END OF PROGRAMME
PROGRAM DEFINITION

• A programmed is a series of instructions to the

Programm machine, set out in sequence to -produce a


complete machining operation. A programmed is
made up of a series of blocks
e
• A block or programmed line is a set of
instructions to the machine that are carried out
Block simultaneously. A block is made up of one or
more Words and is terminated by an End of
Block which is the Line Feed Character

• A word is a specific instruction to the machine that


W or will affect a particular machine function. Every
word consists of a Letter Code and a
d Numerical value
TYPE OF CONTROL SYSTEM
⚫ Point-to-point ⚫
Contouring
◦ Point-to-point systems are
used mainly in drilling,
⚫ used on lathes, milling
machines, grinders, welding
punching, and straight machinery, and machining
milling operations centres
WRITING A
PRO G R A M
WRITING A
PRO G R A M
N10 G71 G90 S1500 T1
N20 G00 X0 Y0
N30 G00 X70.0 Y-25.0 Z10.0
N40 G01 Z-5.0 F250
N50 G03 I-25.0 J0
N60 X45.0 Y-50.0
N70 G01 X60.0 Y -50.0
N80 G02 I0 J-15.0
N90 X49.393 Y-75.607
N100 G01 X38.787 Y-65.0
N110 X15.0 Y-65.0
N120 Z10.0
N130 G00 M00
N140 G00 X0 Y0
PROGRAMMING ⚫
Description
NX X – block number
⚫ Block No. 10 – set machine to use metric unit, incremental
coordinate, spindle speed 1500 rpm, choose tool no. 1.
⚫ Block No. 20 – rapid movement to centre point (C.P).
⚫ Block No. 30 - rapid movement to point 1 (P. 1), cutting tool
distance is
⚫ 5.0 mm from the surface of the work piece.
⚫ Block No. 40 – cutting tool cuts 10.00 mm deep, feed 250
mm/min
⚫ Block No. 50 – circular interpolation, counter clockwise,
radius
N10 G71 G90 S1500 T1  25.0 mm
N20 G00 X0 Y0
N30 G00 X70.0 Y-25.0 Z10.0 ⚫ Block No. 60 – tool ends interpolation cutting at P. 4

N40 G01 Z-5.0 F250 ⚫ Block No. 70 – linear interpolation until P. 5


N50 G03 I-25.0 J0
⚫ Block No. 80 - circular interpolation, clockwise, radius 15.0
N60 X45.0 Y-50.0
N70 G01 X60.0 Y -50.0
mm
N80 G02 I0 J-15.0 ⚫ Block No. 90 - tool ends interpolation cutting at P. 6
N90 X49.393 Y-75.607 ⚫ Block No. 100 - linear interpolation until P. 7
N100 G01 X38.787 Y-65.0
N110 X15.0 Y-65.0 ⚫ Block No. 110 - linear interpolation until P. 8
N120 Z10.0 ⚫ Block No. 120 – tool rises up 10.0 mm
N130 G00 M00
⚫ Block No. 130 – program stops
N140 G00 X0 Y0
⚫ Block No. 140 - rapid return to centre point (C.P).
ADVANTAGES OF
COMPUTER NUMERICAL
CONTROL
can be edited when the
machine is placed/located.
More versatility – editing
Editing, correction and
and debugging
optimising; such as machine Programmes are stored
programmes,
tool operations, spindle on the machine ready
reprogramming, and
speeds and speeds; are for use.
plotting and printing part
usually done in the test
shape are simpler.
run of the tape.

easily changes into metric Greater accuracy –


system if the programme is computers have a higher Programmes and data can
in the imperial units. sampling rate and faster be modified on the
operation. machine.

Increased flexibility – the


It is widely used in industry. machine can produce a
It is easily adaptable in a specific part, followed by
computerised industry other parts with different
system. shapes, and at reduces
cost.
EXAMPLE 1 (USE G90)
EXAMPLE 2
QUIZ (USE G91)

You might also like