Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Configuring a Motion Control System

50 ratings | 4.08 out of 5
Print

Overview

This document provides a general introduction to motion control and is designed to help you get started with your own motion control system.

Motion Control System

The following diagram and explanation describe a typical motion control system.



A typical motion control system (with a position feedback loop) consists of the following components:
  • Application software – Developers use application software to program desired target positions and motion control profiles.
  • Motion Controller – The motion controller acts as the brain of the of the system by taking desired target positions and motion profiles and creating trajectories the motors follow by outputting either a +/- 10 V signal for servo motors or step and direction pulses for stepper motors.
  • Amplifier or Drive – Amplifiers, also called drives, take the commands from the motion controller and generate the required current to drive the motor.
  • Motor – Motors are the muscles of the system. Motors convert electrical energy into mechanical energy and produce enough torque to move the motor to the desired target position.
  • Mechanical Elements – Motors are designed to provide torque to mechanics such as linear slides, robotic arms, and special actuators.
  • Feedback device or Position Sensor – A position feedback device is not required for some motion control applications (such as controlling stepper motors) but is vital for servo motors. The feedback device, usually a quadrature encoder, senses the position of the motor and reports the result to the controller. This closes the loop to the motion controller.

The following sections discuss each of the parts of a motion control system in more detail to help you further understand how you can design your own motion control system.

Motion Control Software


Application software is divided into three main categories: configuration, prototype, and application development environment (ADE). The following figure illustrates the process of programming a motion control system and the corresponding National Instruments products.



Configuration
NI offers Measurement & Automation Explorer (MAX), an interactive tool for configuring NI hardware. For motion control, MAX offers interactive testing and tuning panels that help you verify your systems functionality before doing any programming.



Prototype
After you configure your system, you are ready to start prototyping and developing your application. This is the phase where you create your motion control profiles and test them on your system. NI has a software tool for prototyping called NI Motion Assistant. NI Motion Assistant enables you to configure moves using a point and click environment and then generate LabVIEW code based on the moves you configure. The key benefit of NI Motion Assistant lies in the difference between configurable environments and programmable environments. Configurable environments enable you to start your development without programming. Think of the tasks available in NI Motion Assistant as pre-written blocks of code that you can configure to meet your needs. The disadvantage of many configurable environments is that they may be limited in functionality or in the ability to integrate with other I/O outside of motion. Programmable environments require you to use standard programming languages such as LabVIEW, C, or Visual Basic to develop your application. Motion Assistant bridges the gap between programmable and configurable by offering all of the features of a configurable system while enabling you to generate code for LabVIEW that you can integrate with your system and adapt to your needs.



Development
After prototyping, the next step is to develop your final application code. Use driver-level software in the ADE of your choice such as LabVIEW, C, or Visual Basic. For NI motion controllers, use the NI-Motion driver software.

NI-Motion contains functions that enable you to communicate with NI Motion controllers in Windows or LabVIEW Real-Time (RT). NI-Motion also contains MAX functionality to help you easily configure and tune your motion system.

For non-Windows systems, you have the option of developing your own driver using the NI-Motion Hardware Driver Developer's Kit (DDK). If you do not have the expertise or time to develop your own driver, NI Alliance Member Sensing Systems offers Linux and VxWorks drivers. They can also create drivers if you need something for other operating system such as Mac OS 10 or RTX.

Motion Controllers


The motion controller calculates the trajectories for each commanded move. This task is often done on the motion controller to prevent interference from the host computer. The motion controller uses the trajectories it calculates to determine the proper torque command to send to the motor amplifier to cause motion.

The motion controller also closes the control loop. Because closing the control loop requires a high level of determinism, it is also typically done on the motion controller. Along with closing the control loop, the motion controller also provides supervisory control by monitoring limits and emergency stops to ensure safe operation. Putting each of these operations on the board or in an RT system ensures the high reliability, determinism, stability, and safety necessary to create a successful motion control system.

Calculating the trajectory
The motion trajectory describes the profile of the control or command signal output by the motion controller board to the driver/amplifier. This results in a motor/motion action that follows the described profile. A typical motion controller calculates the segments of a motion profile trajectory based on programmed parameter values. The motion controller uses the desired target position, maximum target velocity, and acceleration values to determine how much time is spent in acceleration, constant velocity and deceleration. In the acceleration segment of a typical trapezoidal profile, motion begins from a stopped position, or from a previously in-process move, and follows a prescribed acceleration ramp until the speed reaches the target velocity for the move. Motion continues at the target velocity for a prescribed period until the controller begins the deceleration segment and slows the motion to a stop at the desired target position. The following graphic illustrates a typical trapezoidal profile.



