CNC Programming Handbook: A Comprehensive Guide to Practical CNC Programming, Second Edition

Chapter 39: Subprograms

The length of a CNC program is usually measured in the number of characters such program contains. This number is similar to the number of bytes, if the program is stored on a computer disk. The physical length of a program is usually not an issue for most jobs. The program length will vary, depending on the complexity of work, the number of tools used, the method of programming and other factors. Generally, the shorter the program, the less time is needed to write it, and the less space it will occupy in the CNC memory. Short programs also reduce the possibility of a human error, because they are easily checked, modified and optimized. Virtually all CNC systems offer features designed to shorten the length of a program to some extent and make the programming process easier, more efficient and less prone to errors. Typical examples of this type of programming are fixed cycles, multiple repetitive cycles and custom macros. This chapter describes the structure, development and applications of another method of efficient program preparation - the use of subprograms.

MAIN PROGRAM AND SUBPROGRAMS

A CNC program is a series of instructions, assigned to different tools and operations. If such a program includes two or more repetitive instructions, its structure should be changed from a single long program to two or more separate programs. Each repetitive instruction is written only once and called when required. This is the main concept of subprograms. Figure 39-1 shows a typical part layout...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: CNC Machining Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.