Stabilize measurements with Linux
Two applications show that the open-source operating system keeps on running.
Martin Rowe, Senior Technical Editor -- Test & Measurement World, 3/1/2003
|
The Linux operating system (OS) has frequently been touted as a reliable, stable alternative to Windows in test applications. Recently, engineers at Boeing (St. Louis, MO) and Sandia National Labs (Livermore, CA) developed test systems that employ the OS, demonstrating that Linux lives up to its promise.

Both applications show that Linux is a viable, stable OS for use with instrumentation. Linux can run on embedded computers and, with real-time extensions, perform timely measurements. But on the down side, using Linux often requires more programming expertise than using Microsoft Windows or Apple MacOS.
Real-time aerospace application
![]() |
|
Figure 1 A single-board computer running both real-time and standard Linux simulates signals from aircraft controls such as sticks, throttles, and rudders. |
To get real-time response, Jennings combined standard Linux with the Realtime Linux Application Interface (RTAI, www.aero.polimi.it/~rtai). The two distributions run on separate processors on a dual-processor, single-board computer (SBC) installed in a PCI passive-backplane chassis (Figure 1).
One processor, running standard Linux only, handles communications with an external computer over an Ethernet link. The external computer runs the simulation of aircraft dynamics and provides a graphical user interface (GUI).
The second processor, which runs standard Linux and RTAI simultaneously, performs real-time control on the 14 I/O cards in the passive-backplane chassis:
- two 32-channel analog-output cards from United Electronic Industries (Canton, MA: www.ueidaq.com),
- one 64-channel analog-input card from National Instruments (Austin, TX; www.ni.com),
- nine 96-channel digital I/O cards from Measurement Computing (Middleboro, MA; www.mccdaq.com), and
- two eight-port RS-232 interface cards from Comtrol (Hopkinton, MA; www.comtrol.com).
Because Jennings needed a real-time OS to control the instrument cards, he had to either write his own drivers or modify Linux drivers obtained from the card manufacturers. For the analog-output cards, Jennings obtained the source code from UEI for the card's Linux driver and modified it to run under RTAI. He wrote his own drivers for the digital I/O cards because Measurement Computing doesn't offer Linux drivers for its products.
For the NI analog-input card, Jennings also wrote his own real-time driver. (For previous applications, he had used an ISA-bus version of the card and had written a DOS driver; he used the DOS driver as a model for the Linux/RTAI driver.) The Comtrol serial-port cards run under standard Linux, so they didn't require a real-time Linux driver. (To learn more about writing Linux drivers for instrument cards, see "Get Those Boards Running Under Linux," Ref. 1.)
When a user starts the system, standard Linux performs all initialization required and initializes the real-time RTAI tasks. The real-time RTAI tasks control the instrument cards while standard Linux processes handle "soft" real-time tasks such as RS-232 communications. RTAI processes and standard Linux processes communicate through shared memory and mailboxes. Together, they send measurement data to the simulation computer, and in turn, receive commands to control simulation hardware.
Embedded LinuxBesides running on desktop, notebook, and single-board computers, Linux runs on embedded computer systems. Sandia Labs' Richard Jennings, a principal technologist, developed a general-purpose data-acquisition system based on PC/104 embedded computers.
![]() |
|
Figure 2 A PC-Card card stack controls a data-acquisition card with LabView for Linux. Courtesy of Sandia National Labs. |
![]() |
|
Richard Jennings, Sandia |
LabView runs on Windows, Linux, and Macintosh operating systems, and Jennings chose Linux because he believes it is the most stable and customizable OS. He removed unneeded components from the open-source OS, reducing its size from more than 100 Mbytes to less than 20 Mbytes. That's impossible under the closed Windows and Mac OSs. Stripping Linux is difficult, but it is a necessary step for embedded applications. "Custom Linux," above, discusses methods you can use to shrink the OS.
Jennings obtained the driver he needed for his data-acquisition card from an open-source project called Comedi (www.comedi.org), which contains Linux drivers for instrument cards from several manufacturers. After downloading the driver, Jennings had to compile the source code and install it into his application.
The engineers at Boeing and Sandia chose Linux because it enabled them to develop stable, reliable applications. Both applications required detailed knowledge of Linux, but not all Linux data-acquisition applications require such programming expertise. If you use downloaded drivers, you may have to compile them, but you don't need to know Linux's inner workings to do that. "Linux drivers," p. 34, provides a list of data-acquisition hardware manufacturers that provide Linux drivers.
| Author Information |
| Martin Rowe has a BSEE from Worcester Polytechnic Institute and an MBA from Bentley College. Before joining T&MW in 1992, he worked for 12 years as a design engineer for manufacturers of semiconductor process equipment and as an applications engineer for manufacturers of measurement and control equipment. E-mail: m.rowe@tmworld.com. |
| Reference |
|
|



















