Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Lesson Three: Block Delete Techniques

Block Delete techniques (also called optional block skip)


Many basic courses do at least acquaint novice programmers with the block delete
function. As you probably know, when the control sees a slash code in a program, it
looks at a special on/off switch on the control panel (the block delete switch). If the
switch is on, the control will ignore the balance of the command that is programmed after
the slash code. If the switch is off, the control will execute the balance of the command.
This function allows the programmer to give the setup person or operator a choice
between one of two possibilities.
Even if this function is introduced in a basic CNC course, most instructors will not
describe the various applications for block delete. Here, well show two advanced
capabilities of block delete, and well show a variety of applications.
Using block delete mid-command
Though it is not commonly known, most controls will allow you to place the slash code
right in the middle of a CNC command - and only what is to the right of the slash code
will be affected by the block delete switch.
Say you are trying to use one program to machine a workpiece that can be made of two
materials. One material is steel and the other is cast iron. For the steel workpiece, you
need coolant to flow, but for the cast iron workpiece, you elect not to run coolant. You
could, of course, start the coolant on a line by itself and place a slash code in the program
at the beginning of the command like this:
.
.
N045 T01 M06 (Tool change)
N050 G54 G90 S300 M03 T02 (Select coordinate system, absolute mode,
start spindle, get next tool ready)
N055 G00 X4.0 Y3.0 (Move to first XY position)
N060 G43 H01 Z0.1 (Instate tool length compensation)
/N065 M08 (If block delete switch is off, start spindle)
.
.
With this method, however, the programmer is isolating the coolant on command from
other commands in the program. While this may not be too bad, if the machine has a
fully enclosed guarding system, it may be wiser (and faster) to turn the coolant on in line
N060, as the tool approaches in the Z axis. Consider the next series of commands.
.
.
N045 T02 M06 (Tool change)
N050 G54 G90 S300 M03 T03 (Select coordinate system, absolute mode,
start spindle, get next tool ready)
N055 G00 X4.0 Y3.0 (Move to first XY position)
N060 G43 H02 Z0.1 / M08 (Instate tool length compensation. If block delete
switch is off, start spindle)
.

Lesson Three: Block Delete Techniques


.
Notice that the slash code is now placed in the middle of command line N060. And only
what is to the right of the slash code (the M08 in our case) will be affected by the block
delete switch. While almost all current model CNC controls allow this programming
technique, be sure to test it to ensure that it works as we say.
Conflicting words in a command
While the technique well show next is a bit obscure, it is sometimes helpful to know
what will happen if conflicting words are specified in a command. The command
.
.
N060 G00 X2.0 X4.0
.
.
for example, probably represents a mistake. It is likely that the programmer meant to
specify Y4.0 instead of X4.0 in the command. But believe it or not, most controls will
not actually generate an alarm if this command is given (test if you are in doubt).
Instead, the control will simply execute the latter of the two conflicting words. In this
example, the control will move the tool to X4.0 and ignore the X2.0 word in the program.
Understanding how conflicting words are handled by your control can be helpful with
block delete. In a previous example, we describe how to use the slash code to control
whether coolant comes on for the purpose of running the same workpiece in two different
materials with but one program. If, of course, you want to run the same workpiece in two
materials with the same program, it is likely that the feed and speed for each tool must
also change from one material to another. Intentionally including conflicting words in a
command (feed and speed words) in conjunction with block delete will allow you to write
one program that will work for both materials. Consider these commands
.
.
N045 T02 M06 (Tool change)
N050 G54 G90 M03 T03 S300 / S400 (Select coordinate system, absolute
mode, get next tool ready, start spindle at 300 rpm if block delete is turned on,
400 rpm if turned off)
N055 G00 X4.0 Y3.0 (Move to first XY position)
N060 G43 H02 Z0.1 / M08 (Instate tool length compensation. If block delete
switch is off, start spindle)
N065 G81 R0.1 Z-0.5 F3.5 / F4.5 (Drill hole, feed at 3.5 ipm if block delete is
turned on or 4.5 ipm if block delete is turned off)
.
.
If you are running the cast iron workpiece, turn the block delete switch on. In line N050,
the S400 word will be skipped and the spindle will start at 300 rpm. In line N060, the
M08 word will be skipped, keeping coolant off. In line N065, the F4.5 word will be
skipped, meaning the feedrate used will be 3.5 ipm.

Lesson Three: Block Delete Techniques


