Make the program a subroutine then call it with and L count.
Hi guys,
I have a SL10 lathe and we just got a bar puller for it.
I do not want to clamp the 5c collet with nothing in it so,
How do you program for a certain number of pulls on a bar?
For example if I know I can get 10 pieces out of a 12” inch bar how would I program that?
I understand all the moves involved in pulling a bar, it is just the number of pulls that concern me.
Could someone please give an example of how you program it to only make 10 pulls?
Thanks Erich
Make the program a subroutine then call it with and L count.
An open mind is a virtue...so long as all the common sense has not leaked out.
Geof thanks for the reply that is what I was thinking.
OK after asking the question I started searching on line here is what I came up with.
I now realize how much typing is involved so this an accurate program example?
The program is for a bar puller that engages in the z axis the one we got engages from the x axis
So I would be changing the program to accommodate that.
http://www.cncci.com/resources/tips/bar%20puller.htm
Thanks for your help
Erich
That program seems to be teaching you how to write a macro which is a bit more complicated than the way we do it; we just have a dedicated little section at the top of the program, kinda like this in words, not G-code.
Program Name
Safety Line
Move bar puller into position
Grip bar
Open Chuck
Pul bar
Close Chuck
Release bar
Move away for tool change
Call subroutine for with L count (M97 Pnnnn Lsomething)
G28
M30
------
Nnnnn
Part program
;
;
M99
An open mind is a virtue...so long as all the common sense has not leaked out.
I just use the tool usage alarm to stop the machine after a certain number of tool uses, works ok for me..
That being said, here is a snippet of code that I use with my royal bar puller in my SL10..
(BAR PULLER)
T1212
G54
G98
M05
G00 Z-7.2868
X-9.
G01 X-10.5 F20.
G04 P0.75
M11
G04 P0.75
Z-5.9268 F50.
G04 P0.75
M10
G04 P0.75
G01 X-9. F20.
G00
Z0.1
G28
/ M99
M30
If I only want to run one part, I use the block delete key to ingore the m99..