Last month I provided three ways to get data into a part family custom macro. With one method, a series of input variables is placed at the beginning of the custom macro. With the other two, the input variables are placed in a separate program, which I call the part definition program.
Ideally, you will limit input data to information that can be found on the workpiece drawing. That is, your part family custom macro should require very little, if any, process- or machining-specific input data. This way, anyone who can read a blueprint should be able to create the part definition program and, in essence, program a job.
Here’s an example: A given workpiece attribute, say the diameter of a series of holes, varies from one part in the family to another. You know that there are three possible sizes for this series of holes—0.25, 0.375 and 0.5 inch—and your part family custom macro must, of course, be able to accommodate all three of them.
With this example, three different drills must be available; they may permanently remain in the machine (preferred), or the setup person may have to load the appropriate ones during setup. For each drill, the program must specify, at the very least, a tool station number, a speed and a feed rate.
You may be tempted to require these process-related variables as part of the input data, but this would mean the person who provides that data must be able to do more than simply read a blueprint. He/she would have to know the tool station where the setup person puts the required drill and be able to calculate cutting conditions for the drill.
Whenever you are tempted to include process-related variables as part of input data, stop and consider how you can build intelligence into your part family custom macro to eliminate the need to do so. That is, come up with a way to key on simple part definition data (found on the blueprint), and have your custom macro make process-related decisions accordingly.
In our example, make the hole diameter part of the input data (we’ll say it is placed in common variable #114). Set up some standard tool stations where these tools will be permanently placed.
The following commands in the custom macro will automatically select the appropriate tool station based upon the hole diameter value included in the part definition program (in #114). The tool station number will be stored in #121.
IF [#114EQ0.25] THEN #121=3
IF [#114EQ0.375] THEN #121=4
IF [#114EQ0.5] THEN #121=5
#3000 = 100 (Improper hole diameter)
The hole diameter will also be required in order to calculate cutting conditions, like speed and feed rate. Say the desired surface feet per minute (sfm) is 75 and the desired feed rate is 0.004 inch per revolution (ipr). Consider these S and F words that provide a speed in rpm and feed rate in ipm (again, #114 contains the hole/drill diameter).
Handling drill/hole size variation is pretty basic, but there are times when more ingenuity will be required to build that logic into your custom macro.
Say there is a slot that must be milled by your part family program. The slot width varies from one part to another and can be from 0.5 to 1.25 inches wide. The slot depth varies from 0.125 to 0.5 inch deep, meaning multiple depth passes may be necessary. Given a specific part in the family, how would you determine the end mill size to use? How many passes would you make to mill its width? How many to machine its depth? Your answers will determine the logic of your custom macro.
Maybe you decide that all slots will be milled with three passes—one down the middle to remove the bulk of the stock and one to finish each side. So, like the drill, the end mill’s diameter will be based upon a workpiece attribute: the slot width. You’ll come up with a series of end mills that will machine all slots in the part family. Also like the drills, they will be permanently placed in standard tool stations, available whenever they are needed.
Using this logic, we could say any slot 0.625 inch or smaller will use a 0.437-inch end mill, from 0.625 through 1.0 inch will use a 0.625-inch end mill, and from 1.0 through 1.25 inches will use a 1.0-inch end mill. The slot width (coming from the part definition program) has been stored in #105. The required tool station number will be placed in #122 and the required end mill diameter in #142.
IF [#105 GT 1.25] THEN #3000 = 100 (Slot too wide)
IF [#105 LT 1.0] GOTO 5
#122 = 8 (Tool station number)
#142 = 1.0 (End mill diameter)
N5 IF [#105 LT 0.625] GOTO 10
#122 = 7 (Tool station number)
#142 = 0.625 (End mill diameter)
N10 IF [#105 LT 0.5] THEN #3000 = 101 (Slot too narrow)
#122 = 6 (Tool station number)
#142 = 0.437 (End mill diameter)
N15 (Continue here…)
When slots require multiple passes, the depth of each can be a function of the end mills’ diameters. Maybe you determine that yours can mill to a depth that is 30 percent of their diameters. Maybe you’d rather set a specific maximum depth of cut for each end mill. Whatever you decide, be sure to key on simple part definition data and build the required intelligence into your part family custom macro.
blog comments powered by Disqus