Did adjust the function, and did a compile succesfully but the function does not work.
I would like to use the axis id and the motor id info to determine which is active Spindle or router.
still not shure what child_id number would be.. Problem with filling in 0 is that there is a motor (x in my case) with number zero...
Any pointers? let me know!
local inst = mc.mcGetInstance()
--z axis = 2
-- A axis =4
--Motor 2 = Z
--Motor 4 = A
function Zspindle()
local AxisZ = mc.mcAxisGetMotorId (0,2,0) --get motor id from axis 2
if AxisZ == 2 then mc.mcCntlGcodeExecute(inst, "G90 G53 X80 Y200 F10000")
else mc.mcCntlGcodeExecute(inst, "G90 G53 X72.1993 Y42.2352 F10000")
end
end
ps: Gcode excecute only for testing purposes...