Before starting, or after completing a job on the CNC, it is useful to pass over the table with the vacuum extractor to remove any sawdust or debris.
To automate this task, I hacked the Gcode of a machining operation. I made a model of my spoil board in fusion360, created a faux facing tool with a diameter of 80mm which was to stand in for the vacuum. The facing operation parameters were set with 50% stepover.
The feedrate was cranked up to 10,000 mm/min and the speed of the spindle dropped way down to 5 RPM. 5 RPM was the lowest the software would allow the operation to be generated.
The code was generated and then with a bit of experimentation, edited to meet my needs. I have shown the generated code below as outputed from Fusion360 with deletions shown in (brackets) and additions shown in bold.
(2018-09-22 VACUUM 2400X1200) (2018-09-22 VACUUM 2400X1200) (T80 D=60. CR=0. - ZMIN=10. - FLAT END MILL) G90 G94 G91.1 G40 G49 G17 G21 G28 G91 Z0. G90 (FACE4) M5 M9 T80 M6 G10 L2 P5 X70 Y45 Z-95 G58 (S5 M3) (G54) M8 G0 X2459. Y28.471 G43 Z16. (H80) G18 G3 X2453. Z10. I-6. K0. F10000 ... G3 Y1185.9 I0. J28.936 G1 X0. G18 G3 X-6. Z16. I0. K6. F3100. G17 M9 G28 G91 Z0. G90 G28 G91 X0. Y0. G90 M30
I wanted the vacuum operation to work directly form the absolute co-ordinates without the need to manually set the WCS prior to running the operation. I also wanted to guard against the WCS being accidentily overriden manually so the WCS is set and declared within the GCODE with the lines
G10 L2 P5 X70 Y45 Z-95 G58
As we dont need the spindle running for this operation, the lines below were deleted.
G54 can be deleted as we are using the G58 offset.
To wrap it up, I added a button on the default Mach3 screen that would automatically open and load the vacuum gcode. The button script was as follows.
'Load the vacuum file LoadFile("C:\Mach3\GCode\Vacuum 2400x1200.tap") 'Now run it RunFile()