If a move is short enough that the deceleration start point occurs before acceleration has completed, the profile will appear triangular instead of trapezoidal and the actual velocity attained may fall short of the desired target velocity.

An enhancement to the basic trapezoidal profile is s-curve acceleration/deceleration, where the acceleration and deceleration ramps are modified into a nonlinear, curved profile. An s-curve profile allows for fine control over the shape of these ramps is useful for tailoring the performance of a motion trajectory based on the inertial, frictional forces, motor dynamics and other mechanical limitations of motion systems.

Typical Motion Profile Options
The following sections discuss the various profile options available on a typical motion controller.

Single-Axis Point to Point Motion
Single-axis point-to-point motion is one of the most basic types of moves. The main parameter required for this move is the position the axis needs to get to, or target position. In addition to the position parameter, the motion controller also often requires velocity and acceleration parameters. These are usually supplied by a default setting. The following LabVIEW example illustrates a single-axis move using the default velocity and acceleration.



Coordinated Multi-Axis Motion
Coordinated multi-axis, or vector, motion moves are often also point-to-point motion but in a two- or three-dimensional space. The main requirement for vector moves are the final positions on the x-, y-, and/or z-axis. Your motion controller will also require some type of vector velocity and acceleration. Vector motion profiles are commonly found in xy type applications such as scanning or automated microscopy. The following LabVIEW example illustrates a two-axis move.



Refer to the examples in Multiaxis.llb that ships with NI-Motion for more information about coordinated motion.

Blended Motion
Blended motion involves two moves that are fused together by a blend that causes the moves to seem like one. The main requirements for a blended move are two moves and a blend factor, which specifies how large the blend will be. Blending is useful for applications where you need continuous motion between two different moves. One of the issues to consider before using blended motion is that the blended path will not pass through all of the points in your original trajectory. If the specific position along the path is important to you, consider is contouring. The following graphic illustrates the effect of blending on a motion path.



The following LabVIEW example illustrates a blending move between two vector moves.



Refer to the Sequence of Blended Vector Moves example that ships with NI-Motion for more information on blending.

Contoured Motion
Contouring enables you to supply a buffer of positions and then create a smooth path or spline through those positions. The advantage of contouring is that you are guaranteed to pass through each of the specified positions. The following graphic illustrates a contouring move.



The following LabVIEW example illustrates a contour move. Refer to the examples in Contouring.llb that ships with NI-Motion for more information about contouring.



Electronic Gearing
Electronic gearing enables you to simulate the motion that would occur between two mating gears without using gears. To use electronic gearing, you supply a gear ration between a slave axis and a master axis, encoder, or ADC channel.

The following LabVIEW example illustrates how to configure a slave axis to follow a master axis.



Refer to the examples in Gearing.llb that ships with NI-Motion for more information about electronic gearing.

Motion Controller Options from National Instruments
NI offers three families of motion controllers, the low cost 733x series, the full featured 734x series, and the high performance 735x series. The 733x series are low cost controllers for 4 axes of stepper motor control offering basic functions for a wide variety of applications including single and multi-axis point-to-point motion. The 734x series are full featured controllers that offer up to 4 axes of both stepper and servo control as well as higher performance features such as contouring and electronic gearing. The 735x series are high performance controllers that offer up to 8 axes of stepper and servo control, extra I/O, and powerful features such as sinusoidal commutation for brushless motors and 4 Mhz periodic breakpoints (or position triggers) for high speed integration. The following table lists the differences between the three families of NI motion controllers.

Feature
7330
7340
7350
Number of Available Axes
2,4
2,4
2,4,6,8
Servo Control
-
P
P
Closed loop stepper control
P
P
P
Linear Interpolation
P
P
P
S Curve
P
P
P
Blending
P
P
P
Circular interpolation
P
P
P
Contouring
P
P
Electronic Gearing
-
P
P
Onboard Programming
-
P
P
Sinusoidal Commutation
-
-
P
Position Trigger Speed
100 Hz
100 Hz
4 Mhz
DIO lines
32 lines
32 lines
64 lines
Analog to digital converter
12-bit
12-bit
16-bit
PCI
P
P
P
PXI
P
P
P

Integration of Motion Control with Data Acquisition and/or Machine Vision
When creating a motion control system, you also need to consider the other requirements of your system, such as your need for data acquisition and/or machine vision. NI offers the advantage of a single source for all of your needs as well as a high speed bus for communication between system components. Using LabVIEW RT in a PXI chassis offers the ability to create stand alone systems for all of your data acquisition, machine vision, and motion control.

