flex_load_velocity_override

NI-Motion Functions

flex_load_velocity_override

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

Load Velocity Override

Usage

status = flex_load_velocity_override(u8 boardID, u8 axisOrVectorSpace, f32 overridePercentage, u8 inputVector);

Purpose

Loads an instantaneous velocity override for an axis or vector space.

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 to control
overridePercentage f32 velocity override scale factor
inputVector u8 source of the data for this function

Parameter Discussion

axisOrVectorSpace is the axis or vector space to control. Valid values are NIMC_AXIS1 through NIMC_AXIS30 or NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15. 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.

overridePercentage directly scales the programmed velocity. The default value is 100% (no effect).

inputVector indicates the source of the data for this function. Available input vectors include immediate (0xFF), variable (0x01 through 0x78), or indirect variable (0x81 through 0xF8). Refer to Input and Return Vectors for more detailed information.

Using This Function

This function scales the operating velocity on an axis or vector space from 0 to 150%. Velocity override is not double-buffered. The function takes effect immediately and does not require a Start Motion or Blend Motion function execution to change the operating velocity. All velocity changes use the loaded values of acceleration, deceleration, and s-curve to smoothly transition the velocity to its new value.

Velocity override scales velocity in linear interpolation as well as in circular, helical, and spherical arcs.

Note  Velocity override is not valid for contoured moves.

You can load velocity override to individual axes or to a vector space for coordinated velocity scaling. When sent to a vector space, the velocity override is broadcast to all axes in the vector space to change the per-axis overrides. If you later want to operate an axis independently with a different velocity override, you must execute this function again for that axis. Note that this also works with gearing. In addition to following the position of the master axis, the geared slave axis follows the velocity of the master axis.

After it is loaded, velocity override remains in effect until changed by another call to this function. All subsequent moves are at velocities scaled by the most recent override percentage. At power-up reset, velocity override is always reset to 100%.

Velocity override is commonly used in machine tool and other applications to reduce the speed of a programmed motion sequence and can be used to implement a feed hold by setting the value to zero (0). You can directly use a scaled value from an analog input as the velocity override value.

Remarks

This section includes information about how the behavior of this function differs among the controllers that support it.

NI 73xx Controller Considerations

The following list includes considerations you must make when you are using this function with a 73xx motion controller:

  • The conversion from floating-point to fixed-point is performed on the host computer, not on the motion controller. To load velocity override from an onboard variable, you must use the integer representation of 0 to 384.
  • The resolution of this function is approximately 0.4%.
  • All axes in a vector space must have the same velocity override. If axes have different velocity overrides, the vector move cannot function as expected. This mode is legal and does not generate an error, but it causes the axes to finish their moves at different times.

NI SoftMotion Controller Considerations

The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:

  • If velocity override is loaded on an axis, it is applied only during single-axis moves.
  • If the velocity override is loaded on a vector space, it does not overwrite the values for the axes that are in the vector space. In this case, the velocity override is applied only during vector space moves.
  • The range for the overridePercentage is the full 64-bit range, and is not limited to 150% for the NI SoftMotion Controller.