Professional Documents
Culture Documents
What Is CNC?
What Is CNC?
What Is CNC?
Computer User
Axis servo Interface
controller
Numerical
(key board,monitor)
Control
Programmable
Machine
controller
Machine Tool
Servo Slide
Motor
Encoder
Popular CNC Controls
Fanuc
Sinumeric from Siemens
Heidenhain
Allen Bradley etc
Spindle
The part of the machine tool that spins. On the
turning center, the spindle holds the work piece,
On the machining center, the spindle holds a
cutting tool.
Turret
This holds the tools required for machining.
Z axis
X axis
z
Turning center Operations
Facing
Turning
Drilling
Boring
Grooving on OD or ID
Face grooving
Chamfering
Thread Cutting
Etc.,,
Functions
Example
M08 Coolant On
M06 Tool change
M00 Program Stop Temporary stop of program
M01 Optional Stop Temporary stop of program ( Optiontion Stop )
M02 Program end Program end and reset
M03 Spindle normal rotation Clockwise rotation of spindle
M04 Spindle reverse rotation Counter clockwise rotation of spindle
M05 Spindle Stop Spindle rotation stop
M06 Tool Change ATC Cycle start
M08 Coolant ON Coolant Discharge
M09 Coolant OFF Coolant shut
M22 Index Forward Turret index clockwise
M23 Index Reversed Turret index counter clockwise
M24 Chuck open Opening of chuck
M25 Chuck close Closing of chuck
M30 Program end and rewind Program end and reset/rewind
M98 Sub-program call Call of a sub-program from a main program
M99 Sub-program end Return from a sub-program to a main program
G Codes
Example :
Movement of Turret..
Rotation of spindle… etc
Program block
A program block is a combination of above functions in a
single line.
Not mandatory
Occupies memory
Syntax :S ;
As you know when the tool is moving towards the center the cutting
speed changes.
Vc = πDN/1000
In CSS control N is varied automatically to keep the Vc constant
when the tool moves diametrically.
Syntax : G96 Vc; CSS Control on
G97; CSS control cancel
G96 S200;
G96 and G97 are modal codes.Here S200 denotes the cutting speed.
CLAMP OF MAXIMUM SPINDLE SPEED
When we are using G96, the CSS control, the spindle Speed
need to be clamped to a maximum speed.
Syntax :F ;
Syntax T
Offset number
Tool number
N_ G00 X_ Z_
G01 X-50.0F0.15;
G90- Absolute command
The point with reference to the work piece zero point is
referred as absolute command
Always referred by G90
Spindle
z(-) z (+)
Work Zero
x (-)
G91 - Incremental command
N_ G02 X_ Z_ R_ F_
Z axis
N_ G03 X_ Z_ R_ F_
Z axis
The G03 is a counter
clockwise radial GO3
feed move
X axis
G04 Dwell
N_ G04 U or P_
N_ G20
N_ G21
N_ G28 U_ W_
N_ G30 U_ W_
G 50 X_ Z_ Co ordinate setting
G50 S 2500 Max spindle speed setting
G 50 X 200. Z100
100
100
G96 Constant surface speed Control
G96 S425;
G97
G98
Ex bar bulling
G99 Feed per Revolution
G99
Ex Regular turning
What is Tool offset?
Tool offset is a value used to compensate the difference between
the actual tool and the imaginary tool (standard tool) used for
programming.
Standard tool
Actual tool
X offset
Z offset
Tool Geometry offset:
To compensate the difference in tool shape and mounting position.
Part Machine
Part drawing CNC
programming tool
Programming Operation
How to set the
machine
Machine ON
Origin
Fixture Mounting
Fixture dialing
Locator/clamp fixing
Tool pocketing
Tool offset inputing
Programming
Component inspection
Component cutting @
100%feed/ speed/Rapid
Program
Number
Program number
Spindle
z(-) z (+)
Work Zero
x (-)
Basic Programming rules CNC
lathe :
X = The diameter of the part.
Z = The length dimension
50
Optional stop and block skip
CNC PROGRAM
FOR
TURNING CENTRE
O7130
(PILATUS PROGRAM FOR 4130
ZEN)
IF[#530NE4130]GOTO8
M98P6000
M86
Turning & facing
G04X2.0
M01
N1 (R0UGH TURNING)
T0606
G30U0.0W0.0
G50S2000
G90G00G54X105.0Z-29.55
G96G99S375M04 M08
G01X46.0F0.4
U0.5W0.25
G00U6.0
Z0.5 41.125
X48.0
G01X20.0
G00X36.625Z1.5
G01X41.125Z-0.75
Z-29.55
G00U2.0W1.0
T0000
G30U0.0W0.0
M09 29.55
M05
#506=#506+1
M01
O7130
29.55
Grooving
N6
(BOOT GROOVE)
T0303
G30U0.0W0.0
G90G00G54X44.0Z-19.85
G97G99S2000M03 19.85
M08
G01X37.625F0.25
G00X50.0
T0000
G30U0.0W0.0
M09 37.625
M05
#503=#503+1
M01
Sub program call by M98
If a program contains a fixed sequence or frequently
repeated pattern such a sequence or pattern can be stored
as a sub program in memory to simplify the program.
EXAMPLE:
O0001; O1000; O2000; O3000; O4000;
. . . . .
. . . . .
. . . . .
M98P1000 M98P2000 M98P3000 M98P4000 .
. . . . .
. . . . .
. . . . .
M30; M99; M99; M99; M99;
programmable data input -
G10
Offset values can be changed during run time from inside the
program by using programmable data input G10 command.
Example:
O0001;
(Main program for part 29665688-Pilatus);
N1;
T0101;
(Rough turning TCGX102-AL804);
Custom Macro
You are aware that sub programs are useful for repeating the same
operation.
Example : #100
Common variables #100 - #199 they can be shared among many programs. Volatile.
#1000 – System variables used to read and write NC data items like pallet in work
zone, tool number, axis current position etc.,
Variable values
-1047 to -10-29
0
10-29 to 1047
Referencingthevariablesinapartprogram.
N2 S#503;
Macro alarms
For example
#500 = #500+1;
Trigonometric and logarithmic operations
#I=SIN [#j];
#I=COS [#j];
#I=TAN [#j];
#I=SQRT [#j];
#I=ABS [#j];
#i=LN [#j];
#I=EXP [#j];
Conditional branch
EQ = EQUAL TO
NE= NOT EQUAL TO
GT= GREATER THAN
GE= GREATER THAN OR EQUAL
LT= LESS THAN
LE= LESS THAN OR EQUAL
BRANCHING EXAMPLE
O0003;
IF[#530 NE 5142] GOTO7;
.
.
.
.
.
.
N7;
End m;
G CODE INFORMATION