Chapter 13 -- Testing & Running Programs and Making Parts
This chapter contains information on debugging programs, Anilam Crusader II Error Codes, dry running programs, and running programs.
Debugging Programs
The problem with CNC programs is that they do exactly what the programmer tells them to...whether or not the programmed action is correct or not. Untested CNC programs typically have bugs (AKA unintentional, undocumented programmatic features of varying consequence). As CNC devices incorporate high speed rotating metallic cutters or pieceparts moving quickly between metal fixtures and clamps, a CNC bug can quickly metamorphose from an inconvenient error into a potentially deadly airborne missile. Be real careful. Until a program has been completely debugged, tested and proved, the programmer/operator should use extreme caution and refrain from using the actual tooling and cutters.
Good computer programming practices include breaking complex programs into smaller and easily tested components or functions. After all of the program's components have been individually developed and tested, they can be assembled into the final program and subjected to a final round of testing. The EIA-274 standard supports three important types of programming "functions": user developed subroutines and pre-programmed X & Y-axis canned cycles and Z-axis canned cycles. Incorporating canned cycles into a program whenever possible and segmenting the program into easily understandable functional subroutines will help minimize both the number of bugs and speed the debugging process.
It is strongly recommended that the programmer/operator team should follow an orderly and stepwise procedure of increasing complexity (and danger) during the debugging and testing phases of program development:
- Develop the program (or subroutines) off-line and, if possible, use a CNC simulator to verify proper syntax and tool paths.
- Load and then dry run (or single step) the program or particular subroutine(s) without any fixturing or
cutters installed to make sure the program runs completely and tool paths appear to be correct (they will be confirmed later).
- (Optional) Set all TLOs and Z-axis moves to common values (e.g., all TLOs equal Z-2 and all (lowest) Z-axis moves to Z0).
Run the program to generate a pen-plot to ensure proper program paths.
- Set the TLOs for all tools (i.e., end mills, drill bits, etc.) then drop the mill knee to a safe height
and run with cutters installed but without the fixturing. Check for conflicts between the cutters and fixturing/clamping devices.
- Raise the mill knee to the proper height and run the program with cutters and fixturing installed but without installing the actual workpiece.
- (Optional) Run the program using a soft (and forgiving) prototype material such as wax, plastic, &/or wood.
- Load the workpiece, cross your fingers, and go for the gold.
Error Codes
Often during debugging operations, an error is encountered; the controller will then stop, enunciate the error condition with a loud "SQUAWK!," and display a code for the encountered error condition. Please consult the Anilam Crusader II Error Codes (in PDF format) to troubleshoot and rectify.
Dry Running
Follow the steps below to dry-run CNC code:
- Indicate the workpiece hold-down fixture or tooling parallel to the X &/or Y axes within 0.001" runout and secure.
- Locate and secure the workpiece.
- Load the program into the Crusader's memory,
zero the axes counters at the workpiece origin, and
set the TLOs.
- Deactivate any TLO that may be in effect by pressing
- Return all axes to their origins by pressing
- Dry run your program the first time WITHOUT cutters installed.
- Press .
- Press to execute each block one-block-at-a-time.
Running Programs
- If the dry run operation looks OK, then run your program using an easily machinable prototype material such as wax, plastic, or wood.
- Press then the
button to begin your run.
- To interrupt the program, press the button.
To continue operation, press .
- If the prototype material piecepart checks out OK, then run your first article part as designed (proper material, cutters, etc.).
- Perform a first article inspection and enter the data in a First Article Inspection Report (FAIR) form.
- Prepare a complete documentation package including:
- Set-up and operator instructions;
- CADD Drawing of the part, tool path(s), fixturing, clamps, etc.;
- CNC source code (with in-line comments);
- Pen plots; &/or
- Machined part
- FAIR report
- Submit the project documentation package to the appropriate supervisory personnel (e.g., your instructor).
- Clean up the machine to the floor and put away all tools, etc.
Copyright © 2003-2008 George C. Stanton & Bill Hemphill
All Rights Reserved
Last updated on Sept. 2, 2008 by Bill Hemphill