I finally managed to get some time in the shop this afternoon to finish up the Post Processor modification.
The GCode program output by the Post works fine on my machine. The X,Y & Z locations are based on my XXL table and the height of my probe. I tried this out as a standalone gcode file run using UGS Platform before moving it inside the Post and it worked fine. By making it a part of the post, each program written will automatically have all the coding it needs built-in rather than pausing and running macros.
I use Vectric’s VCarve Destop software. Vectric lists 242 different Posts to choose from. If you use other software you may have to use one similar.
This is not a macro. I couldn’t find a way to get a macro of this length into UGS, ergo the Post route. The code is inserted into the Shapeoko_inch_TC.pp Post Processor found in the MyPost folder. If you use VCarve and don’t have that one listed when you go to save the GCode program, you need to copy if from the PostP folder into the MyPost folder.
I opened the Post using Notepad and scrolled down to the section shown below.
+ Commands output for tool change
Removed the “M6 T[T]”
Then inserted my lines of coding in it’s place.
*** CAUTION ***: All instructions to be placed within the Post must be enclosed “within” quotation marks!
Then I saved the Post back to the MyPost folder. I went back into VCarve Desktop. Loaded the small two-tool test program that cuts a 1/4" x 2" and a 1/8" x 2" profile, one under the other. I then saved the GCode file using the modified Post.
After manually zeroing the workpiece XYZ to begin, the program cuts the first profile with the 1/4" tool then it runs into my code… Posting doesn’t seem to allow tabs, so reading this might be a little rough.
“G21” ; I work in inches, so Switch to Millimeters
“G0Z25”; Raise the bit and move to my
“G0G53X-700Y-830”; Tool Change Location hanging over the front rail
“M00”; and Pause. Change the tool and click continue.
'G0G53X-739Y-676"; The bit is moved to my probe location and pauses
'M00"; I place and connect the probe and click continue.
“G91G38.2Z-12.7F25.4”; The probe operation executes. My probe height
“G10L20Z19.30”; of 19.30 mm is made the Z height.
“G0Z5”; The bit is raised from the probe 5mm.
“M00”; Then a pause to remove the probe. Click continue.
“G90G0X0Y0Z0”; The bit is sent back to XYZ Zero.
“G20”; Switch back to “Inches” and the code for the second
profile line continues to the end.
This is my first shot at GCoding, so if you decide to give this idea a shot, please be careful. During testing, I manually inserted M00 commands like a Salt & Pepper shaker. Proceed a few lines, pause, proceed one line, pause… checking the GCode against what the machine was doing.
Anyway… over the next couple days, I’m going to sit down at the machine again and begin looking to see if I’ve made sure I’ve lifted the bit high enough for the various rapid moves in future programs etc.
Hope this helps. Please feel free to let me know if you see ways that it can be improved.
EDIT: Adding full GCode output file. Caution-- Do not run as-is on your machine.