301
Mach4 General Discussion / Re: Probe1, Probe2,Probe3, PMDX411
« on: February 20, 2018, 06:52:01 PM »
Thanks Steve, not the answer I was hoping for but it sure was answered quickly!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
local function myHomeC()
local inst=mc.mcGetInstance()
local rc,sState
local pos=-1
local hSigH=mc.mcSignalGetHandle(inst,mc.ISIG_MOTOR3_HOME)
rc=mc.mcSignalEnable(hSigH,1)
local hSig,rc=mc.mcSignalGetHandle(inst,mc.ISIG_INDEX)
if rc==mc.MERROR_SIGNAL_NOT_FOUND then
wx.wxMessageBox('wrong Signal')
end
sState=mc.mcSignalGetState(hSig)
if sState==1 then -- sitting on the slot so move off it
mc.mcCntlGcodeExecuteWait(inst,'g0 f20000 h15\n')--g1 h366 f5000')
end
mc.mcAxisHome(inst,mc.C_AXIS)
repeat
wx.wxMilliSleep(1000)
rc= mc.mcAxisIsHoming(inst,mc.C_AXIS)
mc.mcCntlSetLastError('Homing: '..tostring(rc))
until rc==0
rc=mc.mcSignalEnable(hSigH,0)
end
myHomeC()