flex_load_run_stop_threshold

NI-Motion Functions

flex_load_run_stop_threshold

Device Compatibility

Device Compatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Load Run/Stop Threshold

Usage

status = flex_load_run_stop_threshold(u8 boardID, u8 axis, u16 runStopThreshold, u8 inputVector);

Purpose

Sets the Run/Stop threshold, which affects the run/stop status returned by Read Trajectory Status.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axis u8 axis to configure
runStopThreshold u16 sets the velocity threshold above which an axis is considered running.
inputVector u8 source of the data for this function

Parameter Discussion

axis is the axis to configure. 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.

runStopThreshold is the Run/Stop threshold velocity in counts/sample period for servo axes or steps/sample period for open-loop and closed-loop stepper axes. The range for this parameter is 1 (default) to 32,767 sample periods.

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 velocity threshold above which an axis is considered running. The runStopThreshold parameter has time units of update sample periods and is affected by the update rate set in the Enable Axis function.

If the velocity of an axis is above the step/count per sample period specified in this function, the run/stop status from Read Trajectory Status returns TRUE. If it is below the threshold, the run/stop status returns FALSE.