Performing Handheld Measurements using LabVIEW Mobile and NI USB Data Acquisition Devices
Overview
The National Instruments LabVIEW Mobile Module can be used to develop applications for Windows Mobile and Windows CE devices. A variety of NI Data Acquisition (DAQ) devices can be used with LabVIEW Mobile for handheld measurement systems that integrate with wireless technologies such as 802.11 and Bluetooth to easily establish communication with embedded LabVIEW applications. This document explains how to perform data acquisition using the National Instruments LabVIEW Mobile Module with a USB Data Acquisition device.
Table of Contents
- Selecting a Mobile Device
- DAQ Device Support
- Hardware and Software Requirements
- USB Host Support for Data Acquisition Hardware
- Transferring Data to a Mobile Device
- Installing DAQ Drivers on a Mobile Device
- Creating and Configuring a Mobile Project
- Tasks for Data Acquisition
- Building and Deploying the Application to Your Mobile Device
Selecting a Mobile Device
A variety of measurement hardware is available for use with a LabVIEW Mobile application. Mobile devices can be programmed with LabVIEW in the same way desktop LabVIEW applications interface with peripheral data acquisition devices. The options range in functionality, bandwidth and resolution in order to cater to a variety of applications and budgets. Use of this hardware in conjunction with LabVIEW Mobile facilitates applications that can:
- Perform on-the-go analysis and processing of live data
- Provide portable, handheld measurements and data-logging
- Serve as remote measurement systems for distributed applications
DAQ Device Support
Handheld devices that support USB 2.0 host connectivity can connect to the following DAQ devices using DAQmx Base 3.2 or later:
|
Devices |
Description |
|
NI DAQCard 6024E |
200 kS/s, 12-bit, 16 AI channels, 2 AO channels, 8 DIO lines, 2 counter/timers |
|
NI DAQCard 6062E |
500 kS/s, 12-bit, 16 AI channels, 2 AO channels, 8 DIO lines, 2 counter/timers |
|
NI DAQCard 6036E |
200 kS/s, 16-bit, 16 AI channels, 2 AO channels, 8 DIO lines, 2 counter/timers |
|
NI DAQCard AI-16E-4 (6041E) |
500 kS/s, 12-bit, 16 AI channels, 8 DIO lines, two counter/timers |
|
NI CF-6004** |
200kS/s, 14-bit, 4 AI channels, 4 DIO lines |
|
NI USB-6009/USB-6009 OEM |
14-bit, 48 kS/s, 8 AI channel, 12 DIO line, 1 event counter device |
|
NI USB-6501 |
24 DIO line, 1 event counter device |
|
NI USB-6210* |
16-Bit, 250 kS/s, 16 AI channels, 4 DI, 4 DO, 2 counters |
|
NI USB-6211*/USB-6211 OEM* |
16-Bit, 250 kS/s, 16 AI channels, 2 AO, 4 DI, 4 DO, 2 counters |
|
NI USB-6215* |
16-Bit, 250 kS/s, 16 AI channels, 4 DI, 4 DO, 2 counters, isolated |
|
NI USB-6218*/USB-6218 OEM* |
16-Bit, 250 kS/s, 32 AI channels, 2 AO, 8 DI, 8 DO, 2 counters, isolated |
|
NI USB-9211A* |
4 AI Channels, 24-bit thermocouple input module |
|
NI USB-9215A*/USB-9215A BNC* |
4 AI Channels, ±10 VDC, 16-bit simultaneous sampling analog input module |
|
NI USB-9233* |
4 AI Channels, ±5 VAC, 24-bit simultaneous sampling DSA module with IEPE |
|
NI USB-9234* |
4 AI Channels, ±5 VAC/VDC, 24-bit simultaneous sampling DSA module with IEPE |
*This product is only supported with dynamic tasks in NI-DAQmx Base
**This product is only supported with static tasks in NI-DAQmx Base
Hardware and Software Requirements
The following are required to get started with portable data acquisition:
- A computer with Windows Vista/XP or Windows 2000 with Service Pack 4.0 or later
- A Mobile device running Windows Mobile 5.0, Windows Mobile 6.0, or Pocket PC 2003
- LabVIEW 8.6 Base, Full, or Professional Edition
- LabVIEW Mobile Module 8.6
- NI-DAQmx Base 3.2
- Host support
- Microsoft ActiveSync
- Additional Microsoft tools - for more information please refer to KB Online – 2ZTAQ5DS
USB Host Support for Data Acquisition Hardware
Support for USB data acquisition depends on the handheld’s USB host architecture. Almost all devices have client support, which is used to connect to a computer in order to synchronize data. Host support is most commonly found on industrial, ruggedized devices that are intended for use with peripherals such as DAQ device.
Support for USB data acquisition also requires USB 2.0 host support. Devices that only support USB 1.1 have a limited bandwidth and might not support continuous data acquisition above certain speeds. For full support of USB data acquisition devices, make sure your handheld’s vendor has implemented USB 2.0 host support.
Transferring Data to a Mobile Device
Microsoft ActiveSync provides synchronization between your desktop and your device. To use ActiveSync, follow the steps below.
- Connect your Windows Mobile-based device to your desktop PC with a USB cable or cradle. The ActiveSync Wizard will appear on your desktop to give you step-by-step instructions for synchronizing files and loading programs onto your device.
Figure 1. Microsoft ActiveSync Synchronization Setup Wizard
- Select the items you want to synchronize between your computer and Windows Mobile device. You can choose to synchronize contacts, calendar, e-mail, tasks, favorites, files and media. You will need to enable synchronization of Files to transfer DAQmx Base task configuration files. Click on Next after selecting the content you want to synchronize.
Figure 2. Synchronization Options
- Select Finish to start the synchronization process.

