Load Accel/Decel in RPS/sec

NI-Motion VI

Load Accel/Decel in RPS/sec

Loads the maximum acceleration and/or deceleration value for an axis or vector space in RPS/s.

Details     Remarks

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
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.
Inp Vect indicates the source of the data for this VI. 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.
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.
Axis or Vector Space is the axis or vector space to control.
Value is the double precision floating point acceleration and/or deceleration value in motor revolutions/s/s (RPS/s). The default is 200. The range for acceleration in RPS/s depends upon the motor counts or steps per revolution and the trajectory update rate.
Selector is the selector for loading acceleration, deceleration, or both acceleration and deceleration (default).
Value Definition
0 Both (default)
1 Acceleration
2 Deceleration
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 Load Accel/Decel in RPS/sec VI specifies the maximum rate of acceleration and/or deceleration for individual axes or vector spaces in revolutions/s2. When executed on a vector space, the value controls the vector acceleration (deceleration) along the vector move path. This VI requires previously loaded values of either counts per revolution (for stepper axes) or steps per revolution (for servo axes) to operate correctly.

You can use this VI to load separate limits for acceleration and deceleration or to set them both to the same value with one call. These parameters are double-buffered so you can load them on the fly without affecting the move in process, and they take effect on the next Start or Blend Motion call. After they are loaded, these parameters remain in effect for all subsequent motion profiles until re-loaded by this VI. You do not need to load acceleration before each move unless you want to change the acceleration and/or deceleration value.

Acceleration defines how quickly the axis or axes come up to speed and is typically limited to avoid excessive stress on the motor, mechanical system, and/or load. A separate, slower deceleration is useful in applications where gently coming to a stop is most important.

Tip  Use Load Move Constraints instead of this VI for more move options.

Remarks

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

NI 73xx Controller Considerations

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

  • RPS/s values stored in onboard variables are in double-precision IEEE format (f64). For information about the number of variables required to hold an RPS/s value, refer to Using Inputs and Return Vectors with Onboard Variables.
  • NI-Motion firmware uses a 16.16 fixed-point format internally to represent velocity in counts/sample period or steps/sample period and acceleration/deceleration in counts/sample period2 or steps/sample period2. If you change counts or steps per revolution or change the update rate using Enable Axes, you must reload the velocity and acceleration/deceleration.
  • You also can load acceleration and deceleration in counts/s2 or steps/s2 by calling the Load Acceleration/Deceleration VI.
  • If you are doing onboard programming and are using inputVector to get the data this VI needs, notice that this VI reads the variables starting at the memory address pointed to by inputVector in the following order: accelerationType, RPSPS.
  • Acceleration and deceleration values in RPS/s are converted to an internal 16.16 fixed-point format in units of counts/sample2 or steps/sample2 before being used by the trajectory generator. You can calculate the minimum acceleration increment in RPS/s with the following formula:

    RPS/s = Amin × ()2 ×

    where:
    Amin is 1/65,536 counts/sample2 or steps/sample2,
    Ts is the sample period in seconds per sample, and
    R is the counts or steps per revolution.
  • For a typical servo axis with 2,000 counts per revolution operating at the 250 ms update rate, calculate the minimum RPS/s increment using the following equation:

    × = 0.122070 RPS/s
  • You can calculate the maximum RPS/s using the following equation:

    maximum RPS/s = Amax × ()2 × ()

    where:
    Amax is 32 counts/sample
    Ts is the sample period in seconds per sample, and
    R is the counts or steps per revolution,

    and is constrained according to the following equations:

    acceleration 256 × deceleration
    deceleration 65536 × acceleration
  • Use Load Velocity and Load Acceleration/Deceleration for faster performance.

NI SoftMotion Controller Considerations

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

  • The minimum acceleration/deceleration value is not limited by the fixed 16.16 calculation. This VI takes the acceleration/deceleration value in as an f64.
  • For the Inp Vect parameter, the NI SoftMotion Controller supports only the immediate return vector (0XFF).