Perl Generated G-Code Files

The subject of using perl to generate G-Code came up on the Mach mailing list. These photos show a hex shaped hole that I machined using such a script.

Facing the end

I faced the end and brought the end lip to the correct thickness. Bigger...

Rotary Table Clamps

This is a set of clamps I made for holding the 4-jaw chuck in place on the rotary table. The chuck is screwed on in the center, and the clamps are just to ensure that the chuck doesn't unscrew. Bigger...

Setup for machining

The 4 jaw chuck has been transferred to the rotary table and is secured using the clamps in the previous photo. Bigger...

Machining the Hex

This shows the hex being machined. 1/6 of the hex was machined at a time and then the rotary table was rotated. Bigger...

Finished Hex

This shows the finished hex hole. The brass nut has spines down the center which engage with spline on the axle. The brass nut was part of the vehicle base that I'm using for a robot I'm building. Bigger...

Simulation of Hex

I wrote a perl program, which I called Hex.pl to generate the G-Code. There is a variable near the top of the file called $sim. Setting this variable to 1 causes Hex-Sim.nc to be produced, which is what I used to generate the simulation pictured here. Setting $sim to 0 generates Hex.nc which is the file I used to machine the actual hex. Bigger...


Home - Machinist - CNC

Copyright 2007 by Dave Hylands