Modifying the GRBL post Processor

This forum is for general discussion regarding VCarve Pro
Post Reply
ricklach
Vectric Apprentice
Posts: 70
Joined: Wed Nov 06, 2019 7:44 pm
Model of CNC Machine: 1510 Workbee/5'x10 Colossus (home Built)
Location: Victoria, BC

Modifying the GRBL post Processor

Post by ricklach »

I am running a spindle router on my home built CNC powered by a blackbox. In VCarve, when you select a tool for a job it has as one of its parameters the optimum spindle speed for the selected tool. I also need to turn on the coolant and pause the startup of the spindle by about 8 seconds. There may be other GRBL commands that I would like to set also. Does anyone know how to modify the GRBL post processor in Vcarve so that these (and perhaps other commands) are applied when the toolpath is saved before the tool starts the run?

User avatar
rink
Vectric Craftsman
Posts: 188
Joined: Tue Jul 07, 2020 3:45 pm
Model of CNC Machine: OpenBuilds LEAD 1510 / VCarve Pro
Location: USA
Contact:

Re: Modifying the GRBL post Processor

Post by rink »

Good evening.

I’m not an expert on editing post processors, and someone more knowledgeable will most likely chime in with a more complete answer. Maybe this will get you started.

I’m not at my computer so I can’t tell you the exact folder path, but in your VCarve folders, look for files named *.pp. These are post processors. Edit the pp file you’re using to generate your toolpaths with any text editor or word processor. That’s where you add your custom commands that the PP will add to your toolpaths. Be sure to make a copy of the unedited original, in case you mess it up.

For some reference on GRBL and gcodes, here’s a link (that you may already have):
Home · gnea/grbl Wiki · GitHub

If the link doesn’t come through, just Google “gnea/grbl wiki”.

Hope that helps.
Thx, rink.
I want to be unique like everyone else.

User avatar
Adrian
Vectric Archimage
Posts: 14658
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Modifying the GRBL post Processor

Post by Adrian »

Look on the Help menu in VCarve. There is a post processor editing guide there.

How the post processors are stored has completely changed in v11. By default they are all contained within a single database. You will only have a pp file if you moved over an older post processor or have chosen to customize one as follows.

To make one of the "built in" ones editable you can go to post processor management on the Machine menu. You can then click the paper icon to the right of the post processor you're interested in and choose Customize. That will then refresh the display and you will see the post processor at the top of the list with a pen icon next to it to show that it is now editable. If you click the paper icon next to the post processor now you will see Open File Location. That will take you to a Windows folder where you can see the pp file ready for editing.

ricklach
Vectric Apprentice
Posts: 70
Joined: Wed Nov 06, 2019 7:44 pm
Model of CNC Machine: 1510 Workbee/5'x10 Colossus (home Built)
Location: Victoria, BC

Re: Modifying the GRBL post Processor

Post by ricklach »

Thanks for that. I made a few simple mods. However, I am not sure of the syntax for the variable for spindle speed. For example, if the recommended spindle speed from the tool database is 12000, how do I set that bit of code to use the tool speed recommended by the manufacturer. An example would be very handy.

User avatar
Adrian
Vectric Archimage
Posts: 14658
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Modifying the GRBL post Processor

Post by Adrian »

You set the spindle speed in the tool database for the tool in question and then the post processor will change the spindle speed appropriately.

The GRBL post processor already has the spindle speed variables and commands in it so you don't need to change anything in the post processor. This is the section that does that:

Code: Select all

begin SPINDLE_ON

"[S]M3"
[S] is the value from the Spindle Speed field in the tool database from whichever tool the toolpath was created with.

ricklach
Vectric Apprentice
Posts: 70
Joined: Wed Nov 06, 2019 7:44 pm
Model of CNC Machine: 1510 Workbee/5'x10 Colossus (home Built)
Location: Victoria, BC

Re: Modifying the GRBL post Processor

Post by ricklach »

OK, Thanks. I made all my changes, checked the code and ran some tests and everything operated as programmed and planned.

Post Reply