flex_load_follow_err

NI-Motion Functions

flex_load_follow_err

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 Following Error

Usage

status = flex_load_follow_err(u8 boardID, u8 axis, u16 followingError, u8 inputVector);

Purpose

Loads the following error trip point.

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)
axis u8 axis to control
followingError u16 following error trip point in counts
inputVector u8 source of the data for this function

Parameter Discussion

axis is the axis to control. Valid values are NIMC_AXIS1 through NIMC_AXIS30. On motion controllers that support fewer than thirty axes, configuring non-existent axes returns error –70006 (NIMC_badResourceIDOrAxisError). Refer to Axes for axis resource IDs.

followingError is the following error trip point in encoder counts. If the following error exceeds this value, the axis is automatically killed. The range is 0 to 32,767 with a default of 32,767 counts. Loading zero (0) is a special case that disables the following error trip functionality.

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 sets the maximum allowable following error. Following error is the difference between the instantaneous commanded trajectory position and the feedback position. If the absolute value of this difference exceeds the trip point, an internal kill stop is issued and the axis is disabled.

If this axis is part of a coordinate (vector) space, all other axes are commanded to decelerate to a stop when one axis trips on following error.

This function is a safety feature used to protect the motion hardware and associated system components from damage when the position error gets excessive due to friction, binding, or a completely stalled motor. It also protects you in case you load unobtainable values for velocity and/or acceleration.

This feature is available on all servo and closed-loop stepper axes. It has no effect on stepper axes running in open-loop mode. You can completely disable the following error feature by loading a zero (0) value.

Caution  Following error must not be disabled unless the application absolutely requires operating with greater than 32,767 counts of error.

You can monitor following error status with the Read Trajectory Status or Read per Axis Status functions. A following error trip always sets the Motor Off status. You can further diagnose the cause of the trip by checking the torque limit status with the Read DAC Output Limit Status function.

If an axis trips on following error, that axis, or any axes associated through a coordinate space, are prohibited from starting from an onboard program until a start from the host, pause of the onboard program, or run of an onboard program.

In general, a following error trip is considered normal operation and does not generate an error. There are a few cases where an unexpected following error trip generates a modal error: during Find Reference and while executing a stored program.

Note  Following error limit cannot be set for a vector space, you must set a following error limit for each axis individually. For coordinate spaces, following error data is truncated to a maximum of 32,767.

If an axis is tripped on following error, call the Stop Motion function with stopType set to NIMC_HALT_STOP to remove the error status.

Refer to the Errors and Error Handling topic for information about errors and error handling.

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:

  • The NI SoftMotion Controller does not support loading zero (0) in followingError to disable the following error.
  • For the inputVector parameter, the NI SoftMotion Controller supports only the immediate return vector (0XFF).
  • Starting a move with a following error returns an error. You must clear the following error by calling Stop Motion with stopType set to NIMC_HALT_STOP.