If you are running the steel workpiece, turn the block delete switch off. In line N050,
both S300 and S400 will be read by the control. But since it is the latter of the two
conflicting words, only the S400 word will be executed (the speed fro the steel
workpiece). The same technique is used for feedrate in line N065. In line N060, the
M08 word will be executed and coolant will come on. Similar techniques will, of course,
be required for all tools in the program.
While this is a unique technique that helps you use the same program for two workpieces
in a family, it just scratches the surface of what can be done for part families with a
function called parametric programming. If you have part family applications, youll
really want to learn more about parametric programming (we offer another online course
for parametric programming).
Trial machining
You know from basic CNC courses that trial machining is done to help ensure that a tool
will not machine too much material the first time it cuts. It is commonly required when
running the first workpiece in the production run for dimensions that have critical
tolerances. It may also be required during the production run when dull tools are
replaced.
The most common method of trial machining involves several steps.
First, the setup person makes an adjustment of some kind (possibly to the tool itself or
more likely to a tool offset) that will ensure that excess stock is left on the workpiece.
Second, the tool is allowed to machine in its normal fashion.
Third, the machine is stopped and the setup person measures the surface machined by
the tool (if the entire tool is run, most setup people and operators use the optional stop
function to actually stop the machine).
Fourth, the setup person makes an adjustment (again, to the tool or an offset) based on
the measurement just taken.
And fifth, the setup person reruns the tool.
While this method of trial machining is almost failsafe (the surface will come out some
where within its tolerance band), there are three potential problems. First, this method
assumes that the workholding setup, workpiece, and cutting tool are pretty rigid. If there
is any flexing, and since the material machined on the second try will be much less than it
will be in production, it is possible that the surface will not be within its tolerance band if
the tolerance is very small. Second, this method requires that the tool be run in its
entirety twice (once when trial machining and once after the measurement). If the tools
machining operation is very long, production time will suffer. And third, trial machining
requires much manual intervention. The setup person or operator will be highly involved
with the entire process, requiring a high level of skill on their part.
One of the programmers primary goals should always be to make their CNC programs as
easy to run as possible. And when it comes to trial machining, a programmer can almost
always make it easier to trial machine with block delete. In all cases, if trial machining is
required, the setup person or operator will turn off the block delete switch to have the
control execute the trial machining commands. If they dont wish to trial machine (the

Lesson Three: Block Delete Techniques


machine is in normal production), they turn on the block delete switch and the trial
machining commands will be ignored.
Here we show a few example machining operations that can benefit from the
programming of trial machining the most. However, what we show is not in any way the
limit of what you can accomplish. If you see setup people and operators struggling to
perform trial machining (or taking much time to do so), its likely that you can do
something to help them with block delete.
Trial boring on a machining center
Most boring bars used on machining centers require manual adjustment. And they vary
when it comes to how easily and precisely they can be adjusted. Ideally, it would be
great if the boring bar could be perfectly adjusted prior to being placed in the machine
(and some companies go to great lengths to do so). But for most companies, it is not
feasible to purchase the expensive presetting devices it takes to perfectly set boring bars.
And the tighter the diameter tolerance you expect the boring bar to hold, the harder it is to
adjust it up front (tool pressure will, of course, also affect the diameter the boring bar will
cut).
Most machining center using companies are resigned to intentionally setting the boring
bar undersize by a small amount and then having the setup person trial machining for the
first workpiece. The setup person will allow the boring bar to enter the hole by a small
amount (some people let the boring bar machine to its final depth if tolerance is
especially small). While the bar is still in the hole, theyll manually stop the cycle,
manually retract the boring bar, manually move the machine into a position that allows a
measurement of the hole, manually measure the hole, manually adjust the boring bar, and
finally, they will manually rerun the tool. Depending upon the quality of the boring bar,
the skill of the setup person, and the tolerance to be held, the setup person may have to
repeat the process several times to get the boring bar to cut on size. Note that if trial
machining is needed during setup, it will also be needed whenever the tool is replaced
during the production run, meaning operators will also be required to trial machine when
dull tools are replaced.

Techniques
Saving timewith
andblock
effort:delete

Trial boring on a machining center:

Trial boring
subprogram
Commonly
taughtto
in help
basicwith
CNC
courses:
Use
block delete
trial
machining

Slash code in program


