CNC Introduction
CNC Introduction
In 1955 US introduce N/C system based on hardware, but system were built
with separate elements and the reliability of these machine was bad. Later in 1970's N/C machine
were built around LSI chips and MSI chips, during 1965 N/C manufacturing industries step
forward constructed systems with mini-computer, which was named as Computer Numerical
Control(CNC). The present day systems are designed around microprocessors to meet the
requirements of high productivity, flexibility and high reliability to produce components with
high quantity and quality at minimum manufacturing cost.
CNC Systems
1. Hardware: CNC hardware includes the microprocessors that effect control system functions
and peripheral devices for data communication, machine tool, transducers, actuators, etc.
2. Software:CNC Software includes the programs that are executed by the system
microprocessors this make machine to function and coordinate.
Japan, Italy, U.K, West Germany, Spain, U.S.A, Korea, Taiwan, India, etc
The first CNC Machine tool was developed in India as early as in 1975. CNC
Machine tools become popular only during 1980 - 1985. Indian Machine Tool manufacturers'
Technical collabration from countries like Japan, West Germany, U.K and U.S.A. There are now
35 manufacturers engaged in the production of CNC Machines.
CNC CONTROL SYSTEM
There are large number of CNC Control systems are available. They are FANUC,
SIEMENS, L - PRO, SINUMERIC-HINUMERIC, BOSCH etc.,
But commonly FANUC control systems are mostly used in CNC machines in the world.
Disadvantages
* Cost of machine is high
* Not suitable for small batch production
* Maintenance cost is high
CNC Lathe machines are the major machine tools used for the production of rotating
parts.They are available with multiple tooling,flexible automation equipment and rotary
tooling.The operations such as milling,drilling,tapping and other operations can be performed
with the same set up.
1.Chucking machines
Chucking machines have usually have shorter beds and a single saddle with a single drum
type turret which accomodates both I.D and O.D. tools.
2.Shaft machines
Shaft machines are usually for between centre works.they have hydraulic (or) pneumatic
tail stock for the work piece.
3.Universal machines
Universal machines are suitable for both chucking and for bar work,4 (or) 5 axis
machines.Some machines have rotating tools in the turrets to facilitate off-axis machining such
as drilling,milling,reaming,tapping,boring etc.these machines have in addition to the
conventional X and Z axis.CNC control of the spindle rotation i.e. C-axis.Such machines are
known as CNC turning centres.
Head stock:Incorporated spindle in the head stock is rotated with a spindle motor.Gripped work
piece with the chuck is also rotated with to be machined.
Tail stock: It is used to support the work piece.the tail stock centre is usually mounted on
precision bearing to obtain good running accuracy and enough stiffness.The tailstock design can
either be hydraulic or electro mechanical.
Turret: Tools are fixed to the turret.Lathes are fitted with 8,12 or 16 stationary turrets.the
indexing can be done through hydraulic or electric operation.The cost of a turret post is
high.Both O.D. and I.D tools are fitted on the turret.Also tools are mounted on the cross slide.
Cross slide: Movement of 'X' axis.
Longitudinal slide: Movement of 'Z' axis.
Chip conveyor: It is used to remove the scraps(chips)
Emergency stop:
When push this key the machine is 'off' suddenly.Then release the Emergency stop push
button for further operations of machine.
Dry run: it is used to activate JOG feed rate instead of a programmed feed rate.
Block skip: It is used to turn on/off the block skip key, used for selective operation
Optional stop: It is used to stop the program execution at a block containing M01, when
Machine lock: when this key is ON, in automatic operation, the program is run, the spindle is
rotating and the tool is also indexing. But the tools do not move.(No feed movement of tool)
Cycle start: when we press this key in auto mode the machine run automatically as per already
inputted program.
Feed hold: when we press this key in automatic operation, the tool feed is locked.
(Tool not moves).Press cycle start switch for further movement of tool.
Note: The panel above is for milling machine, lathe is also similar too. But some additional keys
can be added and removed.
PROGRAM NUMBER
Program Number is use for Identifying the program. It must be always on the top of the
program. It is denoted by the Address ‘O’
Example: O0001 to O09999(Any Number Can be used frokm 00001 to 9999) but total number
of program can be stored is limited depends upon FANUC Series.
SEQUENCE NUMBER
Sequence Number is using for Identify the program Sequence, this is added to top block
for easy access. It is denoted by the address ‘N”
O0012;
N1 ______ ;
N2 ______ ;
N3 ______ ;
N4 ______ ;
N5 ______ ;
N6 ______ ;
N7 M30;
PROGRAMMING TERMS
ADDRESS
DATA
Numerical Characters are called Data( it also include sign and the decimal point)
WORD
Word includes Address and Data(it also include sign and the decimal point)
BLOCK OR LINE
G00; is not a meaningful block because G)0 is only selection of traveling mode( linear, circular)
PROGRAMMING
What is a program?
Outline of Programming
A Conventional machine tool is operated by the operator. With CNC machine tools,
the operating commands are given in the form of NC data. Programming is the process of coding
machining conditions such as cutting dimensions, processing orders, cutter movements or axes
feed rate all under fixed regulation which refers to the work piece drawing to instruct NC
machine tool. The following shows a typical job flow for NC machine tools
Manual Programming
Automatic Programming
Example
O1203;
N1;
_______________;
_______________;
_______________;
M01;
N2;
_______________;
_______________;
_______________;
_______________;
M01;
M30;
DECIMAL POINT INPUT
Decimal point is used to input the units like Distance, Time, and Angle.
X25.0 is use for input the distance value. X25.0 equal to 25mm or 25 inch.
G04 X1.0 is used for input the dwell time value. X0.1 is equal to one second.
The following are the same meaning, in the case of decimal point.
X20.
X20.0
X20.00
X20.000
X 50 =0.05mm
X500 =0.5mm
X5000=5.0mm
X,Z,U,A,B,C,I,J,K,R,Q,F.
NOTE:
1 Micron = 0.001mm.
Code Application
G00 positioning (rapid traverse) (M,T)
G01 linear interpolation (feed) (M,T)
G02 circular Interpolation CW (M,T)
G03 circular Interpolation CCW (M,T)
G04 dwell, a programmed time delay (M,T)
G05 unassigned
G06 parabolic interpretation (M,T)
G07 cylindrical diameter values (T)
G08 programmed acceleration (M,T)
G09 exact stop check (M,T)
G13 computing line and circle intersect (M,T)
G17 XY plane selection (M,T)
G18 ZX plane selection (M,T)
G19 YZ plane selection (M,T)
G20 input in inch
G21 input in mm
G22-G23 machine axis off limit area (M,T)
G24 single-pass rough facing cycle (T)
G28 return to reference point (M,T)
G29 return from reference point (M,T)
G30 return to alternate home position (M,T)
G33 thread cutting, constant lead (T)
G34 thread cutting, increasing lead (T)
G35 thread cutting, decreasing lead (T)
G36 automatic accel. and deccel. (M,T)
G37 used for tool gaging (M,T)
G38 measure dia. and center of hole (M)
G40 cutter compensation cancel (M)
G41 cutter compensation left (M)
G42 cutter compensation right (M)
G43 cutter offset, inside corner (M,T)
G44 cutter offset, outside corner (M,T)
G45 tool offset decrease
G46 tool offset double increase
G47 tool offset double decrease
G48 scaling off
G49 tool length compensation cancel
G50 tool offset increase
G52 offset axis w/ respect to 0 point (M,T)
G53 motion in machine coordinates (M,T)
G54 work coordinate system 1 select
G55 work coordinate system 2 select
G56 work coordinate system 3 select
G57 work coordinate system 4 select
G58 work coordinate system 5 select
G59 work coordinate system 6 select
G60 single direction positioning
G61 exact stop check mode (M,T)
G62 reduce feed rate on inside corner (M,T)
G64 cutting mode (M,T)
G65 custom parametric macro (M,T)
G66 custom macro for motion blocks (M,T)
G67 stops custom macro (M,T)
G68 coordinate syslaim rotation ON (M)
G69 coordinate syslaim rotation OFF (M)
G70 inch programming (M,T)
G71 metric programming (M,T)
G72 circular interpolation CW (M)
G72 finished cut along z-axis (T)
G73 peck drilling cycle (T)
G74 counter tapping cycle (M)
G74 rough facing cycle (T)
G74 cancel circular interpolation (M,T)
G75 circular interpolation (M,T)
G76 fine boring
G80 canned cycle cancel
G81 drilling cycle, no dwell (M,T)
G82 drilling cycle, dwell (M,T)
G83 deep hole, peck drilling cycle (M,T)
G84 right hand tapping cycle (M,T)
G85 boring, no dwell, feed out (M,T)
G86 boring, spindle stop, rapid out (M,T)
G87 boring, manual retraction (M,T)
G88 boring, spindle stop, manual ret. (M,T)
G89 boring, dwell and feed out (M,T)
G90 absolute dimension input (M,T)
G91 incremental dimension input (M,T)
G92 set absolute zero point (M,T)
G93 inverse time feed rate (M,T)
G94 per minute feed (M,T)
G95 per revolution feed (M,T)
G96 constant surface speed control (T)
G97 stop constant surface speed control (T)
G98 return to initial point in canned cycle
G99 return to R point in canned cycle
M- CODES (Miscellaneous Function)
M-code includes anaddress 'M' and Numerical letter. M-Code is also known as Machine
code. It is related to auxillary
or switching information such as Spindle on/off, coolant on/off and other machine functions. It is
not related to movement
of the machine.
M00
M01 Program Stop
Optional Stop
M02 End of Program - Stop
M03
M04
M05 Spindle On CW
Spindle On CCW
Spindle Stop
M06 Tool Change
M07
M08
M09 Coolant On - Mist
Coolant On - Flood
Coolant Off
M13
M14
M15 Spindle On CW - With Coolant
Spindle On CCW - With Coolant
Spindle Stop - With Coolant
M19
M20 Spindle Orientation On
Spindle Orientation Off
M21
M22
M23
M24 Table Rotate CW / Tool Magazine Right
Table Rotate CCW / Tool Magazine Left
C-Axis Enable / Tool Magazine Up
C-Axis Disable / Tool Magazine Down
M25
M26 Tailstock Engaged / Tool Clamp
Tailstock Retracted / Tool Unclamp
M27
M28 Clutch Neutral On
Clutch Neutral Off
M30 End of Program - Stop and Rewind
M98
M99 Call Subprogram
End Subprogram
Letter addresses
Some letter addresses are used only in milling or only in turning; most are used in both.
Bold below are the letters seen most frequently throughout a program.
Variable Description
A Absolute or incremental position of A axis (rotational axis around X axis)
B Absolute or incremental position of B axis (rotational axis around Y axis)
C Absolute or incremental position of C axis (rotational axis around Z axis)
D Defines diameter or radial offset used for cutter compensation
E Precision feedrate for threading on lathes
F Defines feed rate
G Address for preparatory commands
H Defines tool length offset
I Defines arc size in X axis for G02 or G03 arc commands.
J Defines arc size in Y axis for G02 or G03 arc commands.
K Defines arc size in Z axis for G02 or G03 arc commands.
L Fixed cycle loop count;
Specification of what register to edit using G10
M Miscellaneous function Action code, auxiliary command; descriptions vary.
N Line (block) number in program;
System parameter number to be changed using G10
O Program name
P Serves as parameter address for various G and M codes
Q Peck increment in canned cycles
R Defines size of arc radius or defines retract height in canned cycles
S Defines speed, either spindle speed or surface speed depending on mode
T Tool selection
U Incremental axis parallel to X axis (typically only lathe group A controls)
V Incremental axis parallel to Y axis
W Incremental axis parallel to Z axis (typically only lathe group A controls)
X Absolute or incremental position of X axis. Also defines dwell time on some
machines (instead of "P" or "U").
Y Absolute or incremental position of Y axis
Z Absolute or incremental position of Z axis
1.Example
G0 X-1.780 Y-1.025 Z0.1
Description
Moves the tool to location (-1.78,-1.025,0.1) at the move speed specified in Setup|CNC defaults.
The Z axis will be moved first.
2.Example
G1 X0.939
X0.948 Y0.333
Description
Moves the tool along the X axis to location (0.939) at the feed speed specified in Setup|CNC
defaults. Then moves the tool to location (0.948, 0.333).
3.Example
G1 X0.948 Y0.333 F2.5
Description
Moves the tool to location (0.948,0.333) at speed 2.5. Any subsequent G1 commands or
coordinates will continue to use speed of 2.5 until you set it to some other value or you cancel
the F command. To cancel the F command, use F0. This will reset the feed speed to the value in
the Setup|CNC Defaults form. If you specify a speed higher than the MaxSpeed value specified
in the Setup|Motor Parameters form, the MaxSpeed value will be used instead.
4.Example
G2 X-1.535 Y0.469 I0.500 J0.000
Description
Move in a clockwise arc from the current position to location (-1.535, 0.469) using a center point
located 0.5 units in the X direction from the current position.
5.Example
G3 X-1.535 Y0.469 I-0.500 J0.000
Description
Move in a counter-clockwise arc from the current position to location (-1.535, 0.469) using a
center point located 0.5 units in the negative X direction from the current position.
6.Example
G4 P2000
Description
Pause the tool for 2 seconds (2000 milliseconds) before continuing.
7.Example
G27
Description
Rapid return home. Move directly to location (0, 0, 0) at the move speed specified in Setup|GNC
Defaults.
8.Example
G28 X0.5 Y-.2 Z.1
Description
Rapid return home via point. Move directly to location (0.5, -0.2, 0.1) at the default move speed,
then move directly home to location (0, 0, 0).
9.Example
G50 X0.5 Y-.2 Z.1
Description
Redefine the tools current location to be (0.5, -0.2, 0.1).
10.Example
G81
D .125
M1
X-0.470 Y0.597 Z-0.030 L0.01
G80
Description
Start Drill cycle with G81. D parameter specifies drill bit radius (not diameter) of 0.125.
Pause program with M1 command giving you time to load a drill bit. Manually adjust the tool
depth so that the tip of the new drill bit is at the same depth as the one removed. When you are
ready, click the Continue button. The tool moves up to Zsafe defined in Setup|GNC Defaults
form. Then it moves to location (-0.47, 0.597) at the default move speed. Then it moves down
to 0.01 at the default move speed. Then it moves down to the Z depth of –0.030 at the default
feed speed. If you leave out the L coordinate, it will travel at the feed speed from Zsafe to the Z
depth. Subseqent X,Y coordinates will drill new holes at the new coordinates. The tool will lift
up before moving to the next hole. Finally, drill cycle is cancelled with G80.
11.Example
G83
D .125
M1
X-0.470 Y0.597 Z-1 L0.01 Q.3
G80
Description
Start Peck Drill cycle with G83. D parameter specifies drill bit radius (not diameter) of
0.125. Pause program with M1 command giving you time to load a drill bit. Manually adjust
the tool depth so that the tip of the new drill bit is at the same depth as the one removed. When
you are ready, click the Continue button.
1) The tool moves up to Zsafe defined in Setup|GNC Defaults form.
2) Moves to location (-0.47, 0.597) at the default move speed.
3) Moves down to 0.01 at the move speed. If L parameter not defined, it will use Zsafe.
4) Moves down another 0.3 units at the default feed speed If Q parameter not defined, it will use
2 times the drill bit diameter.
5) Moves back up to 0.01 at move speed.
6) Moves down to within one radius of previous depth at move speed
7) Moves down another 0.3 units at feed speed
8) Repeats steps 5-7 until Z depth of –1.0 has been reached
9) Moves up to 0.01 at move speed
10) Subseqent X,Y coordinates will peck drill new holes at the new coordinates. The tool will
lift up to Zsafe before moving to the next hole.
11) Finally, drill cycle is cancelled with G80.
12.Example
G98
Description
Move Z axis to depth set in L code at the default move speed defined in Setup|GNC defaults
form.
13.Example
G99
Description
Move Z axis to depth set in R code at the default move speed defined in Setup|GNC defaults
form.
14.Example
M0
Description
Stop program
15.Example
M30
Description
Reset program back to the top and start running again from there
TOOL FUNCTION :-
Address T:
A four digit number address T specifies the tool number and tool offset number.
Format:
T (Tool Number) (Offset Number)
Example: T 01 01
Tool Number
The leftmost two digits specify the number of tool.
Offset Number
The rightmost two digits specify the number of tool offset.
Types of offsets:
There are two types of offsets:
1. Wear offset.
2. Geometrical offset.
1. Wear offset:
The tool is moved adding the wear offset amount to part program.
Input the offset amount to the same number as the number on offset screen (Wear).