Re: Bar puller programming?
I do it the other way, I have my machining in the MPF file & call the sub program for the bar pulling. Then I just get the MPF file to loop however many times I need it to which is usually the number of components I can get out of a length of bar. This way you can edit the mpf as you'd normally do when running & only need to load the SPF(Unless you want to edit the lengths the bar puller is using etc)
Re: Bar puller programming?
Quote:
Originally Posted by
atmosports
Then I just get the MPF file to loop however many times I need it to which is usually the number of components I can get out of a length of bar.
How do you get an MPF file to loop? I haven't been able to do that.
Regards, Ray
Re: Bar puller programming?
The easiest way is between the M05 &M30 at the end of the MPF, insert the following:
@100 K-5
The @100 command makes it return to the start of the program. The K-5 part tells it which line to start from so in this can Line5 or N5, if you use @100K-15 it would start on line 15 or N15
I then set the parts counter to the same amount of components I get out of a bar so it'll run the bar then stop.
Another way of doing it is using the R48/R49 parameters
To do this you'll need to add more lines into your program: Sample as below
N5 G18 G54 G90 G71 G95
N10 R49=4
N11 R48=1
N15 R48=R48+1
N20 G92 S2000
,
,
,
N790 G90
N795 M55
N800 @123 R48 R49 K-15
N805 G90 G58 Z0
N810 M30
the @123 tells the control that when r48 is less than r49 it must repeat the MPF. When R48 is equal or greater than R49 it will continue to the end of the program, the K-15 tells it which line to start on. R49 is the number of repeats in this case above it's 4
This works on all our lathes running 840c Controls, I haven't had to do it on the 840d controls yet but I'd imagine it'd be similar as most things are the same
Re: Bar puller programming?
Atmosports,
I will try it tomorrow. I tried in the past with something like this:
N10
.
.
.
@100 K10
M30
But it didn't work. I suppose @100 K-10 will do the trick, no?
Regards, Ray
Re: Bar puller programming?
No "-" before on the K parameter means that indicated block number is beeing seek after this line.
Re: Bar puller programming?
Atmo and all,
Success! I am using the parts counter to stop when the bar is finished. Thanks for all your help! - Ray
N10 (initial bar puller to set start point)
---
N20 (bar puller to pull stock to position)
M55
N30 (form tool)
N40 (thread)
N50 (knurl)
N60 (part)
@100 K-20
M30
Re: Bar puller programming?
Thanks RBrandes...good stuff to know!