I'm trying to write a simple macro to cut a series of through holes at variable depths based on the number of cycles, basically trying to use all the flutes on my endmill before changing it.
I'm running it on a Haas TM-1P. The maximum depth is .650, the initial depth is .05, and the number of cycles before the step down is 20. #100 is my cycle counter and #101 is my depth variable. Here's the code:
IF [#101 LT 0.05] THEN #101=0.05
#100=#100+1
IF #100=20 THEN #101=#101+0.05
IF #100=20 THEN #100=0
IF [#101 GE 0.650] THEN GOTO 10
...
(This represents the cutting routines)
G13 Z-#101 I0.14 D03 F12.
...
N10
(ALARM MACRO)
#3000=115 (CHANGE TOOL)
M30
Does it look sound or does it need changes?