Example Code

NI-Motion: Velocity Setpoint, 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 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 Panel:

2011-02-11_104815.png

Block Diagram:  This VI was created from the One-Axis Move with Position Monitor.vi

Key concepts: Notice that the set opperation mode (the second VI) is set to "velocity"

Update Velocity.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