In the early days of NC and even CNC, the technology related to automated machine tools was relatively primitive and unproven. Electronic circuitry failure and CNC software errors were the primary sources of the problems—and the resulting symptoms could be quite strange and difficult to diagnose. Also, because most CNC users were new to the technology, it could be difficult to determine whether a given problem was caused by machine malfunction or a user mistake.
CNC technology, of course, has improved dramatically over the years. Though problems can still exist with machine electronics and internal software, most of the common problems today are caused by user mistakes.
There are certain user mistakes that can result in very strange machine behavior—behavior that appears to be caused by a machine or control malfunction. What can make matters worse is that powering down and restarting the machine will often eliminate the problem. This makes the problem appear to be an intermittent machine problem—one that the user never does solve. The user is left frustrated, feeling that there must be something wrong with the machine.
Until such a problem is fully diagnosed and corrected, you should never give up because you’ll never fully trust the machine again until you do. When you find the source of the problem, and especially if it is a user mistake, you’ll know exactly how to spot and correct the problem in the future. Here is an example of a common programming mistake:
For many CNC turning centers, the G code for per-minute mode is G98. The G code for per-revolution mode is G99. The M code for calling a subprogram is M98 and subprograms end with M99. The common mistake in this scenario is that the programmer uses a G98 instead of an M98 in an attempt to call a subprogram. When he or she executes the program, the machine will not call the subprogram (but the programmer has just unwittingly put the machine in the per-minute feed rate mode). The programmer finds the mistake and changes the G98 to an M98 to correctly call the subprogram.
However, the next time the program is executed, the machine moves very slowly during every cutting motion (G01, G02 and G03). In the inch mode, a feed rate of F0.005, which is supposed to be 0.005 ipr, will be taken instead as 0.005 ipm. Again, the machine will barely crawl during cutting motions. This problem can be difficult to diagnose because the programmer probably won’t remember having the initial G98 in the program. This is also one of those times that turning the machine off and back on again will correct the problem because the per-revolution (G99) mode is automatically instated at power-up. However, by restarting the machine, the programmer will never find the true cause of the problem.
One way to keep this kind of problem from occurring is to use safety commands at the beginning of the program—and possibly at the beginning of each tool—to ensure that the machine is in the appropriate modes when the program (or a specific tool) is run. For our example, had the programmer included a G99 at the beginning of the program, there would not have been a problem in the first place. The next time the program was run, the machine would have been set back to the per-revolution mode.
Other examples of this kind of problem include forgetting to cancel cutter radius compensation; unknowingly instating mirror image, XY exchange or coordinate rotation; and unknowingly invoking a programmable stored stroke limit. In every case, it can be difficult to determine what is wrong.
Most CNC controls have a display screen page that displays the currently instated CNC words (G codes, M codes, F word, S word, T word and more). For Fanuc controls, this is called the program check page. By displaying this page and evaluating each currently instated word while you’re having a problem, you should be able to tell if all the currently instated words are appropriate.
Here’s an example: After climb milling a contour, the machine changes tools and spot drills a series of holes. During an optional stop (M01) after spot drilling, you check the hole positions and find that all, or most, of the holes are out of position. You look in the program and find that the coordinates for all holes are correctly specified. What’s the problem?
While the machine is still in cycle at the optional stop, you look at the program check page and find the list of currently instated G codes. You spot a G41. After climb milling, you must have forgotten to cancel cutter radius compensation (G40). The movements for the spot drill are being affected by the cutter radius compensation offset for the previous tool.
Note that pressing the reset button or allowing the program to run until completion will often mask this kind problem. Depending on parameter settings, certain G codes will be automatically instated when the reset button is pressed or when an end-of-program command (such as M30) is executed. Again, when you’re having this kind of problem during a program’s execution, you must look at the program check page while the machine is still in cycle.