Introduction to CNC

What is CNC?
Computer Numerical Control

The process of manufacturing machined parts using a computerized controller to command motors which drive each machine axis.

History of CNC
John Parsons, Parsons Corporation, Michigan

Developed a control system that directed a spindle

to many points in succession
Servomechanism Laboratory of Massachusetts Institute of Technology (MIT).

Added computer to Parson’s system

Cincinnati Milicron Hydro-Tel Vertical Spindle Milling Machine

First three-axis numerically controlled
Use of tape-fed machine tool

1954 NC was announced to public. 1957

First production NC machines were delivered and
installed. 1960 NC machine tools commonly available.

Why CNC machine tools?
 

Increase production throughput. Improve the quality and accuracy of manufactured parts. Stabilize manufacturing costs. Manufacture complex or otherwise impossible jobs - 2D and 3D contours.

 

CNC Programming Basics
Program structure Every program consists of: 1. Program Start The program start is the program number. The program number begins with character/letter O. 2. Program Contents NC blocks 3. Program End M30 for a main program M17 for a sub-program

CNC Program Numbers
Program Numbers
O6999 . . . O0256 O0255 . . . O0000

CNC Program Blocks (1)

• N is the address • Block numbers from N0000 to N9999 • A block consists of number and words. • Words are contents of a block. • Block numbers are selected in the jumps of ten for the purpose of insertion

CNC Program Blocks (2)
• A block consists of one or more blocks • A Word consists of a character (address) and a number. • Every address has a certain meaning, on which the corresponding number depends

CNC Prg. Syntax Regulations
• The maximum block length must not exceeded four lines. • Every block starts with a block number. • After the block numbers follows the G command. • Words consists of coordinates X(U), Z(W). • For G02, G03 program interpolation parameter I and K are placed after X(U), Z(W). • The F word (feed, thread pitch). • The S word (cutting speed). • The T word (tool address). • The M word (additional functions).

Absolute Value Programming
 P0 N… … P0  P1 N… G01 X40. Z25. F… P1  P2 N… G01 X60. Z-40. F… P2  N… …

Absolute coordinate system

Incremental Value Programming
Example:  P0 N… P0  P1 N… P1  P2 N… P2  N…

… G01 U5. W-25. F… G01 X10. Z-15. F… …

Incremental coordinate system

Mixed Programming
Example:  P0 N… … P0  P1 N… G01 U5. W-25. F… P1  P2 N… G01 X60. Z-15. F… P2  N… …

Mixed coordinate system

Self-holding Functions (1)

• The majority of G and M commands and other words are self-holding, remain active until overwritten or deactivated/deselected. • Aimed to simplify and to reduce programming tasks. Example: G41 can be deactivated by issuing G40 command.

Self-holding Functions (2)
Take-over of G00 commands in block N0110 In block N0120 G00 is deactivated by G01. G01 is active.
Example 1: N0100 G00 X50. Z+10. N0110 X36. Z+2. N0120 G01 X40. Z-10. F… N0050 M03 N0060 … … N0120 M04 M03 activated at N0050 and effective from N0050 through N120. M03 deactivated at N0120 by M04 command

Example 2:

Reference Points
M = Machine zero point. (unchangeable ref. Point determined by machine manufacturer) N = Tool mounting reference point W = Work piece zero point. (can be freely determined by the programmer and can be moved within program

Work piece (1)

Work piece (2)

G & M Commands
G00: G01: G02: G03: G70: G71:
M03: M04: M20: M21:

Rapid traverse Linear interpolation Circular interpolation clockwise Circular interpolation counter clockwise Measuring in Inch (USA) Measuring in mm (Other countries)
Spindle ON clockwise Spindle ON counter clockwise Tailstock back Tailstock forward

G00, Rapid Traverse
Tool position X69 Z5

Absolute dimensions of the target point coordinates: N030 G90 N040 G00 X48 Z-26

An absolute X coordinate related to the diameter.

Incremental dimensions of the target point coordinates: N030 G91 N040 G00 X-10,5 Z-31

G01, Linear Interpolation
G01 X… Z… G90: N030 G00 X39 Z2 N040 G01 X39 Z0 N050 G90 N060 G01 X48 Z-37 G91: N030 G00 X39 Z2 N040 G01 X39 Z0 N050 G91 N060 G01 X4.5 Z-37

P0: tool position

G90 & G91 Commands
G90 G01 X+140 Z-90 Target point abs. G91 G01 X+40 Z-60 Target point incr. PO: Start Point P1: Target Point