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.