NI SoftMotion: Create Your Custom Motion Controller on Any Platform with LabVIEW

Publish Date: Mar 03, 2012 | 58 Ratings | 3.74 out of 5 |  PDF

Table of Contents

  1. Overview
  2. NI SoftMotion: The Next Generation for Motion Control
  3. What is the NI SoftMotion Module for LabVIEW?
  4. Architecting Your Custom Motion Controller Using NI SoftMotion Module for LabVIEW
  5. Choosing the Right Hardware Platform based on Price-Performance Requirements
  6. Reference Links

1. Overview

Motion control involves precisely controlling the position, velocity, and torque of a rotational or linear electromechanical device. Motion controllers have evolved from being part of stand-alone systems targeted towards specific applications to becoming DSP-based and available for a variety of applications on different bus types. NI LabVIEW NI SoftMotion Module technology presents the next generation of motion control with which you can define a custom motion controller on your choice of processor and I/O, based on your price-performance requirements.



Figure 1. Motion Control System Architecture

Back to Top

2. NI SoftMotion: The Next Generation for Motion Control

Traditionally, motion control components were integrated into a single system. The total cycle time for each motion controller move included intervals for beginning and ending a move, intervals for performing other operations, and additional intervals for software latency. Cycle times could not assume consistency because there was no way to account for timing errors (such as backlash and changing conditions) caused by nonlinear hardware. Decreasing the time required for acceleration and deceleration decreased the total cycle time, but also created higher force requirements, thereby increasing costs. Also, a stand-alone motion controller does not adapt to changing application requirements or deliver fast update rates required by high-precision motion applications.
Currently popular DSP-based motion controllers enable fast servo update rates of up to 30 kHz for high-precision applications. With the open architecture, you can program your system to share signals and data across the PCI, PXI or IEEE 1394 bus. National Instruments PCI and PXI motion controllers also include a high-speed dedicated trigger bus called the Real-Time System Integration (RTSI) bus that allows digital signal sharing between multiple devices. When the motion controller reaches a certain position, it can trigger other operations without having to stop the motors, reducing excess acceleration and deceleration time and software latency. Thus, DSP-based motion controllers not only improve total cycle time, but also lower overall motion system cost, while providing flexibility and precision for a variety of applications.

While current motion controllers with DSPs are suitable for many applications, when it comes to high-precision motion control with servo update rates as fast as 200 kHz, machine builders turn to designing their own motion controllers on a custom PCB. Not only is the development expensive in terms of time and cost, but the fixed personality of the motion controller makes the system inflexible for future redesigns or for accommodating variations in the motion control algorithms at run-time. Some applications that need such a high level of precision and flexibility include wafer processing machines in the semiconductor industry, or in-line vehicle sequencing (ILVS) reconfigurable-at-run-time assembly line for the automotive industry. National Instruments reconfigurable I/O (RIO) technology coupled with NI SoftMotion technology provides the right tools for machine builders who want high-precision customized motion control with the complete flexibility of an FPGA. In addition to high-precision applications, machine builders and OEMs also can use the NI SoftMotion Module to implement multiaxis coordinated motion control using NI LabVIEW on a variety of platforms – from NI plug-in M Series DAQ devices for industrial PCs and PXI to rugged systems using NI CompactRIO and NI Compact FieldPoint programmable automation controllers (PACs).

Back to Top

3. What is the NI SoftMotion Module for LabVIEW?


The NI SoftMotion Module provides VIs and functions to help you build custom motion controllers that run using LabVIEW in combination with National Instruments hardware such as NI RIO devices, DAQ devices, and Compact FieldPoint.

The NI SoftMotion works in conjunction with the NI LabVIEW Real-Time Module, LabVIEW FPGA Module, and the LabVIEW Control Design and Simulation Bundle. The NI SoftMotion 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 2. NI LabVIEW NI SoftMotion Module Enables Custom Motion Control on Any Platform

The NI SoftMotion 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.

Back to Top

4. Architecting Your Custom Motion Controller Using NI SoftMotion Module for LabVIEW


A motion controller is at the center of a typical motion system which consists of supervisory control, trajectory generation, and a control loop. The controller converts high-level user commands into command signals that drives use to move actuators. The motion controller also monitors the system for error conditions, faults, and asynchronous events that can cause the system to change speed, direction, or start/stop the actuators. The following illustration shows the parts and processes of a typical motion controller.


