Tweaking post processor


hey, I m trying to add some tweaks to the post processor to get some handy functions.

I have an air blast and a vacuum that are controller by M7 and M8. The modification was easy in order to enable those (I use flood and mist in fusion360 and mapped those functions to the masso).

What i d like to do is enable the air blast while the machining is homing towards my touch plate (to make sure no chips are on the plate). I d also like the machine to go to X0 Y900 instead of home when a job ends. Is there any references out there that explain how a post processor is laid out? I have a basic understanding of programmation but any help would be appreciated.

I added a picture of the machine for reference. The build is still in progress but so far so good


  • 281B015C-B9C4-4BE9-B1F4-C3FDA7515B19.jpeg
    3 MB · Views: 20


You can open up your post processor up in notepad ++ and change some stuff around too. you might be able to get some more customization that way for your particular needs.


MASSO Support
Staff member
Auto tool zero is not part of the gcode, its done automatically by MASSO on tool change command.

Maybe in your post you can add a command before tool change to switch on air and then switch it off after tool change.

Example gcode should look like this, we will use digital output 1 with M62 and M63 in this example:

M62 P1
- This will switch ON the output for air.

T3 M6 - This will load tool 3 and after that will move to auto tool zero position.

M63 P1 - This will switch OFF the output for air.

M62 info:


I use M7 for air blast which is hooked up to a relay to control an air solenoid. It s wired up on relay output #2.

I ll look up a bit more in the post processor and see if I can find a way go around this


I made some changes and tested out by outputting a post. Seems good on paper but i'll try tomorrow. For those that may be interested here are the changes I've done (**TEST AT YOU OWN RISK***):

-Send the spindle at the back of the table when a job finishes

-Activate the air blast during tool changes (mine is controlled by M7/M9)

-Shut down spindle right when the job finishes instead of waiting for the machine to home (added an M5 before the writeretract(Z))

if (properties.useM6) {
//activates air blast during tool change
writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6));
//shut down air blast after tool change

function onClose() {


// shuts down the spindle when the job is done before retracting


setWorkPlane(new Vector(0, 0, 0)); // reset working plane


// moves the head at the back of the table when finishing a job
writeBlock("G1 Y1000 F5000");

writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
if (subprograms.length > 0) {


@3dlow testing your post processor changes by making slight changes and posting your code is how I've fine tuned post processors in the past. keeping what your after as simple as possible for a test program and trial and error until you get where you need to be.

looks like you already figured out how to save a copy of the post to your computer and open it up to make your changes. it's been a year or better since the last time I messed with one of these. but you can get in there and change quite a bit if you spend enough time sifting through everything. I took a Mazak post for a laser and converted it into a post for a Mitsubishi laser by doing this so you can tweak quite a bit actually.

it all boils down to finding a solution that fits your machine and what you make with it. the less time you spend altering your programs the better in my opinion.