I am trying to get my code for Laser Zero working properly I have it so it turn the output on/off (will have a Laser on button that's easy) then move to require position. 
then what I would like is for it to zero out the axis`s it does not do it in the correct order it zero`s the axis first before the required move. 
I am using
mc.mcAxisSetPos(inst, 0, 0.000)
mc.mcAxisSetPos(inst, 1, 0.000)
to zero the axis`s
this is the code 
--Laser Zero
local inst = mc.mcGetInstance();  --Get the instance of the controller
local out5= mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5);  --Get the out5 handle 
local outstate = mc.mcSignalGetState(out5); --Output TOGGLE
   if (outstate == 1) then
       mc.mcSignalSetState(out5, false);
     else
       mc.mcSignalSetState(out5, true);
    end
local inst = 0; 
local rc = 0;
local Xmove = "X2";
local Ymove = "Y3";
    rc = mc.mcCntlGcodeExecute(inst, "G91 G0 \n" .. Xmove .. " G91 G0 \n" .. Ymove);
    mc.mcAxisSetPos(inst, 0, 0.000)
    mc.mcAxisSetPos(inst, 1, 0.000)
if (mc.mcInEditor() == 1) then
end
can some one point me to what I should use or what am I doing wrong
thank
pain in the a