Hi,
I am using 3804 and without that difficulty.
Do you wish to raise a Support Ticket with NFS or do you want to try to understand and fix it yourself?
The diagnostic error message narrows down where you have to look.
Open the Zero Brane Editor and navigate to the Mach4Hobby\Modules\mcTouchOff.lua.
This is the code that occurs at line 911 through 915:
UI.frameMain:Connect( wx.wxEVT_UPDATE_UI, function(event)
frameMainOnUpdateUI()
event:Skip()
end )
So exactly as the diagnostic suggests the error occurs in the function frameMainOnUpdateUI().
That function is defined in lines 1158 through 1188 and I have copied it here:
function frameMainOnUpdateUI()
mcState, rc = mc.mcCntlGetState(inst)
if (co ~= nil) and (mcState == 0) then
local state = coroutine.status(co)
if state == "suspended" then --We are about to run some more code so check to see if we have to check the probe state
local IsOk = true;
if ( m_CheckProbe == true) then --The probe should be active at the end of the move
IsOk = CheckProbe(1)
else
IsOk = CheckProbe(0) --The probe should NOT be active at the end of the move
end
if ( IsOk == false ) then --If the check failed lets kill the Coroutine
co = nil
IsOk = true
else
coerrorcheck, rc, m_CheckProbe = coroutine.resume(co)
if(coerrorcheck == false) then --Something happened here to the coroutine so kill it
co = nil
end
if(rc < 0) then --Something happened in the Gcode and we have an error So Kill the coroutine
co = nil
end
end
end
if state == "dead" then --Kill the coroutine
co = nil
end
end
The line that faults, 1178, is copied here:
if(rc < 0) then --Something happened in the Gcode and we have an error So Kill the coroutine
The error message ':attempt to compare nil with numberstack ' tells me that it looks like the variable rc is nil, ergo comparing
a nil with a number results in an error. Reading the few lines previous to find the current vale of rc:
coerrorcheck, rc, m_CheckProbe = coroutine.resume(co)
if(coerrorcheck == false) then --Something happened here to the coroutine so kill it
co = nil
end
if(rc < 0) then --Something happened in the Gcode and we have an error So Kill the coroutine
Thus rc is assigned a value when this expression is evaluated:
coerrorcheck, rc, m_CheckProbe = coroutine.resume(co)
What I would like to suggest is to put a wxMessageBox diagnostic report statement immediately after the faulty expression
to establish if the assignment of rc is indeed of type nil.
I would therefore edit the mcTouchOff.lua file with this statement:
wx.wxMessageBox(" rc="..tostring(rc))
immediately after line 1178.
Run the code and see if the wxMessageBox indicates the value of rc, whether it be nil or otherwise.
This would not solve the problem but it would give you a way of digging in to find out why.
Craig