(/)
O1000
If off,with
trialblock
machining
take
place
N1will
G91
G86 R0
Z-0.3
Works
delete
switch
N2
G80
M09
If on,
trialskipped..if
machining off,
will be skipped
If on,
block
N3 G00block
Z3.0 executed
N4 X4.0 Y4.0

a little
ingenuity,
you
can streamline
M00
NotWith
always
taught
in basic N5
courses:
N6
G00
X-4.0
Y4.0 M03
any trial machining
operation!
Midalmost
Another
command
optional
stop
N7 Z-3.0 M08
Conflicting words with Multiple
block deletes
N8 G90
N9 M99
Trial machining
2)
Allow
boring
bar
to
partially
machine hole
With unexpected stock

Lesson Three: Block Delete Techniques


Our first example of trial machining with block delete will dramatically reduce the
manual intervention. The setup person must still manually measure the hole and
manually adjust the boring bar, but just about everything else will be done by the
program. Additionally, were using a special subprogram written in the incremental
mode that will work for any hole diameter in any location, meaning this subprogram can
be kept in the controls memory permanently and will be available whenever trial boring
is required. This, of course, minimizes programming effort and verification effort once
the subprogram is proven.
Main program:
O0001 (Program number)
.
.
.
(Machining prior to boring bar)
.
.
.
N255 T04 M06 (2.3750 boring bar)
N260 G54 G90 S450 M03 T05 (Select coordinate system, absolute mode,
start spindle, get next tool ready)
N265 G00 X4.0 Y4.0 (Move to first hole location)
N270 G43 H04 Z0.1 M08 (Instate tool length compensation, move to Z
position, start coolant)
N275 F2.5 (Ensure that trial boring program uses desired feedrate)
/N280 M98 P1000 (Jump to trial boring sub program)
/N285 M98 P1000 (Give second trial boring try)
/N290 M98 P1000 (Give third trial boring try)
/N295 M98 P1000 (Give fourth trial boring try)
N300 G86 R0.1 Z-1.0 F2.5 (Bore hole to depth)
.
.
.
Now heres the subprogram that will work for any hole diameter in any location.
O1000 (Subprogram number)
N1 G91 G86 R0 Z-0.3 (Bore just deep enough to take measurement)
N2 G80 M09 (Cancel cycle, turn off coolant)

Lesson Three: Block Delete Techniques


N3 G00 Z3.0 (Retract in Z to clear all obstructions)
N4 X4.0 Y4.0 (Move far enough to allow measurement)
N5 M00 (Program stop to allow measurement)
N6 G00 X-4.0 Y4.0 M03 (Move back to hole, restart spindle)
N7 Z-3.0 M08 (Move back to just above hole, restart coolant)
N8 G90 (Reselect absolute mode)
N9 M99 (End of subprogram)
In the main program, notice that line N275 selects the feedrate needed for boring. Since
we want the subprogram to work for any hole diameter, the subprogram does not actually
include a cutting feedrate in the boring cycle.
Also, the entire subprogram is written incrementally to allow it to function properly
regardless of the holes location. We are assuming that, in line N3 of the subprogram, the
tool will be high enough to clear all obstructions for all times you use the routine. You
may have to retract to a higher position. Were also assuming that the XY movement in
line N4 is a convenient location for measurement. You can, of course, modify these
values to work for your setup people. And finally, were assuming you run coolant for
the boring bar. Its being restarted in line N7 of the sub program.
In the main program, were giving the setup person four tries to get the boring bar sized
(you can easily add M98 commands for more tries) Again, theyll turn off the block
delete switch and run the program. When the control gets to line N280, it will execute
subprogram O1000 and trial bore 0.200 deep (just deep enough to take a measurement).
The tool will then retract and move to a convenient measuring position and stop (M00 in
line N5). At this point the setup person simply measures the hole and adjusts the boring
bar (since it is not to size, they leave off the block delete switch). When they press cycle
start, the tool will be brought back to the hole location. The subprogram ends by
reselecting the absolute mode.
When back in the main program the control will also execute line N290 and the machine
will trial bore a second time, since the setup person has left off the block delete switch.
At the M00 in the subprogram, the setup person will measure again. If the hole is to size,
they will turn on the block delete switch and the balance of the trial machining passes
will be skipped. If not, theyll adjust the boring bar again, leaving off the block delete
switch. This process is repeated until the hole is sized, at which time, they will turn on
the block delete switch. Of course, once the hole is sized and block delete is turned on,
the machine will continue to ignore the trial machining commands during the production
run. But if the boring bar dulls and the insert/cartridge is replaced, trial machining can be
easily done again (this technique will help during both the setup and the production run).
Trial turning on a turning center
In the previous machining center trial boring example, the reason for programming the
trial boring operation is to provide assistance to the setup person, minimizing the amount
of manual intervention required. This, in turn, reduces the time it takes to trial machine
and minimizes the potential for mistakes. Note also, that since the boring bar is only
allowed to enter the hole a small amount (just enough to get a measurement), machining
time for trial machining is also reduced. While the time saved may be minimal

