flex_load_base_vel |
Load Base Velocity
Usage
status = flex_load_base_vel(u8 boardID, u8 axis, u16 baseVelocity);
Purpose
Sets the base velocity used by the trajectory control loop for the axis specified.
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
axis | u8 | axis to control |
baseVelocity | u16 | base velocity for the stepper axis in steps/second |
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.
baseVelocity is loaded in steps per second and is a 16-bit data word in the range of 0 through 65,535. The default value is 0.
Using This Function
Base velocity is the minimum step rate used by the trajectory generator during acceleration and deceleration. Base velocity is useful when the system uses full-step or half-step mode. Base velocity is not necessary if the system uses microstepping.
If the target velocity loaded with the Load Velocity function is lower than the base velocity, the base velocity is reduced to equal the loaded target velocity.
Note This function is valid only on axes configured as steppers, so you must configure an axis as a stepper using the Configure Axis Resources function before executing this function. |
Example
If the base velocity loaded is 2000 steps/s and the loaded velocity is 5000, the axis starts at the base velocity and accelerates to the loaded velocity. The axis then decelerates to the base velocity and stops, as shown in the following figure.