In the latest Tip of the Day, Mark shows you how to go from making one part at a time on your Haas mill, to making multiple parts. While that may not sound like a big deal, what if you also saved a ton of tool changes and reduced the number of times your operator had to open the door and stop the machine? It probably sounds too good to be true, but it's not as difficult as most people think. By using the M97 command and making use of subprograms, Mark shows you how to take your existing program, throw in a few M97 lines into your program, and be much more efficient.
Don’t miss any TIP-OF-THE-DAY videos. Click here (http://ow.ly/s28l30mTiUo) to join our email list! If you enjoyed this video, please hit the like button and share it with a friend who’ll find it helpful . . . and thanks! Follow Haas: Facebook – / haasautomati. . Instagram – / haas_automa. . Twitter – / haas_automation
AI Generated·May contain errors
Hello and welcome to this Haas tip of the day. Running more than one part at a time
might be the easiest way for us to increase our productivity.
In today's tip we're going to show how we program for multiple parts
and we'll also touch on why this skill is so important for your shop.
Everything for me begins with my setup. So check this out I've got a block loaded
I've been tightening up those tools by hand. Here I've got one lonely vice on my machine table.
My demo part here takes six minutes to run. This part uses more than a dozen tools so of that six
minute cycle time about a minute and a half of it is spent doing tool changes. That is our chip to
chip time with the coolant starting and stopping on this particular machine. Now each time a part
is done I will open the doors, grab my handle, open the vice, put the handle away, remove the
part, pick up the air gun, blow off the part, return the air gun, load a new part, pick up the
vice handle, tighten my part, return the vice handle, close the doors and press cycle start.
So it is taking me about seven minutes per part total not counting inspection for each part.
A big slice of my time per part is spent on tool changes and swapping the part out. This is time
spent making money and this is well there's room for improvement. Now if I have 250 of these parts
to run it's going to take me about 30 hours or four shifts of my time. Now I can go ahead and
build an amazing fixture where I can find every vice that I can and load up the table. If that
happens I can run 10, 20, 30 parts all at once with one push of the green button. We are still
spending about a minute and a half doing tool changes but that time is spread across dozens
of parts instead of a single part. When we spread those tool changes across an entire table full of
parts that slice of the pie almost doesn't matter. We've gone from a minute and a half per part down
to just a few seconds. So why do we want to run multiple parts? It minimizes the number of tool
changes. Another essential reason for running multiple parts is that we save time just swapping
those parts out. Instead of me having to open and close those doors dozens of times we now open them
just once. Instead of us having to pick up that vice handle dozens of times we do it just once.
Instead of pressing the cycle start button dozens of times once for each part we now just press the
green button once for each batch of parts. My part changeover time which was taking a minute or longer
per part is now taking 30 seconds or less. Because we have reduced the number of times we need to
open doors pick things up and press that green button. It gets even better though when I was
running just one part at a time I couldn't really leave the machine much. The cycle time was just
too short. Extending our unattended run time is just another reason to run multiple parts.
In our scenario running dozens of parts at once our machine can run unattended for hours at a time.
This means that I can be running two machines at once or I can be programming the next part while
these parts run. This means that my machine can be running through my lunch break when it might
otherwise be sitting. If I time things right I can have the machine loaded with stock and ready to
run as I walk out the door. This is going to give me an extra couple hours of cycle time each and
every day. This is production. This is getting it done. Now we've sold you on why you should be
running multiple parts but how do we actually accomplish this? We're going to do this on our
control using an M97 local subroutine call. Now your control already has this built in and you can
be using it right now and we're going to show you how. On Haas machines sub programs come in two
basic types M97 internal subs and M98 external subs. With the M97 internal sub program all of
our sub programs are stored in a single file along with our main program. This makes keeping track of
things really simple. You load a single program and you run it with an M98 external sub call. Each
of your sub programs each of your operations is stored in its own O number program which means
you might end up with dozens of programs to manage. This is a file management nightmare which is why I
prefer to use an M97 over an M98 whenever possible. A simple M97 program consists of a main program
and one or more local sub programs. Our main program is everything between our program's first
line the O number line and the M30 program stop. We'll put our local sub programs after our M30.
Our M97 local sub program is everything between a certain N line number and an M99 return call.
Now watch me single block through this program. With each press another line of code is executed.
G154 P1 is just another work offset call like G54 or G55. These are our expanded work offsets
and we'll use one for each part. Now when I run this M97 P100 line it is going to jump to local
sub N100 an N number that corresponds matches our M97 P value. The control will run through
whatever code is in our sub until it reaches an M99. When the M99 is run we return from our sub
program back to our main program. In this program if we keep going we'll reach our M30 and the
program will stop. Now that we know how an M97 works here is how we use it to run multiple parts.
We're going to start with a simple proof program written for a single vise. We need to take the
code for each tool and separate it into subs, sub programs. We'll place our subs after the M30.
Now some cam systems can actually do all this for us automatically. These subs must not have
work offset calls in them so those can be removed. These subs must start with a unique N number
and end with an M99 return. Once a local sub program is created for each tool or tool path
we can add in our M97 calls to our main program. If we run through this example program we are
going to call work offset G154 P1 which is the work offset for our first part and then we are
going to call our N100 sub program which contains the tool path for tool one in this example.
Then we call our G154 P1 again and call our M97 P200 local sub program which brings us to sub
N200 in our program. Each time an M99 is reached in our sub we return to the line just after the
M97 sub call. With all of our sub programs written it's easy to add more parts. We just
add more work offset calls and more M97 sub program calls. We've loaded up a second vise
onto our table and we're calling this part G154 P2. G154 P1, G154 P2. Now in the code
we'll call up our work offset G154 P1 which is our first vise. That first tool is going to come in
and run M97 P100. Then we'll call up our second work offset G154 P2 and we'll call that same
sub routine again. We'll then come up and do a tool change. We'll call up G154 P1 again. We'll
call up our second sub routine M97 P200 which will run tool 2 on this first part. Then call up
our G154 P2 second work offset and we'll call that same sub again M97 P200. Now we can just keep
adding work offsets or vises until we've filled up our entire table. Well there's one last thing
that we have to take care of here in our code. Take a look at this. You can see that all of our
vises are at different heights. They're not even close to being even here. So this is a dangerous
situation. So we're going to have to adjust our Z clearance at the end of each one of our sub
routines. We're going to change my Z.1 clearance plane to a Z.4.0. This is going to have the tool
coming up four inches above our parts before it moves from part to part or from vise to vise.
This is just something we add in for safety. Well we've shown you how and we've shown you why.
So the next time you have lots of parts to run, grab your calculator and do some quick math. Decide
if it's worth it for you to spend the time to add more vises to your table or maybe it's time to
build a dedicated fixture or maybe even a sub plate that can be held with clamps or put on
your table with a vacuum fixture. Remember it's not how fast you can finish that first part that
matters. It's how fast you can finish that last part that really counts. Well that is it for M97.
Thanks for letting us be a part of your success and for watching this Haas Tip of the Day.