4508
« on: March 26, 2012, 01:43:05 AM »
OK first you cannot use line numbers on lines that contain the Oword. Mach cannot see the Oword if you do.
You first SUB it NOT a sub that is the main program it cannot have the Oword at teh beginning.
In sub # 2 you have a M99 at line 155 which stops the rest of the code from runnning is the following code part of the sub OR main program. IF main program it is in the wrong place. IF sub then remove the M99 so the rest can run. It is ODD to have a tool change in the middle of a sub BUT if it works(;-)
;( CNC File :- Injector Hole Test ver A3 )
;( Produced :- March 25, 2012 )
;( Post Processor :- M_Mach 3_inc 02_02_12 )
;( Part Number ID :- Injector complete pocket )
;( Tools Used )
;( T01 9.53mm End Mill)
;( T02 6.35mm End Mill)
;( T03 5.56 Twist Drill / Center Drill)
;
%
(main Program)
N10 G00 G21 G17 G90 G40 G49
N20 G52 X30.0 y0.0 ;start with first offset
N30 M98 P0002 L1 ;call the machining routine
N40 G52 X60 Y0.0 ;use a different offset to run it again
N30 M98 P0002 L1 ;call the machining routine
N50 G28
N60 M30
;
;Injector pocket routine is here
N70 O0002 ;injector pocket routine
N80 M05
N90 X0. Y0.
N100 M06 T03
N110 M03
N120 G43 H3
N130 S2000
N140 G04 P2.0
N150 G00 x20 Y-20 Z50
N160 G98 G83 X20 Y-20 Z-7.0 Q1.0 R3.0 F100.0
N170 G80
N180 G00 Z80.
;
N190 M05
N200 M06 T01 ;tool change to 9.53mm end mill
N210 M03
N220 G43 H1
N230 S2500
N240 G04 P2.0
N250 X20 Y-20 F1000
N260 Z3
;
;Mill out the full depth of the 24mm body first. Use 2mm go-round cuts
;make the 24mm body pocket in 2 steps, first to 15mm depth
N270 G01 Z-7.0 F30 ;plunge to 15mm depth
N280 G01 X22 F15 ;OD cut #1, of 5
N290 G03 X22 I-2.0 J0 ;go-round
N300 G01 X24 ;OD cut #1, of 5
N310 G03 X24 I-4.0 J0 ;go-round
N320 G01 X26 ;OD cut #2, of 5
N330 G03 X26 I-6.0 J0 ;go-round
N340 G01 X27.2 ;OD cut #3, of 5
N350 G03 X27.2 I-7.2 J0 ;go-round
N360 G03 X27.2 I-7.2 J0 F40 ;go-round for cleanup
N370 G01 X26 F500 ;back away from the wall
N380 G01 Z-3.8 ;Move up to the upper O-ring step
N390 G01 X28.2 F15
N400 G03 X28.2 I-8.2 J0 ;go-round
N410 G03 X28.2 I-8.2 J0 F50 ;go-round for cleanup
N420 G01 X20 F500 ;back to center
N430 G00 Z50.
N440 M99 ;end of routine
%