Figure 3. Synchronize files between your mobile device and Windows PC
Installing DAQ Drivers on a Mobile Device
In order to add support for your USB DAQ device you’ll need to install the DAQmx Base driver onto your mobile device.
- From the start menu navigate to Program Files»National Instruments»NI-DAQmx Base»Utilities and select Windows Mobile Driver Installation.

Figure 4. Windows Mobile Driver Installation
- The Windows Mobile Driver Installation software should automatically start the installing NI DAQmx Base onto the mobile device. When the installation is complete, your Windows Mobile device should display the following message: “NI DAQmx Base 3.2.CAB was successfully installed on your device.”
Creating and Configuring a Mobile Project
The Project Explorer window provides the framework for organizing and interacting with various distributed targets within the LabVIEW programming environment. You can create a project for your Windows Mobile application by starting out with an empty project, or by using the LabVIEW Mobile Module Wizard. This tutorial uses the Mobile Module Wizard.

Figure 5. LabVIEW Mobile Project
Tasks for Data Acquisition
An NI-DAQmx Base task is required for device operation. A task contains information about the channels in use, sample rate and triggering information, and other information specific to a given operation. There are two methods for creating tasks in NI-DAQmx Base:
- Static Tasks are created using the NI-DAQmx Base Task Configuration Utility
- Dynamic Tasks are created at application runtime using the NI-DAQmx Base API
Prior to the release of DAQmx Base 3.2, the only available method was to create a static task with the task configuration wizard. Now you can programmatically create a task using the DAQmx Base VIs. Dynamic tasks, as shown in the figure below, allow more dynamic device control by allowing the user to specify task parameters at run-time. Static tasks limit the user to preconfigured task parameters that cannot be changed without updating the corresponding static task and then rebuilding the application. The following sections will show you how to create a VI for your Mobile device using a dynamic task or a static task.

Figure 6: Data Acquisition with DAQmx Base using a Dynamic Task
Create a Mobile VI Using a Dynamic Task
Using the Mobile Module Wizard, complete the following steps to create LabVIEW project, add the target, and add an existing VI to the project. The existing VI uses a dynamic task to acquire voltage data from a DAQ device.
- Launch LabVIEW. In the Getting Started window, select Mobile Project from the Targets pull-down menu. Click the Go button to launch the Mobile Module Wizard.
- Define the project information as shown in figure 6.
- Select New Mobile project, import VI from the Project type pull-down menu to create the LabVIEW project using an existing VI.
- Specify a project name and the location where you want to save the project and the VI in the Project location text box. Save the project to a location other than the default location so you do not overwrite the shipping example with your changes. For this tutorial, name the project Mobile Tutorial - Dynamic Task.lvproj in the Project location text box.
- Click the Browse button next to the VI path text box and navigate to labview\examples\daqmxbase\PDA\dynamic\Ai\ Acq&Graph Voltage-Int Clk.vi to select the VI to import. Click the OK button to add the VI to the project you are creating.
- Click the next button.