Lesson Three: Block Delete Techniques


depending upon the holes depth, there are times when the primary goal of providing trial
machining help is primarily to reduce machining time during setup.

Techniques
Saving timewith
andblock
effort:delete

Trial rough turning (minimize trial machining time):

Commonly
taughtto
in help
basicwith
CNCtrial
courses:
O0003
Use
block delete
machining
N005 T0101 M41

Slash code in program N010


(/) G96 S400 M03
N015 G00 X6.0 Z.1
If off,with
trialblock
machining
take
place
/N020
X5.5
Works
deletewill
switch
/N025 G01 Z-.3 F0.020
If on,
trialskipped..if
machining off,
will
be
skipped
If on,
block
executed
/N030block
X6.0
/N035 G00 X8.0 Z3.
/N040 M00 (DIAMETER 5.50 IN)
Not always taught in basic courses:
/N045 T0101 M03
/N050 G00 X6. Z.1
Mid command
Another
optional stop
N055 G71 P060 Q160 D2500
N060 . . . block deletes
Conflicting words with Multiple

With a little ingenuity, you can streamline


almost any trial machining operation!

Trial
machining
Rough turning time: 18 minutes
With unexpected stock
Consider a large workpiece to be machined on a turning center. The rough turning (or
boring) operation may take over fifteen minutes. If traditional trial machining techniques
are used to ensure that the roughing tool leaves the proper amount of finishing stock, the
entire rough turning operation will have to be repeated (after the initial offset adjustment
and measurement). Fifteen minutes of program verification time will be wasted. By
using our recommended method, the setup person will be able to set the rough turning
tools offset before the first workpiece is completely rough turned. Since the amount of
time needed to actually set the offset will remain essentially the same with our given
method, the amount of program verification time that will be saved will be the time it
takes to perform the roughing operation (almost fifteen minutes in our case).
A programmer can program a short rough turning pass under the influence of block
delete. To ensure that tool pressure will remain consistent, this roughing pass must be at
the same depth of cut as is used for the normal rough turning operation. Note that this
rough turning pass only needs to go far enough into the workpiece to allow a
measurement to be taken. Our example program provides 0.3 in for this purpose.
Here is a portion of the program showing the trial rough turning operation.
O0003 (Program number)
N005 T0101 M41(Select rough turning tool, offset, and spindle range)
N010 G96 S400 M03 (Start spindle CW at 400 SFM)
N015 G00 X6.0 Z.1 (Rapid up to the workpiece)
/N020 X5.5 (Begin trial machining operation)
/N025 G01 Z-.3 F0.020 (Trial machine)
/N030 X6.0 (Feed up face)
/N035 G00 X8.0 Z3. (Rapid to convenient measuring position)
/N040 M00 (Stop for measurement, DIAMETER SHOULD BE 5.50 IN)
/N045 T0101 M03 (Reinstate offset, restart spindle)
/N050 G00 X6. Z.1 (Rapid back to starting point)
7

Lesson Three: Block Delete Techniques


