121
Mach4 General Discussion / Re: Mach4 Homing and Machine Coordinates
« on: July 16, 2021, 07:02:49 AM »
Can you post a screenshot of your homing/soft limits tab in the config screen?
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.
FeedHoldTimerPanel = wx.wxPanel (wx.NULL, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxSize( 0,0 ) )
FeedHoldTimer = wx.wxTimer(FeedHoldTimerPanel)
FeedHoldTimerPanel:Connect(wx.wxEVT_TIMER,
function (event)
local inst = mc.mcGetInstance()
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5) --SET OUTPUT NUMBER
local sSig = mc.mcSignalGetState(hSig)
if sSig == mc.MC_ON then
mc.mcSignalSetState(hSig, mc.MC_OFF)
else
mc.mcSignalSetState(hSig, mc.MC_ON)
end
end)
[mc.OSIG_FEEDHOLD] = function (state)
--Use mach controlled feed hold output to activate the feed hold LED
local inst = mc.mcGetInstance()
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5) --SET OUTPUT NUMBER
if( state == 1) then
mc.mcSignalSetState(hSig, mc.MC_ON)
else
mc.mcSignalSetState(hSig, mc.MC_OFF)
end
end,
[mc.OSIG_TOOL_CHANGE] = function (state)
local inst = mc.mcGetInstance()
if( state == 1) then
--Start timer to flash feed hold LED 500ms interval
FeedHoldTimer:Start(500, false)
else
--Stop timer and turn off feed hold LED in case it's still on.
FeedHoldTimer:Stop()
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5) --SET OUTPUT NUMBER
mc.mcSignalSetState(hSig, mc.MC_OFF)
end
end