flex_load_spherical_arc |
Load Spherical Arc
Usage
status = flex_load_spherical_arc(u8 boardID, u8 vectorSpace, u32 radius, f64 planePitch, f64 planeYaw, f64 startAngle, f64 travelAngle, u8 inputVector);
Purpose
Loads parameters for making a spherical arc move in a 3D vector space.
Tip Refer to the Remarks section for information about how the behavior of this function differs between controllers. |
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
vectorSpace | u8 | vector space to control |
radius | u32 | arc radius in counts or steps |
planePitch | f64 | angle between the x' and x axes when the entire x'y'z' vector space is rotated around the y axis |
planeYaw | f64 | angle between the x' and x axes when the entire x'y'z' vector space is rotated around the z axis |
startAngle | f64 | starting angle for the arc move in the x'y' plane in degrees |
travelAngle | f64 | travel angle for the arc move in the x'y' plane in degrees |
inputVector | u8 | source of the data for this function |
Parameter Discussion
vectorSpace is the vector space to control. Valid values are NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15. On motion controllers that support fewer than thirty axes, configuring non-existent vector spaces returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Vector Spaces for vector space resource IDs.
radius is the arc radius in counts (servo axes) or steps (stepper axes).
planePitch is the double precision floating point value, in degrees, of the angle between the x' and x axes when the entire x'y'z' vector space is rotated around the y axis. The y' axis remains aligned with the y axis. When planePitch equals 90°, the positive x' axis is aligned with the negative z axis.
planeYaw is the double precision floating point value, in degrees, of the angle between the x' and x axes when the entire x'y'z' vector space is rotated around the z axis. The z' axis remains aligned with the z axis. When planeYaw equals 90°, the positive x' axis is aligned with the positive y axis.
startAngle is the double precision floating point value, in degrees, of the starting angle of the arc.
travelAngle is the double precision floating point value, in degrees, of the angle to traverse. A positive travelAngle defines counterclockwise rotation in the xy plane.
Note Internally, the floating point values for startAngle and travelAngle are represented as scaled, fixed-point numbers. |
inputVector indicates the source of the data for this function. Available input vectors include immediate (0xFF), variable (0x01 through 0x78), or indirect variable (0x81 through 0xF8). Refer to Input and Return Vectors for more detailed information.
Note The conversion from floating-point to fixed-point is performed on the host computer, not on the motion controller. To load arc functions from onboard variables, you must use the 16.16 fixed-point representation for all angles. |
Using This Function
This function defines an arc in the x'y' plane of a coordinate system that has to be transformed by rotation in pitch and yaw from the normal 3D vector space (xyz). In the transformed x'y'z' space, the spherical arc is reduced to a simpler circular arc.
Note Load the velocity and acceleration/deceleration before loading an arc. |
The spherical arc is specified by a radius, starting angle, and travel angle, and like all vector space moves, uses the loaded values of vector acceleration and vector velocity to define the motion along the path of the arc in the x'y' plane. The following figure shows a graphic representation of the transformation between the x'y'z' and xyz coordinate spaces:
Yaw and pitch transformations are inherently confusing because they interact. To avoid ambiguities, you can think about spherical arcs and coordinate transformations as follows:
- The spherical arc is defined as a circular arc in the x'y' plane of a transformed vector space x'y'z'. The original vector space xyz is defined by the Configure Vector Space function.
- The transformed vector space x'y'z' is defined in orientation only, with no absolute position offset. Its orientation is with respect to the xyz vector space and is defined in terms of yaw and pitch angles.
- Yaw angle rotation comes before pitch angle rotation.
- When rotating through the yaw angle, the y' axis never leaves the original xy plane as the newly defined x'y'z' vector space rotates around the original z axis.
- When rotating through the pitch angle, the y and y' axes stay aligned with each other while the x'z' plane rotates around them.
- At the beginning of the move, the axes are considered to be already on the arc in the x'y' plane. This avoids any impossible situations where the end point of the last move and the beginning of the arc move are not coincident.
- Spherical arcs allow full 3D curvilinear motion for robotic, solid modeling, and other advanced applications.
Note If you are doing onboard programming and are using Inp Vect to get the data this function needs, remember that this function reads the variables starting at the memory address pointed to by Inp Vect in the following order: radius, planePitch, planeYaw, startAngle, travelAngle. |
Refer to NI 73xx Arc Angles in Degrees for more information about representing angles numerically.
Remarks
This section includes information about how the behavior of this function differs among the controllers that support it.
NI 73xx Controller Considerations
The following list includes considerations you must make when you are using this function with a 73xx motion controller:
- The range for radius is 2 to 231–1 counts (steps).
- The range for planePitch is 0 to 90°.
- The range for planeYaw is 0 to 359.999313°.
- The range for startAngle is 0 to 359.999313° where angle 0 is along the positive x axis and values increase counterclockwise from the positive x axis in the xy plane.
- The range for travelAngle is –1,474,560° to +1,474,200° (–4,096 to +4,095 revolutions).
NI SoftMotion Controller Considerations
The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:
- The range for radius is 0 to 231–1 counts (steps).
- The range for planePitch is 0 to 360°.
- The range for planeYaw is 0 to 360°.
- The range for startAngle is 0 to 360° where angle 0 is along the positive x axis and values increase counterclockwise from the positive x axis in the xy plane.
- The range for travelAngle is the full 64-bit range.