N055 G71 P060 Q160 D2500 U0.040 W0.005 F0.020 (Rough turn)
N060 . . .
.
.
.
In line N020, we begin the trial turning operation. In lines N025, N030, and N035, the
tool makes the trial turning pass and rapids to a convenient measuring position. At this
position the setup person can easily measure the workpiece. In line N040, the machine
stops due to the M00. We strongly recommend that you include a message in the
program at this point telling the setup person what the diameter (and if necessary, the Z
face position) the workpiece should currently be. The setup person measures the
workpiece and adjusts the offset accordingly. Line N045 reinstates the offset, based on
the setup persons offset change. In line N050, the tool rapids back to its starting point.
From line N055, the program continues in its normal manner. After setting the offset, the
operator turns on the block delete switch so the roughing tool wont trial machine on the
next workpiece.
The block delete switch can be turned off whenever the setup person wishes to use the
trial machining sequence, meaning the CNC operator will also have this sequence
available should it be needed when changing (or indexing) the rough turning tools insert
during the production run.
Any lengthy roughing operation can be handled in much the same manner. For rough
boring on a turning center, the only difference will be that the programmer may have to
move the boring bar further away from the workpiece to allow a measurement to be
taken.
Eliminating tool pressure when finishing on turning centers
The turning center programmer can also facilitate the setup persons ability to size for the
finishing tool before the finishing operation even takes place. By incorporating this
technique, any tool pressure related problems caused by using more conventional trial
machining processes can be eliminated.
While we use the same large turned workpiece for this example program, keep in mind
that this technique can also be used when the rough turning operation is quite short. If
the goal now is to perfectly size the finishing tool, and may have nothing to do with
reducing roughing time. However, you must still use a trial roughing operation to
confirm that the roughing tool leaves the proper amount of stock for finishing.
With this technique, we simply include another set of commands under the influence of
block delete for finish turning right after the trial rough turning commands (in the rough
turning tool portion of the program). These commands will first re-machine with the
rough turning tool to ensure that the rough turning tool has left the correct amount of
finishing stock. Then the program will index the turret to the finishing tool and continue
machining on our practice surface. It is important to program the same depth-of-cut
during the trial finishing operation as will be used for the actual finishing operation. It is
also important that the setup person initially adjusts the roughing tools offset in a way
that allows excess stock prior to trial machining. This ensures that the roughing tool
wont machine too much stock, not leaving the proper amount for finishing. After

Lesson Three: Block Delete Techniques


cutting, the machine will move to the convenient measuring position and stop again. At
this point the setup person measures the surface/s and adjusts offset/s accordingly. After
this technique is used, the setup person can rest assured that the finishing tool will
machine perfectly to size, even on the very first workpiece. Here is the example
program.
O0003 (Program number)
N005 T0101 M41(Select rough turning tool, offset, and spindle range)
N010 G96 S400 M03 (Start spindle CW at 400 SFM)
N015 G00 X6.0 Z.1 (Rapid up to the workpiece)
/N020 X5.5 (Begin trial machining operation)
/N025 G01 Z-.3 F0.020 (Trial machine)
/N030 X6.0 (Feed up face)
/N035 G00 X8.0 Z3. (Rapid to convenient measuring position)
/N040 M00 (Stop for measurement, DIAMETER SHOULD BE 5.50 IN)
/N045 T0101 M03 (Reinstate offset, restart spindle)
/N055 G00 X5.5 Z.1 (Rapid back to rough turned diameter)
/N060 G01 Z-.3 F0.020 (Ensure correct diameter)
/N065 X6.0 (Feed up face)
/N070 G00 X8.0 Z6.0 (Rapid to tool change position)
/N075 T0202 M42 (Index to finish turning tool, select range)
/N080 G96 S700 M03 (Select finish turning speed)
/N085 G00 X5.42 Z.1 (Rapid to trial diameter, 0.040 cut depth)
/N090 G01 Z-0.3 F0.008 (Trial machine)
/N095 X6.0 (Feed up face)
/N100 G00 X8. Z5. (Rapid to tool change position)
/N105 M00 (DIAMETER SHOULD BE 5.4200)
/N110 T0101 M41 (Re-select rough turning tool)
/N115 G96 S400 M03 (Re-select roughing speed)
/N120 G00 X6. Z.1 (Rapid back to starting point)
N125 G71 P130 Q230 D2500 U0.040 W0.005 F0.020 (Rough turn)
N130 . . .
.
.
.
With this technique, the setup person must confirm that the rough turning tool will not cut
undersize with its first pass, meaning an offset adjustment must be made to offset number
one to force some excess stock to be left. Additionally, the proper speed and feedrate for
actual finish turning must be used when trial finish turning. In line N105 the setup
person measures the diameter and adjusts the finishing offset accordingly. The program
then indexes back to the rough turning tool and begins the actual rough turning operation.
After the trial machining operation has been completed and the setup person is sure that
roughing and finishing will be done correctly, the block delete switch can be turned on to
skip the trial machining operations in production. Whenever changing inserts (at least for
the finisher), these same techniques can be used again.

Lesson Three: Block Delete Techniques


