If've added ,16 to the function and get the ok and cancel option, but it aparantly does not matter.
When pushing ok or cancel, it both executes the script. So i have no option to abort when needed.
function ProbeMBZ()
mc.mcCntlSetLastError(inst, "Goto machine bed probe point")
local val = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_14) --PoundVar 4014 coordinates sytem
local msg = "G00 G90 G53 Z-20 A-20\n G59 X0 Y0\nG"..val--Use G59 as workpiece zero for position Return to current fixture
mc.mcCntlGcodeExecute(inst, msg) --Use G59 as workpiece zero for position Return to G54
wx.wxMessageBox("Load the correct tool & lower the bit within 50mm before probing. Attach the MAGNET!!!","Abort if needed",16)
mc.mcCntlSetLastError(inst, "Probing in progress!")
mc.mcCntlGcodeExecuteWait(inst,"G91 G31 Z-50 F200")
--local ToolSet = -12.8 -- Toolset plate difference machine bed / plate
mc.mcAxisSetPos(inst, mc.Z_AXIS, ToolSet)
mc.mcCntlGcodeExecute(inst,"G00 G90 G53 Z-20")
end
if (mc.mcInEditor() == 1) then
ProbeMBZ()
end
Suggestions?
Keef Safe,
David