1. Why Build a Rugged Mobile Test Instrument?
Similar to stand-alone traditional instruments, mobile test instruments are designed to perform one or more specific tasks defined by the vendor. However, you generally cannot extend or customize them. The knobs and buttons on the instrument, built-in circuitry, and functions available, are all specific to the nature of the instrument.
Because they are PC-based, virtual instruments inherently take advantage of the latest technology incorporated into off-the-shelf PCs and now PDAs. In addition to incorporating powerful features, these platforms also offer easy access to useful tools such as wireless communication. However, many test and data acquisition applications take place in harsh outdoor environments, subjecting the instrument to extreme variations in temperature, humidity, moisture and shock not typically encountered in laboratory environments. Consumer grade PDAs will not typically survive long term operating under such conditions. Rugged field computers, such as Juniper Systems Allegro CX device shown in Figure 1, provide a platform for mobile handheld instruments that will withstand the extremes of harsh environments.
Figure 1: Example of a Rugged PDA Device
Using LabVIEW to Build Your Virtual Instrument
LabVIEW is the most important component of your portable virtual instrument. Using LabVIEW, you design custom virtual instruments by creating a graphical user interface on the PDA screen through which you:
· Communicate with various instruments
· Control selected hardware
· Analyze acquired data
· Display test results
· Log data to a file
LabVIEW allows you to quickly customize front panels with knobs, buttons, dials, and graphs to emulate control panels of traditional instruments, creating custom user interfaces. The LabVIEW PDA Module extends the LabVIEW development environment to applications for PDA handheld devices. Using this module, you develop in LabVIEW on a desktop or laptop PC and then download applications to portable PDA targets. The LabVIEW PDA Module automatically compiles your LabVIEW application to run on a PDA device and optimizes the application for the smaller memory space and unique processors that are common to PDAs. With LabVIEW PDA technology, you can quickly create a portable data acquisition application with a user-defined interface, data storage, and custom analysis. You can also create a custom handheld digital multimeter or battery tester.
2. Step 1: Software and Hardware Installation
Before you begin programming a rugged test instrument, you need to purchase and install the following software products. Please follow the instructions outlined in the Getting Started Guide or Readme for each product. You also need to purchase the hardware listed below before you can actually run and deploy your application.
· LabVIEW Development System
· LabVIEW PDA Module
· NI-DAQmx Base 1.0 driver (free download)
· NI PCMCIA-4050 DMM Driver for LabVIEW PDA (free download)
· Allegro CX SDK (free download)
· NI 6036E DAQCard
· NI 4050 PCMCIA DMM
· Allegro CX DMM expansion pod
· Allegro CX DAQ expansion pod
3. Step 2: Building a Mobile Data Acquisition Application
To build an application in LabVIEW and deploy it to a handheld device, you must first specify the PDA as your execution target. This reconfigures the development environment so that only functions compatible with PDA devices are accessible from the menus, controls palette, and functions palette. Additionally, it compiles the code to the particular device operating system you select. These changes make it easier for you to develop applications specifically for handheld devices and therefore further reduce your development time.
Once you have selected the PDA as a target, you can begin to develop the application in LabVIEW using many of the familiar LabVIEW functions and tools, as well as newly-added capabilities specific to the PDA. The controls are optimized for deployment to PDAs, which means they take up less memory and are optimized for performance on the processors specific to PDA devices. Functions such as data acquisition, instrument control, modular instrumentation, analysis, and wireless communication are also optimized for performance on PDA devices.
To develop a mobile data acquisition application using the NI 6036E DAQCard, you will use the NI DAQmx Base 1.0 driver. This driver offers a subset of NI-DAQmx functionality for Windows Mobile or Windows CE applications. Figure 2 shows an example of a simple handheld data acquisition application which acquires data from up to four channels and plots this data on a graph. The program is briefly explained below:
1. The while loop runs until the Scan button is pressed.
2. The case structure then executes the True case, which acquires data on up to four analog input channels and displays this data on a graph.
3. The program exits the while loop when the Exit button is pressed.
Figure 2: Simple Handheld Data Acquisition Application
4. Step 3: Building a Handheld Digital Multimeter (DMM)
Similar to developing a handheld data acquisition application, you first need to select the PDA as your execution target. Next, you develop your application on the host PC. Finally, deploy the LabVIEW program to the PDA once it is completed.
To develop a mobile digital multimeter application using the NI 4050 PCMCIA DMM, you will use the NI PCMCIA-4050 DMM driver for LabVIEW PDA. This driver has an intuitive LabVIEW application programming interface (API). The API exports the complete functionality of the NI 4050 digital multimeter through three VIs (DMM Config, DMM AutoRange, and DMM Read). Figure 3 shows an example of how simple it is to create custom PDA digital multimeters.
1. The code inside the case structure configures the measurement dial that appears on the front panel, or user interface.
2. Two DMM VIs are then used to first configure the measurement and then retrieve the measurement every 100 ms.
3. The measurement is formatted to display 51/2 digits and then displayed on the user interface.
Figure 3: Handheld Digital Multimeter (DMM)
You can also develop more sophisticated digital multimeter applications, such as a battery tester, which take advantage of the integrated keyboard on the Juniper Systems Allegro CX device. Figure 4 shows an example of the block diagram for a battery tester application.
1. Similar to the simple DMM application in Figure 4, two DMM VIs are used to first configure the measurement and then retrieve the measurement every 100 ms.
2. When the Save button is pressed, the code inside the case structure writes the Battery ID and Battery Status from the user interface to a text file, along with the current DMM measurement.
3. The two string controls on the front panel are then cleared so that the appropriate ID and Status can be entered for the next battery test.
The front panel for this VI is shown in Figure 5.
Figure 4: Battery Tester Block Diagram
Figure 5: Battery Tester Front Panel
5. Step 4: Example Programs
Now that you understand what technologies are used to build a rugged test instrument, you can begin to develop your own applications. Feel free to download the examples from the download section to guide you through the development of either a handheld data acquisition or digital multimeter (DMM) application.
6. Step 5: Deploy to the Allegro CX or other PDA
When you have finished developing the LabVIEW PDA application, compile the application and download it to the PDA by clicking the run arrow. After pressing the run arrow, LabVIEW compiles the code into an executable to run on the target device. If a PDA is connected to the development system, LabVIEW will also automatically download the application immediately after the build. After building and downloading the application, the application on the PDA will be ready to use.
7. More Information
For more information about the technology and products discussed in this tutorial refer to the following online information:
· LabVIEW PDA Module
· NI 6036E DAQCard
· NI PCMCIA-4050 5 ½ digit digital multimeter
· Juniper Systems Allegro CX