flex_blend

NI-Motion Functions

flex_blend

Device Compatibility

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

Blend Motion

Usage

status = flex_blend(u8 boardID, u8 axisOrVectorSpace, u16 axisOrVSMap);

Purpose

Blends motion on a single axis, single vector space, multiple axes, or multiple 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 blend

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 blending multiple axes or vector spaces, the axisOrVSMap parameter indicates which axes or vector spaces are involved. On motion controllers that support fewer than thirty axes, configuring 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 blend. It is only required when you select multiple axes or vector spaces with the axisOrVectorSpace parameter. NI-Motion ignores additional axes and vector spaces if you select non-existent axes.

When blending 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 axis
   0 = Do not blend axis

When blending 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 vector space
   0 = Do not blend vector space

To blend a single axis or vector space, set the axisOrVectorSpace selector to the specified axis or vector space. The axisOrVSMap bitmap is ignored.

To blend multiple axes, the axisOrVectorSpace selector is set to NIMC_AXIS_CTRL and the axisOrVSMap bitmap defines the axes to blend. Similarly, to blend multiple vector spaces, the axisOrVectorSpace selector is set to NIMC_VECTOR_SPACE_CTRL and the axisOrVSMap bitmap defines the vector spaces to blend.

Note  It is not possible to combine the blend of an axis and the blend of a vector space in a single use of this function. To accomplish this, create a single axis vector space and then execute a multi-vector space blend.

Using This Function

The primary difference between a Start Motion function and a Blend Motion function is that the Start Motion is immediate and preemptive, while Blend Motion waits and starts the next move upon the completion of the previous move.

This function is used to blend motion profiles on axes or vector spaces, either simultaneously or individually. A blend is similar to a normal start and has the same requirements for valid trajectory parameters as the Start Motion function. The blended move uses the most recently loaded values of acceleration, velocity, target position, s-curve, operation mode and so on to generate the motion profile.

Note  If a stepper axis is in a killed state (not energized), halt the axis using the Stop Motion function, with stopType set to NIMC_HALT_STOP, before you execute a Start Motion or Blend Motion function. After you halt the axis, you might need to wait before executing a Start Motion or Blend Motion function, so that the stepper drive comes out of reset state. If the stepper drive does not come out of reset state before you execute the function, the stepper axis might lose some steps during acceleration. To determine if you need to wait before executing the function, refer to the stepper drive documentation or vendor.

Blend starting smoothly blends two move segments on an axis, axes, or vector space(s). There are three types of blends, controlled by the blend factor:

  • Blend moves by superimposing the deceleration profile of the previous move with the acceleration profile of the next move (blend factor = –1).
  • Blend moves by starting the next move at the exact point when the previous move has stopped (blend factor = 0).
  • Start the next move after a programmed delay time between the end of the previous move and the start of the next move (blend factor > 0 ms).

Refer to the Load Blend Factor function for more information about how blend factor controls the blending of motion profiles.

Caution  For sequencing multiple moves with blends, NI-Motion must complete one blend before parameters for the next move are loaded. Refer to the Read Blend Status function for more information about blend sequencing.

If motion on any axis involved in a blend is illegal due to a limit or other error condition, the entire Blend Motion function is not executed and a modal error is generated. None of the axes are affected and the move(s) in process completes normally and stops.

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.