You may be questioning the wisdom of including the actual trial machining commands in
the program that machines the workpiece. Admittedly, if these techniques are used often,
the CNC programmer may be cluttering the program with a great number of commands
that are seldom used. Keep in mind that the trial machining commands can be easily
stored in a separate subprogram or parametric program, and invoked with one simple
command from the main program. Here is an example that shows how a subprogram can
be used for trial machining. However, it is not nearly a flexible as the subprogram shown
for trial boring on a machining center. This subprogram will only work for one specific
workpiece. If you have need of this technique for a variety of workpieces, a parametric
program can be created that would work for all workpieces. Parametric programming is
presented in a future module of this course.
O0003 (Main program)
N005 T0101 M41(Select rough turning tool, offset, and spindle range)
N010 G96 S400 M03 (Start spindle CW at 400 SFM)
N015 G00 X6.0 Z.1 (Rapid up to the workpiece)
/N020 M98 P1000 (Call trial machining subprogram)
N025 G71 P130 Q230 D2500 U0.040 W0.005 F0.020 (Rough turn)
N030 . . .
.
.
.
O1000 (Sub program)
N001 X5.5 (Begin trial machining operation)
N002 G01 Z-.3 F0.020 (Trial machine)
N003 X6.0 (Feed up face)
N004 G00 X8.0 Z3. (Rapid to convenient measuring position)
N005 M00 (Stop for measurement, DIAMETER SHOULD BE 5.50 IN)
N006 T0101 M03 (Reinstate offset, restart spindle)
N007 G00 X5.5 Z.1 (Rapid back to rough turned diameter)
N008 G01 Z-.3 F0.020 (Ensure correct diameter)
N009 X6.0 (Feed up face)
N010 G00 X8.0 Z6.0 (Rapid to tool change position)
N075 T0202 M42 (Index to finish turning tool, select range)
N011 G96 S700 M03 (Select finish turning speed)
N012 G00 X5.42 Z.1 (Rapid to trial diameter, 0.040 cut depth)
N013 G01 Z-0.3 F0.008 (Trial machine)
N014 X6.0 (Feed up face)
N015 G00 X8. Z5. (Rapid to tool change position)
N016 M00 (DIAMETER SHOULD BE 5.4200)
N017 T0101 M41 (Re-select rough turning tool)
N018 G96 S400 M03 (Re-select roughing speed)
N019 G00 X6. Z.1 (Rapid back to starting point)
N020 M99 (End of subprogram)

10

Lesson Three: Block Delete Techniques


Trial threading on a turning center
Many threads take very little time to machine. A very fine pitch, single start, short thread
on a small diameter, for example, may not require more than about ten or twenty seconds
to machine. In this case, use conventional trial machining techniques to size the thread.
However, the longer the thread takes to machine, the more time it will take to use
conventional trial machining techniques. Coarser threads, for example, require more
passes (and more time) to machine. Multiple start threads require even more passes,
meaning even more time. A lengthy four-start ACME thread on a large diameter, for
instance, may take twenty to thirty minutes to machine. If conventional trial machining
techniques are used, the entire thread must be run twice (once to trial machine, once to
bring on size), meaning from twenty to thirty minutes of wasted program verification
time.
The same block delete techniques just shown can be used to minimize trial machining
time for lengthy threading operations. However, keep in mind that some CNC controls
make it very easy to specify how threads are to be machined within their standard canned
cycles. If this is the case, it may be quite easy for the setup person to simply modify the
(one) threading command to minimize the number of threading passes needed to finish
the thread after offset adjustment. Once the first thread has been machined to size, of
course, the threading command must be changed back to its original state.
Unfortunately, modifying the CNC program to minimize the number of threading passes
requires the setup person to thoroughly understand the threading command. Mistake can
result in disaster for the threading tool. For this reason, and since not all companies use
standard threading canned cycles, if you wish to minimize program verification time, it
may be necessary to size threads using block delete techniques.
Conclusion to trial machining with block delete
Note that we have but scratched the surface when it comes to the kind of assistance you
can provide setup people and operators when it comes to trial machining. Again, as you
watch setup people running the first workpiece (or as you do so yourself), constantly ask
yourself what can be done to make the process easier. Since trial machining is done on
such a regular basis (and remember what we said in module one about the ease of
justifying improvements to repeated tasks), programmers should be anxious to provide as
much help as possible. Other examples of using block delete to help with trial machining
that you may find useful include lengthy trial milling on machining centers, trial thread
milling, trial grooving on turning centers, and just about any other kind of machining
operation. Again, what kinds of machining operations are your setup people having
problems getting to size?
Using block delete with unexpected rough stock
There are many times when the CNC machining operation is not the first machining
operation to be performed on a workpiece. If previous machining operations must be
performed prior to the CNC operation, it is important that those operation/s be performed
consistently. For example, if a part is to be run on a CNC turning center is made from
round bar stock, the stock is usually be cut to length on a cut off saw of some kind. In
this case, it is important that the cut off saw cut each piece of raw material to the same
length. While the CNC turning center can deal with a small amount of length variance
from one part to the next, if the overall length is much greater than planned, it can present
11