Figure 7. LabVIEW Mobile Module Wizard
- Select the appropriate device from the Device type pull-down menu. For this tutorial, we will use the Windows Mobile 5.0 Pocket PC Device.
- Click the next button.
- Click the Finish button. Because the create a build specification checkbox contains a checkmark, the Mobile Build Specification Properties dialog box opens. Select OK.

Figure 8. Acquire and Graph Voltage VI Front Panel
- Set the channel and timing parameters using the front panel controls as shown above.
- Save your changes and close the VI.
Create a Mobile VI Using a Static Task
Using the Mobile Module Wizard, complete the following steps to create LabVIEW project, add the target, and add an existing VI to the project. Once you create the VI, use the NI-DAQmx Base Task Configuration Utility to configure a static task.
- Launch LabVIEW. In the Getting Started window, select Mobile Project from the Targets pull-down menu. Click the Go button to launch the Mobile Module Wizard.
- Define the project information as shown in figure 8.
- Select New Mobile project, import VI from the Project type pull-down menu to create the LabVIEW project using an existing VI.
- Specify a project name and the location where you want to save the project and the VI in the Project location text box. Save the project to a location other than the default location so you do not overwrite the shipping example with your changes. For this tutorial, name the project Mobile Tutorial - Static Task.lvproj in the Project location text box.
- Click the Browse button next to the VI path text box and navigate to labview\examples\daqmxbase\PDA\static\Ai\ Acq&Graph Voltage-Int Clk.vi to select the VI to import. Click the OK button to add the VI to the project you are creating.
- Click the next button.

Figure 9. LabVIEW Mobile Module Wizard
- Select the appropriate device from the Device type pull-down menu. For this tutorial, we will use the Windows Mobile 5.0 Pocket PC Device.
- Click the next button.
- Click the Finish button. Because the Create a build specification checkbox contains a checkmark, as shown in Figure 3, the Mobile Build Specification Properties dialog box opens. Select OK.
- Select Tools»NI-DAQmx Base Task Configuration Utility….
Note: If you launch the NI-DAQmx Base Task Configuration Utility from Start » Programs » National Instruments » NI-DAQmx Base and then import a DAQmx Base task list you will not be able to choose the DAQ device you wish to use with your mobile device.

Figure 10. NI-DAQmx Base Task Configuration Utility
- The example VI uses a pre-made task called “ai finite buffered”.
- Set the channel number, max-min voltage, and coupling in the Channel List tab under the Task Configuration Parameters section.
- Set the timing mode, scan rate (Hz), number of scans and trigger settings in the Task Timing tab.
- Once all settings have been configured, click on Export Task List.
- Name the task BASEtasks.cfg and place it in the Mobile Device File Synchronization folder.

Figure 11. Export DAQmx Base Task to Mobile Device
- Open Microsoft ActiveSync and select Sync to synchronize the files.
Building and Deploying the Application to Your Mobile Device
After you develop the VI on the host computer, you build the VI into an executable application that you can run on a Mobile target.
- In your LabVIEW project, double-click the build specification titled Acq&Graph Volt-Int Clk that was generated by the Mobile Module Wizard.
- Select the Source Files category and add the Acq&Graph Voltage-Int Clk.vi as a Top-level VI. Select OK to close out the Build Specification Properties window.

Figure 12. Mobile Build Specification Properties
- To build, deploy, and run your application, right-click the build specification and select run. Once the application has been built and deployed, it should begin running on your mobile device and acquiring voltage data. When finished, tap the Exit button in the application on the Mobile target to close the application.
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
