October 2007 Edition
MACHINING Rxs FROM DR. J
Smoothing the Road
While advanced acceleration smoothing and jerk limits smooth toolpaths, it's best to use smoother profiles by using circular arcs and NURBS to smooth a tool's "road" and speed its "trip"
Jairam Manjunathaiah MAG Fadal
As I mentioned in the August issue[August 2007, Vol. 41, No. 8, "The Need for Speed, p. 18], the starting point for any project is defined by the amount of work necessary and the end result. If the project objective is part quality, then the starting point is arguably the instructions to the machine from the programmer, i.e., the G-code program. I'll focus now on toolpath generation and how a programmer can take better advantage of machine performance.
While G-codes themselves have been around for a long time, the method of how they are generated recently changed [an examination of whether G-codes are the best way of communicating with a machine I'll reserve for another day].
Historically, programmers manually wrote G-code programs. Today CAM programs are commonly used to generate G-codes. While complex features describe part geometry, when it comes time to create a toolpath, it is broken into small linear segments to achieve tolerances. When very fine tolerances are specified, it leads to huge programs that cause a number of issues, including the need for high block processing speeds, storage issues, ability to load/edit programs in NC memory, and integration of DNC, or drip feeding the program to controller which itself leads to issues like mid-program restart.
Smart Guys Work Small
A smart programmer always tries to instruct the machine with the smallest program necessary for quality. This requires basic understanding of how a control handles the supplied G-code. Every controller accepts the G-code and processes it in two distinct steps, it
- reads each block of the program, interpreting it into machine language; and
- sends the block instruction to the servo system for motion execution.
The first step is typically measured by block processing speed and the second step by block execution speed [or time]. Note, different block processing speeds depend on the definition of a block. For instance, does a block contain motion instruction for each of the X-, Y-, and Z-axes or just one axis?
Once the block has been decoded, the instructions are sent to the drive system for execution. This typically takes the same magnitude of time as decoding the block.
Simply stated, the first step is a function of the speed of the processor a faster processor leads to faster block-processing speeds. The second step is a more complex function of the processor speed, servo-tuning parameters, and moving the mass of the machines.
Less Code, More Flavor
Here are three points in favor of fewer lines of code to cut a part.
First, most have experienced machine slow downs due to data starvation. This occurs when code is broken into tiny segments that take more time to read and process than execute. Reducing tolerance limits dramatically increases the number of segments. Don't make the mistake of reducing tolerance limits below the machine's capabilities. This results in reduced productivity, and in some cases, unfavorable surface quality.
Second, imagine a passenger riding on the cutting tool; the passenger would see the toolpath change direction abruptly at the junction of every code segment. The greater the number of lines of code, with shorter segments, the greater the points of discontinuity. The control does its best to smooth the motion using advanced acceleration smoothing, jerk limits, and so forth, however, all of these techniques result in slowing the tool, or increasing machine component loads.
When possible, design parts with smoother profiles, so machining is smoother. The use of circular arcs or NURBS as a replacement for linear segments helps reduce the number of lines of code.
Third, reduced lines of code and smoother profiles help the controller plan better motion with the look-ahead function.
While it may not be possible to reduce the amount of code for a finishing pass due to quality requirements, it is possible to have a significant impact during the roughing and semi-roughing stages. Some CAM programs offer this capability; however it is still in the NC programmer's hands to make use of the tools available to achieve a "lower load" on the controller and better productivity and quality at the end of the day.
Jairam Manjunathaiah, Ph.D., Dr. J serves as vice president of engineering for MAG Fadal, a division of MAG-IAS. He leads the new product development, product maintenance, and engineering team.
Have a machining question or dilemma?
The Doctor is in. If you have a topic you'd like the good doctor to address,
send it to Dr. J at pnofel@nelsonpub.com.