To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This examples has the motor track a sequence of velocity moves that follow a sinusoidal profile.
Description
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
Requirements
Software
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.
Hardware
Any controller compatible with the installed version of NI-Motion such as a 7330.
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.