1971
Mach4 General Discussion / Re: MACH4 Mcode testing
« on: May 27, 2014, 06:30:37 PM »
Ok simple step by step test, Here is the Mcode to run a SUB via M98..
The Mcode Runs AND the SUB(o5555) loads in Mach4 BUT it does not know to Cycle Start the sub to run. It just STOPS there and the Mcode ends (no error) IT does run teh last sequence of the Gocde line as it places the comment (StartMacro) in the comment line. BUT it does not finish the next sequence in the Mcode.
Could the Mcode be fixed to RUN the SUB and then finish out the Mcode code? If so "THAT" would be the CAT's MEOW
function m222()
local inst = mc.mcGetInstance();
mc.mcCntlSetLastError(inst, "m101");
mc.mcCntlGcodeExecuteWait(inst, "M98 P5555 L1 \n (StartMacro) ");
mc.mcCntlSetLastError(inst, "M222 Completed " );
end
if (mc.mcInEditor() == 1) then
m222()
end
The Mcode Runs AND the SUB(o5555) loads in Mach4 BUT it does not know to Cycle Start the sub to run. It just STOPS there and the Mcode ends (no error) IT does run teh last sequence of the Gocde line as it places the comment (StartMacro) in the comment line. BUT it does not finish the next sequence in the Mcode.
Could the Mcode be fixed to RUN the SUB and then finish out the Mcode code? If so "THAT" would be the CAT's MEOW
function m222()
local inst = mc.mcGetInstance();
mc.mcCntlSetLastError(inst, "m101");
mc.mcCntlGcodeExecuteWait(inst, "M98 P5555 L1 \n (StartMacro) ");
mc.mcCntlSetLastError(inst, "M222 Completed " );
end
if (mc.mcInEditor() == 1) then
m222()
end