Submitted by: Manuel Martinez of Horst Engineering & Mfg
This is a custom Macro I created for our operators to load a bar into the spindle and then let the machine to run by it self in repeat mode until completion of the bar. I hope your readers find it helpful.
When you use a bar puller, there will be no “end of bar” confirmation signal as there is with a properly interfaced bar feeding system. So you must be very careful not to let too many cycles run. This macro keeps track of how many parts have been run and will stop the machine prior to the bar becoming too short.
Bar pullers and machine codes vary, of course, and this macro shows one specific technique for the bar puller and machine we use. But if you understand how it works, you should be able to adapt this program to your own machine and puller.
The operator (or the programmer if preferred) just needs to know how to calculate the macro variables value and then they can exactly adjust it to each job you're running.
The callout on the main program must be as follows:
%
O0000 (PROGRAM HEADER)
N10G20
N11 (FEED OUT )
N12G97M5
N13M98P1 (SAFE INDEX SUBPROGRAM)
N14T1212 (CALLING THE BAR PULLER AND ITS OFFSETS)
(BAR PULLER MACRO CALL)
N15G65P9992Q53.0W0.64
N16M98P1
N17M01
N18(NEXT TOOL)
.
.
.
(REST OF THE MACHINING SEQUENCE)
.
.
.
.
/N125M00
(********************)
(TAKE PART FROM BASKET)
(********************)
N125#500=#500+1(***PARTS COUNTER***)
N125M25(***PART CATCHER RETRACT***)
N160M98P1
N125M30
%
The Macro Variables works as follows:
Q: Quantity of pieces per bar. Say you're using a 3 foot long bar, for example, cutting 0.5 inch long pieces with a 0.12 inch wide cutoff tool, and leaving 0.02 for finish facing stock. And you want to leave a 2.0 remnant at the end of the bar to safely ensure that the chuck will be clamping properly even on the last workpiece. In this case, you can machine 53 pieces and have a two inch long remnant (36 inches minus 2 inches [34] divided by 0.64 is 53.125).
W: Material length to feed. This is the workpiece length plus the cutoff tool width plus the amount of finish facing stock (0.5 plus 0.12 plus 0.02 or 0.64 in the example just shown).
If you made you use the same length of bar each time (36.0 inches in our example), you can just replace the bar when the machine shows your operator he needs to and the machine can run unattended for the length of the bar.
For the bar puller in my example, the bar puller offsets must be set as follows:
X=0 must be set as if it was a drill, aligned to spindle's center.
Z=0 must be set by eye on the part's face as any regular tool.
The way I use it, will require that you always leave the material .350 inch out of the collet after you use your cutoff. If you leave less, the bar puller will crash the spindle face. Again, this is our specific technique – if you use different methods the macro must be changed to suit your needs.
%
O9992 (BAR PULLER PROGRAM)
IF[#500LT17]GOTO1
#500=0
#3000=1 (YOU NEED TO CHANGE THE BAR)
N1G0G40G98
G0X4.Z.25
G01Z-[.3+ #23] F50.
X0.
M21 (OPEN COLLET)(*****ADJUST IT TO YOUR MACHINES M CODE*****)
W#23F20. (FEED MATERIAL)
M22 (CLOSE COLLET)(*****ADJUST IT TO YOUR MACHINES M CODE*****)
X4.0 F50.0
Z.25
M98P1
M99
%
Comments