Sets and gets a reference frame’s Location Object, which typically contains the nominal position and orientation of the frame.
refframe_object.Loc = <Cartesian_location_object>
-or-
…refframe_object.Loc
Prerequisites
None
Parameters
None
Remarks
Most reference frame types have an associated Cartesian Location Object that is pointed to by the Loc property. Typically, the nominal position and orientation of the reference frame is stored in this Location although the specific interpretation of this data is a function of the reference frame type.
The refframe_object.Loc.RefFrame property points to the next reference frame if refframe_object is itself relative to another frame. For conveyor reference frames, Loc is unused and Loc.RefFrame must always be null since conveyor reference frames cannot be relative to another reference frame of any type.
Table 19-73 describes how to interpret the position and orientation data stored in the Cartesian Location Object pointed to by refframe_object.Loc.
RefFrame Type | refframe_object.Loc Contents |
---|---|
Basic |
Contains the reference frame position and orientation. So, refframe_object.Loc.Pos represents the total position of refframe_object and refframe_object.Loc.PosWrtRef is the position and orientation of refframe_object with respect to any subsequent reference frames. If a program wishes to change the position and orientation of a basic frame, it must do so via refframe_object.Loc. However, if a program wishes to read the reference frame position and orientation, it is normally a better practice to use the refframe_object.Pos and refframe_object.PosWrtRef methods. These last two methods will return the current total and relative position for any type of reference frame. |
Pallet |
The XYZ position of the refframe_object.Loc defines the position of row 1, column 1, and layer 1 of the pallet. The orientation of refframe_object.Loc defines the direction of the rows, columns, and layers of the pallet. The X-axis of refframe_object.Loc defines the index direction for a row. The Y-axis defines the index direction for a column. The Z-axis defines the index direction for layers. |
Conveyor |
The Loc property is not used for conveyor reference frames. The "nominal" position for a conveyor reference frame is dynamically extracted from the value stored in the associated conveyor robot module. This permits the direction of travel and nominal position of a conveyor to be taught once, automatically loaded when the controller is restarted, and referenced by multiple conveyor reference frames. The Loc.PosWrtRef must always be NULL since conveyor reference frames cannot be relative to any other reference frame. The refframe_object.Pos and refframe_object.PosWrtRef methods should be used to access the instantaneous and nominal positions of a conveyor reference frame. |
As a convenience, when a new reference frame object is created, a Cartesian Location Object is automatically created and linked to the reference frame. By default, this Location will have its position and orientation angles set to zero.
Examples
Dim ref1 As New RefFrame ' Also allocates Loc
Dim loc1 As New Location
ref1.Loc.XYZ(100,90,-80,0,0,45) ' Define base frame
loc1.RefFrame = ref1 ' Define loc1 wrt ref1
loc1.XYZ(10,0,0,0,180,0) ' Define loc1 poswrtref
Console.Writeline(loc1.Pos.X) ' Displays 107.07
Console.Writeline(loc1.Pos.Y) ' Displays 97.07
Console.Writeline(loc1.Pos.Z) ' Displays -80
See Also
RefFrame Class |refframe_object.Pos|refframe_object.PosWrtRef