Specialized Plastic Packaging for Cutting Tools!
Published

Divide and Conquer

For simplicity, break up your part family custom macro into multiple programs.

Share

Last month we stressed the importance of minimizing the amount of process-specific information in input data (the part definition program). Ideally, the person inputting data should be able to get everything he needs right from the blueprint. This means you must build process-related intelligence into your custom macro(s).

Let’s take this concept further. Regardless of how complex your application, I recommend breaking up your part family custom macro into several programs. If you use common variables (#100 or #500 series) to store data, this data will remain active at least until the power is turned off, so variables set in one program will be available in others.

One advantage of the divide and conquer method is that the main program will remain short and simple. Here is an example:

O0001 (Ring turning center program)
M98 P1000 (Call part definition program)
M98 P8001 (Call system constants program)
M98 P8003 (Call cutting conditions program)
M98 P8004 (Call tool selection program)
M98 P8002 (Call error trapping program)

N1 (Side one, process one – rough face and turn)
M98 P8031 

N2 (Side one, process two – rough bore)
M98 P8032

N3 (Side one, process three – finish bore thru and face)
M98 P8033
N4 (Side one, process four – finish turn)
M98 P8034

M30 (End of program)

The M98 commands get everything ready; N1 through N4 command the machining operations and provide restart blocks should cutting tools need to be rerun. This program could be shortened even more by combining all the M98 commands in a separate sub-program.

Program O1000 (input data): This is the series of common variables set to workpiece attribute values that are needed by the custom macro(s) to machine the workpiece.

Program O8001 (system constants): Use system constants instead of writing fixed values in the machining programs. This way, should a constant need to be changed, you need only do it in one place. For example, it is common to use a rapid approach distance of 0.1 inch. Consider how many times you reference this value during motion commands. Changing it with traditional methods requires changing a lot of commands. With a system constant, you only have one value to change. Any time you find yourself writing a fixed value in a program is probably a good time to use a system constant.

Program O8003 (cutting conditions): This program will be especially helpful if parts in your family must be made from several different materials. If your input data includes a material specification, you can easily key on this value to determine which set of cutting conditions must be used. Consider this example in which common variable #101 is set in the part definition program to the material specification (1018 or 1045):

O8003 (Cutting conditions)
IF [#101EQ1018.0] GOTO 1018
IF [#101EQ1045.0] GOTO 1045
#3000=104 (Material specification not found)
N1018 (1018 material)
#161=0.125 (Depth of cut for rough face and turn)
#151=425 (sfm for rough face and turn)
#152=0.012 (ipr for rough face and turn)
#162=0.08 (Depth of cut for rough boring)
#155=400 (sfm for rough bore)
#156=0.01 (ipr for rough bore)
#157=450 (sfm for finish bore)
#158=0.008 (ipr for finish bore)
#159=500 (sfm for finish turn)
#160=0.009 (ipr for finish turn)
N20 GOTO 99
N1045 (1045 material)
#161=0.1 (Depth of cut for rough face and turn)
#151=425 (sfm for rough face and turn)
#152=0.012 (ipr for rough face and turn)
#162=0.07 (Depth of cut for rough boring)
#155=400 (sfm for rough bore)
#156=0.01 (ipr for rough bore)
#157=450 (sfm for finish bore)
#158=0.008 (ipr for finish bore)
#159=500 (sfm for finish turn)
#160=0.009 (ipr for finish turn)
N40 GOTO 99
(More materials here)
N99 M99

Program O8004 (tool station selection): Like the cutting conditions program, this program will provide logic to determine which cutting tool stations are currently being used. This is especially important if a given machining operation requires a different cutting tool based on the size of the related workpiece attribute. 

Program O8002 (error trapping): Ensure that all input data is acceptable before you allow any machining to take place. Test anything you think a person may incorrectly specify. As you begin using your part family program, watch for mistakes and add more error trapping as needed.

Programs O8031-O8034 (machining): Notice how each machining operation is contained in a separate program. All commands needed for each tool must be included.

 

Iscar
Sumitomo
Horn USA
Specialized Plastic Packaging for Cutting Tools
Kyocera SGS
IMCO
Ingersoll Cutting Tools
CERATIZIT
IMTS+
Hurco
Techspex
Innovative Manufacturing for the Medical Industry

Related Content

CNC Tech Talks

A Spiral Milling Custom Macro Using Constant Contouring Feedrate

Helical milling or “spiral” milling are helpful when machining a circular pocket that is much larger than the milling cutter diameter.

Read More

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 More
CNC Tech Talks

Troubleshooting Differences in Programming Methods, Machine Usage

Regardless of the level of consistency among machines owned by your company, you probably have experienced consistency-related issues. Here are some tips to help solve them.

Read More
CNC Tech Talks

The Best Point of Reference for Program Zero Assignment Entries

Correctly specified program zero assignment and coordinate position values enable the CNC to determine how far to move the cutting tool during each positioning motion.

Read More

Read Next

Sponsored

The 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
Automation

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 More
View From My Shop

Inside Machineosaurus: Unique Job Shop with Dinosaur-Named CNC Machines, Four-Day Workweek & High-Precision Machining

Take a tour of Machineosaurus, a Massachusetts machine shop where every CNC machine is named after a dinosaur! 

Read More
Kyocera