OK the MDI did the same thing so I did some testing with GcodeExecuteWait . It should run as teh Gcode line stated BUT it did NOT.
The Message(M222) Displayed fiirst
The X started moving to X10 and at the same time the Message (M222 Completed) was displayed
The X continued to X10 then Pause for 3 sec then returned to X0
So did something get OUT of sequence

or not It shoudl not have dispalyed the last message UNTIL the Gcode was done correct??
With some testing earlier it did the same thing it had 6 lines of Gcode to do using GcodeExecuteWAIT and it processed it all OUT of order it ran the 2,4,6 then it ran the 5,3,1 lines.
So far I have tried 4 PCs here and none have been able to run code that Steve and Craig can run fine without problems. SO I do not know , untill something changes I'll just wait to see what happens. I am Dead in the water. I can can run everything else but the LUA scripting side of mach4.
I am as happy as a a pig with a new slop trough full of PIZZA with the Gcode side of MACH4. Even more so when all the #VARs get brought out so I can use them. Well maybe if we get "AND, OR ,XOR " included in the conditional side(;-).
(;-) TP
(;-) TP
function m222()
local inst = mc.mcGetInstance();
mc.mcCntlSetLastError(inst, "m222");
local rc, DebugStopVar = 0;
mc.mcCntlGcodeExecuteWait(inst, "G1 X10 F30 \n G4p5 \n G0X0");--call the m3 macro from within this m700 macro
DebugStopVar = 1;
--mc.mcCntlGcodeExecuteWait(inst, "G0 x10");
mc.mcCntlSetLastError(inst, "M222 Completed " );
end
if (mc.mcInEditor() == 1) then
m222()
end