Figure 3. Motion Controller Architecture

Supervisory Control
The supervisory control is the main loop of the motion control system. This loop intercepts commands from the user and signals the trajectory generator to start/stop moves. The supervisory control loop also monitors all I/O needed to perform initialization tasks, such as finding the reference or origin. This loop also monitors the system for faults and aids in synchronizing moves relative to changes in external conditions. Code for supervisory control executes in the LabVIEW Real-Time environment at millisecond loop rates. The NI SoftMotion contains multiple examples for supervisory control.

Trajectory Generator
The trajectory generator is a path planner that creates set points for the control loop. It is a multiaxis, preemptive, 64-bit floating-point engine that supports coordinated motion with linear and circular interpolation. The trajectory generator creates new set points every loop period, based on move constraints provided by the user. These move constraints include the maximum velocity, maximum acceleration/deceleration, and maximum jerk that the mechanical system can tolerate. You can perform 2-D, 3-D (roll, yaw, pitch), and helical circular interpolation with contouring and registration moves. The trajectory generator also includes support for cubic splining and provides coefficients for spline interpolation.


Figure 4. Trajectory Generator Implementation with the NI SoftMotion Module Spline Engine
The spline engine function uses a cubic spline algorithm and four set points to calculate interpolated positions between two positions from the trajectory generator. Using the spline engine function results in smooth motion and means you can run the trajectory generator loop slower than the control loop.

Control Loop
The control loop creates the command signal based on the set point provided by the trajectory generator. In most cases, the control loop includes both a position and a velocity loop, but in some cases the control loop may include only a position loop. The position is typically read from encoders, but also may be read from analog inputs (ADCs). The velocity is calculated from the position values, and may be read directly from a velocity sensor, such as a tachometer. Because feedback is not required for stepper motors, the control loop concerts the set point generated by the trajectory generator into stepper signals (step/direction).

The NI SoftMotion contains examples for control loop implementation with PID. The example features an enhanced PID algorithm that supports dual feedback, both position and velocity loops, velocity feedforward, and acceleration feedforward parameters. The control loop can be programmed through LabVIEW Real-Time as well as LabVIEW FPGA. The complete source code for the PID control loop is provided as part of the NI SoftMotion.

I/O
Analog and digital I/O are required to send the command signals and receive feedback from the actuators. Most I/O requirements for motion controllers are digital. In most cases, position feedback is obtained from digital encoders. However, some servo motor drives require analog I/O, and the feedback is obtained from an analog source (ADC).

The NI SoftMotion Module includes examples for I/O implementation using M Series DAQ devices, CompactRIO I/O modules, R Series reconfigurable I/O modules, and Compact FieldPoint I/O modules. With the encoder implementation code, you can implement custom encoders using LabVIEW FPGA to calculate velocity and direction at speeds as fast as 20 MHz.

Back to Top

5. Choosing the Right Hardware Platform based on Price-Performance Requirements


CompactRIO and R Series hardware offer the highest degree of customization and performance with the NI SoftMotion Module, with control loop rates as low as 5 µs. You can use plug-in DAQ devices offering analog output lines and direct input from quadrature encoders for applications (such as packaging and material handling) requiring loop rates of 1 ms. Compact FieldPoint offers lower loop rates of 5 ms and is suited for simple motion control applications like servo hydraulics, conveyors, or systems with high inertia. Table 1 compares the performance of all platforms with a traditional plug-in motion controller.


Table 1. Motion Controller Performance across Different Platforms

NI SoftMotion Module provides the software tools to create a motion controller from almost any LabVIEW Real Time controller. This ability is realized with Axis Interface provided with NI SoftMotion Premium Module. Through the use of function blocks, Axis Interface allows access into the SoftMotion engine, trajectory generator and lays out the framework for sending that data to IO modules other than the standard NI-951x modules (NI 9512, NI 9514, NI 9516). The ability to customize IO and provide third-party drive control and triggering would be the recommended cases for using Axis Interface. 

Back to Top

6. Reference Links

How do I upgrade my NI SoftMotion Development Module 2.x application to use the LabVIEW NI SoftMotion Module?

Using the NI SoftMotion Axis Interface

Advanced NI SoftMotion Module Axis Interface Reference Examples

Back to Top

Language

Bookmark & Share

Ratings

Rate this document

Answered Your Question?
Yes No

Submit