flex_wait_for_blend_complete |
Wait for Blend Complete
Usage
status = flex_wait_for_blend_complete(u8 boardID, u8 axisOrVectorSpace, u16 axisOrVSMap, u32 timeout, i32 pollInterval, u16* blendComplete);
Purpose
Waits up to the specified period of time for a blend to complete on an axis, vector space, group of axes, or group of vector spaces.
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) |
axisOrVectorSpace | u8 | axis or vector space selector |
axisOrVSMap | u16 | bitmap of axes or vector spaces to check |
timeout | u32 | timeout in milliseconds |
pollInterval | i32 | polling interval in milliseconds |
blendComplete | u16* | the blend complete status |
Parameter Discussion
axisOrVectorSpace can select an axis (NIMC_AXIS1 through NIMC_AXIS15), vector space (NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15), multiple axes (NIMC_AXIS_CTRL), or multiple vector spaces (NIMC_VECTOR_SPACE_CTRL). When simultaneously waiting for a blend to complete on multiple axes or vector spaces, the axisOrVSMap parameter indicates which axes or vector spaces to wait for. On motion controllers that support fewer than fifteen axes, waiting for non-existent axes or vector spaces returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Axes and Vector Spaces for axis and vector space resource IDs.
axisOrVSMap is the bitmap of axes or vector spaces to wait for. It is only required when multiple axes or vector spaces are selected with the axisOrVectorSpace parameter. Otherwise, this parameter is ignored. NI-Motion ignores additional axes and vector spaces if you select non-existent axes.
When waiting for multiple axes (axisOrVectorSpace = NIMC_AXIS_CTRL):
D15 | ... | D10 | D9 | D8 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
Axis 15 | ... | Axis 10 | Axis 9 | Axis 8 | Axis 7 | Axis 6 | Axis 5 | Axis 4 | Axis 3 | Axis 2 | Axis 1 | 0 |
For D1 through D15:
1 = Blend must be complete on specified axis
0 = Blend can be either complete or not complete on specified axis (do not care)
When waiting for multiple vector spaces (axisOrVectorSpace = NIMC_VECTOR_SPACE_CTRL):
D15 | ... | D10 | D9 | D8 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
VS 15 | ... | VS 10 | VS 9 | VS 8 | VS 7 | VS 6 | VS 5 | VS 4 | VS 3 | VS 2 | VS 1 | 0 |
For D1 through D15:
1 = Blend must be complete on specified vector space
0 = Blend can be either complete or not complete on specified vector space (do not care)
To wait for blend complete on a single axis or vector space, set the axisOrVectorSpace selector to the specified axis or vector space. The axisOrVSMap parameter is ignored.
To wait for blend complete on multiple axes, the axisOrVectorSpace selector is set to NIMC_AXIS_CTRL and the axisOrVSMap bitmap defines the axes to wait for. They must all be blend complete, for the blendComplete output to be true. Similarly, to wait for blend complete on multiple vector spaces, the axisOrVectorSpace selector is set to NIMC_VECTOR_SPACE_CTRL and the axisOrVSMap bitmap defines the vector spaces to wait for.
timeout is the amount of time, in milliseconds, to wait for the blend to become complete.
pollInterval is the amount of time, in milliseconds, to wait between successive queries to the controller to determine if the blend is complete.
blendComplete indicates if the blend is complete on the axes or vector spaces specified:
1 = Blend complete
0 = Blend not complete
Using This Function
This utility function is built on top of the Check Blend Complete Status function, and is provided for your programming convenience. This function compares the axes or vector spaces specified in the axisOrVectorSpace and/or axisOrVSMap input parameters with the blend complete status for the appropriate axes or vector spaces. It does this repeatedly, with the pollInterval time determining the frequency that the controller is queried. When the blend is complete, this function returns with blendComplete set to true (1), otherwise, it waits for the amount of time specified by timeout. If the function waits longer than timeout, it returns NIMC_eventTimeoutError, and blendComplete is set to false (0).
The output is a single true/false value indicating if the specified blend or blends are complete.
This function does not check for following error status or axis off status. Checking for faults during moves is recommended. To do this, use Read per Axis Status, which returns following error and axis off status in addition to the move complete status. Refer to the NI-Motion Help for more information and example code.
For more information about blend complete status, refer to the Read Blend Status function.
Remarks
This section includes information about how the behavior of this function differs among the controllers that support it.
NI SoftMotion Controller Considerations
The following includes considerations you must make when you are using this function with the NI SoftMotion Controller:
To wait for blend complete on axes sixteen through thirty, use the Read per Axis Status function.