31
Mach4 General Discussion / Re: mcAxisGetInfoStruct
« on: June 18, 2018, 08:06:38 PM »mcAxisGetInfoStruct returns a table.
This is how I would get work and machine coords in lua.Code: [Select]local inst = mc.mcGetInstance()
local val, rc = mc.mcAxisGetPos(inst, mc.X_AXIS)
local xInfo, rc = mc.mcAxisGetInfoStruct(inst, mc.X_AXIS)
local xMpos = xInfo.Mpos --Machine position in user units.
unfortunately though, if the machine is not enabled then you get a -16 error saying the AXIS does not exist. I'd prefer to use the structure myself since I get both work and machine coords.