681
Mach4 Videos / Creating an M6 Toolchange in Mach4 (Part 1)
« on: October 06, 2015, 06:09:49 PM »
This is part 1 of creating my own M6 Toolchange in mach4
https://youtu.be/m1eMEec0N-E
The Code so far in this part
DazTheGas
https://youtu.be/m1eMEec0N-E
The Code so far in this part
Code: [Select]
function M6()
local inst = mc.mcGetInstance();
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)
if selectedtool == currenttool then
return
mc.mcCntlSetLastError(inst, "ToolChange Activated but Not Required")
else
mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0")
mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 X260 Y50")
local changetoo = mc.mcToolGetDesc(inst,selectedtool)
wx.wxMessageBox("Please change to tool number "..selectedtool.." "..changetoo.." and press ok to continue")
wx.wxMessageBox('Toolchange finished')
end
end
if (mc.mcInEditor() == 1) then
M6()
end
DazTheGas