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

HA5C Lessons

Programming with Local Sub-Program
Programming with Local Sub-Program
- Programming a 4th axis indexer can be complicated, but many programmers use sub-programs.
- Local Sub-Programming works great when a programming is 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.
- "M" codes used for Local Sub-Programming:

M97 - Local Sub-Program call.

P - Is the line number that the local sub-program will look for in your program.

L - Is the loop command to perform that operation so many times.

(Example: M97 P1390 L6

The control will look for line #1390 and perform it 6  times).

M99 - Return to the main program.