Changes all six components of the PosWrtRef value of a Cartesian Location Object to a specified set of values.
location_object.XYZ(x,y,z,yaw,pitch.roll)
Prerequisites
None
Parameters
x
An optional numeric expression that specifies the X-axis displacement. If this value is not specified, a default value of 0 is assumed.
y
An optional numeric expression that specifies the Y-axis displacement. If this value is not specified, a default value of 0 is assumed.
z
An optional numeric expression that specifies the Z-axis displacement. If this value is not specified, a default value of 0 is assumed.
yaw
An optional numeric expression that specifies the Yaw angle rotation. If this value is not specified, a default value of 0 is assumed.
pitch
An optional numeric expression that specifies the Pitch angle rotation. If this value is not specified, a default value of 0 is assumed.
roll
An optional numeric expression that specifies the Roll angle rotation. If this value is not specified, a default value of 0 is assumed.
Remarks
Internally, the PosWrtRef value of a Cartesian Location Object is stored as a sparse 4 by 4 matrix called a “homogeneous transformation”. This matrix represents the 3 positional degrees-of-freedom and the 3 rotational degrees-of-freedom needed to fully specify a robot or part position and orientation in Cartesian coordinates. This internal representation has several computational advantages. However, entering the values for the elements of a homogeneous transformation is not very convenient. To simplify data entry, transformation values are entered as X, Y, and Z position displacement components and three Euler angles. The three Euler angles consist of a rotation about the Z-axis, followed by a rotation about the new Y-axis, followed by a rotation about the new Z-axis. This set of displacements and angles is often referred to as X, Y, Z, Yaw, Pitch, and Roll.
The XYZ method sets all six Cartesian components of the location_object’s PosWrtRef value in a single operation. Any unspecified values are set to 0. This operation is much more efficient than using the X, Y, Z, Yaw, Pitch, and Roll properties to individually set the component values. As a convenience, independent of the initial Type of the location_object, at the conclusion of this operation, the Type will be set to indicate it is a Cartesian Location Object.
Examples
Dim loc1 As New Location ' Create new Location set to default values
Dim dy As Double
loc1.XYZ(10,20,30,0,180,25) ' Set PosWrtRef value of loc1
dy = loc1.Y ' dy will be set to 20
loc1.Y += 7 ' loc1's Y value will now be 27
See Also
Location Class | location_object.X |location_object.Y |location_object.Z |location_object.Yaw |location_object.Pitch |location_object.Roll |location_object.XYZInc | Location.XYZValue