Module 4: Computer Aided Manufacturing
Write a CNC program using appropriate G and M code to turn the component shown in the figure. [IMAGE REQUIRED — add the original component/profile figure here.] Raw material: MS 32×50 mm, cutting speed V=40 m/min and feed =0.1. Assume suitable data for depth of cut. The figure specifies the component dimensions and profile.
CNC Turning Program — MS Ø32×50 mm, V=40 m/min, f=0.1 mm/rev
Note on figure: Original question figures varies by paper set. This solution presents a general parametric framework plus a fully worked exemplar profile (common for this paper: Ø32→ stepped 30/20 mm + chamfer + radius, 50 mm length) so you can regenerate for any figure by changing
X,Zvalues. Full G/M list + cutting data + canned cycle method included.
1. Cutting Data Calculation
Given: Draw=32 mm, V=40 m/min, f=0.1 mm/rev, depth of cut assumed ap=1.0 mm rough, 0.3 mm finish.
N=πD1000V=π×321000×40≈398 rpm≈400 rpm
Set S400 (G97). Alternatively use CSS G96: G96 S40 (40 m/min constant surface speed) + G50 S1200 clamp — modern lathe prefers CSS for facing.
Feed: F0.1 (mm/rev, G99). Depth: rough 1 mm, finish 0.3 mm — both within MS turning.
2. Essential G/M Codes for CNC Turning (Fanuc)
| Code | Meaning |
|---|---|
| G00 | Rapid positioning |
| G01 | Linear interpolation (cut) |
| G02/G03 | Circular CW/CCW |
| G28 U0 W0 | Return to home |
| G40/G41/G42 | Tool nose radius comp off/left/right |
| G70/G71/G72 | Finish / Stock removal (longitudinal / facing) canned cycles |
| G90/G94 | Absolute / Feed per min vs G99 feed per rev (lathe) |
| G96/G97 | Constant surface speed / rpm mode |
| G98/G99 | Feed per min / per rev |
| M03/M04 | Spindle CW/CCW |
| M06/Tnn | Tool change |
| M08/M09 | Coolant on/off |
| M00/M30 | Program stop / end & rewind |
Work offset: G54, Tool offset via T0101 (tool 1, offset 1).
3. Billet & Work Setup
Raw: MS Ø32 × 50 mm
Programme zero: Workpiece face centre (Z0 at finished face, X0 at centreline)
Z negative into part, X diametral.
Chuck: Ø32, 15 mm grip, 35 mm stick-out, facing allowance 1 mm → start Z+1
Tools: T01 = rough OD (CNMG 80°), T02 = finish OD + chamfer, T03 = parting
Z+
| G54 origin (face centre)
+-----> X (diameter)
|
+--+----------------------------------+
| | Ø32 raw | ← 50 mm
+--+----------------------------------+
0 Z- -50
4. Exemplar Part Profile (assumed — adapt values to your figure)
Common figure for this paper — stepped shaft:
Ø30 ┌──────────┐
───────┘ │ Ø20 ┌──────┐
20 │ │ 2×45° chamfer at Ø30 face & step
└──────┘ │
|<--20 mm-->|<--15 mm--->|<10mm>|
C2 R2 fillet at step
Total L = 45 mm (facing 1 mm off 50 mm billet → 49 mm → finished 45 mm + 4 mm parting)
If your figure differs (taper/concave), only profile N-block coordinates change — cycle structure stays same.
5. Full CNC Program — Fanuc 0i-TF (G71 Rough + G70 Finish + Parting)
O0001 (CNC TURN - MS 32x50 V40 F0.1 - EXEMPLAR STEPPED SHAFT)
(DATE 2022 Q9a - ADAPT X,Z TO YOUR FIGURE)
(BILLET 32x50 - ZERO FACE CENTRE G54 - TOOLS T01 ROUGH T02 FINISH T03 PART)
N10 G21 G40 G99 G97 (mm, cancel comp, feed/rev, rpm mode)
N20 G28 U0 W0 (home)
N30 T0101 M06 (rough OD tool)
N40 G54 G00 X35.0 Z2.0 M03 S400 M08 (rapid to start, spindle 400 rpm, coolant on)
N50 G96 S40 G50 S1200 (opt: switch to CSS 40m/min, clamp 1200 -- comment if G97 desired)
N60 G00 X32.5 Z0 (touch face)
N70 G71 U1.0 R0.5 (G71 rough cycle: depth 1.0, retract 0.5)
N80 G71 P90 Q170 U0.3 W0.1 F0.1 (P-Q profile, finish allowance X0.3 Z0.1, feed 0.1)
N90 G00 X18.0 (profile start -- G71 needs X before Z)
N100 G01 X20.0 Z0 F0.1 (face to Ø20)
N110 G01 Z-15.0 (Ø20 length)
N120 G02 X22.0 Z-16.0 R1.0 (fillet R1 at step -- adjust to figure: R2 if needed)
N130 G01 X28.0 Z-16.0 (step face approach)
N140 G01 X30.0 Z-17.0 (45° chamfer 1x1 at Ø30 step: X30 Z-1 from X28)
N150 G01 Z-35.0 (Ø30 length)
N160 G01 X32.0 Z-36.0 (outer chamfer 1x1 before parting allowance)
N170 G01 X32.0 Z-45.0 (Ø32 to part length)
N180 G70 P90 Q170 F0.08 S600 (FINISH pass -- lower feed 0.08 for finish)
N190 G00 X100.0 Z100.0 M09 (retract, coolant off)
N200 T0202 M06 (finish tool -- if same as rough, skip; else refine)
N210 G00 X35.0 Z2.0 M03 S600 M08
N220 G70 P90 Q170 F0.08 (second finish if separate tool)
N230 G00 X100.0 Z100.0 M09
(PARTING)
N240 T0303 M06 (parting tool width 3mm)
N250 G00 X33.0 Z-45.0 M03 S300 M08
N260 G01 X18.0 F0.05 (part off slowly)
N270 G00 X100.0 Z100.0 M09
N280 G28 U0 W0
N290 M30 (end, rewind)
%
What each block does
| Block | Action |
|---|---|
| N30-40 | Tool, home, rapid to safe, spindle, coolant |
| N70-80 | G71 canned longitudinal roughing — CNC auto-slices the P90-Q170 profile at U1.0 depth |
| N90-170 | Profile definition (finished shape) — only executed via G71/G70 |
| N180 | G70 finish — single pass along same profile with finish feed |
| N240-260 | Parting |
6. Manual (Long-hand) Version Without G71 (for exam where canned cycle not allowed)
O0002 (MANUAL - NO CANNED CYCLE)
N10 G21 G40 G99 G97
N20 T0101 M06
N30 G00 X35 Z2 M03 S400 M08
N40 G00 X31 Z0
N50 G01 Z-45 F0.1 (rough OD 32->31)
N60 G00 X32 Z2
N70 G00 X30 Z0
N80 G01 Z-45 F0.1 (30 dia)
N90 G00 X31 Z2
N100 G00 X29 Z2 (repeat passes, decrement X by 2*ap)
...
(FACE, CHAMFER, RADIUS via G01/G02 as in N100-N170 above, finishing)
N200 M30
%
7. How to Adapt to YOUR Figure (Critical Exam Tip)
- Replace N100-N170 profile with your figure's
X(diameters) andZ(lengths).
Taper:G01 X__ Z__with both changing.
Arc:G02/G03 X__ Z__ R__(R = radius from drawing) orI,Kcentre. - Keep G71 structure — change only
U(depth),P/Qline numbers,F. - For internal bore/groove, use G71 for OD, G72 for facing, G75 for grooving.
- Units: programme in diametral X (Fanuc lathe default) — Ø20 =
X20.0.
Example for taper Ø32→Ø20 over 20 mm:
G01 X20.0 Z-20.0 (taper -- simultaneous X,Z)
For concave radius R10:
G03 X20.0 Z-25.0 R10.0
8. Process Sheet
| Op | Tool | Speed | Feed | Depth | Passes |
|---|---|---|---|---|---|
| Facing | T01 | 400 rpm | 0.1 | 1 mm | 1 |
| Rough OD | T01 | 400 rpm (CSS 40) | 0.1 | 1.0 mm | ~(32-20)/2 ≈6 |
| Finish | T02 | 600 rpm | 0.08 | 0.3 mm | 1 |
| Part | T03 | 300 rpm | 0.05 | 3 mm wide | 1 |
Chuck + tailstock support if L/D>3.
9. Checks Before Running
- Simulate in
CNC Simulator Pro/ Fanuc GUI — check overcut, gouging at fillet. - Compensate tool nose radius (
G41if contouring withR0.8insert) — omitted above for clarity; addG42for OD. - Set work offset G54 Z by touching off face with
G00+ paper. - Dry run with
M01optional stop + single block.
One-line exam answer: Use N≈400 rpm (V=40, D32), F0.1,
G71 U1.0rough +G70finish withX,Zprofile taken directly from figure; programme above is complete — substitute your figure's diameters/lengths/radii intoP90-Q170block.
Similar questions
Coursify Android App
Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.