to be optimized. Unfortunately, some programmers use a dwell of unnecessarily long duration. Multiplied by a large number of parts, long dwell time can increase the cost per part quite significantly. A qualified CNC operator can change the dwell time to be both functional and efficient. The first requirement is the identification of dwell in the program.
There are two methods of programming a dwell:
▪As a single block entry, using the G04 command
▪Using the P address in certain fixed cycles
In both cases, the dwell address is followed by the dwell time. Single block entry for dwell can have three basic forms:
G04 X. . (mills and lathes)
... for example, G04 X0.5 is 0.5 seconds dwell
G04 P. . (mills and lathes)
... for example, G04 P500 is 500 ms dwell or 0.5 sec.
G04 U. . (lathes only)
... for example, G04 U0.5 is 0.5 sec. dwell
Milliseconds can also be used with the X and U addresses, but seconds (with a decimal point) cannot be used with the P address. Typical use of the P address is in fixed cycles G82 and G89. G04 command is not used with fixed cycles (it is built into the cycle internally).
Once a dwell is identified in the program, make sure you understand the reason for its inclusion. As a rule of thumb, pay special attention to dwells longer than one half of a second. A longer dwell than that is not necessarily a waste of time. A long dwell is often programmed to make sure a certain mechanical function of the CNC machine is fully completed before program processing continues. That may apply to activities such as clamping and unclamping, automatic door closing, delay due to acceleration, tailstock application, bar feeder, and many others. In these cases, you should not change the dwell time. For machining, the dwell time change (usually a reduction) is quite often justified.
In order to optimize dwell time, you have to understand what a minimum dwell is:
Minimum dwell is the time required to complete ONE spindle revolution
Based on the definition, a formula can be established to calculate minimum dwell:
▪Minimum dwell = 60 / rpm
As an example, the minimum dwell is 60/900 = 0.067 seconds or 67 ms (milliseconds). Programmers often increase the minimum dwell to allow for more than one revolution, and also for the possibility that spindle speed override is set to 50% (normal minimum override). P250 in block N6 allows fewer than four revolutions while the dwell is in effect.
Dwell should never be shorter than twice the minimum dwell calculation
There is a lot more that can be found in the above program or any other program. An experienced CNC operator will be able to visualize various tool motions before testing the program or running the first part. One of the more important skills of being a first class CNC operator is to be able to identify program errors.
Mistakes are part of the human condition and CNC programmers are not immune in this area. Manual programming is prone to errors, but even a computer generated program may contain errors if the post processor is not properly configured. Entering program codes in MDI (Manual Data Input) mode can also contain errors.
Program errors can be very costly in production, causing expensive downtime. When evaluating a program before actual machining, looking for errors is often a time well spent. There are generally two groups of errors in the program:
▪Syntax errors
▪Logical errors
In addition, errors caused by equipment failure can be also added, but these belong to the area outside of the operator’s influence.
Syntax errors are easy to detect. In fact, there is no real need for manual detection, because the control system will identify all syntax errors anyway. When evaluating a program, it is always a good idea to look for syntax errors before actual program run.
As the name suggests, syntax errors are equivalent to misspelled words in typical regular text. In CNC, syntax errors include all illegal characters, characters not available on a particular control unit, wrong order of characters, letter O instead of numeral 0 (or vice versa), and similar errors. All following examples are syntax errors:
MO8 | instead of M08 | |
... | letter O instead of numeral 0 | |
(only one letter per word is allowed) | ||
-X5.0 | instead of X-5.0 | |
... | minus sign in front of an address | |
instead of the number | ||
1000S | instead of S1000 | |
... | address (letter) must always be | |
the first character | ||
Y 5.0 | instead of Y5.0 | |
... | no spaces allowed within a word |
These and other similar errors will be detected by the control, even if you miss them during program evaluation. By far, the most common syntax error is the letter O instead of numeral 0 or numeral 0 instead of letter O.
Zeros are visually narrow... 00000 Letter O is visually wide... OOOOO
Logical errors present a much more serious group of errors, as they can lead to a scrap or even a collision. In short, a logical error can be defined as a program entry that is correct in its syntax but wrong in context. A very common example is a misplaced decimal point, an error in programming and program editing at the machine. The control has no way of selecting the correct dimension, as both are perfectly legitimate: