CNC Lathe Subprogram Call Multiple Times Example


Submit by: Vikram

Summary

CNC lathe program which calls a subprogram multiple times to cut the same pattern.
Subprogram uses UW instead of XZ to make porgram easier to understand and debug.

Drawing/Image

CNC Lathe Subprogram Call Multiple Times Example

CNC Program

Main Program:

N5 G90 F0.2 S1200 T0101 M04
N10 G00 X40 Z0
N20 M98 P37000 (call subprog O7000 three times)
N30 G01 W-30
N40 G28 U0 W0
N50 M05 M30



Subprogram:

O7000;
G01 U0 W-30
G02 U0 W-10 R5
N60 M99