That will work. You could ADD the line to reset #501 to zero when tool life is up to save you from having to do it manually.
N40
#3000=1(TOOL LIFE UP)
#501=0(************************)
GOTO2000
O4444(TEST FOR AUTOMATIC)
$1
M9
G113G99
G50Z-.015
M6
G4P1000
#501=[#501+1]
IF[#501EQ3]GOTO10
IF[#501EQ6]GOTO20
IF[#501EQ9]GOTO30
IF[#501EQ12]GOTO40
GOTO2000
N10
#2701=.001
GOTO2000
GOTO2000
N20
#2701=.002
GOTO2000
GOTO2000
N30
#2701=.003
GOTO2000
GOTO2000
N40
#3000=1(TOOL LIFE UP)
GOTO2000
N2000
G0X.5Z-.05
M3S1=2000
T100(FRONT TOOL)
G0X.5Z0T1
That will work. You could ADD the line to reset #501 to zero when tool life is up to save you from having to do it manually.
N40
#3000=1(TOOL LIFE UP)
#501=0(************************)
GOTO2000
You MUST put the reset BEFORE the alarm. My BAD!
N40
#501=0(************************)
#3000=1(TOOL LIFE UP)
GOTO2000
thanks much. I did have some minor hang ups though, some how the machine
ignored the math portion altogether when i put the "n10" etc. statments in the main body of the program. so finally the proven example looks like this
O4444(TEST FOR AUTOMATIC)
$1
M9
G113G99
G50Z-.015
M6
G4P500
#500=[#500+1.0]
IF[#500EQ3]GOTO10
IF[#500EQ6]GOTO20
IF[#500EQ9]GOTO30
IF[#500GT12]GOTO40
N200
G0X.5Z-.05
M3S1=2000
T100(FRONT TOOL)
G0X.5Z0T1
G99G1Z.05F.002
G0X.625T0
T600(CUT OFF .047)
G0X.6Z.050T6
M3S1=2000
G99G1X-.05F.004
M8
M8
/M98P8999
M9
M9
M25
M119
M5
M7
G0U0Z-.015T0
M56
G600
G999
G600
N999
M2
M99
N10
#2701=.001
GOTO200
N20
#2701=.002
GOTO200
N30
#2701=.003
GOTO200
N40
#500=0
#3000=1(TOOL LIFE UP)
GOTO200
$2
G600
G999
G600
N999
M2
M99
$3
G600
G999
G600
N999
M2
M99
$0
A
#814=0000001560
#815=0000002000
#816=0000006000
#817=0003000000
#822=0000000007
#824=-000000500
#818=0000008000
#819=0000001000
#820=0000000000
#821=0000010000
#990=0000005000
#991=0000063000
#893=0000000000
%
What are you machining that you get 12 parts for tool life?
I get cranky when I have to change an insert once a day... haha.
yeah seriously
rather than fiddling around with funky programming id rather solve the issue at its source.. unless you're machining 1" diamond down to .1" in one pass over a footlong length I dont see how you're only getting 12 parts lol *shrug*
interesting method though!