| aMotion_SetRampParam | Index |
Definition:
Parameters:
Return Value:
Description:
This routine writes a new value to a ramp configuration parameter. Several of the other ramp configuration functions use macros that reference this routine. Use of this routine requires low-level knowledge of the ramp parameters. It is only recommended for experienced users. See the cmdMO_RMPCFG documentation for more details.
There are defined values for the index of each ramp configuration parameter.
| aMOTION_RIDSTH | 0 | Index for most significant 2-bytes of 4-byte travel distance. |
| aMOTION_RIDSTL | 1 | Index for least significant 2-bytes of 4-byte travel distance. |
| aMOTION_RIVMAX | 2 | Index for maximum velocity. |
| aMOTION_RIACCT | 3 | Index for acceleration step time. |
| aMOTION_RIFLAG | 4 | Index for flags. |
Example:
#include <aMotion.tea>
aMotion_SetRampParam(0, aMOTION_RIVMAX, 20);
This would set a new max velocity of 20 for motion control channel 0.
#include <aMotion.tea>
aMotion_SetRampParam(0, aMOTION_RIACCT, 50);
This would set the ramp acceleration step time for motion control channel 0 to 50ms.
Related: