DESTEXJ
(Statement)

Gets the target position of an extended-joint invoked by the current motion command into a floating-point variable. If the robot is on halt, this command will get the current position (commanded value).

DESTEXJ(<JntNumber>)

DESTEXJ reads the target position of an extended-joint invoked by the current motion command and specified by <JntNumber> into a floating-point variable.
To get a position detected by the encoder of an individual joint, use a CUREXJ command.

If a robot motion is stopped by entering Stop motion command (Refer to INTERRUPT ON/OFF stated later), the DESTEXJ will get the joint angle where the motion is stopped.
Example
INTERRUPT ON
|
|
DRIVEA(7,100)
|
'Interrupt signal turns ON during motion.
'The 7th joint stops and the process advances
'to the next command.
|
INTERRUPT OFF
|
|
F1=DESTEXJ(7)
|
'The value of F1 will not be 100 but the value
'of the angle where the joint stopped.
|

PROGRAM PRO1
|
|
DIM lf1 AS SINGLE
|
|
TAKEARM 1
|
|
DRIVEA (7,100),NEXT
|
'Move 7th joint to an angle of 100 degrees.
'NEXT advances the process to the next command
'before the motion is completed.
|
lf1 = DESTEXJ(7)
|
'Assign target angle 100 of previously
'commanded motion into lf1.
|
END
|
|