ESS version 248
Mach 4 Hobby Version 4.2.0.4310
If I do a tool probe or tool change many times I am getting "Error, Y axis commanded over Softmin".
I have been fighting this since I got the probing working. I updated the ESS to what they say works with this version of Mach 4.
One thing I notice is that my Y will say -0.0000. Not sure why it has a minus, but maybe this has something to do with it? I moved my tool setter .005 in from the soft limits to make sure that was not it. I moved the tool change location in also to make sure. No help.
Sometimes after this occurs, then it will also start my tool height check , but never actually move, yet my message window comes up that it is in position, even though it never moved. No moves will occur with the tool height check function, but I can jog the axis around still.
It may also have something to do with a tool change after the tool probe.
What I just did this time was power up mach, ref home everything, initiate a tool height probe sequence, which worked like it should. Then I sent an M6 T6 to change to the next tool, then I get the "Error, Y axis commanded over SoftMin". I am beginning to think this is a bug??
Once this occurs, even if I ref all home again, the Auto Tool Change button will no longer make any moves. When I hit it, it will say it is ready to probe (meaning it should have moved over the tool height setter), but it never moves and does not try to probe even if you say okay. It is like the moves are disabled within the function now for some reason. However, I can still jog around and home etc just fine after this. A tool change will not do anything either once it gets in this state.
.....I just tried again, and it does the same thing after a tool height check and then trying to do a tool change. However this time it did not give me a negative on the Y, but many times it does.
If this is not a bug, maybe something in my Tool Zero probe function is causing it?
-----Auto Tool Zero button------
function AutoToolZero()
local posmode = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_3) --Get the current mode so we can return to it when macro ends
local currenttool = mc.mcToolGetCurrent(inst)
local ToolRadius = mc.mcToolGetData(inst, mc.MTOOL_MILL_RAD, currenttool) --Get the radius of the current tool
--Get positions before moving to do tool change
local valX, rc = mc.mcAxisGetMachinePos(inst, mc.X_AXIS) --Get the position of the X axis in Machine Position
local valY, rc = mc.mcAxisGetMachinePos(inst, mc.Y_AXIS) --Get the position of the Y axis in Machine Position
local valZ, rc = mc.mcAxisGetMachinePos(inst, mc.Z_AXIS) --Get the position of the Z axis in Machine Position
rc = mc.mcCntlGcodeExecuteWait(inst, "M05") --Turns off the spindle (includes decel time)
if (ToolRadius < .4500) then --checks to see if the tool is too big for the touch plate
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0.0000") --Move the Z to Home
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X19.5250 Y14.4445") --Move the the X, Y Coords to to the touch pad location
rc = mc.mcCntlSetLastError(inst, 'Now in Tool Measuring Position')
else
local xValDiamCor = (19.5300 - ToolRadius) -- Tool plate center minus tool radius to hit edge of tool
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0.0000") --Move the Z to Home
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X" .. tonumber(xValDiamCor) .. "Y14.4500") --Move the the X, Y Coords to to the touch pad location minus tool radius
local MyChoice = wx.wxMessageBox("Manually rotate tool so lowest cutting edge is over the center of the touch plate","Click OK to continue once tool area is clear!" , 4)
end
local MyChoice = wx.wxMessageBox("Click Ok to Begin Probing the New Tool","Click OK to continue" , 16)
if (MyChoice == 16) then
rc = mc.mcCntlSetLastError(inst, 'Auto Tool Zero was cancelled.')
mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0.0000 F15.0") --Retract back to Z home
mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X" .. tonumber(valX) .. "Y" .. tonumber(valY)) --Move back to X & Y initial location
return
elseif (MyChoice == 4) then
rc = mc.mcCntlSetLastError(inst, "Probing in Progress!")
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G31.1 Z-8.125 F20.0") --Quick probe to find touch plate, Z distance min for shortest tool to hit
local touchLoc = mc.mcCntlGetPoundVar(inst, mc.SV_PROBE_POS_Z) --Assigns Z Probed position in Machine coords at touch plate
local RetractPoint = touchLoc + .200 --Adds retract distance to touch plate probed point
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 Z" .. tonumber(RetractPoint) .. "F15.0") --Retracts to prepare for slow approach
local approachDist = RetractPoint - .210 --Subtracts retract distance to touch plate probe, slightly more to make sure probe trips
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G31.1 Z" .. tonumber(approachDist) .. "F5.0") --Probe the new tool at slow speed
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0.0000 F20.0") --Retract back to Z home
rc = mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X" .. tonumber(valX) .. "Y" .. tonumber(valY)) --Move back to X & Y initial location
local probedz = mc.mcCntlGetPoundVar(inst, mc.SV_PROBE_POS_Z) -- Z Probe position in Machine coords
mc.mcCntlGcodeExecute(inst, string.format('G ' .. posmode))--return to pre macro mode G90, or G91
local ToolSetterHeight = mc.mcProfileGetDouble(inst , "ProbingSettings", "ToolHeightZ", 0.0000) --Gets the Tool Height Setter Z postion from the probing tab settings
local NewOffset = math.abs (probedz - ToolSetterHeight) --Gives the Absolute value of the probed Z minus the Tool Heigt Setter Z position
mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, currenttool, NewOffset)
mc.mcCntlSetLastError(inst, string.format("Auto tool setting complete, Offset = %.4f", NewOffset))
wx.wxMessageBox("Toolchange Complete.\nTLO Set")
end
end