Skip to content

Streamed my 1st Gcode!

November 16, 2011

Last night at the Splat mtg I had some real progress.

I installed the spindle- it pulled less than 1A at 12v, which is what David Carr recommends on the Makeyourbot site. It needs to be glued in place better, which I can do tonight. I am a little concerned about running that toy motor off of 19v; I may have to look into some way of dropping that.

I used MIT’s cad.py to generate a gcode file from the grblshield png image. I’ve used cad.py for other things in the Mobile, but hadn’t used it for gcodes before. I used a scrap piece of wood as a stand-in for copper board.

About half the times I streamed the code, it seemed to work correctly, although the feed rate was waaay off (too high) which was causing it to drop steps. The other times, it worked in one corner and made a verrry tiny rectangle.

I finally figured out that what I was seeing with the tiny rectangles was the entire board, shrunk by a factor of 25.4. In other words, GRBL was randomly selecting either mm or inches as its units.

In looking over the code again I realized that cad.py is not adding any G70 (inches) or G71 (mm) code to the file.  (EDIT: it’s probably actually G20 and G21.) And with no units specified, the feed rate is also wildly variable. Duh. (Cad.py also specifies a spindle speed, which is irrelevant for the Mantis, but that doesn’t seem to cause any trouble; it just ignores it.)

I will manually add the G70 code and specify a reasonable feed rate in inches and then try it again.

Advertisements
3 Comments leave one →
  1. Alden Hart permalink
    November 16, 2011 9:39 am

    I believe the correct Gcodes for distance units are G20 for inches and G21 for mm.

  2. November 16, 2011 10:57 am

    Huh, I wonder if that’s a version issue. I was finding G70-71 last night when I was googling around, but then other places specify G20-21 (and that’s actually what’s in my ReplicatorG codes as well.). As you can tell, I’m a noob at this, but I’ll try G20 first for sure.

  3. Alden Hart permalink
    November 16, 2011 2:21 pm

    The gold source for the Gcode language is this:
    http://www.isd.mel.nist.gov/documents/kramer/RS274NGC_3.pdf

    The EMC Gcode reference is derived from this and is also useful:
    http://linuxcnc.org/docs/html/gcode_main.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: