In past issues of The Optional Stop, we’ve stressed the importance of maintaining a good structure in your programs. The primary reason has to do with gaining the ability to rerun cutting tools.
All machining centers and turning centers can handle multiple cutting tools. Tool change commands in the program, of course, cause the tool changes during the CNC cycle. Almost all machining centers and stationary-headstock turning centers (not Swiss type machines) allow the ability to rerun tools. This is often necessary during setup when verifying programs and during production runs when trial machining after dull tool replacement.
In order to be able to rerun tools, the program must be appropriately formatted. Certain CNC words must be repeated at the beginning of each tool even though their inclusion may be considered to be a bit redundant. Consider, for example the spindle start word (M03) on a CNC turning center. During a tool change (turret index), it is not necessary to stop the spindle. Doing so would be a waste of time. But in order to gain the ability to rerun tools on a turning center, the spindle start command must be included at the beginning of each tool.
This is but one example of the many “redundant” CNC words that must be restated at the beginning of each tool.
Appropriate program structure goes beyond simply having the ability to rerun tools. There are several things a programmer can do in the program to streamline the way CNC programs are used on the shop floor.
Almost all CNC control provide the ability to include messages in the program. Many use parentheses () in which messages can be included. At the very least, messages should be included at the beginning of the program to specify what the program is used for. Part number, revision number, programmer’s name, date of last revision, and program run time are among the things we recommend documenting in this manner.
It is also wise to include a documenting message at the beginning of each tool, naming the tool and specifying anything special or unusual about how the tool runs.
If a program stop (M00) is included in a program for any reason, a message should explain why the machine has been stopped and what the operator is supposed to do.
While it’s possible to get a little carried away with messages, and messages do take up memory space in the machine, most programmers could stand to include more clarification messages in their programs.
If a setup person can recognize the need for trial machining (a workpiece surface having a tight tolerance), so should the programmer. And knowing certain workpiece attributes require trial machining, a programmer can include special commands in the program to simplify the process for the setup person and operator. Trial machining incorporates the use of block delete – the slash code (/) – and has been the topic of several past articles in The Optional Stop newsletter. We won’t repeat them here. To learn more visit our website’s CNC Tips page.
Program mean values
This should go without saying. If all coordinates in all programs are specified as mean values of their tolerance bands, a setup person can go from one job to the next without having to modify offsets (or trial machine) for cutting tools that remain in the machine from a previous job.
Never make sizing adjustments with program changes
Doing so breaks the rule just given (program mean values). As soon as your setup people or operators start making program changes to deal with a sizing problem, they will no longer have the ability to go from one job to the next without considering offsets for every tool in the job.
There is always a way to handle sizing problems – even the most difficult ones – with offsets.