1
Mach4 General Discussion / Re: Mach4 freezes while executing mcCntlGcodeExecuteWait
« on: October 20, 2016, 03:34:02 AM »
I have just tried to do it as Macro script and there is no problem with freezing...
Denis
Denis
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
--Measure
inst = mc.mcGetInstance()
local rc
function GCodeExecute(GCode)
local rc = mc.mcCntlGcodeExecuteWait(inst, GCode)
if rc ~= mc.MERROR_NOERROR then
return 'Error', false
else
return 'OK', true
end
end
local a, b
a, b = GCodeExecute('G0 G53 Z0 X-200 Y-300')
if b == true then
mc.mcCntlSetLastError(inst, 'test move.')
else
mc.mcCntlSetLastError(inst, a)
end