location_object.Here Method

Sets the “total position” of a Location Object equal to the current position and orientation of the Selected robot.

location_object.Here

Prerequisites

A robot must be currently Selected, but need not be Attached.

Parameters

None

Remarks

The Here method provides a very convenient means for defining or updating the “total position” of a location_object by moving the robot to the desired position and then executing this method to record the position and orientation.

This method works properly for both Cartesian and Angles Locations. If the location_object is an Angles type, the values of the location_object’s axes positions are set equal to the current axes positions of the Selected robot. For Cartesian types, the “total position” is set equal to the current Cartesian position and orientation of the Selected robot and its Config properties are updated. If the location_object does not have an associated reference frame, the PosWrtRef is set equal to the current Cartesian location of the robot. If the location_object has a reference frame, the PosWrtRef is set such that the combination of the new PosWrtRef and the reference frame will be equal to the current location of the robot.

While the Here method is similar to assigning a location_object to the value of the Robot.Where() method, it is important to understand the differences. The statement:

location_object = Robot.Where()    ' Works okay

assigns a new block of data to the location_object. While it does save the current robot location in the location_object, the values previously set for ZClearance, ZWorld, and RefFrame are effectively lost. On the other hand, the statement:

location_object.Here                      ' Even better

alters the PosWrtRef and Config values in the location_object with less overhead while still preserving the values for ZClearance,ZWorld, and RefFrame. So, in most situations, the Here method produces the expected results and should be employed instead of an assignment statement with Robot.Where().

Examples

 
Dim loc1 As New Location ' Create new Location set to default values
loc1.Here ' Sets "total position" of loc1 to present
' location of Selected robot.

See Also

Location Class | location_object.Here3 | location_object.Inverse |location_object.Mul | Robot.Selected | Robot.Where | Robot.WhereAngles