Blend Motion

NI-Motion VI

Blend Motion

Blends motion on a single axis, single vector space,
multiple axes, or multiple vector spaces.

Details

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
Y
NI SoftMotion Controller for CANopen—Xenus
Y
Axis/VS Map is the bitmap of axes or vector spaces to blend. It is only required when you select multiple axes or vector spaces with the Axis or Vector Space parameter.

When blending axes (Axis or Vector Space = 0):

Axis/VS 1—If true, blend axis. If false, do not blend axis.
Axis/VS 2—If true, blend axis. If false, do not blend axis.
Axis/VS 3—If true, blend axis. If false, do not blend axis.
Axis/VS 4—If true, blend axis. If false, do not blend axis.
Axis/VS 5—If true, blend axis. If false, do not blend axis.
Axis/VS 6—If true, blend axis. If false, do not blend axis.
Axis/VS 7—If true, blend axis. If false, do not blend axis.
Axis/VS 8—If true, blend axis. If false, do not blend axis.

When blending vector spaces (Axis or Vector Space = 0x10):

Axis/VS 1—If true, blend vector space. If false, do not blend vector space.
Axis/VS 2—If true, blend vector space. If false, do not blend vector space.
Axis/VS 3—If true, blend vector space. If false, do not blend vector space.
Axis/VS 4—If true, blend vector space. If false, do not blend vector space.
Axis/VS 5—If true, blend vector space. If false, do not blend vector space.
Axis/VS 6—If true, blend vector space. If false, do not blend vector space.
Axis/VS 7—If true, blend vector space. If false, do not blend vector space.
Axis/VS 8—If true, blend vector space. If false, do not blend vector space.

To blend a single axis or vector space, set the Axis or Vector Space selector to the appropriate axis or vector space. The Axis/VS Map bitmap is ignored.

To blend multiple axes, the Axis or Vector Space selector is set to 0 (zero) and the Axis/VS Map bitmap defines the axes to blend. Similarly, to blend multiple vector spaces, the Axis or Vector Space selector is set to 0x10 and the Axis/VS Map 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 VI. To accomplish this, create a single Axis vector space and then execute a multi-vector space blend.
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller.
Axis or Vector Space can select an axis (1 through 15), vector space (0x11 through 0x14), multiple axes (Axis Control), or multiple vector spaces (Vector Space Control). When simultaneously acting on multiple axes or vector spaces, the Axis/VS Map parameter indicates which axes or vector spaces are involved.
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI.
Resource Output is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device.
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

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

The Blend Motion VI 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 VI. 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 VI, with Stop Type set to halt stop, before you execute a Start Motion or Blend Motion VI. After you halt the axis, you might need to wait before executing a Start Motion or Blend Motion VI, 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 VI, the stepper axis might lose some steps during acceleration. To determine whether you need to wait before executing the VI, 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 VI 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 VI 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 VI is not executed and a modal error is generated. None of the axes are affected and the move(s) in process complete normally and stop. For more information about errors and error handling, refer to Errors and Error Handling.

Example 1

To blend motion on axis 4 only, call the Blend Motion VI with the following parameters:

Axis or Vector Space = 4
Axis/VS Map = do not care

Example 2

To blend motion on vector spaces 2 and 3, call the Blend Motion VI with the following parameters:

Axis or Vector Space = 0x10
Axis/VS Map corresponds to the following.

Axis/VS 1 Axis/VS 2 Axis/VS 3 Axis/VS 4 Axis/VS 5 Axis/VS 6 Axis/VS 7 Axis/VS 8
False  True  True  False  False  False False False