Load S-Curve Time

NI-Motion VI

Load S-Curve Time

Loads the s-curve time for an axis or vector space.

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
S Curve Time (1) is the time in update sample periods over which the acceleration profile is smoothed as it transitions from zero to the programmed value and back to zero. The s-curve range is from 1 to 32,767 with a default of 1 sample period.
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 is the axis or vector space to control.
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.
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 S-Curve Time VI smoothes the acceleration and deceleration portions of a motion profile, resulting in less abrupt transitions from start motion to acceleration, acceleration to constant velocity, constant velocity to deceleration, and deceleration to stop. Using s-curve acceleration limits the jerk in a motion control system.

Officially, jerk is defined as the derivative of acceleration (change of acceleration per unit time) and is measured in units of counts (steps)/s3. This VI, however, allows you to load s-curve time in update sample periods rather than have to deal with the obscure units of jerk.

With the default s-curve time of one (1) sample period, there is almost no effect on the motion profile, and the standard trapezoidal trajectory is executed. As s-curve time increases, the smoothing effect on the acceleration and deceleration portions of the motion profile increase, as shown in the following figure. Large values of s-curve time can override the programmed values of acceleration and deceleration by sufficiently smoothing the profile such that the acceleration and deceleration slopes are never reached.

Note  A large s-curve value makes the time to accelerate to the commanded velocity longer. Therefore, the time it takes to reach the target position is also longer. If the s-curve value is too large, the value is ignored and full acceleration is used. This happens when the acceleration and deceleration become too long to perform smoothly.

You can load s-curve time to individual axes or to a vector space for smoothing all axes in the vector space. When sent to a vector space, the s-curve time is broadcast to all axes in the vector space to change the per-axis s-curve times. If you later want to operate an axis independently with a different s-curve time, you must execute the Load S-Curve Time VI again for that axis.

Note  All axes in a vector space must have the same s-curve time for best vector accuracy.

Remarks

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

NI SoftMotion Controller Considerations

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

  • When you use this VI with the NI SoftMotion Controller, S Curve Time (1) is the smoothing time in the host loop period.
  • National Instruments suggests you use the Load Move Constraints VI with the NI SoftMotion Controller instead of using this VI.