Work around for G83 canned cycles.

Post Reply
skipmcdonald
Posts: 22
Joined: Fri Oct 25, 2013 2:31 pm
Location: Dallas/Fort Worth Area, Texas, USA

Work around for G83 canned cycles.

Post by skipmcdonald » Tue Apr 22, 2014 8:22 pm

When GRBL ignores the holes you wanted peck drilled what do you do?
Well I wrote a quick and dirty work around in perl that post process converts g83 g80 blocks into code that GRBL does understand.
A series of G0 G1 and G4 commands are substituted for the blocks. It processes most g-code files that contain valid G83 commands and outputs a new file that you can send to GRBL. Only G83 and G80 blocks get converted. Other canned cycles will probably get messed up because I only considered G83 commands in this version and it eats G80 lines that might belong to them.


I thought I would share the code with you here:

https://github.com/skipmcdonald/g-code-converters

just run the command line program:

perl g83tog0g1.pl test.g output.g

Prints helpful options:

perl g83tog0g1.pl -h

Sends the output to the screen and squashes progress dots:

perl g83tog0g1.pl -s test.g

Can participate in scripts and command line pipes like this:

cat test.g | perl g83tog0g1.pl -s | pg

Mac and linux users should have perl if they use a "shell" window.

Windows users may want to install MINGW32 or cygwin to get a working perl without much fuss, but you should then run it in their shell window unless you really know what you are doing.. I tested it with MINGW32 perl 5.8.8 and with a few fairly simple test cases. Your mileage may vary if you have something else.

Enjoy!

Skip
Shapeoko 2 #3181, Protoneer Arduino CNC Shield, Step-Stick 4988s, GRBL 9b+, All Aluminum Bed - Misumi HFSQN4-15250 extrusions, Dewalt DW611, Precision Think & Thinker, Collets.

Post Reply