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 2:00:00 AM
|
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.

Boeing engineers developed a real-time, Linux-based system that simulates signals from "man-in-the-loop" controls, such as sticks, throttles, and rudders. Engineers at Sandia used embedded Linux to develop a handheld general-purpose data-acquisition system.
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. |
Coincidentally, the lead engineers in the Boeing and Sandia applications have the same name—Richard Jennings. Boeing's Senior Specialist Engineer Richard Jennings needed a real-time system to acquire aircraft control signals. Windows was too slow for the job, as was standard Linux. Jennings needed a system that responds to instrument commands in less than 1 ms, but response times from Windows and standard Linux can run as long as 30 ms.
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 Linux
Besides 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. |
The system runs a stripped-down version of Linux and controls a National Instruments PC-Card data-acquisition card (Figure 2). The PC/104 embedded computer stack uses a PC-Card adapter to communicate with the card. Jennings wrote the application software using the Linux version of LabView, and he reports that Linux crashed only once—the result of a driver error.
|
|
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.
| Reference |
|
Linux: A Worthy OS for Real Applications
10/15/1998Find instrument drivers online
07/01/2001Chickens or eggs?
01/31/2002PC instrumentation through the ages
09/14/2001Linux drivers
01/31/2006
-
FLIR offers IR camera for under $3000
-
Don't let the economy compromise quality (Guest commentary)
-
Danaher speeds up restructuring, acquires life-sciences businesses
-
Agilent’s Cover-Extend technology eliminates need for physical test points for in-circuit test
-
So many combinations: Testing a switch-matrix board

