Lesson Three: Block Delete Techniques


catastrophic problems for the CNC turning center operation. This statement is true of all
kinds of CNC machines. The condition of the rough stock to be machined by the CNC
machine must be consistent from one workpiece to the next for the CNC machine to
perform properly. Castings and forgings are notorious for this kind of raw material
variation that wreaks havoc with CNC operations.

Techniques with block delete

Block delete can be used to help


Commonly
in basic
CNCstock
courses:
rough taught
machine
varying
0.1
Slash code in program (/)
Works with block delete switch
Stock as it
If on,
block skipped..if off, block executed
should be:
Not always taught in basic courses:
0.5
Mid command
Another optional stop
Conflicting
words with Multiple block deletes
Worst case
Trial
machining
stock
condition:
With unexpected stock
The illustration shows an example of when the rough stock coming to a turning center is
not consistent. As you can see, the programmer expects there to be only 0.100 in of
facing stock on the end of the workpiece. But the cut off saw operator made a mistake.
Instead of all pieces of rough stock allowing 0.100 in roughing stock, the stock lengths
vary. In the worst condition, 0.500 in stock is left on the face of the part to be machined.
If machining a workpiece with 0.100 in stock, the program will perform just fine. But if
the operator tried to use the same program for the parts with excess stock, the facing tool
will would try to remove much more stock than it was intended to machine, resulting in
damage to the workpiece, the tool, and possibly even the machine. In extreme cases such
as this one, the workpiece would probably be thrown from the chuck, possibly causing
injury to the operator.
This is but one example of when the consistency of the rough stock to be machined on a
CNC machine is less than desirable. The programmer must constantly be on the lookout
for this kind of rough stock problem. Even when no previous machining operations are
performed prior to the CNC operation, the rough stock could still vary enough to cause
problems and must be cautiously checked. Castings or all kinds, for example, are
notorious for their inconsistency. This variation from one workpiece to the next can raise
havoc during machining.
Block delete can be used to allow for the undesirable variance related to the amount of
rough stock. The program can be written to behave in one of two ways, depending on the
rough stock situation. A series of extra roughing passes can be included under the
influence of a slash codes to machine the undesirable extra stock. Then the normal
roughing pass can be programmed without the slash code/s. If the workpiece has excess
12

Lesson Three: Block Delete Techniques


stock, the operator will turn off the block delete switch to run the part. The control will
execute the extra roughing passes to machine the rough stock. If the part has the proper
amount of rough stock (no excess stock), the part will be run with the block delete switch
on. In this case, the control will skip the extra passes and only make the roughing pass/es
as originally planned.
WARNING! This brings up a safety related point. Whenever you are considering the
use of block delete for any application, always ask yourself Whats the worst thing that
can happen if the operator has the block delete switch in the wrong position? In this
case, if the switch is in the on position when a workpiece with excess stock is machined,
the tool would attempt to remove all stock in one pass, causing damage to the tool,
workpiece, and possibly the machine. Knowing this, the operator must exercise extra
caution while running the job.
Due to this potentially dangerous situation, some shop people will elect not to use block
delete for this purpose. They will treat the job as two different jobs, separating those
parts that have excess stock from those that do not. Then they will create two programs,
one for workpieces with excess stock and one for workpieces without, and run the parts
separately. One program machines the workpieces with the excess stock, making the
needed extra passes. The other program machines the workpieces that have the correct
amount of rough stock in the normal manner. This keeps them from having to risk the
possibility of having the operator position the block delete switch incorrectly.
Here is an example program that incorporates the block delete feature for the purpose of
removing unexpected rough stock. Though this is a turning center example, the same
principles will apply to machining center applications. If the workpiece is as it should be,
only 0.100 in stock will be on the face to be removed. In its worst condition, the
workpiece has 0.5 in of stock on the face, meaning five passes are necessary.
It is this worst condition for which you must plan. That is, as you decide how many
rough passes to make, you must know the worst possible condition of the rough stock.
Remember, you can only give the operator two choices. Either the rough stock is to the
proper length and the block delete switch will be turned on, or the part has excess stock
and the block delete switch will be turned off. If turned off, the machine must make
enough rough passes to allow for the worst case condition. (Note that with parametric
programming techniques, a program can be developed that will let the operator specify
how much stock is on the workpiece and an appropriate number of passes will be made.)
The program will show only the rough facing tool as it rough faces the part to within
0.005 in of the finished surface.
Heres the program:
O0004 (Program number)
N005 G96 S600 M03 (Start spindle cw at 600 sfm)
N010 G00 T0101 M41 (Index turret, select low spindle range)
N015 G00 X4.2 Z.4 M08 (Rapid to position, turn coolant on)
/N020 G01 X-.06 F.012 (Face passed center, 1st pass)
/N025 G00 Z.5 (Rapid away in Z)
/N030 X4.2 (Rapid back up in X)

