Agl Function

Returns the joint angle for the selected rotational joint, or position for the selected linear joint.

Syntax
Agl(jointNumber)

Parameters

jointNumber
Specify the joint number as an integer value. Values are from 1 to the number of joints on the robot. The additional S axis is 8 and T axis is 9.

Return Values
The joint angle for selected rotational joint or position for selected linear joints.

Description
The Agl function is used to get the joint angle for the selected rotational joint or position for the selected linear joint.

If the selected joint is rotational, Agl returns the current angle, as measured from the selected joint's 0 position, in degrees. The returned value is a real number.

If the selected joint is a linear joint, Agl returns the current position, as measured from the selected joint's 0 position, in mm. The returned value is a real number.

If an auxiliary arm is selected with the Arm statement, Agl returns the angle (or position) from the standard arm's 0 pulse position to the selected arm.

See Also
PAgl, Pls, PPls

Agl Function Example
The following examples are done from the command window using the Print instruction.

> print agl(1), agl(2)
 17.234  85.355