This thread collects reports about arithmetic errors after reading the current TCP position in Lua.

Status

Partial checklist. The checks below come from community reports.

Symptoms

  • The position is read into variables such as x, y, z, rx, ry, rz.
  • A simple calculation on the first value, such as adding 100 to x, returns an error.

Known checks

  • Confirm the variable really has a value. If it is nil, the calculation will fail.
  • Check the function name in the manual for your version. Users spell it in different ways, so copy it exactly.
  • Check the type before the calculation. Users report that a check like this keeps the validator from stopping on the line.
local x, y, z, rx, ry, rz = GetActualTCPPose()
if type(x) == "number" then
  x = x + 100
end

Please reply with

  • Software version
  • Exact error text and line
  • Whether it happens in a main or background program