I converted my Scantek 2000 CNC lathe to work via Parallel port control (for Mach3/LinuxCNC software control) and have been learning how to hand write gcode (because the Linux compatible CAM lathe software options are not terribly good).
Unfortunately, the LinuxCNC software doesn’t support many of the automated cycles (G71 I’m looking at you!) for lathe turning (yet!), so I had to write up a gcode file with many manual G1 passes to cut down the cone shape you see here.
Instead of hand coding the whole thing, I wrote a small python script that automated the gcode generation, which takes 0.2 mm passes off the stock, stopping 0.5mm shorter each time from 10mm down to 5mm radius. But I did the first few by hand….
Here is a video of the process in action:
And below is the full gcode file for those who care….
Continue reading →