What's new
What's new

Haas incremental sub program loop in Y

KristianSilva

Aluminum
Joined
Nov 26, 2016
Hello!

Im experimenting with some different programming methods for some little bits of fixturing I have to machine, just trying to get better and long hand programming. If any of you have used haas G12/G13 you will know that it is no good for production parts as it has a huge feed in and feed out that gets bigger with the diameter of the hole, this wastes a lot of time, also because there is no overlap it leaves a mark where the tool enters/leaves the cut.

So basically I have written a local sub program that overlaps and has a shorter lead, however in this case its not needed as im just chamfering a hole, but like I said im just playing here. This works great, but I want to know how I could loop this program incrementally in X or Y so it could be used if I had 100 holes in a line to interpolate to size etc, the program below ALMOST does what I want it to, it drills the first holes fine then comes in to Y16. to do the first sub program chamfer cycle but before it does, it moves -32. in Y and then runs the sub program for the first time at y-16., then moves another -32 in Y then runs it again at y-48.

Basically, I want it to do exactly what its doing now EXCEPT i want it to run the chamfer sub program at the initial start point y16. and y-16.

NOTE!!!
- I dont want to just move the initial start point to y48. to bring the 2 sub programs cycles into the correct position as this wastes valuable axis travel which is limited on haas mini mill and TM1P's

-The machine is not equipped with macro option.

-I want to do this in the neatest and shortest amount of code possible by looping an incremental value so all positions dont have to be input.

Current program:


%
O04259 (JF4259D/60D)
G00 G17 G21 G40 G49 G54 G64 G80 G90 G94 G98

(MOVE TO TC)
G00 G53 Z0.
G00 G53 X-500. Y0.

M00 (OP1-BOTTOM OF BOTH STEMS)

N1
T1 M06 (8.5MM CARBIDE DRILL)
G00 G54 X0. Y16. S2430 M03
G43 H01 Z10. M08
G81 R2. Z-31. F440.
Y-16.
G00 G53 Z0.
G00 G53 X-500. Y0.
M01

N2
T2 M06 (6MM X 45DEG CHAMFER)
G00 G54 X0. Y16. S6000 M03
G43 H02 Z10. M08
Z2.
G91 M97 P200 Y-32. L2
G00 G53 Z0.
G00 G53 X-500. Y0.
M01

N3
T3 M06 (M10 CUT TAP)
G00 G54 X0. Y16. S160 M03
G43 H03 Z10. M08
G84 R2. Z-29.5 F240. J4
Y-16.
G00 G53 Z0.
G00 G53 X-500. Y0.
M30

N200 (CHAMFER HOLE W/OVERLAP)
G00 G90 Z-2.
G00 G91 X0.5 Y-0.5
G01 G91 X2.711 F1200.
G03 G91 X0. Y1. I-3.211 J0.5
G03 G91 X0. Y-1. I-3.211 J-0.5
G03 G91 X0. Y1. I-3.211 J0.5
G01 G91 X-2.711
G00 G91 X-0.5 Y-0.5
G00 G90 Z2.
M99
%

THANKS!
 
you know if you read the manual it will do what you are asking in a g13. if you give it a start radius with an I and the final radius of a K and give it a stepover of a Q it will over lap as you are asking.
 
you know if you read the manual it will do what you are asking in a g13. if you give it a start radius with an I and the final radius of a K and give it a stepover of a Q it will over lap as you are asking.

I dont want to mill out a pocket, thats not what im asking, I purely want to do a finish pass with a slight overlap, this also wouldn't eliminate the huge semi circular lead in that is equal to half the bore diameter
 
To do what you want, the proper way would be to call it once at your first location, then call it again with L to repeat incrementally (for your 100x example)

T2 M06 (6MM X 45DEG CHAMFER)
G00 G54 X0. Y16. S6000 M03
G43 H02 Z10. M08
Z2.
M97 P200 (CALL IT ONCE HERE)
G91 M97 P200 L99 Y-32. (CALLING IT AGAIN HERE TO DO IT 99 MORE TIMES INCREMENTALLY)
G00 G53 Z0.
G00 G53 X-500. Y0.
M01



For your example, I would simply move to the next location and call it up again without L, since its just 2 holes.



Alternatively, you could "start" the tool at +48 and use your same code.


T2 M06 (6MM X 45DEG CHAMFER)
G00 G54 X0. Y48. S6000 M03
G43 H02 Z10. M08
Z2.
G91 M97 P200 Y-32. L2
G00 G53 Z0.
G00 G53 X-500. Y0.
M01


... but you said you don't want to do that.




I do not know if there is a setting on a haas to set whether it does the incremental movement first, or after the sub. I doubt it.
 
To do what you want, the proper way would be to call it once at your first location, then call it again with L to repeat incrementally (for your 100x example)

T2 M06 (6MM X 45DEG CHAMFER)
G00 G54 X0. Y16. S6000 M03
G43 H02 Z10. M08
Z2.
M97 P200 (CALL IT ONCE HERE)
G91 M97 P200 L99 Y-32. (CALLING IT AGAIN HERE TO DO IT 99 MORE TIMES INCREMENTALLY)
G00 G53 Z0.
G00 G53 X-500. Y0.
M01



For your example, I would simply move to the next location and call it up again without L, since its just 2 holes.



Alternatively, you could "start" the tool at +48 and use your same code.


T2 M06 (6MM X 45DEG CHAMFER)
G00 G54 X0. Y48. S6000 M03
G43 H02 Z10. M08
Z2.
G91 M97 P200 Y-32. L2
G00 G53 Z0.
G00 G53 X-500. Y0.
M01


... but you said you don't want to do that.




I do not know if there is a setting on a haas to set whether it does the incremental movement first, or after the sub. I doubt it.

Both,

Thanks for your help, I just wnated to check that I wasnt doing something wrong/stupid!

In this case yes it makes sense to just call it twice and not use a loop, but if I had 15 holes in a line I think I would follow your first suggestion and call it twice and loop 14 times.

Thanks!
 








 
Back
Top