Headers and Footers

Hello! I’m sorry for my complete ignorance here but I can’t seem to find a good way to do what I’m trying to do. I’ve just recently completed my LowRider V3 build and I have EstlCAM set up per the V1E docs. This all works great for the touch plate gcode and such. However, I’d like to use a program like Easel (or another software) that adds a bit more CNC functionality. However, I’m not seeing a way to get that touchplate gcode into the exported files. I know that the gcode files are just text files but I’d rather not manually add the gcode to each file before each job. Is there a way to take a generated gcode file (outside of EstlCAM) and have those V1E gcode snippets added to it? I’m playing with Easel and it exports a .nc file so if there’s a way to convert that too, that would be awesome!

Thanks!

In Estlcam, if you want to add g-code at the start of every file, go to Setup/CNC Programs/Texts/Program Start. Any text you put in the edit field will be added to the start of your g-code.

Yep, that I’ve done that part. So anything I make in Estlcam has that added gcode. However, when I use something like Easel I can’t figure out how to convert their .nc output to the gcode I need which includes the touchplate gcode. Thank you!

Now I understand the issue. Since Easel does not have a start code section, you will need to use some sort of scripting language. If using Windows, you can use a CMD window.

Imagine these three files:

  • Header.txt - the file with the touch plate g-code
  • Out.nc - output from Easel
  • TheFile.gcode - the final file

In a CMD window, you would just type:

copy Header.txt+Out.nc TheFile.gcode

If you always write out the Easel file with the same name and same location (and therefore overwrite the previous save), you can put the copy command in a batch file and create a windows shortcut. That way you could add the header and build the file with a click of an icon in Windows.

1 Like

@robertbu Thank you so much! Will the Marlin firmware read Easel’s .nc gcode correctly?

I ran a test two years ago as outlined in this post. At that time, Easel g-code worked on Marlin. I’ve not run any recent tests. You must set up your job on your MPCNC in the specific way Easel expects. That is Z=0 is the top of the stock, and the XY origin of the job is the bottom left corner of the stock. If you are running your job from an SD card, you must rename the file to have a .gcode extension, not the default .nc extension.

Edit to add: If you want a footer as well as the header, the copy command looks like:

copy Header.txt+Out.nc+Footer.txt TheFile.gcode

And to reiterate, there are other scripting solutions. The CMD prompt is just available without installing anything.

Great! Thank you so much!!