I assume that you found mc.mcAxisSetSoftlimitEnable in the API? This is not really what you are looking for, but it could at least turn a soft limit on. I was looking for the same thing as you and couldn't find it. What I resorted to was writing a script that checked my offsets to make sure that they were within a specified range that I have set with a wizard. This way you can have the machine set your offset automatically from the touch plate, or be confident that none of your members will set an unacceptable offset. (The retrievesettings() is to get data from the wizard, and the error() is just a function that stops the g code, spindles etc.)
Sorry it's not what you are looking for, but maybe will be some help.
function offsetsafetycheck()
local rc --return code
local inst = mc.mcGetInstance() --Get instance
local offset_x
local offset_y
local offset_z
offset_x, rc = mc.mcCntlGetOffset(inst, 0, 1)
if rc ~= mc.MERROR_NOERROR then
error("error retrieving offset_x")
return nil
end
offset_y, rc = mc.mcCntlGetOffset(inst, 1, 1)
if rc ~= mc.MERROR_NOERROR then
error("error retrieving offset_y")
return nil
end
offset_z, rc = mc.mcCntlGetOffset(inst, 2, 1)
if rc ~= mc.MERROR_NOERROR then
error("error retrieving offset_z")
return nil
end
local probe_max_x_offset
local probe_max_z_offset
probe_max_x_offset, rc = retrievesettings("probe_max_x_offset")
if rc ~= mc.MERROR_NOERROR then
return nil
end
probe_max_z_offset, rc = retrievesettings("probe_max_z_offset")
if rc ~= mc.MERROR_NOERROR then
return nil
end
if math.abs(tonumber(probe_max_x_offset)) > .020 then
error (("Max x offset setting too high! Check gouger settings.\n") .. ("Current max x offset setting: ") .. (probe_max_x_offset))
return nil
end
if math.abs(tonumber(probe_max_z_offset)) > .020 then
error (("Max Z offset setting too high! Check gouger settings.\n") .. ("Current max z offset setting: ") .. (probe_max_z_offset))
return nil
end
if math.abs(tonumber(offset_x)) > math.abs(tonumber(probe_max_x_offset)) then
error (("X offset too large") .. ("\nOffset attempted: ") .. (offset_x) .. ("\n") .. ("Max offset: ") .. (probe_max_x_offset))
return nil
end
if math.abs(tonumber(offset_z)) > math.abs(tonumber(probe_max_z_offset)) then
error (("Z offset too large") .. ("\nOffset attempted: ") .. (offset_z) .. ("\n") .. ("Max offset: ") .. (probe_max_z_offset))
return nil
end
if math.abs(tonumber(offset_y)) ~= 0 then
error (("Y offset too large") .. ("\nOffset attempted: ") .. (offset_y) .. ("\n") .. ("No offset is acceptable for y axis"))
return nil
end
return mc.MERROR_NOERROR
end