Craig, thanks for the mental labor on this. You certainly made a few things make a little more sense with the layout of the software. The bit about the 'superscript' being a compiled output of multiple scripts made some loosely connected puzzle pieces click together.
Among some other issues I've been working on, I still hadn't been able to get a script/Mcode/MDI triggered homing sequence fully operational. It works great in the Lua editor, but when tried in the Mach4 GUI in any manner it just doesn't work. Visual Basic debugger pointed at Mach4 shows:
Exception thrown at 0x7506B832 in Mach4GUI.exe: Microsoft C++ exception: std::out_of_range at memory location 0x189AE36C.
Exception thrown at 0x7506B832 in Mach4GUI.exe: Microsoft C++ exception: std::bad_typeid at memory location 0x189AC6DC.
when I attempt to call the function. The code for the function is as such:
function m155()
local mInst=0;
local X_AXIS=0;
local Y_AXIS=1;
local HOMED_POS=0;
mc.mcAxisDerefAll(mInst);
mc.mcAxisHome(mInst, X_AXIS);
mc.mcAxisHome(mInst, Y_AXIS);
mc.mcAxisSetMachinePos(mInst, X_AXIS, HOMED_POS);
mc.mcAxisSetMachinePos(mInst, Y_AXIS, HOMED_POS);
mc.mcAxisSetPos(mInst, X_AXIS, HOMED_POS);
mc.mcAxisSetPos(mInst, Y_AXIS, HOMED_POS);
end
I didn't use refAllHome due to a post from PMDX mentioning that sequence of events, though not entirely relevant to my situation; refAllHome shoots out the same error anyhow.
http://www.machsupport.com/forum/index.php/topic,33545.msg232937.html#msg232937The logs from the above Lua script and of a normal refAllHome and profile are attached, if you/anyone is interested into digging into it for clues.