Hi
I recently updated from Mach4 4.2.0-2914 to 4.2.0-3233 and discovered that my manual tool change macro does no longer work.
The macro looks like this:
function m6()
local inst = mc.mcGetInstance()
local selectedTool = mc.mcToolGetSelected(inst)
local selectedToolDescription = string.format("%d: %s", selectedTool, mc.mcToolGetDesc(inst, selectedTool))
local currentTool = mc.mcToolGetCurrent(inst)
local currentToolDescription = string.format("%d: %s", currentTool, mc.mcToolGetDesc(inst, currentTool))
if selectedTool == currentTool then
mc.mcCntlSetLastError(inst, string.format("Current tool \"%s\" is selected tool, no change required", currentToolDescription))
else
mc.mcCntlSetLastError(inst, string.format("Please insert tool \"%s\" and hit cycle start", selectedToolDescription))
mc.mcCntlToolChangeManual(inst, true)
mc.mcToolSetCurrent(inst, selectedTool)
mc.mcCntlGcodeExecuteWait(inst, string.format("G43 H%d", selectedTool))
end
end
if (mc.mcInEditor == 1) then
m6()
end
In Mach4 3233 this macro does no longer work. Symptoms are that the on the first tool change after program start always the selected tool is the current tool. On subsequent tool changes I always need to issue the tool chance to have to right tool set.
Does anybody has an idea what might be the problem?
Thanks in advance
Mark