In past columns, I’ve addressed how you can program trial machining operations. It seems obvious to me that if a setup person or operator can recognize a workpiece tolerance that is so tight that trial machining is required, then a programmer should be able to recognize it as well. If a programmer knows trial machining is required for a given machining operation as they write a program, then he or she should do his or her best to help with the trial machining process.
One technique is to use the block delete function (specified by the slash code [/] in a program). For normal operation, the block delete switch will be on. When the setup person or operator wants trial machining, they’ll turn off the block delete switch—turning it back on once they finish trial machining.
When programming a trial machining operation, a [program] stop is included in the program to allow the setup person to take a measurement and make an offset adjustment. While this can be very helpful, it still requires the prior entry of the trial machining offset as well as the calculation and entry of the new offset value after measurement. If you have custom macro B, then you can eliminate these two steps.
Here is an example: This machining center application shows the technique for milling a slot with a critical depth, meaning the tool length compensation offset will be used for trial machining. We’ll say the slot depth is 0.5 inch, ±0.0004 inch and that tool number four is the end mill that machines the slot. Figure 1 shows the program segment.
N250 T04 M06 (Place 1.0 inch end mill in spindle)
N255 G90 G54 G00 X-0.6 Y2.0 S500 M03 (Move to left side of slot, start spindle)
N260 G43 H04 Z0.1 M08 (Instate tool length compensation)
(Trial machining commands start here)
/ #2004 = #2004 + 0.01 (Increase tool length compensation offset by 0.01 inch)
/ N270 G43 H04 Z-0.5 (Move to depth position with trial machining offset)
/ N275 G01 X5.6 F5.0 (Trial machine slot)
/ N280 G00 Z5.0 (Retract for measurement)
/ N285 X8.0 Y6.0 (Move to convenient measuring position)
/ #3006 = 101 (MEASURE DEPTH – ENTER IN OFFSET 99)
/ N290 #2004 = #2004 - [0.5 - #2099] (Calculate and enter offset value)
/ N295 #2099 = 0.5 (Reset offset 99 to 0.5)
/ N300 G00 X-0.6 Y2.0 S500 M03 (Mover to left side of slot, restart spindle)
/ N305 Z0.1 M08 (Move above work surface, restart coolant)
/ #3006 = 102 (TURN OFF BLOCK DELETE)
N310 G43 H04 Z-0.5 (Instate–or reinstate–tool length compensation with correct offset)
N315 G01 X5.6 F5.0 (Mill slot)
N320 G91 G28 Z0 M19 (Move to tool change position)
N325 M01 (Optional stop)
With normal operation, block delete will be turned on; the slash coded commands will be skipped; and the slot will be machined in the normal fashion. Note that the G43 H04 in line N305 will have no effect, since offset number four is the same value that it was in line N260.
However, when the setup person or operator wants to trial machine, he or she turns off the block delete switch and slash-coded commands will, of course, be executed. The first slash-coded command will increase the value of offset number four (the offset used with this end mill) by 0.010 inch—just as a setup person would normally do manually in order to trial machine.
In N270, this new offset will be instated on the movement down to the slot depth (if everything is “perfect” then the tool will be at a depth of -0.49 inch at the end of this motion).
Lines N275 through N285 trial machine the slot and move the tool to a convenient measuring position.
The #3006 (stop with message) command will stop the machine just like M00. It will also place the message “Measure Depth—Enter In Offset 99” on the display screen. At this point, the setup person will measure the current slot depth and enter it into offset number 99 (an unused offset).
Note that the setup person simply enters the slot depth in offset 99. Line N290 calculates the needed adjustment (0.5 minus the current value of offset 99).
Line N295 is a kind of safety command. It sets offset 99 to 0.5, just in case the setup person forgets to enter this offset after the measurement is taken. You could also set offset 99 to zero, but if you do, and if the setup person forgets to enter offset 99 after measurement, then the slot will be milled 0.5 too deep after trial machining.
Lines N300 and N305 return the tool to the starting position to mill the slot.
The second #3006 command is optional. It might be helpful to remind the setup person to turn off block delete at this point so that trial machining won’t be performed on the next workpiece.
If trial machining has been done, then line N310 instates the correct tool length compensation offset (offset four). If trial machining has not been done, then the G43 H01 in this command will have no effect.
Finally, line N315 mills the slot to the correct depth.