Sets and gets the displacement along the Z-axis, in units of millimeters, for the PosWrtRef value of a Cartesian Location Object.
location_object.Z = <new_value>
-or-
...location_object.Z
Prerequisites
The location_object must be a Cartesian Location Object.
Parameters
None
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 three positional degrees-of-freedom and the three 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 converted to 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 property described on this page allows read and write access to one of the six components used to specify the PosWrtRef value of the Cartesian location_object.
Accessing the X, Y, and Z properties is an efficient operation. However, accessing the Yaw, Pitch, and Roll properties requires some computational overhead. Therefore, if you wish to set multiple angles, it is more efficient to utilize the XYZ method.
When a “New” Cartesian Location Object is created, all six components are initially set to 0.
Examples
Dim loc1 As New Location ' Create new Location set to default values
Dim dz As Double
loc1.XYZ(10,20,30,0,180,25) ' Set PosWrtRef value of loc1
dz = loc1.z ' dz will be set to 30
loc1.z += 7 ' loc1's Z value will now be 37
See Also
Location Class | location_object.X |location_object.Y |location_object.Yaw |location_object.Pitch |location_object.Roll |location_object.XYZ