This M3 macro will not execute from G-code or MDI. The M3 line in G-Code is just skipped.
-----------------------
function m3()
local inst = mc.mcGetInstance()
local torchHeightInput, rc= scr.GetProperty("torchHeightInput", "Value")
mc.mcCntlSetLastError(inst, "rc code="..rc)
mc.mcCntlSetLastError(inst, "This is the new turning on torch!")
mc.mcCntlGcodeExecuteWait(inst,"m62p1")
end
----------------------
However, this one will:
----------------------
function m3()
local inst = mc.mcGetInstance()
mc.mcCntlSetLastError(inst, "rc code="..rc)
mc.mcCntlSetLastError(inst, "This is the new turning on torch!")
mc.mcCntlGcodeExecuteWait(inst,"m62p1")
end
---------------------
This line is the difference: local torchHeightInput, rc= scr.GetProperty("torchHeightInput", "Value").
I have used this line many time in stand alone macros. I am at a loss.