Log In   |  Register Free Newsletter Subscription
Global TMW:
Skip navigation
Zibb
Subscribe to Test & Measurement World
RSS
Reprints/License
Print
Email
Average Rating:
  • (0)
    Rate this:
  • 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

    Linux drivers
    Custom Linux

    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
    1. Ivchenko, Alex, "Get Those Boards Talking Under Linux, Test & Measurement World, May 2000. p.36. www.tmworld.com/archives.

    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.
    Average Rating:
  • (0)
    Rate this:
  • RSS
    Reprints/License
    Print
    Email
    Talkback
    Reed Business Information Resource Center

    Featured Company


    Related Resources

    Advertisement

    Related Microsite Content

    Related Links

    • No Related Content Available

    More Content
    • Blogs
    • Webcasts

    Sorry, no blogs are active for this topic.

    » VIEW ALL BLOGS RSS

    EDN's Designing with LEDs
    Advertisement
    TMW Video - www.tmworld.com/video/
    NEWSLETTERS
    Test Industry News
    Automotive, Aerospace & Defense
    Communications Test
    Design, Test & Yield
    Machine-Vision & Inspection
    Instrumentation



    Please read our Privacy Policy

    About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   FREE Subscription   |   Editorial Calendar
    © 2010 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
    Use of this Web site is subject to its Terms of Use | Privacy Policy
    Please visit these other Reed Business sites