flex_load_velocity_threshold

NI-Motion Functions

flex_load_velocity_threshold

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 Threshold

Usage

status = flex_load_velocity_threshold(u8 boardID, u8 axis, u32 threshold, u8 inputVector);

Purpose

Loads a velocity threshold for an axis.

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
threshold u32 velocity threshold in counts/s or steps/s
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.

threshold is the velocity threshold in counts/s (servo axes) or steps/s (stepper axes). For servo axes, the threshold range is 1 to 16,000,000 counts/s. For stepper axes, it is 1 to 1,500,000 steps/s. The factory default value for threshold is the maximum, so the feature is effectively disabled until a threshold is loaded.

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 establishes a velocity threshold for the specified axis, which can then be monitored with the Read Trajectory Status function. The velocity threshold status is True when the absolute value of filtered axis velocity is above the threshold and False when the velocity drops below the threshold.

Velocity threshold is a status and does not have to be enabled or disabled. Loading a maximum value effectively disables the feature because the status is always off. Increasing the velocity filter time parameter with the Configure Velocity Filter function reduces quantization noise in the threshold status but at the expense of increasing threshold status latency.

Velocity threshold is typically used to monitor the acceleration and deceleration trajectory periods to see when or if an axis is up to speed.

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: