G Code import, Any additional header and footer info required?

Hey Theodore,

Pleased that the info was helpful to you. It was quite a simple process to create tbh where i opened easil, created a rectangle and then under machine tab > advanced > export G code.

I then created a new project, then imported rectangular program G code. The G code fails to import initially so i deleted a line at a time, then import G code, delete failed line etc etc. There is a batch of code at the beginning which i beleive is related to the tool length measuring. This needs to be deleted as this is added/runs whenever Carvey starts by default. I beleive that there are also a number of other commands at the program start/finish that are redundant. Anyway eventually you get some Carvey friendly G Code…but remember also this is an unapproved way of creating code so be careful you dont damage your machine

I would like to of seen a complete G Code guide produced by Inventibles. In addition to acceptable G and M codes, it would of been good to of had some info on preferred format, headers/footers, layout, number of decimal places for G0,G1 commands, tolerances of point, etc etc. I hope this will be published soon


Please forgive my ignorance, and I don’t mean to think you are wasting your time. But why do you want to write gcode when you can use graphical programs to create it for you?

I understand curiosity to learn what the code means so you can troubleshoot a gcode program line by line. But beyond that I don’t understand the appeal.

@GlennCoates good question

I’m in the process of creating a post processor for my CAM software that will drive Carvey. A PP translates CAM code into G code. If I use Easily as the machine controller,it requires the G code in a specific format. By experimenting with simple raw G code I can quickly determine which commands work or not and therefore create rules/determine spec for PP

Hey @BenSmithson,

Easel does send a header and a footer on the ends of the gcode you import. These are (mostly) statically generated. Your program will run just fine so long as it conforms to Easel’s gcode spec: https://inventables.desk.com/customer/en/portal/articles/2258567-easel-g-code-spec

Hey @EricDobroveanu

Thanks for your reply - but i’m still confused. I completely understand what the Header and Footer moves do that you list above. However if i include this code in my posted file/import file for import into Easil - it fails to import.

For example, I copy and paste your Header code to a txt file

I open Easil and File > Import G-Code. I select the file above. I then get the following error on the 2nd line of code:

If i delete this line of code and import again, i get the following error:

etc. etc.

On my initial forum post above, i went through the program and deleted all the code that failed to import. The majority of this code seems to be related to the Header and Footer info that you mention needs to be included. Once errors deleted, i then ran the program on Carvey. Carvey started, did a tool measure and went off cutting.

I’d be really grateful if you could confirm what info is needed (or not!) to run Carvey via Easil and File > Import G-Code

Many thanks


The header/footer are injected above/below whatever gcode you import on Carvey, so you don’t need to add any of it manually. All you need in the gcode file, is the code to make the cuts, and it must conform to the spec I linked above

Only the following commands can be in your gcode file:

G0, G1, G4, G17, G20, G21, G40, G54, G61, G90, G94
M0, M1, M2, M3, M4, M5, M6, M7, M8, M9, M30

If your file has anything other than the above, it will get rejected.

OK thanks @EricDobroveanu

This now makes sense

Hey @EricDobroveanu

Is the header and footer info injected automatically by Carvey? or is it done by Easil?

I ask because if i import the code to Carvey by UGS for example, will i need to add the header and footer info you mention above? or is it done automatically by Carvey?

Thanks again!


Easel will inject the header and footer, not Carvey.

Also I can’t recommend using UGS for Carvey, its very easy to crash into the smart clamp and break it.

Also, please keep in mind that using UGS with Carvey will void your warranty.

For me I use

To turn on: S12500 M3

The S12500 is spindle speed…it doesn’t actually adjust speed, but is required to turn on the relay

To turn off: M5

1 Like

This is the complete header from a file I just cut

G0 Z0.5000
G0 X0.0000 Y0.0000 S12500 M3

Silly question…Are you using the regular g-shield and arduino? Is the switch on logic? Is the power switch on the router on?

shouldn’t matter…swap and see

None that I am aware of…

Has it ever worked? Is it wired correctly?

Try typing your header 1 line at a time (or copy and paste) into UGS and send the commands to the machine and see if you get an error on any line…I would change output to verbose.

1 Like

There is a setting in UGS to output verbose (more info) while it runs commands…I think it is just a check box.

I think the issue is the G64 command…but I have been wrong before :slight_smile:

1 Like

@PhilJohnson As mentioned by @EricDobroveanu I believe G64 and P0.001 is not supported in Easel’s Gcode import, or by GRBL.
Remove that from the F-Engrave configuration.
GRBL will reject the WHOLE LINE of code when it receives a command it does not like.