In the first part of this series, we described proven methods for faster downloading of NC programs over a serial line. This conclusion addresses the other two bottlenecks of DNC, processing and machining, and how these affect the quality of your parts.
Transmitting NC data from a computer to a CNC is the chief function of a DNC (direct numerical control) system. How efficiently the system performs this function is based partly on how the data is prepared before transmission. Likewise, how the receiving CNC is prepared will affect how the incoming data is processed and executed as machine moves to make the part.
Most discussions of DNC do not adequately address what happens at the CNC, the receiving end of a DNC system. This is unfortunate because therein lay some of the most valuable opportunities for improving the productivity of a machine tool. As our first installment stressed, the key to increasing DNC speed is to increase the speeds at which the CNC loads, processes and machines moves. All three of these aspects must improve to increase overall DNC speed.
The two bottlenecks to be addressed in this article impact not only the speed of the DNC system, but also the quality of the finished workpieces.
The second bottleneck of DNC is how fast the CNC processes moves once they have been loaded. In its simplest terms, processing is the conversion of moves from a form you understand (that is, an NC program) into a form the CNC motors understand (that is, axis motor commands). For example, the simple move "X1." may require a great many calculations to convert it into actual table motion. In general, the CNC must consider several factors when processing moves:
Once the CNC calculates a move-to position after taking all of these factors into consideration, the move-to position must be converted into digital motor pulses. The motor pulse size and number of pulses are based on the programmed feed rate. For example, if the X axis is to move 1 inch at a feed of 60 ipm, then it will take the axis motor 1 second to move the table 1 inch. If the axis motor is pulsed at a rate of 10 milliseconds (which means the motor pulses 100 times a second), then each pulse of the motor must advance the table 0.01 inch (pulse size = 0.01 inch).
Thus, for this move, the processor controlling the axis motor will calibrate the motor pulse size to 0.01 inch. Every 10 milliseconds for the next second, the processor will pulse the axis to move another 0.01 inch. When the axis has reached its destination, it is ready for another move.
If processing requires too many calculations, it will become a bottleneck. You can see the effects of a processor bottleneck by running a program with very short moves using cutter radius compensation. The program will run significantly slower than if cutter radius compensation were not in use.
Fast Tip 13: Do not use cutter radius compensation.
The fewer calculations that the processor has to make to convert a move into motor pulses, the more moves that can be processed in the same time. Cutter radius compensation requires the most calculations of any mode and can slow down even normal machining significantly.
Fast Tip 14: Do not use fixture offsets.
Avoid using a fixture offset by setting your zero position to the fixture offset zero. This change may possibly eliminate the fixture offset calculation during all processing.
Absolute Vs. Incremental/Inch Vs. Millimeter
The mode in which you are programming also may have a significant impact on processing time. Your CNC calculates moves in either absolute values or incremental values. In the absolute mode of programming, the end points for all motions are specified from the program zero point. In the incremental mode, end points for motions are specified from the tool's current position, not from program zero.
Which mode you should use depends upon the manufacturer of your control and how it is set up to make calculations. In other words, regardless of the mode your program is written in, the CNC will make its calculations in the same mode it always does. For example, if your CNC does all of its calculations in absolute mode, all of your incremental moves will be converted to absolute values before calculations begin. Therefore, if your program is in absolute mode to begin with, you avoid the conversion from incremental to absolute.
The same applies to inch and millimeter modes. Your CNC performs all table motion in either inch or millimeter units, regardless of the mode your program is written in. If your control performs table motion in inch units, then any program in millimeter units will have to be converted into inch units. If your program is in inch mode to begin with, you avoid the conversion from millimeter to inch.
Fast Tip 15: Determine whether your CNC calculates in absolute or incremental mode, and program in the same mode (unless you are using a special high speed mode as discussed below).
Fast Tip 16: Determine whether your CNC performs table motion in inches or millimeters, and program in the same mode.
You can determine if your CNC uses absolute or incremental mode internally by running two point-to-point programs that machine the same part in both modes and see which runs faster. To determine if your CNC uses inch or millimeter units, compare the run times of a part written in both inch units and millimeter units. Depending upon your control, it may make a significant difference as to which modes you use.
Many CNCs offer special processing modes. Special processing modes allow you to tell the CNC that it can make certain assumptions about your program, and therefore process it faster. There are many special processing modes, and most CNCs have modes that are unique to themselves. Some modes offer more accuracy, others offer more speed.
In general, the modes you are going to be interested in for faster and better DNC are the high speed modes. The modes that offer more accuracy and higher quality tend to run slower than the high speed modes. We will explore these modes later in the discussion of the third bottleneck, machining.
Fast Tip 17: Use a high speed mode, if available.
The most important feature of your CNC, regarding processing speeds, is the architecture of your CNC control. The architecture of your control is the way the various components of your control are built to work together. A CNC's speed depends upon how its components interact.
A common misconception is that the fastest computer chip will make the best machine or that a 32-bit processor makes a better control than a 16-bit processor. This is not necessarily true. For example, a 32-bit processor that drives up the cost of a CNC will not necessarily control a 2048-line encoder better than a 16-bit processor. In fact, an 8-bit processor might do the job just as well for less money. What really matters is how these components are used together.
One important aspect of a CNC's architecture is whether it has multiple processors. Having multiple processors simply means that it has more than one processor. In general, the more processors a CNC has, up to a point, the faster it can process moves.
However, there are two basic processor designs: time-slicing or in-parallel. Time-slicing means that a processor works on many tasks, switching from task to task hundreds, or even thousands, of times per second. Examples of tasks might be updating the axes positions on the screen, pulsing a motor, and checking the keyboard for a key press.
Parallel processing means that many processors work on their own set of tasks, separately and independently from the other processors. Tasks are performed in parallel, that is, at the same time. Whereas time-slicing processors update the screen, then pulse the motors, then check the keyboard; in parallel processing, one processor updates the screen while another processor pulses the motors, while a third processor checks the keyboard.
Of course, a single processor might handle several tasks, and a CNC system might be a combination of time-slicing and parallel-processing elements. However, each CNC usually depends upon one type of processing more than another. One cannot say whether one method is better than the other in every case.
Nevertheless, parallel processing generally can achieve higher DNC speeds than time-slicing, using equal technology when a system is being pushed to its limits. A time-slicing system has certain recurring tasks that always compete against your program for processor time. The screen must be updated, the keyboard checked, the motors pulsed, and so on. Even if it takes only 5 milliseconds to process a move, a time-slicing system may be unable to machine moves this quickly because of system tasks that need to be done on a regular basis. Because it has to allow time for system tasks, the control may be able to pulse moves only every 7 or 8 milliseconds. In addition, lower priority tasks, such as screen updates, will suffer.
In a parallel-processing system, your program is not competing with as many other tasks for processor time. The screen might have its own processor. The keyboard might have its own processor. And the motors might each have their own processors. And these processors can function simultaneously.
A parallel system is also capable of pipelining. Pipelining is a method by which your program is handled by different processors, each performing a specific task. An example of pipelining in DNC might involve a serial processor, the main processor and an axis processor. The serial processor's job is to receive the program over the serial line. The main processor converts the program into motor pulses. The axis processor sends the pulses to the motor. When a processor has finished with a move (for example, the serial processor receives an entire move), the move is passed on to the next processor to handle.
The rate at which such a system will process moves is based on how fast the slowest step in the pipeline processes. We can illustrate this by following a few moves through the pipeline. Suppose that each processor requires 5 milliseconds to complete its task. First a move is loaded in by the serial processor. This step takes 5 milliseconds. Then, while the main processor converts the move into pulses, the serial processor loads another move. While the axis processor pulses the motor, the main processor converts the second move and the serial processor loads a third. Every 5 milliseconds, a move is pulsed by the axis processor. Thus, even though the entire processing time for a move is 15 milliseconds (3 x 5 milliseconds), a move is completed every 5 milliseconds because of pipelining.
In reality, the process inside a CNC is much more complicated, but the general principle is the same. Moreover, because CNC system tasks are being handled by their own processors, no compensation is necessary for CNC system tasks. Moves can be consistently pulsed every 5 milliseconds.
Fast Tip 18: If your CNC uses time-slicing, turn off and disable any features you are not using.
For example, turn off the screen display during DNC to reduce the processing time required by CNC system tasks.
Many people think that buying a faster processor option for their machine will improve their DNC. It's definitely something to look into. Your CNC manufacturer may have added new hardware or software features since you bought your machine. Some manufacturers design their products to be backwards compatible so that new features can be installed on older machines as these improvements are developed. Obviously, a point may come when technology has pushed so far ahead that an older machine can no longer be upgraded; but this may be years after the machine is installed.
Fast Tip 19: Check with your dealer every couple of months about new options for your CNC.
The third bottleneck of DNC is the physical limitations of machining. Whereas you might be able to machine an aluminum part at 300 ipm, you certainly wouldn't cut titanium at that speed. Dealing with this limitation is mostly a matter of experience and insight into the nature of the workpiece being machined. Machining too quickly can adversely affect final finish and accuracy.
Resolution is the detail of your part. The chief factor in determining the resolution of a part is the size of the point-to-point moves. For example, an arc made of long segments tends to look more like a dot-to-dot drawing than a smooth curve. In this case, the resolution is low. On the other hand, the shorter and more numerous the segments, the smoother the arc appears. Resolution is high in this case.
Resolution also plays a role in digitized parts. Digitized parts are cut in cross sections. A digitized part may represent thousands of cross-sections to machine. The thickness of the cross sections affects the resolution. The higher the resolution, the thinner the cross sections (and the more cross sections that will have to be machined).
In general, the lower the resolution of the part, the faster it will machine. For example, a program with cross sections 0.001 inch thick will take ten times as long to machine as a part with cross sections 0.01 inch thick. Resolution affects quality: You can see and feel 0.01-inch thick cross sections but you may not be able to notice cross sections 0.001 inch thick.
The advantage of faster DNC is that resolution can be managed intelligently. Because more moves are being processed and machined, you can lower resolution and machine parts faster, or you can increase resolution and get parts with smoother surfaces. If you are machining an injection mold, you probably want the increased resolution. If you are machining high volume parts, you probably want the increased speed.
Fast Tip 20: Before you begin to program and run your part, decide whether quality or speed is more important for this job.
The highest priority of a CNC during DNC should be managing axis motors. These motors have a direct effect on the quality of the finished part. Motors are driven; that is, they receive electrical pulses at a set rate. The larger the pulses, the faster the motor is driven.
Let's look at a motor that's stopped. All of a sudden, it receives a pulse to move 0.01 inch. The motor immediately begins to advance to the new position. However, before it can finish moving the entire 0.01 inch, a pulse to move another 0.01 inch arrives. The motor is now more than 0.01 inch but less than 0.02 inch from where it should be. The motor moves faster than it did after the first pulse because it has to catch up. Eventually, the motor ramps up to speed and machines 0.01 inch per pulse.
From this example we can see that the distance the motor has to go to get into position is what drives the motor. The larger the distance to go, the faster the motor must go to catch up. If the distance to go is 0, then the motor is in position and doesn't need to move.
Two problems can occur when driving a motor. Overshooting occurs when the motor is quick to respond to changes in distance to go but the distance to go is updated slowly. In other words, the motor has already reached the position it was commanded to reach, but the distance to go hasn't been updated, so the motor keeps on going. Undershooting occurs when a motor is slow to respond to changes in the distance to go. In other words, the distance to go is updated before the motor has a chance to move to position. Undershooting is most apparent on axis reversals: The distance to go reflects the axis reversal before the motor reaches the point of the reversal.
The best system is one that both responds quickly and updates often. Some CNCs are sluggish: Motors are updated every 20 milliseconds (50 times a second). Some multiple-processor CNCs can update motors every millisecond (1,000 times a second).
CNCs with a slow update rate cannot machine high resolution parts quickly. Details may be lost because several moves are added together into one update. Consider two machines cutting at the same feed rate. Which can have more detail--the one which has 50 updates a second or the one with 1,000 updates a second?
Fast Tip 21: If your CNC has a slow update rate, favor lower resolution parts for this machine.
Another aspect of CNC that will affect the final quality of a part is backlash. Backlash occurs when the ballscrew moving the CNC table along an axis reverses direction. The screw may turn for a few "tenths" before the table begins moving in the new direction before the thread catches and the table begins to move also. CNCs compensate for backlash by commanding the axis to move those extra "tenths" whenever the axis reverses direction.
Backlash can be a problem particularly when an NC program is created by a CAD/CAM system. Some systems may create a program that has very small moves in the Z axis on flat surfaces, even when tolerances are very low, such as 0.0002 inch. These moves, even though they are very small, cause axis reversals, with the control unit attempting to compensate for backlash at each reversal. Inaccurate backlash settings can magnify these slight variations, causing ridges and valleys in what should be a flat surface. Fine-tuning the backlash settings will eliminate this problem most of the time.
Fast Tip 22: Make sure that your backlash settings are accurate.
High speed DNC can push the limits of the accuracy of machining. Just as an automobile does not stop instantly when the brakes are applied, axis motors cannot start and stop instantly at high speeds. Imagine cutting a corner at 200 ipm. Even though you programmed a corner cut, what you may get on the part is an overshoot and a gouge.
For accuracy's sake, the CNC must automatically compensate when coming to a corner or during any direction change. Normal processing modes offer the option of compensating for every move, but not every move needs compensation, so processing speed slows down unnecessarily. Fine-tuning the compensation yourself is extremely time-consuming, and it may not be possible at all on some controls. Another option is to run at slower feed rates to reduce error to an acceptable level. None of these choices is attractive for high speed DNC.
Many CNCs offer special processing modes to handle high speed DNC. These modes use what is commonly called feed forward. Feed forward allows the CNC to look ahead a number of moves and determine how to avoid overshooting and undershooting. For example, the CNC can determine that the tool will be cutting too quickly for a particular series of moves, so the CNC reduces the feed rate automatically. These modes can significantly improve the quality and resolution of your parts. However, they will increase processing time.
Fast Tip 23: Check if your CNC manufacturer has high speed DNC preprocessing software.
You can use special processing modes without the processing penalty if you can preprocess the program. Preprocessing is a means by which the DNC computer does some of the calculations that the CNC would do before the DNC computer sends the program to the CNC. Preprocessing software is offered by suppliers of CNC machine tools as an option. By preprocessing the program off-line (away from the CNC, that is), you can avoid using valuable CNC processing time. Preprocessing your program off-line allows you to ensure the quality of your part and maintain the high speed.
This article has offered many ways in which to increase the speed and quality of your DNC. Nobody will use every tip offered here. Some of them cancel each other out. But by understanding your DNC system and the CNCs it serves, you can choose the options which are best for the parts you machine.blog comments powered by Disqus