I finally was able to aquire a manual for the INVERSE and FORWARD functions, but I had a couple questions.
First, for the Inverse function, if an error code of 1 is returned, it means there are "software limit switches violated with the specified axis angles," and if an error code of 3 is returned, "there are axis angles with which the Cartesian end position can be reached, but the specified Turn would result in a software limit switch being violated." Is the only difference that 3 implies there are values that don't trigger software limits?
Secondly, if error code 3 is returned, how can I find the better axis angles that it tells me should exist?
Lastly, when trying to ensure an E6POS point a reachable, I've been doing inverse(myPoint, errReturnValue), and if no error is returned I've been moving to that point. Otherwise, I've been setting a temporary FRAME variable to my E6POS point (to strip away status and turn), then doing inverse on that, and lastly calling forward on that value, returning that final E6POS value if no error is thrown.
Assuming i is an int, myFrame is a FRAME, tempAxis is an E6AXIS structure, and myPoint and newPoint are E6POS positions, my code looks like this:
i = 0
tempAxis = inverse(myPoint, $AXIS_ACT, i)
IF i == 0 THEN
; myPoint is good
ELSE
i = 0
myFrame = myPos
tempAxis = inverse(myFrame, $AXIS_ACT, i)
IF i == 0 THEN
newPoint = forward(tempAxis, i)
IF i == 0 THEN
; newPoint is good
ELSE
; bad point
ENDIF
ENDIF
ENDIF
I believe that this finds status and turn values that allow the robot to reach myPoint, and after a bit of testing I think it works (though I may have a program in which myPoint is always good and I never need to try to find newPoint -- in fact, I think this is exactly the case), but I'm really not sure what exactly happens when I take that data away and then call inverse and forward on that ambiguous data. If anyone has any comments or an explanation of why this does (or does not) work, or possibly a better algorithm, I would love to hear it!