I’ve never used Vectric Aspire. This web page lists info on how to edit a post processor for their system:
According to that doc, you would want to add code to the “HEADER” inside the “Block definitions” section. In the PP file you attached, the header starts on line #61. In the post processor, each GCode line has to be wrapped in double quotation marks, so G90 has to be entered as “G90”
In that scenario, the code in my script that reads as:
G92 X0 Y0 ; Set Current position to 0 on the X and Y axes.
G92 Z130 ; Set new Z position since probe to touchplate fails in negative numbers
G0 F3000 X150 Y150 ; move to +150,+150 inward from 0,0, prep for touch off
M0 Attach probe ; Pause to connect touchplate
G38.2 Z0 F900; Probe down to touchplate
G92 Z0.34 ; Set new Z position to thickness of touchplate
G1 Z40 F3000 ; Lift off touchplate
M0 Remove probe ; Pause and wait for touchplate removal
;M106 ; This will turn on an IOT relay to start a router or vacuum
Would have to be edited to instead say:
"G92 X0 Y0 ; Set Current position to 0 on the X and Y axes."
"G92 Z130 ; Set new Z position since probe to touchplate fails in negative numbers"
"G0 F3000 X150 Y150 ; move to +150,+150 inward from 0,0, prep for touch off"
"M0 Attach probe ; Pause to connect touchplate"
"G38.2 Z0 F900; Probe down to touchplate"
"G92 Z0.34 ; Set new Z position to thickness of touchplate"
"G1 Z40 F3000 ; Lift off touchplate"
"M0 Remove probe ; Pause and wait for touchplate removal"
";M106 ; This will turn on an IOT relay to start a router or vacuum"
Also, it’s probably a good idea to lookup what each command already in there, is doing. Here’s the pertinent existing code in the header of your Post Processor:
begin HEADER
"; [TP_FILENAME]"
"; Safe Z height: [SAFEZ]"
"; Tools: [TOOLS_USED]"
"; Notes: [FILE_NOTES]"
"; Generated [DATE] [TIME]"
" "
"G90"
"M84 S0"
"M03 [S]"
"G21"
"G00 X0.000 Y0.000 Z0.000"
"G1 [SAFEZ]"
"G1 [XH] [YH] [F]"
" "
"; Tool [T]: [TOOLNAME]"
"; Path: [TOOLPATH_NAME] [PATHNAME]"
"; [TOOLPATH_NOTES]"
In G-Code, a semicolon ( ; ) starts a “comment” which is ignored by the machine.
So, in the above code in your PP, any line that starts with a semicolon ( ; ) right after the double quote mark, is an ignored line that does nothing.
You can add a semicolon at the end of a line and add a comment explaining what the code does. When you look up (Google) each command that’s active in your header, you could add comments so you will always know more easily what that line does.
NOTE: Don’t delete the commented out inactive lines, because they are usually intended to make a comment appear in the rendered G-Code result, to provide helpful info for human eyes.
Nevertheless, when I filter your Header to focus on active lines that are not “commented” out, this is what is left — and I looked up what the function is for the first couple of lines, and added a comment for it:
"G90; specifies absolute positioning, as opposed to relative positioning"
"M84 S0; Disable steppers; S=Inactivity Timeout. If none specified, disable now"
"M03 [S]; Spindle CW / Laser On; [S] seems to be a variable/constant standing in for, most likely, speed"
"G21; specifies metric as opposed to imperial. all moves starting now have their units specified in millimeters (metric units)"
"G00 X0.000 Y0.000 Z0.000; command for rapid movement - seems to be going to 0,0,0"
"G1 [SAFEZ]"
"G1 [XH] [YH] [F]"
Etc.
The crucial part here is figuring where in that header to insert the new code. I’d “guess” that right after that G00. Someone here on the forum who knows more than I could help more.