flex_read_blend_status

NI-Motion Functions

flex_read_blend_status

Device Compatibility

Device Compatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Read Blend Status

Usage

status = flex_read_blend_status(u8 boardID, u8 axisOrVectorSpace, u8 returnVector);

Purpose

Reads the Blend Complete status for all axes or vector spaces.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axisOrVectorSpace u8 axis or vector space selector
returnVector u8 destination for the return data

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.

returnVector indicates the destination for the return data generated by this function. Available return vectors include return data to the host (0xFF), to a variable (0x01 through 0x78), to an indirect variable (0x81 through 0xF8), and return no data (0). Refer to Input and Return Vectors for more detailed information.

Note  The suffix _rtn on the function indicates that the data must be returned to the host. When this calling convention is used, no returnVector is required.

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
VS15 ... VS10 VS9 VS8 VS7 VS6 VS5 VS4 VS3 VS2 VS1 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.