Example Code

NI-Motion: Velocity Setpoint Overide, Updatable

Code and Documents

Attachment

Introduction

Many users have had questions regarding how to program a velocity based control over positional control. In otherwords, this example will discribe how to change the shipping examples on simple one axes moves to use velocity setpoints over position setpoints. This VI acomplishes the same functionality as NI-Motion: Velocity Setpoint With Updates. Using velocity overide in a loop over seting velocity and starting motion in a loop has the potential to increase the efficiency to which the motion board processes the velocity move/ comands; this method of velocity control reduces acuracy.

This example gives users the ability to set a velocity to update constantly.

Steps to Complete

Take a look at the front pannel and notice that you need to select the device alias and axes you wish to move. You need to configure your board and axes in Measurement & Automation Explorer befor using this program. Typically velocity moves are configured without limit switches, controling a car for instance. Furthermore you should test the configuration using the 1D interactive tool before running this program.

Front Pannel: You set a velocity to start with and can modify this velocity using a ratio from 0% to 150%

2011-02-11_104848.png

Block Diagram: This example sets a velocity setpoint and starts the move prior to entering the loop and controls the update of this velocity using the Velocity Overide.flx inside the loop. This is a more efficient use of card resources when compared against NI-Motion: Velocity Setpoint With Updates.

motionOverviewFinal.png

Additional Notes

This VI was developed in LV 2010 and NI Motion 2010.


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors