5
« on: October 23, 2019, 06:25:52 PM »
I am learning g code. I was hopeful that the canned turning; and threading (not there yet) would work without having to tweak teh g code. If I use one of the canned turning cycles, during each pass (-Z), the tool keeps ending up further -Z. When done it does not return to Xi, Zi. My inspection of the gcode makes me think it should. And the DRO says it is at Xi, Zi. But the tool is not. I am about to run it line by line in MDI.
After I heavily modified the g code and run it, the tool returns to Xi, Zi. What am I missing? It would be nice not having to modify the canned cycle g code.
Both sets of g code below.
N0 (Machine type - MachMotion Lathe Canned Cycles)
N5 (Filename: C:\Mach4Hobby\GcodeFiles\turncycle21.tap)
N10 (Generated on 10/23/2019 at 6:22:03 PM)
N15 G00 G40 G54 G64 G80 G90.1 G99 G18 G20 (Safe Start Block)
N20 %
N25 %
N30 (Starting Gcode for Turning Cycle: TurnCycle-1)
N35 ([Xi, Zi] = [0.75, 0.0]; [Xf, Zf] = [0.625, -0.5]; Z- Direction; OD)
N40 G50 S2750 (Spindle Speed Cap)
N45 (Roughing)
N50 G00 G40 G54 G64 G80 G90.1 G99 G18 G20 (Safe Start Block)
N55 %
N60 %
N65 T0101 (Tool Change)
N70 G99 (Feed per Revolution)
N75 G96 S180 (Constant Surface Speed)
N80 M03 (Spindle Forward)
N85 M09
N90 G00 X0.9500 Z0.1000 (Rapid move to Clearance Height)
N95 G01 X0.7000 F0.0100 (Cut in on X-Axis)
N100 G01 Z-0.4950 F0.0100 (Cut in on Z-Axis)
N105 G01 X0.7500 Z-0.4950 F0.0100 (Spring Pass)
N110 G00 X0.9500 Z-0.3950 (Pull out to Retreat)
N115 G00 Z0.1000 (Pull out to Clearance)
N120 G00 X0.9000 Z0.1000 (Rapid move to Clearance Height)
N125 G01 X0.6500 F0.0100 (Cut in on X-Axis)
N130 G01 Z-0.4950 F0.0100 (Cut in on Z-Axis)
N135 G01 X0.7000 Z-0.4950 F0.0100 (Spring Pass)
N140 G00 X0.9000 Z-0.3950 (Pull out to Retreat)
N145 G00 Z0.1000 (Pull out to Clearance)
N150 G00 X0.8500 Z0.1000 (Rapid move to Clearance Height)
N155 G01 X0.6350 F0.0100 (Cut in on X-Axis)
N160 G01 Z-0.4950 F0.0100 (Cut in on Z-Axis)
N165 G01 X0.6500 Z-0.4950 F0.0100 (Spring Pass)
N170 G00 X0.8500 Z-0.3950 (Pull out to Retreat)
N175 G00 Z0.1000 (Pull out to Clearance)
N180 (Finishing)
N185 G00 G40 G54 G64 G80 G90.1 G99 G18 G20 (Safe Start Block)
N190 %
N195 %
N200 T0101 (Tool Change)
N205 G99 (Feed per Revolution)
N210 G96 S180 (Constant Surface Speed)
N215 M03 (Spindle Forward)
N220 M09
N225 G00 X0.825 Z0.1 (Rapid to start)
N230 G01 X0.625 Z0.0 (Feed to start)
N235 G01 X0.6250 Z0.0000 F0.0100 (Finish Line Move)
N240 G01 X0.6250 Z-0.5000 F0.0100 (Finish Adjust Move)
N245 G01 X0.7500 Z-0.5000 F0.0100 (Finish Line Move)
N250 G00 X0.9500 Z0.1000 (Return to clearance)
N255 (End Gcode for Turning Cycle: TurnCycle-1)
N260 %
N265 M09
N270 M05
N275 M30
N280 %
N285 (End Gcode file)
N290 %
N5 (Filename: C:\Mach4Hobby\GcodeFiles\turncycle2.1.tap)
N180 (Turning)
N181 G00 (Rapid Move) (Safe Start Block)
N182 G40 (Tool cutter compensation off [radius comp.])
N183 G54 (Work coordinate system [1st Workpiece])
N184 G64 (Best speed path)
N185 G80 (Cancel canned cycle)
N186 G90.1 (Absolute programming IJK [type B and C systems])
N187 G99 (Feedrate per Revolution)
N188 G18 (Select X-Z plane)
N189 G20 (Program coordinates are inches)
N190 %
N199 %
N200 T0101 (Tool Change)
N205 G99 (Feed per Revolution)
N210 G96 S180 (Constant Surface Speed)
N215 M03 (Spindle Forward)
N220 M09 (Coolant OFF)
N225 G01 X0.950 Z0.1 F0.0500 (Feed to clearance)
N229 G01 X0.800 F0.0100 (Feed to start)
N240 G01 X0.700
N241 Z-0.5000 F0.0100 (Turn)
N242 G01 X0.800 Z-0.5000 F0.0100 (feed +X along shoulder)
N243 G01 Z0.1 (To Z start)
N244 G01 X0.650
N245 Z-0.5000 F0.0100 (Turn)
N246 G01 X0.800 Z-0.5000 F0.0100 (feed +X along shoulder)
N247 G01 Z0.1 (To Z start)
N248 G01 X0.600
N249 Z-0.5000 F0.0100 (Turn)
N250 G01 X0.800 Z-0.5000 F0.0100 (feed +X along shoulder)
N251 G01 Z0.1 (To Z start)
N252 G01 X0.550
N253 Z-0.5000 F0.0100 (Turn)
N254 G01 X0.800 Z-0.5000 F0.0100 (feed +X along shoulder)
N255 G01 Z0.1 (To Z start)
N256 G01 X0.5000
N257 Z-0.5000 F0.0100 (Turn)
N258 G01 X0.800 Z-0.5000 F0.0100 (feed +X along shoulder)
N259 G01 Z0.1 (To Z start)
N260 G01 X0.475
N261 Z-0.5000 F0.0030 (Turn)
N262 G01 X0.800 Z-0.5000 F0.0100 (feed +X along shoulder)
N263 G01 X0.9500 Z0.1000 F0.0500 (Return to clearance)
N264 (End Gcode for Turning Cycle: TurnCycle-1)
N268 %
N269 M09 (Coolant OFF)
N270 M05 (Spindle Stop)
N275 M30 (End of Program, Rewind and Reset Modes)
N280 %
N285 (End Gcode file)
N290 %
Thanks,
Dale