right this lua is a pita
what I think I need to do is use this
function GetRegister(regname)
local inst = mc.mcGetInstance()
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname))
return mc.mcRegGetValueString(hreg)
end
and have it like this
function GetRegister(TS_XPos)
local inst = mc.mcGetInstance()
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s, TS_XPos",10))
end
function GetRegister(TS_YPos)
local inst = mc.mcGetInstance()
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s, TS_Pos",10))
so on
then end with this
return mc.mcRegGetValueString(hreg)
end
it compiles and runs and debugs with no problem
then at top of m1005 put in path to it or not
but when I run m1005 it compiles but does not run as it cant find the Register`s
I have put them in as iregs and gregs that did fa I could find and read them using one of Scott examples this one Quicky Wizard and/or Macro variable value viewer function.
the thing I am getting stuck on is m1005 finding them I meant to put them in a use macro or module.
with what I have put in here how wrong am I
also Scott is there something you or ya bro have posted that is the correct way of doing just pointers please, if I can`t work this out by the end of the week I might ask for the answer
for the time being I will just use the macro b to do tool height probing it works but I would rather use the code in the manual it`s a bit safer
and i will be doing the first cut with M4 Friday or monday just got to fix a bobo