1. Why Build a LabVIEW PDA Digital Multimeter?
Similar to stand-alone traditional instruments, handheld 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.
Using LabVIEW to Build Your Virtual Instrument
LabVIEW is the most important component of your portable virtual instrument. With the right software tool, you efficiently create your own applications, by designing and integrating the routines that a particular process requires. With 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 results
With LabVIEW you 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 hand-held devices, as shown in figure 1. With this module, you develop in LabVIEW on a desktop or laptop PC and easily download applications to portable PDA targets. With LabVIEW PDA technology, you can quickly create a portable digital multimeter with a user defined interface, data storage, Bluetooth communication, and custom analysis.
Figure 1: Bluetooth Enabled PDA Digital Multimeter
2. Step 1: Software and Hardware Installation
Before you begin programming your Bluetooth enabled PDA digital multimeter, 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 PCMCIA-4050 Driver for LabVIEW PDA (free download)
· NI PCMCIA-4050 5 ½ digit Digital Multimeter
· PocketPC 2003 device (ie. HP)
· PCMCIA adaptor for PDA device
3. Step 2: Build a PDA Digital Multimeter Application
To build an application in LabVIEW and deploy it to a PDA, you must first choose the PDA as the execution target. This reconfigures the development environment so that it compiles the code to the particular PDA operating system you select. When you select the PDA as the target you want to deploy to, LabVIEW also reconfigures the development environment so that only functions compatible with PDA devices are accessible from the menus, control palette, and function palette. These changes make it easier for you to develop applications specifically for PDAs and therefore further reduce your development time.
Once you have selected your PDA as a target, you can begin to develop the application in LabVIEW, using many of the familiar 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 used on PDA devices. Many of the functions in LabVIEW are also optimized for performance on PDA devices, including data acquisition, instrument control, modular instrumentation, analysis, and wireless communication. Using the intuitive LabVIEW graphical development environment to design your application saves you time because you are building the application as a flow chart, using icons to represent functions, and wires to represent data being passed from one function to another. By using LabVIEW, you develop a professional user interface and easy-to-understand, concise code in less time than with other programming languages.
Digital Multimeter PDA Driver
To build a PDA digital multimeter application you need to use the NI PCMCIA-4050 Driver for 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 2 shows an example of how simple it is to program/create your PDA digital multimeter. The four sections of the program are explained below:
1 – User selects the measurement range and function in a case structure (voltage, resistance, etc…)
2 – The DMM Config SubVI configures the NI 4050 multimeter
3 – The DMM Read SubVI is executes the measurement and returns the NI 4050 multimeter reading (no inputs are required)
4 – Transfers data via Bluetooth communication
Figure 2: Screenshot of the basic PDA example
4. Step 3: Enabling Bluetooth Communication
Adding wireless communication to handheld digital multimeters adds a whole new dimension of flexibility to these measurement devices. Most digital multimeters only display the current, voltage, or resistance reading back to the operator, who must then write it down on paper. With the additional flexibility of a PDA where the data is both displayed and stored, you have greater functionality in your digital multimeter testing devices because you can track all of the readings you have taken, instead of just viewing a single reading. You can then share it with other engineers and compare your tests with the results obtained by others. Using the PDA’s built-in Bluetooth wireless communication, transferring this data to any other computer system is easy to program and use
Bluetooth communication is the result of the collaboration of many companies needing a way for different devices to be able to easily communicate with each other. Bluetooth accomplishes this by the fact that every Bluetooth device can detect any other Bluetooth device that is within the broadcast range (typically up to 30 meters). In addition to detecting other Bluetooth devices, each device can query what “services” or applications are available from the other Bluetooth device which means that establishing communication with other applications and transferring data between Bluetooth devices is often automatic when the devices are within range of each other. Using Bluetooth in LabVIEW applications is very similar to using TCP communication VIs so it takes very little time to incorporate Bluetooth protocols into any LabVIEW application. With the addition of Bluetooth development to LabVIEW, adding wireless communication to any PDA digital multimeter instrument becomes effortless, and due to the timesaving features inherent in Bluetooth communication, so is sending data wirelessly to desktop computers from PDAs.
For more information about what Bluetooth communication is, how auto-device discover and auto-service discover work, look at the Bluetooth consortium official website at www.bluetooth.com. This website also contains information about which companies are involved in developing the Bluetooth standard for wireless communication and a list of the thousands of devices that already use Bluetooth.
5. Step 4: Example Programs
Now that you understand what technologies are used to build PDA multimeter devices you most likely want to know how to build an application. Use the following two examples to guide you through the development of your Bluetooth enabled PDA digital multimeter.
1. Basic PDA digital multimeter example (Shipped with driver)
This example uses a NI 4050 in a Pocket PC 2003 device to acquire data such as DC Volts, AC Volts, and resistance. The example will run continuously until you click on the exit button.
This example uses a NI 4050 in a Pocket PC 2003 device to acquire data such as DC Volts, AC Volts, and resistance. Different tests can be selected to determine whether or not the acquired measurement is within a predefined specification. In order to use Bluetooth, the PDA and PC must have Bluetooth capabilities. In addition to the application running on the PDA, there is also a Bluetooth Server VI to run on the PC which will provide a second Bluetooth device for the PDA to communicate with.
6. Step 5: Deploy to Pocket PC 2003 Device
When you have finished constructing the 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 on-line information:
· LabVIEW PDA module product page
· NI PCMCIA-4050 5 ½ digit digital multimeter product page