Robot.Where Property

Returns a Cartesian Location whose value is equal to the current position and orientation of a robot.

...Robot.Where ( robot )

Prerequisites

None

Parameters

robot

An optional numeric expression that specifies the robot to be accessed (1-n).  If this value is 0 or unspecified, the Selected robot will be accessed.

Remarks

This property returns the current position and orientation of a robot in a Cartesian Location.  This position and orientation automatically take into account both the robot's Base and Tool offsets.

The returned value is computed by reading the instantaneous values of each motor's encoder and converting these values into an equivalent Cartesian position and orientation.  These sampled values are usually slightly different than the commanded axes set point positions due to servo tracking errors and small positional errors. 

The conversion to Cartesian coordinates make use of the optional Kinematic module for the selected robot.

Note, if you wish to update the position and orientation of a Location variable, it is often better to utilize the location_object.Here method rather than simply assigning the Where Location to the variable.  The Here method preserves the other properties of the Location variable and will automatically take into account any reference frame (RefFrame).

Table 19-88 describes the data returned in the Location value.

Table 19-88: Where Property, Location Value

Property Returned Location Object value

Type

Cartesian Location

PosWrtRef

Set equal to current Cartesian position and orientation of a robot.

RefFrame

Always Null

Config

Configuration bits for the current robot position and orientation.

ZClearance

1.0e32 to indicate not initialized

All other properties

Always zeroed.

Examples

Dim RobotPos  As Location 
RobotPos = Robot.Where() ' Where is the robot right now?

See Also

Robot Class | Robot.SpeedAngles| Robot.WhereAngles |location_object.Here