Adept s650H Quattro User Manual
Page 80
Chapter 5 - System Operation
80
Adept Quattro s650 Robot User’s Guide, Rev B
The following is a sample program that accomplishes this:
.PROGRAM q_move(target.loc)
; ABSTRACT: Move to the specified destination location, performing
;
an intermediate motion if necessary because the destination
;
rotation is "close to zero" and on the "other side" of the
;
range of rotation.
;
; INPUT:
target.loc Transformation defining the destination
;
; OUTPUTS:
None
;_______________________________________________________________________
AUTO loc1[6], loc2[6], small
small = 0.1
;Criterion for "close to 0"
; If the destination can be reached, consider whether or not an
; intermediate motion is needed.
IF INRANGE(target.loc) THEN
DECOMPOSE loc1[1] = HERE
;Components of HERE
DECOMPOSE loc2[1] = target.loc
;Components of destination
; If the destination rotation is very close to zero degrees,
; and it's on the "other side" of the range of rotation from
; the starting rotation, move to the center of the range of
; rotation. (Two IFs are used to improve efficiency.)
IF ABS(loc2[6]) <= small THEN
IF SIGN(loc2[6]) <> SIGN(loc1[6]) THEN
MOVES TRANS(loc2[1],loc2[2],loc2[3],loc2[4],loc2[5],180)
END
END
END
; Move to the final destination (which will fail if the location
; cannot be reached).
MOVES target.loc
RETURN
.END
A second, more complicated example follows. The intent of this example is to perform the
tool rotation during the move, leading to a smoother motion.