Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
What is Developer Zone?
United States

Document TypeTutorial
NI Supported: Yes
Publish Date: Jul 30, 2010


Feedback


Yes No

Related Links - Developer Zone

Related Links -Products and Services

Control with X Series

1 Ratings | 3.00 out of 5
Read in  |  Print |  PDF

Table of Contents

  1. What is Control?
  2. Types of Control Applications
  3. Hardware and Software Requirements
  4. Addressing Control Requirements with NI X Series Data Acquisition
  5. Analog and Digital I/O
  6. Counters
  7. Synchronization
  8. Software
  9. Next Steps

What is Control?

In engineering, control applications refer to those where devices are used to regulate the behavior of other devices. An example of such an application is cruise control in a car. The driver sets a target velocity to maintain. After that, the control system in the car constantly monitors the velocity and then accordingly accelerates or decelerates in order to get to the target velocity.

Types of Control Applications

A control system consists of a controller and a plant. The controller is the device that regulates the output sent to the plant. Control systems are broadly divided into two categories: open loop and closed loop systems.

In an open loop system, commands are sent from the controller to the plant and no feedback is received by the controller. An example of such an application is a lawn mower. A button is pressed to trigger the lawn mower on, but there is no sensor used to check if the lawn mower is working as expected.

Figure 1 . The controller compares feedback to a user-defined set point in a closed loop control system.

In a closed loop system, the controller not only sends commands to the plant, but also receives feedback from the plant. Closed loop applications are more common than open loop applications. An example of a closed loop application is a PID controller for a servo motor. The controller calculates the servo motor trajectory based on the position feedback obtained from an encoder.

Hardware and Software Requirements

There are certain hardware and software requirements in order to develop the appropriate controller required for a specific control application.

On the hardware side, a controller needs to be able to send and receive analog as well as digital signals. Counters/timers are also useful for synchronizing input and output tasks, both internally and externally with other devices. The controller must be able to send trigger pulses at high frequency and precision. The device must have low latency when acquiring and generating samples, in order to respond quickly to a change in feedback. Fast response to feedback is a critical component of closed loop control systems.

On the software side, the user must be able to build and implement various types of control techniques. This would allow a controller model to be rapidly customized and prototyped, which is very beneficial in tuning the controller according to the plant model and external conditions.

Addressing Control Requirements with NI X Series Data Acquisition

X Series multifunction data acquisition (DAQ) devices have analog I/O, digital I/O, and four counter/timers on a single device. You can use them for a variety of control applications. You can choose X Series devices in USB, PCI Express, and PXI Express form factors. PCI Express and PXI Express X Series devices are ideal for control applications because of their low latency and LabVIEW Real-Time support.

Figure 2. X Series devices for PCI Express and PXI Express have a low-latency bus interface and are therefore ideal for closed-loop control applications.

NI-STC3 timing and synchronization technology offers independent analog and digital timing and also provides four enhanced counters with an improved timebase. With NI LabVIEW and the NI-DAQmx driver, it is possible to quickly design a software-based controller that is able to execute digital, analog, and counter tasks.

Analog and Digital I/O

You can use analog output to send voltage signals to servo motor amplifiers. Analog encoder signals, such as those obtained from a rotary shaft encoder, can be read at rates of up to2 MS/s per channel. With X Series devices, digital I/O lines have their own timing engine for input and output at up to 10 MHz . You can use digital output to trigger relays that power actuators or other parts of the control system. The digital input lines can be used to trigger the start/stop of a specific portion of the application based on external switches or triggers.

Counters

X Series device counter can measure and generate frequency, PWM, quadrature encoder, and more. This makes X Series devices useful for precise closed-loop motor applications. Edge counting can be performed to keep track of rising or falling edges of an incoming digital pulse train. This can be used in control applications where a task is regulated based on the digital pulses received from an external device such as a camera.

Each counter can be used to generate a finite, buffered, or retriggerable pulse. You can use digital pulse trains to move a stepper motor to a specific location or position. The frequency and duty cycle of the output pulse train are programmable; therefore, the velocity of a stepper motor can be controlled as well.

Synchronization

With X Series devices, you can easily synchronize the analog, digital, and counter subsystems on the device. You can also synchronize an X Series device with another device in your system. USB X Series devices have programmable function interface (PFI) lines, which you can use in conjunction with wires to coordinate timing with other devices connected to your PC. For PCI Express X Series, you can use a Real-Time System Integration (RTSI) cable to synchronize one or more X Series devices with NI vision and motion hardware. You can easily synchronize PXI Express X Series devices with the timing and triggering lines on the PXI backplane.

Figure 3. You can easily synchronize PXI Express X Series modules with other devices by sharing clocks over the PXI backplane.

Software

LabVIEW is a graphical programming language that allows for quick and easy application development. This development environment can be used to interface with X Series devices. The NI-DAQmx driver provides an easy-to-use API that you can use to program analog, digital, and counter tasks. This driver can also be used with C, C++, C# and VB.NET. PCI Express and PXI Express X Series devices require NI-DAQmx driver software version 9.0 or later. USB X Series devices require NI-DAQmx version 9.2 or later.

Figure 4. LabVIEW applications consist of a front panel (left) and block diagram (right).

The NI LabVIEW Real-Time Module is an add-on component for the LabVIEW Development System that allows for application development and deployment on real-time targets. Contol applications frequently require high levels of determinism, which you can achieve by using LabVIEW Real-Time.

The NI LabVIEW PID Control Toolkit adds a library of functions to implement PID and fuzzy logic control algorithms in LabVIEW.

For more advanced control applications, such as those where a controller model needs be created in software from a transfer function representation, you can use the NI LabVIEW Control Design and Simulation Module. This software provides functions to analyze both open-loop and closed-loop behavior, as well as to simulate a control system before actually physically implementing it.

Figure 5. You can use X Series devices with the LabVIEW Control Design and Simulation Module and PID Control Toolkit to perform single-point control, such as PID.

Finally, the NI SoftMotion Development Module is useful for motion control applications. It includes functions for trajectory generation, spline interpolation, position and velocity PID control, and encoder implementation. This software would be used with LabVIEW Real-Time to run low performance motion applications with X Series devices.

Next Steps

See the X Series Control Starter System >>

Watch the X Series for Control webcast >>

See X Series specifications and pricing >>

 

1 Ratings | 3.00 out of 5
Read in  |  Print |  PDF

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/).