here's the type of code that i'm looking to scan...
%
O0000
(PROGRAM NAME - 13430 PUNCH GEO)
(DATE=DD-MM-YY - 05-01-11 TIME=HH:MM - 18:04)
N100G20
N102G0G17G40G49G80G90
( 1/2 CENTERDRILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .5)
Beginning of First toolN104T1M6
N106G0G90G54X-2.5289Y11.8305A0.S2500M3
N108G43H1Z.1M8
N110G99G81Z-.26R.1F40.
Right here is the first Z depth -.26N112X2.3831
N114X-12.3794Y11.837
N116X-7.4582
N118X7.3056
N120X12.3523Y11.8412
N122Y15.8335
N124X-15.6538Y15.837
N126X-7.1548
N128G80
N130M5
N132G91G28Z0.M9
N134G28X0.Y0.A0.
N136M01
M01 is the End of the first tool ( 1/2 FLAT ENDMILL TOOL - 2 DIA. OFF. - 2 LEN. - 2 DIA. - .5)
Switching to 2nd ToolN138T2M6
N140G0G90G54X-2.1541Y18.587A0.S3056M3
N142G43H2Z-.25
Here we have the z depth again at -.25N144G1Y18.087F24.45
N146G3X-1.6541Y17.587R.5
N148G1X12.8459
N150G2X13.0959Y17.337R.25
N152G1Y10.587
N154G2X12.8459Y10.337R.25
N156G1X-16.1541
N158G2X-16.4041Y10.587R.25
N160G1Y17.337
N162G2X-16.1541Y17.587R.25
N164G1X-1.6541
N166G3X-1.1541Y18.087R.5
N168G1Y18.587
N170Z.35F6.42
N172M5
N174G91G0G28Z0.
N176G28X0.Y0.A0.
N178M01
M01 again is the end of the tool( 1/2 FLAT ENDMILL TOOL - 3 DIA. OFF. - 3 LEN. - 3 DIA. - .5)
Starting Tool 3N180T3M6
N182G0G90G54X-2.5289Y11.8305A0.S1833M3
N184G43H3Z.1M8
N186G99G83Z-.25R.1Q.1F14.66
here we have a depth of -.25N188X2.3831
N190X-12.3794Y11.837
N192X-7.4582
N194X7.3056
N196X12.3523Y11.8412
N198Y15.8335
N200X-15.6538Y15.837
N202X-7.1548
N204G80
N206M5
N208G91G28Z0.M9
N210G28X0.Y0.A0.
N212M02
and now we are at the end of the program noted by M02%
Sometimes tools are pulled up multiple times at different z depths I don't know if there is a way to scan for T1M6 (T1 = Tool Change to Tool 1) scan the whole section for Z-(what ever this is) until it hits M01 then scan for the next tool T2M6 all the way till the next M01 and so on... then create some sort of Tool List with the farthest Z depth?
if I confused you please ask me to help me to help you help me
