This examples has the motor track a sequence of velocity moves that follow a sinusoidal profile.
This example will execute a sequence of moves that will result in a sinusoidal profile. In order to do so, a sinewave is generated with the Sine Pattern.vi and fed to the Load Velocity in RPM VI; the program then starts the motion and goes through a while loop and reads the current velocity, updating the front panel with the current velocity once every second.
This example may be modified to change acceleration or position instead of velocity. To do so, you may change the enum constant that is fed into Set Operation Mode.flx. Instead of a sinewave, different velocity profiles may be set up as well.
Steps to Implement or Execute Code
Select the board ID and Axis
Run the VI
If the motor moves slowly or not at all, check the Acceleration value and adjust it accordingly. The default value might not be suitable for all systems.
LabVIEW 8.2 "or compatible"
NI-Motion 8.2 "or compatible". For more information regarding compatibility between LabVIEW and NI-Motion, please view this article.
Any controller compatible with the installed version of NI-Motion such as a 7330.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**