13

Lesson Three: Block Delete Techniques


/N035 Z.3 (Rapid to new Z position)
/N040 G01 X-.06 (Face passed center, 2nd pass)
/N045 G00 Z.4 (Rapid away in Z)
/N050 X4.2 (Rapid back up in X)
/N055 Z.2 (Rapid to new X position)
/N060 G01 X-.06 (Face passed center (3rd pass)
/N065 G00 Z.3 (Rapid away in Z)
/N070 X4.2 (Rapid back up in X)
/N075 Z.1 (Rapid to new Z position)
/N080 G01 X-.06 (Face passed center, 4th pass)
/N085 X4.2
N090 Z.005 (Rapid to final Z position)
N095 G01 X-.06 F.012 (Face to within .005 of finished surface)
N100 G00 Z.1 (Rapid away in Z)
N105 X4.2 (Rapid up in X)
N110 G00 X6.0 Z5.0 (Go back to tool change position)
.
.
.
Notice in line N015, the tool is sent to the first roughing Z position (0.400 in away from
the finished face). If the block delete switch is off, line N020 will be executed, starting
the series of rough facing passes from this point. If the block delete switch is on, the next
command to be executed will be line N090, which sends the tool over to the 0.005
position in Z. In this case, only one rough facing pass is made.
Another optional stop
You know that the optional stop word (M01) works in conjunction with a switch on the
control panel (the optional stop switch). If the switch is on when the control executes an
M01, the machine will stop (just like a program stop M00 in this case). If the optional
stop switch is off, the control will continue with the program, ignoring the M01.
Most programmers get in the habit of including an M01 at the end of each tool to allow
the setup person or operator to check and see what the tool has done. In this case, if the
optional stop switch is on, the machine will stop at the end of every tool. This makes
program verification and rerunning tools easier.
However, if an M01 is programmed at the end of every tool, the optional stop function
cannot be used for any other purpose. If, for example, the programmer wants to provide
the operator with an easy way of stopping the machine for the purpose of taking a
measurement on every fifth workpiece (right in the middle of the cycle), optional stop
cannot be used, since its already being used at the end of every tool.
Block delete can actually be used to provide a second optional stop. Consider this
command
.
/N050 M00
.
.

14

Lesson Three: Block Delete Techniques


Now, the block delete switch will control whether or not the machine will stop at line
N050, though it will work in just the opposite fashion compared to M01 (when the block
delete switch is off, the machine will stop). This will allow the operator to make the
machine stop after every five workpieces (theyll turn the block delete switch off) and the
programmer can still program an optional stop (M01) at the end of every tool.
Special note about multiple applications
While weve shown some excellent applications for block delete, with most controls
youll be limited to but one application per program since there is only one block delete
switch. Note that some controls do offer an optional feature allowing up to nine block
delete functions. Youll actually have nine block delete switches labeled one through
nine. In the program the slash code will include a number to specify which block delete
switch controls the function. For example, with the command
/2 M00
block delete switch number two will control whether or not the machine will stop or not
at this point in the program.
While having the multiple block delete function is nice, if you find yourself wishing you
had more than one block delete switch on a regular basis, it should be taken as a signal
that you have some excellent applications for parametric programming. The multiple
block delete function barely scratches the surface of what can be done with parametric
programming when it comes to making decisions as to how the machine will behave
during the execution of a CNC program. Again, we offer another on-line course for
parametric programming.

15

You might also like