flex_read_blend_status_rtn |
Read Blend Status Return
Usage
status = flex_read_blend_status_rtn(u8 boardID, u8 axisOrVectorSpace, u16* blendStatus);
Purpose
Reads the Blend Complete status for all axes or 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 |
blendStatus | u16* | bitmap of blend complete status for all axes or vector spaces |
Parameter Discussion
axisOrVectorSpace can select an axis (NIMC_AXIS1 through NIMC_AXIS30), vector space (NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15), multiple axes (NIMC_AXIS_CTRL), or multiple vector spaces (NIMC_VECTOR_SPACE_CTRL). When simultaneously reading the blend status of multiple axes or vector spaces, the blendStatus parameter indicates which axes or vector spaces are involved. On motion controllers that support fewer than thirty axes, reading non-existent axes or vector spaces returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Axes and Vector Spaces for axis and vector space resource IDs.
blendStatus is a bitmap of blend complete status for all axes or all vector spaces.
When reading blend status for 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 |
D1 through D15:
1 = Blend complete on axis
0 = Blend pending
When reading blend status for 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 |
D1 through D15:
1 = Blend complete on vector space
0 = Blend pending
Using This Function
Blending smoothly combines two move segments on an axis, axes, or vector space(s). When continuously blending move segments into each other, it is necessary to wait until the blend is complete between the previous two moves before you load the trajectory parameters for the next move to blend. The status information returned by this function indicates that the previous blend is complete and the axis, axes, or vector space(s) are ready to receive the next blend move trajectory data.
Attempting to execute a Blend Motion function before the previous blend is complete on the axes involved generates a modal error.
Example
While blending linearly interpolated moves in a 2D vector space, you call the Read Blend Status function with axisOrVectorSpace = NIMC_VECTOR_SPACE_CTRL to select vector space status. If the blend on vector space 1 is still pending, this function returns blendStatus = 0x000C, which corresponds to the following bitmap:
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 | XXX |
0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
The blend is complete (1) on vector spaces 2 and 3 (or they do not exist), but the blend is still pending (0) on vector space 1. For your programming convenience, two utility functions—Check Blend Complete Status and Wait for Blend Complete—allow you to specify an axis, vector space, group of axes, or group of vector spaces, and find out if a blend is complete, or wait until a blend is complete. These functions return a simple true/false value indicating if a blend is complete.
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 list includes considerations you must make when you are using this function with the NI SoftMotion Controller:
Note You cannot execute this function on multiple axes using the NIMC_AXIS_EX_CTRL resource parameter with axes sixteen through thirty. |