Easy way to Vacuum the table

Hello All,

Here is a copy of my script to vacuum my mill top. I have a larger table so my table is x=110 and y=63 inches. You will need to adjust the X and Y numbers for you mill size.

Add a button to the Mach4 screen and add this script.

-- ======================================
-- |   Vacuum the table surface
-- |   By Jim Anderson
-- |   July 10 2016
-- |   ---------------------------------------------
-- |   This program will vacuum the top of the table
-- |
-- ==========================================
-- -------------------------------------------------
function GCodeExecute(GCodeString)
  local inst = mc.mcGetInstance()
	local rc = mc.mcCntlGcodeExecuteWait(inst, GCodeString)
	if rc ~= mc.MERROR_NOERROR then
		return "GCode failed", false
  end -- if end
end -- function end
-- -------------------------------------------------
function TableVac()
  local inst = mc.mcGetInstance()
  GCodeExecute("G00 G53 Z0.0") -- Move the Spindle to the Top
  GCodeExecute("G00 G53 X2.5 Y82.0") -- Move to the operator location
  mc.mcCntlSetLastError(inst, "Starting Table Vacuum") -- Log Message
  local MyChoice1 = wx.wxMessageBox("Did you remove the tool from the spindle?\nClick OK to continue", "Are You Sure?",  16) 
  if (MyChoice1 == 16) then -- 16 is a cancel
    return  -- exit out
  elseif (MyChoice1 == 4) then 	   
    local MyChoice2 = wx.wxMessageBox("Did you zero Z axis for the Brush for top of table?\nClick OK to continue", "Are You Sure?",  16) 
    if (MyChoice2 == 16) then -- 16 is a cancel
      return  -- exit out
    elseif (MyChoice2 == 4) then 	
      GCodeExecute("M08")   -- Dust Collector On
      GCodeExecute("G00 G53 X11.5 Y2.0")
      GCodeExecute("G01 Z0.0 F50.0")
      GCodeExecute("G00 G53 X11.5 Y61.0")
      GCodeExecute("G00 G53 X18.0 Y61.0")
      GCodeExecute("G00 G53 X18.0 Y2.0")
      GCodeExecute("G00 G53 X27.0 Y2.0")
      GCodeExecute("G00 G53 X27.0 Y61.0")
      GCodeExecute("G00 G53 X36.0 Y61.0")
      GCodeExecute("G00 G53 X36.0 Y2.0")
      GCodeExecute("G00 G53 X45.0 Y2.0")
      GCodeExecute("G00 G53 X45.0 Y61.0")
      GCodeExecute("G00 G53 X54.0 Y61.0")
      GCodeExecute("G00 G53 X54.0 Y2.0")
      GCodeExecute("G00 G53 X63.0 Y2.0")
      GCodeExecute("G00 G53 X63.0 Y61.0")
      GCodeExecute("G00 G53 X72.0 Y61.0")
      GCodeExecute("G00 G53 X72.0 Y2.0")
      GCodeExecute("G00 G53 X81.0 Y2.0")
      GCodeExecute("G00 G53 X81.0 Y61.0")
      GCodeExecute("G00 G53 X90.0 Y61.0")
      GCodeExecute("G00 G53 X90.0 Y2.0")	
      GCodeExecute("G00 G53 X99.0 Y2.0")
      GCodeExecute("G00 G53 X99.0 Y61.0")
      GCodeExecute("G00 G53 X104.5 Y61.0")
      GCodeExecute("G00 G53 X104.5 Y2.0")
      GCodeExecute("G00 G53 Z0.0")
      GCodeExecute("M09")  -- Dust Collector Off
      GCodeExecute("G00 G53 X104.5 Y28.0") -- My park location
      mc.mcCntlSetLastError(inst, "TableVac Done") -- Log Message
    end -- if end MyChoice2
  end -- if end MyChoice1
end -- function end
-- ========== End ===========
TableVac()

Happy Milling

What you’ve done isn’t lazy, its SMART!

1 Like

Thanks! But I just open the garage door, pull out the leaf blower and blast all the sawdust / shavings out the door into the driveway! Lol. Works great and its fast!

2 Likes