– Hello and welcome to
the Haas tip of the day. My name is Mark and right now I am doing two things at once. I’m talking with you and at the same time, the lathe behind me, with
the use of a bar puller, is making parts, a lot of parts. Well, I went and got some coffee, you listened to our theme song, and the lathe made a few more parts. The benefits of using a
bar puller are obvious. It allows me to walk away from my machine for maybe 30 minutes at a time to attend to other projects while my Haas lathe
continues to pay for itself. We don’t sell bar pullers,
we sell machine tools, but we want you to succeed and to get the most out of your Haas machine, so right now we’re gonna show you how to use this effective tool. Our bar puller is basically a gripper that we’ve mounted onto the turret. You can man it just like any other tool and we’ve commanded ours to come in just above the bar and then using a G1, we’ve fed it down onto the stock with the spindle stopped
using an M5 command. From there, we use an
M11 to open up the chuck. Then we’ll dwell for about a second, making sure that the chuck has enough time to open fully before we pull that bar out. In my code, I’ve used a G01 W1.07. On lathes, when we want
to move the X, the Y, or the Z axis incrementally, we’ll command a U, a V, or a W. I’ve used a W1.07 which
is gonna move my Z axis in the positive direction from
where it sits 1.07 inches. Something to remember is that, typically, our X and our U values are in diameter. From there, once our bar has been pulled, we’re gonna close that
chuck using an M10 command and then dwell for about a second, making sure that that
chuck has plenty of time to close before we program that tool up and out of the way. If you press the cycle start button during your setup and get a message that says “Chuck Unclamped,”
you may have to turn on parameter 278, bit 8, Chuck Open Cstart, You’ll get that warning message
if cycle start is pressed while the chuck is open. OK, now it’s time for the fun part. I’ve written my part program, we’ve written our bar puller program, and at the bottom of my program, I’ve changed it from an M30 to an M99 so it runs more than one part, but how many parts are we gonna run? We have to have the
program stop at some point once a part limit has been reached. We’re going to show
you three quick methods to do that now. With this method, we’ve added a counter to our program. #100 equals #100 plus one. Each time a part is run, it
adds one to our part counter. If I load a new bar, I can go
to the macro variables page and zero out variable 100. There are quite a few codes
that can block look ahead. The forward slash block
delete is one of those. We’ve added it here because we don’t want our part counter to
increment before the program has reached this exact line of code. It’s just a macro trick that we use. I’m running a 48-inch bar
and we want our program to stop once we’ve reached 44 pieces. That’s what this line of
code is gonna do for us. This is macros 101. If the expression within the
brackets evaluates to true, then run this code. We’re going to fill
those codes in right now. If #100, our parts counter, is
greater than or equal to 44, my part limit, then M30, stop running. If my part counter is less than 44, it’s not going to execute my M30, it’s just gonna continue
on with my program until we finally reach that part limit. With this second method, we’re still gonna use
our if-then statement, but we’re gonna get rid of our counter. This is because the
Haas control already has a built-in M30 counter and it’s tied to macro variable 3901. We’ve already made an
entire tip-of-the day video using variable 3901 and talking about our M30 counters, so be sure to check it out. Now, with the single line of code, we’re saying if our M30 counter is greater than or equal to 44, then stop running parts. And, of course, if our M30 counter is less than 44, then keep running parts until our part limit of 44 is reached. For this last example, we’re gonna use an M97 internal sub routine. M97, call my internal sub routine. P1, the P1 refers to line N1. The sub is everything in
between the N1 and my M99. It’s gonna run this sub routine 44 times. It’s pretty straightforward. It’s a good way to program a bar puller. I prefer the macro method just because if reset is pressed during this program, you’re gonna lose track of
how many parts you’ve run and you’ll be changing
your l value all day. With the M30 counter or
even our #100 counter, if reset is pressed or you
start and stop your program, your part count is still good. As we finish up, we’d like to leave you with three important tips. First off, be sure to
follow the instructions that came with your bar puller. Each bar puller is different. Number two, be sure to support your stock in your spindle. We use the patented Haas
spindle liners for this, which support the bar
across the entire length of the spindle. This gives us the added
benefit of being able to run much longer bars and
if you’re using a bar puller, that means you can walk
away from your machine for a much longer time. Finally and most important,
never let your stock hang out the back of your spindle. Nothing good can happen. If you’re doing a lot of setups or running any kind of production, it wouldn’t take long
for a Haas bar feeder to pay for itself, with it’s
large-capacity bar magazine and software that’s fully integrated with your Haas lathe, the
machine can run unattended with the operator just stopping by to check on his parts and load new bars, all while the machine is running. Well, that’s it for
today’s tip of the day. Be sure to click on the link
at the end of this video for today’s bonus content. That’s going to include
the programs that we use, it’s going to link to
that M30 counter video that we talked about, maybe
even our spindle liner page, and it’s going to give you a chance to subscribe to this
channel so you can see more of these tip-of-the-day videos. Thanks for letting Haas
be part of your success and for watching this Haas tip of the day.