Lec 9
Lec 9
LECTURE 9
CNC Programming
1
Contents:
CNC Programming
BLOCK FORMAT
G&M Codes
2
CNC Programming
4
Basics of NC Part Programming:
5
The position of the tool is described
by using a Cartesian coordinate
system.
If (0,0,0) position can be described
by the operator, then it is called
floating zero.
6
In defining the motion of the tool from one
point to another, either:
1. absolute positioning mode or
2. incremental positioning mode can be used.
7
1. Absolute positioning. In this mode, the
desired target position of the tool for a particular
move is given relative to the origin point of the
program.
8
INFORMATION NEEDED by
a CNC
1. Preparatory Information: units, incremental or absolute
positioning
2. Coordinates: X,Y,Z, RX,RY,RZ
3. Machining Parameters: Feed rate and spindle speed
4. Coolant Control: On/Off, Flood, Mist
5. Tool Control: Tool and tool parameters
6. Cycle Functions: Type of action required
7. Miscellaneous Control: Spindle on/off, direction of rotation,
stops for part movement
This information is conveyed to the machine through a set
of instructions arranged in a desired sequence – Program.
9
BLOCK FORMAT
Sample Block:
10
WORD-ADDRESS CODING
11
G & M Codes
12
G Codes
13
Modal G-Codes
• Most G-codes set the machine in a “mode” which stays in
effect until it is changed or cancelled by another G-code.
These commands are called “modal”.
14
Modal G-Code List
15
M Codes
16
N Codes
17
X,Y, and Z Codes
18
I,J, and K Codes
• Number following the code defines the respective coordinate for the
center of the circle.
19
F,S, and T Codes
20
Thank you
21