NI SoftMotion Development Module 2.1 High-Axis-Count Reference Examples
Overview
The NI SoftMotion Development Module for LabVIEW provides VIs and functions to help you build custom motion controllers that run using LabVIEW in combination with National Instruments hardware such as NI CompactRIO and NI R-Series RIO devices.
The NI SoftMotion Development Module works in conjunction with the NI LabVIEW Real-Time Module and LabVIEW FPGA Module. The NI SoftMotion Development Module provides all of the functions that typically reside on a motion controller DSP. With it, you can handle path planning, trajectory generation, and position and velocity loop control in the NI LabVIEW environment and then deploy the code on LabVIEW Real-Time or LabVIEW FPGA based target hardware.

Figure 1: NI SoftMotion Development Module for LabVIEW Enables Custom Motion Control on Any Platform
The NI SoftMotion Development Module includes functions for trajectory generator and spline engine and examples with complete source code for supervisory control, position, and velocity control loop using the PID algorithm. Supervisory control and the trajectory generator run on a LabVIEW Real-Time target and run at millisecond loop rates. The spline engine and the control loop can run either on a LabVIEW Real-Time target at millisecond loop rates, or on a LabVIEW FPGA target at microsecond loop rates.
Introduction
The NI SoftMotion Development Module 2.1 High Axis Count Reference Examples are a number of example projects built by National Instruments Systems Engineering to aid in the development process of using the NI SoftMotion Development Module specifically with the CompactRIO for coordinated high-axis count applications (8+ axes).
The example Projects contain NI LabVIEW Real-Time VIs and LabVIEW FPGA VIs for both servo and stepper motion control. The purpose of these projects is to give a better starting point and scalable software architecture for performing simple to advanced coordinated motion control on the CompactRIO. Users are expected to be familiar with NI SoftMotion before using these examples.
NI SoftMotion Development Module 2.1 High Axis Count Reference Examples System Requirements:
- NI LabVIEW 8.5.1 or later
- NI LabVIEW Real-Time 8.5.1 or later
- NI LabVIEW FPGA 8.5.1 or later
- NI SoftMotion Development Module 2.1 or 2.2 only
Figures 2 & 3 show the Front Panel and Block Diagram of the RT High-Axis Stepper.VI
Figure 2: Front Panel of RT High-Axis Stepper.VI
Figure 3: Block Diagram of RT High-Axis Stepper.VI
Versions 2.1.1 of the Reference Examples have RT/FPGA examples for:
- Stepper
- 8 axes open loop (cRIO-9103/cRIO-9104 or cRIO-9074)
- 24 axes open loop (cRIO-9103/cRIO-9104 or cRIO-9074 or other 3M gate Virtex-II or 2M gate Spartan-3 based FPGA NI Product)
- FPGA Note: Utilizes 99+% of FPGA resources when compiled*
- 32 axes open loop (cRIO-9074 or other 2M gate Spartan-3 FPGA based NI Product)
- FPGA Note: utilizes 99+% of FPGA resources when compiled – will not compile on a 3M gate Virtex-II based FPGA NI Product (i.e. – cRIO-9103/cRIO-9104)*
- RT Note: 32 axes running at 8ms Host Loop Rate on a 400MHz RT processor utilize 85+% of the processor*
- Servo
- 8 axes analog output torque command with digital differential quadrature encoder feedback (cRIO-9103/cRIO-9104 or cRIO-9074)
- FPGA Note: IO density of the NI-9263 and NI-9411 limit this example from expanding to more axes – changing IO types or modules may allow more servo axes to fit (estimate: 16 axes max)*
- 8 axes analog output torque command with digital differential quadrature encoder feedback (cRIO-9103/cRIO-9104 or cRIO-9074)
- 9505
- 8 axes (8 modules) of full NI SoftMotion position control with 9505 C-Series brushed DC drive (cRIO-9074)
- 7 axes (7 modules) of full NI SoftMotion position control with 9505 C-Series brushed DC drive (cRIO-9103/cRIO-9104)
All of these examples have been optimized for high-axis counts but can be easily scaled down to as few of axes as needed.
*As products continue to release and newer software versions are available, these estimates will change.
This code is not supported by National Instruments. Questions can be posted on NI Discussion Forums.
Reference Links
NI SoftMotion: Create Your Custom Motion Controller on Any Platform with LabVIEW
Getting Started with the NI SoftMotion Development Module for LabVIEW
NI Discussion Forums: Motion Control and Motor Drives
Downloads
Reader Comments | Submit a comment »
Code updated
This document and code have been
updated. They are compatible with LV
8.5 and later.
- Marc Christenson, National Instruments. - Oct 7, 2008
Compatible with 8.5.1?
Is this example compatible with LV 8.5.1?
I tried to open it several times but either
LV crashes after about 6000 VI loaded or the
main.vi isn´t runnable with many broken wires
in itself/its subvis.
- goetz.becker@xon.de - May 8, 2008
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). National Instruments does not support this tutorial or guarantee its quality in any way. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
