Consistency and Compatibility Improve CNC Productivity
Consistency and compatibility among CNC machines can decrease setup time and confusion among operators.
The degree of consistency among G-code programs will have an impact, be it positive or negative, on the productivity of CNC machines. This is true for the commands of the various tools within a program, of commands for multiple programs for a given type of machine and even among programs for different machine types.
Consistency ensures that setup people and operators can easily become familiar with programming methods. They will be able to detect mistakes when they spot inconsistencies in the programming structure. On the other hand, inconsistencies will cause confusion among CNC users. They will use additional time struggling to determine how the program operates. Worse, they may make mistakes if they do not understand what the program is doing. People that know what will happen in the program will be more productive than those that do not.
Here are the four kinds of structure that make up any multi-tool program, along with a consistency-related recommendation:
- Program startup structure: Begin every program for similar machines with the same commands. While the values for CNC words will change from program to program, the structure must remain the same.
- Tool startup structure: Begin every tool for every program with the same commands. Again, CNC word values will change, but keep the structure consistent.
- Tool ending structure: End every tool for every program with the same commands.
- Program ending structure: End every program for a given machine with the same commands.
CAM systems are notorious for breaking these rules. While all the needed words and commands are included in the program, they tend to be in a randomized order. Most CAM systems do allow users to customize G-code output, but many ignore this important system-setup task. They stop working on G-code output as soon as the CAM system is generating workable programs. Again, the more consistent the structure, the easier it will be for CNC users.
Compatibility also impacts productivity. With similar machines provided by different machine builders, there are likely to be minor differences in programming commands for similar functions. And when running the same parts on these similar machines, operators must maintain a separate — though very similar — program for each machine. Finding a way to run the same program — without modification — on all similar machines will dramatically reduce the number of programs required to run parts. This, in turn, will eliminate the amount of time required to create and maintain them.
Often, major differences in programming commands for similar machines are related to M-code numbering. One turning center, for instance, may use M41 for low-spindle-range selection and M42 to select the high range. Another may instead use M23 and M25. If M-code numbering is the only difference among machines, this issue is easily overcome for FANUC CNCs with user-defined M codes, which make it possible to run the same program in the two similar machines.
I do not describe the process in detail here but, in essence, users should set parameters in such a way that, when the CNC sees a given M code (like M41), it will execute a program that performs another (like M23). In this way, it is possible to change the machine that uses M23 for low-range selection to run a program that includes an M41.
Other programming differences may be related to command structure and may be more difficult, though not impossible, to deal with. One machine may require circular commands to be specified with directional vectors (I, J and K) while another may allow them to be specified with an R word. One machine may have standard fixture offset specification (requiring G54-G59) while another may have the extended fixture offset option (requiring a G54.1 and a P word to specify the offset number).
Again, I do not provide the details here. In general, use Custom Macro to set up a machine flag with a permanent common variable that the program will key on to determine which machine is running the program. Logic within the program or, better yet, in a separate Custom Macro program, will determine, based on the machine flag, which machine is being run and execute the appropriate command(s).
Here are the commands related to fixture offsets mentioned above. We key on permanent common variable #510 to determine which machine is being run. If #510 is set to 1.0, it is machine A (G54). If #510 is set to 2.0, it is machine B (G54.1 P1).
- .
- IF[#510 EQ 1.0] GOTO 10 (Machine A)
- G54.1 P1 (Machine B)
- GOTO 15 (Skip the other possibility)
- N10 G54
- N15…
- .
Again, it may be better to include these commands in a separate program, possibly a user-defined G-code program called by G54, to keep from having them in the machining (main) program.
In this manner and with a little ingenuity, it is possible to overcome almost any programming deviation among machines. The greater the number of machines and programs involved, the more one can reduce the number of programs that must be maintained.
Related Content
4 Commonly Misapplied CNC Features
Misapplication of these important CNC features will result in wasted time, wasted or duplicated effort and/or wasted material.
Read MoreContinuous Improvement and New Functionality Are the Name of the Game
Mastercam 2025 incorporates big advancements and small — all based on customer feedback and the company’s commitment to keeping its signature product best in class.
Read MoreOrthopedic Event Discusses Manufacturing Strategies
At the seminar, representatives from multiple companies discussed strategies for making orthopedic devices accurately and efficiently.
Read More5 Tips for Running a Profitable Aerospace Shop
Aerospace machining is a demanding and competitive sector of manufacturing, but this shop demonstrates five ways to find aerospace success.
Read MoreRead Next
IMTS 2024: Trends & Takeaways From the Modern Machine Shop Editorial Team
The Modern Machine Shop editorial team highlights their takeaways from IMTS 2024 in a video recap.
Read MoreIncreasing Productivity with Digitalization and AI
Job shops are implementing automation and digitalization into workflows to eliminate set up time and increase repeatability in production.
Read MoreThe Future of High Feed Milling in Modern Manufacturing
Achieve higher metal removal rates and enhanced predictability with ISCAR’s advanced high-feed milling tools — optimized for today’s competitive global market.
Read More