Motor Drives


The motor amplifier or drive is the part of the system that takes commands from the motion controller and converts them into current to drive the motor. Motor drives come in many different varieties and are matched to the specific type of motor they drive. For example, a stepper motor drive only connects to stepper motors and not to servo motors. In addition to matching the motor technology, the drive must also provide the correct peak current, continuous current, and voltage to drive the motor. If the drive supplies too much current, you risk damaging your motor. If the drive supplies too little current, you will not have the maximum torque your motor is capable of. If the voltage is too low, you will not be able to run your motor at full speed. You must also consider how your amplifier will connect to the controller you use. Some motor companies sell drives that easily connect to their specific motor. NI offers drives for both two phase stepper motors and DC brushed servo motors. These drives have screw terminals that enable you to connect to many different motors. The following table compares the different NI motor drives.

Model
Type
Axes
MaxCurrent per phase (stepper)
Continuous Current (servo)
PeakCurrent (Servo)
MID-7602
Two phase stepper
2
1.4 A
-
-
MID-7604
Two phase stepper
4
1.4 A
-
-
MID-7652
DC brushed servo
2
-
5 A
10 A
MID-7654
DC brushed servo
4
-
5 A
10 A

For connection to third-party drives and amplifiers, NI offers the Universal Motion Interface (UMI). The two types of UMI are the standard UMI-7764 with screw terminal connectivity and the more industrial UMI-7774 with D-SUB connectivity.

Motors


Motor selection and mechanical design is a critical part of designing a motion control system. Many motor companies offer assistance in choosing the right motor, but it is useful to know some basics about motors before you start looking. One of the first things to understand is what different motor technologies offer. The following table compares some of the common motor technologies.

Pro
Con
Application
Stepper MotorsInexpensive, can be run open loop, good low-end torque, clean roomsNoisy and resonant, poor high-speed torque, not for hot environments, not for variable loadsPositioning, Micro Movement
Brushed DC Servo MotorsInexpensive, moderate speed, good high-end torque, simple drivesMaintenance required, no clean rooms, sparking of brushes causes EMI and danger in explosive environmentsVelocity control, High-speed control
Brushless Servo MotorsMaintenance free, long lifetime, so sparking, high speeds, clean rooms,quiet, run coolExpensive, complicated drivesRobotics, Pick and place, Very high torque applications

After determining which technology will work for your application, the next step is to determine the torque and inertia at the motor shaft. Refer to the Motor Fundamentals article posted on the NI Developers Zone at ni.com/zone for more information about calculating torque.

Another option to consider is whether an off-the-shelf actuator or stage might work for your application. Stages offer the power transmission to enable you to get useful rotary or linear motion out of the motor and eliminate the need for a custom design. NI has a variety of partners offering stages that you can search though on the Stage Advisor at ni.com/motion/advisors.

Feedback devices


Feedback devices are designed to help the motion controller know where the motor is at. The most common position feedback device is the quadrature encoder. A quadrature encoder gives position feedback relative to where it starts. Most motion controllers are designed to work with these types of encoders. Other feedback devices include potentiometers, which give analog position feedback; tachometers, which provide velocity feedback; absolute encoders, for absolute position measurements; and resolvers, which also give absolute position measurements. NI motion controllers support feedback from quadrature encoders and potentiometers.

Other Motion I/O
Additional I/O can include limit switches, home switches, position triggers, and position capture inputs. Limit switches provide information about the end of travel to avoid damage to the system. When a motion system reaches a limit switch, the typical response is for motion to come to a halt. Home switches indicate the home position of the system and define a reference point. Defined reference points are critical for a motion system. The following graphic illustrates how limit switches can be used in a motion system.



Triggers, such as position trigger outputs or position capture inputs, help when integrating with other devices. Position trigger outputs (also called breakpoints and position compare) enable you to set up a trigger that will execute at a prescribed position. This type of action is very useful when performing operations, such as scanning where you might want to trigger a measurement system to take measurements at a series of prescribed positions. Position capture inputs are inputs that cause the motion controller to immediately capture the position of an event and store it in memory for later reference. Position capture is useful if you have an external trigger and you would like to know the position where it occurs at in your system.

Conclusion


The information in this document is an overview of motion control and how to get started with your own motion control system. Refer to the NI Developers Zone at ni.com/zone for more additional information, example programs, and tutorials on specific topics within motion control.
50 ratings | 4.08 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. 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/).