Course: PMT 250 Multi-Axis CNC Programming (Section 060)

HA5C Lessons

Programming with Sub-Programs
Programming with Sub-Programs
- Programming a 5th axis trunnion can be complicated, but many programmers use sub-programs.
- Sub-Programming works great when a programming the same feature on multiple side of a work piece.
- Local Sub-Programming means that you create a main program and you use a special "M" code to call up a Sub-Program.
- When using Sub-Programming you will need to create a main program and another program for the sub.
- Each Sub-Program will need to be saved in the memory of the HAAS control.

Programming Example

%

O01310

(HAAS 5TH AXIS PROGRAM)

T3 M06 (.470 CARBIDE END MILL)

G54 G00 G90 X1.5 Y1.5 A0 B0

S9500 M03

G43 H03 Z0.3

G01 Z0 F10.

M98 P1383

G55 G00 G90 X1.5 Y1.5 A90. B0.

G00 Z0.2

G01 Z0 F10.

M98 P1383

G55 G00 G90 X1.5 Y1.5 A90. B90.

G00 Z0.2

G01 Z0 F10.

M98 P1383

G55 G00 G90 X1.5 Y1.5 A90. B180.

G00 Z0.2

G01 Z0 F10.

M98 P1383

G55 G00 G90 X1.5 Y1.5 A90. B270.

G00 Z0.2

G01 Z0 F10.

M98 P1383

G00 Z1. M09

G28 G91 Z0 Y0

M30

%

Below is the sub program.

%

O01383

G13 G91 Z-0.21 I0.225 K1.1875 Q0.225 L2 D03 F180.

G13 G91 Z-0.1385 I0.225 K0.875 Q0.225 L2 D03 F180.

G13 G91 Z-0.149 I0.225 K0.6 Q0.225 L2 D03 F180.

G90 G00 Z4.

M99

%