You are on page 1of 9

Experiment 10

CNC Post Processor

A Post Processor is a unique driver specific to a CNC machine; some CNC machines start at different
locations or require extra movement between each operation, the Post-Processor works with the CAM
software to make sure the G-Code output is correct for a specific machine build. Another example of use
for a Post-Processor would be an ATC (Automatic-Tool-Change) for a CNC, the Post-Processor is
required so the correct Tool is collected from the correct location. The Post Processor controls the format
and syntax of the program that is generated for the controller that controls a specific machine (typically a
CNC or a robot).[1]
A post processor is commonly used by the CAM (Computer Aided Manufacturing) Software to
generate G-code for a specific CNC Machine.
NC machines work by following the commands or instructions (G-codes / M-codes) which are given in
Part Program. Here are G-codes for MACH3 CNC control which are necessary for a CNC machinists to
learn to understand CNC programming.
G code

Description

G00

Rapid traverse

G01

Linear interpolation

G02

Circular interpolation CW

G03

Circular interpolation CCW

G04

Dwell

G09

Exact stop

G10

Programmable data input

G20

Input in inch

G21

Input in mm

G22

Stored stroke check function on

G23

Stored stroke check function of

G27

Reference position return check

G28

Return to reference position

G32

Thread cutting

G40

Tool nose radius compensation cancel

G41

Tool nose radius compensation left

G42

Tool nose radius compensation right

G70

Finish machining cycle

G71

Turning cycle

G72

Facing cycle

G73

Pattern repeating cycle

G74

Peck drilling cycle

G75

Grooving cycle

G76

Threading cycle

G92

Coordinate system setting or max. spindle speed setting

G94

Feed Per Minute

G95

Feed Per Revolution

G96

Constant surface speed control

G97

Constant surface speed control cancel

M-code are CNC program instructions which help CNC machinist/programmer to control CNC machine
hardware like chuck, tailstock, quill, coolant. Here are listed M-code which are mostly used on CNC
lathe/mill with MACH3 CNC control.
M code

Description

M00

Program stop

M01

Optional program stop

M02

End of program

M03

Spindle start forward CW

M04

Spindle start reverse CCW

M05

Spindle stop

M08

Coolant on

M09

Coolant of

M29

Rigid tap mode

M30

End of program reset

M40

Spindle gear at middle

M41

Low Gear Select

M42

High Gear Select

M68

Hydraulic chuck close

M69

Hydraulic chuck open

M78

Tailstock advancing

M79

Tailstock reversing

M94

Mirror image cancel

M95

Mirror image of X axis

M98

Subprogram call

M99

End of subprogram

Experiment 11
Development of CNC code for Free Form
PARTNO / APT-1
CLPRNT
UNITS / MM
NOPOST
CUTTER / 10.0
$$ GEOMETRY DEFINITION
SETPT = POINT / 0.0, 0.0, 0.0
STRTPT = POINT / 70,70,0
P1 = POINT / 50, 50, 0
P2 = POINT / 20, -20, 0
C1 = CIRCLE / CENTER, P2, RADIUS, 30
P3 = POINT / -50, -50, 0
P5 = POINT / -30, 30, 0
C2 = CIRCLE / CENTER, P5, RADIUS, 20
P4 = POINT / 50, -20, 0
L1 = LINE / P1, P4
L2 = LINE / P3, PERPTO, L1
L3 = LINE / P3, PARLEL, L1
L4 = LINE / P1, PERPTO, L1
PLAN1 = PLANE / P1, P2, P3
PLAN2 = PLANE / PARLEL, PLAN1, ZSMALL, 16
$$ MOTION COMMANDS
SPINDL / 3000, CW
FEDRAT / 100, 0
FROM / STRTPT
GO/TO, L1, TO, PLAN2, TO, L4
TLLFT, GOFWD / L1, TANTO, C1
GOFWD / C1, TANTO, L2
GOFWD / L2, PAST, L3
GORGT / L3, TANTO, C2
GOFWD / C2, TANTO, L4
GOFWD / L4, PAST, L1
NOPS

GOTO / STRTPT

Experiment 12
Turning Cycle for Straight Turning

G20 longitudinal turning cycle for Fanuc 21 TB cnc control is a modal G-code.G20 turning cycle can
be used for straight turning and taper turning as well.G20 turning cycle is Easy to program and learn.
G20 turning cycle is used for simple turning however multiple passes are possible by specifying the
X-axis location of additional passes.
G20 Turning Cycle Format for Straight Turning
G20 X Z F
G20 U W F
X Diameter to be cut (absolute).
Z End point in z-axis (absolute).
F Feed-rate.
U Diameter to be cut (incremental).
W End point in z-axis (incremental).

G96 S200 M03


G00 X56.0 Z2.0
G20 X51.0 W-20.0 F0.25
X46.0
X41.0
X36.0
X31.0

X30.0
G00 X100 Z100
M30

CNC Program Code Explanation

As you can see in the above cnc program code,


Tool is at X56 Z2 point,
First cut is made at X51 and tool travels W-20 in Z-axis.
Second cut is made at X46
Third cut is made at X41

Last cut is made at X30

G20 Turning Cycle Function


As if you study the above cnc program code you will notice that,
1 with G20 both absolute (X51.0) and incremental (W-20.0) values are used to make cuts.
2 If above code also shows a very powerful functionality of G20 turning cycle which is that a cnc machinist
can control depth-of-cut of every pass of G20 turning cycle which is impossible to achieve with other Turning
Canned Cycle like G71 Rough Turning Cycle.
So you will notice first five-cuts are of 5mm deep but the last one is just 1mm deep.

Cancellation of G20 Turning Cycle


G20 turning cycle is a modal G-code.
Modal G-code meaning that they stay in effect until they are cancelled or replaced by a contradictory G code.
It means G20 turning cycle remains active until another motion command is given like G00, G01 etc. As in
above cnc program example G20 G code is cancelled with G00 G code.

Experiment 13
SNAP GAUGE
AIM: To measure the unknown components of fixed dimensions and to sort out the defected one.
APPARATUS: Snap gauge, Block Gauges. THEORY: Snap gauge is a form of Go/no go gauge. It is a
limit gage with permanently or temporarily fixed measurement aperture(s) (gaps) which is used to quickly
verify whether an outside dimension of a part matches a preset dimension or falls within predefined
tolerances

Figure: Snap Gauge


Observation Table
S. NO.
1
2
3
4
5

Accepted Sample

Rejected Sample

Result:
1) The number of specimen accepted = -----------------2) The number of specimen rejected = -------A Plug gauge is an external measuring surface, designed to check the contour or
size of an opening.
PROCEDURE:
1. To check whether the hole drilled is of the diameter of the component.
2. A predefined snap gauge of size of the hole is taken.
3. If the snap gauge fits into the hole, it is called Go Gauge and the component is
accepted.
4. If the Snap gauge does not fit into the hole, it is called No Go gauge and the
component is rejected.

Figure: Plug Gauge


OBSERVATION AND TABULATION
S. NO.
1
2
3
4
5

Accepted Sample

RESULT:
1) The number of specimen accepted = -----------------2) The number of specimen rejected = -------------------

Rejected Sample

You might also like