Optimize Your Machine Control System: A LabVIEW FPGA Design Guide (Presentation)
Overview
Field programmable gate array (FPGA) technology provides the reliability of dedicated hardware circuitry, true parallel execution, and 20 MHz closed loop control performance. This session will show how to use LabVIEW FPGA-based programmable automation controllers (PACs) to improve the performance and reliability of your machine. We will demonstrate how to use LabVIEW FPGA tools to implement common analog and digital control loops and introduce new function blocks for motion control, sensor interfacing, filtering, scaling, integer math, and more.
Presentation Content
- Introduction to LabVIEW FPGA technology
- FPGA-based hardware platforms
- When to use FPGAs for machine automation
- LabVIEW FPGA programming guidelines
- Summary
Summary
An FPGA is a device that contains a matrix of reconfigurable gate array logic circuitry. When an FPGA is configured, the internal circuitry is connected in a way that creates a hardware implementation of the software application. FPGAs are truly parallel in nature so different processing operations do not have to compete for the same resources. As a result, the performance of one part of the application is not affected when additional processing is added. Also, multiple control loops can run at different rates on a single FPGA device. FPGA-based control systems can enforce critical interlock logic and can be designed to prevent I/O forcing by an operator. However, unlike hard-wired printed circuit board (PCB) designs which have fixed hardware resources, FPGA-based systems can literally rewire their internal circuitry to allow reconfiguration after the control system is deployed to the field. FPGA devices deliver the performance and reliability of dedicated hardware circuitry.A single FPGA can replace thousands of discrete components by incorporating millions of logic gates in a single integrated circuit (IC) chip. The internal resources of an FPGA chip consist of a matrix of configurable logic blocks (CLBs) surrounded by a periphery of I/O blocks. Signals are routed within the FPGA matrix by programmable interconnect switches and wire routes. FPGAs provide a variety of performance and economic benefits for machine automation. Because of the performance of FPGAs, you can run LabVIEW code at up to 40 MHz providing for the fastest commercial off-the-shelf (COTS) control system (motion/PID control exceeding 200 kHz). The parallel nature of FPGAs and LabVIEW also allow you to run multiple control and acquisition processes simultaneously on the FPGA. This enables you to replace multiple pieces of hardware and subsystems with a single FPGA-based system. Unlike processors, FPGAs use dedicated hardware for processing logic and do not have an operating system. Therefore, there is no software dependency associated with FPGAs giving you the highest level of reliability, which is crucial for machine automation applications.
With LabVIEW FPGA technology, you can quickly and easily design, prototype, and even deploy your FPGA hardware quickly to rapidly introduce new machines to the marketplace. And because FPGAs are software programmable, you can use LabVIEW tools to change the functionality of your machine by simply downloading a new LabVIEW application to the FPGA without changing any hardware. LabVIEW creates the easiest way to program and customize FPGA chips for machine automation. There are a variety of control and analysis libraries and software tools to speed development of your machine automation application and get your machine to market faster. Most of these functions are built into the LabVIEW FPGA palette such as I/O, discrete PID for analog control, digital and numeric comparison functions, saturation math, and data transfer [direct memory access (DMA) and interrupt request (IRQ) transfer]. Additional functionality such as custom motion control and digital filter design can be implemented with the NI SoftMotion development module and the NI Digital Filter Design Toolkit respectively.
The SawStop demonstration at NIWeek 2005 is an excellent example of the performance and reliability gained by using FPGA-based control. All of the control and processing of this application was programmed into the embedded FPGA of CompactRIO for the highest level of reliability and performance. To detect when a human comes in contact with the blade, CompactRIO induces a 10 kHz sine wave onto the blade and then monitors that signal at high speeds. The human body has a large electrical capacitance which causes the signal to decrease in amplitude when a person contacts the blade. Wood has a small capacitance and does not cause the signal to decrease in amplitude. The FPGA of the CompactRIO generates and monitors the sine wave at 5 ms rates. The FPGA of CompactRIO performs digital signal processing to detect the small change of the sine wave signal when a human touches the blade and react within microseconds to engage the SawStop brake system instantly. This application also shows the rapid development gained using LabVIEW tools to design and prototype automation machinery. It took us less than two weeks to design, prototype, and deploy this control system with CompactRIO. We incorporated all the high-speed timing, triggering, and digital signal processing directly on the CompactRIO FPGA; everything was programmed in two days using LabVIEW.
There are a variety of new features in LabVIEW 8 for FPGA-based hardware. You now have the ability to use direct memory access (DMA) to transfer data at high rates from the FPGA to a real-time or Windows processor. The new DMA feature includes a built-in transfer scheme that makes it easy to setup and transfer data from your LabVIEW FPGA application. The new LabVIEW 8 project manager allows you to program and run LabVIEW programs on different targets (FPGA, Real-Time, and Windows) simultaneously, creating an even faster development process for FPGA-based automation systems. The LabVIEW Project Explorer displays all devices used in a project. Easily drag and drop VI source code files to each target to specify where you want your LabVIEW code to run. LabVIEW 8 also provides new shared variable technology. Create shared variables to easily pass data among VIs executing on various targets. You can enable additional shared variable features such as network buffering and non-blocking FIFOs to reduce jitter when transferring data. And you can now communicate directly from your CompactRIO FPGA-based control system to a variety of PLCs and HMI displays with native Modbus/TCP and serial support for the CompactRIO real-time controller.
FPGAs provide a variety of performance and economic benefits for machine automation. Because of the performance of FPGAs, you can run LabVIEW code at up to 40 MHz providing for the fastest commercial off-the-shelf (COTS) control system. The parallel nature of FPGAs and LabVIEW also allow you to run multiple control and acquisition processes simultaneously on the FPGA. This enables you to replace multiple pieces of hardware and subsystems with a single FPGA-based system. Use FPGA-based hardware to design, prototype and deploy your next machine automation solution and be able to upgrade your system whenever customer requirements change.
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/).
