NI-RIO: Fast Prototyping

Oct. 24, 2006
LabView's Compact RIO is a small real-time, modular platform that is ideal for prototyping. Embedded Technology Editor Bill Wong takes a look at how this innovative, FPGA-based system works.

Building a prototype can be a tedious task at best. This is especially true when you don't want to or don't know how to develop the necessary hardware. Enter National Instrument's Compact RIO (Fig. 1). Now it is possible to create some rather advanced prototypes while dealing with the software aspects and hardware connectivity instead of the low level hardware interconnects and interface software.

Compact RIO is an architecture that incorporates hardware and software. The latter is LabView (see EIED Online>> LabView: Graphical Programming, ED Online ID 13873), a graphical programming environment that we will take a look at in more detail later in the article. In the meantime, let's concentrate on the hardware component.

You can view Compact RIO as a custom computer with a flexible backplane and modules that plug into it. The truth is a bit more complex because the backplane is really an FPGA. This allows a developer to incorporate high speed processing on data that is passed between the modules and the processor. The main processor interfaces to the FPGA and the modules through the FPGA.

What is in the main processing unit? You can find out but normally the programming is done using LabView so you don't really need to. It has its own nonvolatile storage and an Ethernet interface plus a serial port. In general, the system can be programmed via the Ethernet connection from a remote PC. It can run standalone once programmed. It can also be managed as a remote network device.

Part of the programming that you can load into the processing unit is the configuration of the FPGA. But don't fret. National Instruments does not expect most Compact RIO users to be VHDL or Verilog programmers. Instead, this work is left to LabView. Compact RIO developers are expected to build up a system predefined components that are logically wired together. The result is munged by LabView, downloaded to the main processor and dropped into the FPGA. Of course, that is just the portion of the LabView code that is for the FPGA. The other code runs on the main processor.

So far we have our program and the FPGA has been configured. What the FPGA talks to is the Compact RIO modules that are plugged (Fig. 2) into backplane. The standard system has four slots but different configurations are available. There are a number of standard modules available like the 6-channel differential input module (Fig. 3). A developer only needs to choose the interfaces required and plug them in. It is also possible to build custom interface modules although typically a module such as a parallel IO module is used to connect the system to an external device. Custom devices are normally used as developers move through the prototyping stage or if the Compact RIO is used in a rugged environment where more exposed devices are not desirable.

The overall architecture is rather simple. The power comes in the selection of modules available, the FPGA, and the ability of the software to isolate most developers from the details of the hardware. A prototype can be started by selecting the necessary interface modules to plug into the system. Then it is time to move over to the software.

LabView: The Tie That Binds
LabView is National Instruments graphical programming environment. LabView has support for Compact RIO and the standard CompactRIO plug-in modules. This includes LabView virtual instrument (VI) definitions for each plug-in module that can be dragged into a graphical program and wired up as necessary.

A VI is a combination user interface, subroutine and configuration package. VIs are not restricted to software front-ends to a plug-in module. VIs can be everything from digital filters to while loops. A VI can be constructed using other VIs.

A Compact RIO application consists of a combination of VIs that include the plug-in module VIs. The other VIs wind up in the controller or the FPGA depending upon what they are and how they are connected. This allows modules to be connected directly to each other through the FPGA without even going through the controller. This significantly raises the throughput bar since FPGA processing can often handle data in real time that the controller's processor could not.

Explaining what will go where is a little beyond this article but essentially it is a matter of choosing what VIs go where. LabView handles the compiling and linking of the appropriate code (for the controller or FPGA) and download it as well.

The neat thing is how trivial it is to run this code on the PC or on the CompactRIO system, or both. LabView can even run a simulation of the system without any hardware. Best of all, LabView's debugging facilities are the same regardless of where the code actually resides.

Compact RIO's modular architecture and graphical programming support opens hardware and software development to non-programmers and engineers. It also provides a platform for experts to crank out systems and prototypes faster. It is definitely worth a look.

Related Links National Instruments
www.ni.com

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!