Hello all I am a newbie with a Macro question.
Below is my machining program and I am using #500 and #501 as my macros. The counter is working fine but when I need to do a machine reset, it starts my counter over again. How can I use this counter and not have it reset every time I restart my lathe. I do need to reset it once it hits the max count.
Thanks in advance for any help!
%
O19120(19125.xx single cut TEST FOR DRIVER COUNT)
G50S1680
G0G21G40G99
#500=10000 (Max driver count)
G0M5
M89
N3
N1M440
G0G96S80T0101Z0.M3
G0X46.3
G1X44.0F.032
G1X43.5F.024
G04U.4
G0X48.00
#501=#501+1 (Tool count by 1)
S1500
N2M442
IF[#501GE#500]GOTO3
IF[#3901GE#3902]GOTO3
/M99
N3G30U0.
#501=0 (Reset part counter)
#3006=1 (Change driver)
M30
%