851
Mach4 General Discussion / Re: need some lua help
« on: May 07, 2015, 12:17:20 AM »
do i need to put in a address for this
unction m1005()
--local macroname = "m1005"
function GetRegister(regname)
local rc;
local inst = mc.mcGetInstance();
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname));
return mc.mcRegGetValueString(hreg);
end
local TS_XPosVal = tostring(GetRegister("TS_XPos"));
local YPosVal = tostring(GetRegister("TS_YPos"));
local TypeVal = tostring(GetRegister("TS_Type"));
local TouchPosVal = tostring(GetRegister("TS_TouchPos"));
local ProbeHVal = tostring(GetRegister("TS_ProbeH"));
local RetractLVal = tostring(GetRegister("TS_RetractL"));
local DefaultVal = tostring(GetRegister("TS_DefaultL"));
--regval = GetRegister("TS_Type");
--wx.wxMessageBox(regval);
end
if (mc.mcInEditor() == 1) then
m1005();
end
so the tool height probing macro can find it what is m1005 from the manual
unction m1005()
--local macroname = "m1005"
function GetRegister(regname)
local rc;
local inst = mc.mcGetInstance();
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname));
return mc.mcRegGetValueString(hreg);
end
local TS_XPosVal = tostring(GetRegister("TS_XPos"));
local YPosVal = tostring(GetRegister("TS_YPos"));
local TypeVal = tostring(GetRegister("TS_Type"));
local TouchPosVal = tostring(GetRegister("TS_TouchPos"));
local ProbeHVal = tostring(GetRegister("TS_ProbeH"));
local RetractLVal = tostring(GetRegister("TS_RetractL"));
local DefaultVal = tostring(GetRegister("TS_DefaultL"));
--regval = GetRegister("TS_Type");
--wx.wxMessageBox(regval);
end
if (mc.mcInEditor() == 1) then
m1005();
end
so the tool height probing macro can find it what is m1005 from the manual