flex_load_rpm_thresh |
Load Velocity Threshold in RPM
Usage
status = flex_load_rpm_thresh(u8 boardID, u8 axis, f64 threshold, u8 inputVector);
Purpose
Loads a velocity threshold for an axis in RPM.
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 | f64 | velocity threshold in RPM |
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 value in RPM expressed as a double-precision floating point number. The RPM range depends upon the motor counts or steps per revolution and the trajectory update rate, and is always a positive number.
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 in RPM 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 constant with the Load Velocity Filter Parameter 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. You can then change PID tuning or other parameters as a function of velocity.
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 loads the velocity threshold in user units/minute. To load the axis velocity threshold in counts/second, use Load Counts/Steps per Revolution to set countsOrSteps value to 1.