Getting Started With The Labview Mobile Module
Getting Started With The Labview Mobile Module
Getting Started With The Labview Mobile Module
The LabVIEW Mobile Module extends the LabVIEW graphical development environment to Mobile devices so you can create applications that run on Windows Mobile and Pocket PC. You can create portable solutions for a wide spectrum of applications, such as field test systems, remote control and monitoring systems, and portable data acquisition systems. This manual contains installation instructions for additional tools you might need to use with the Mobile Module and a tutorial that shows you how to create a LabVIEW project and build, run, deploy, and debug a Mobile application. Refer to the LabVIEW Mobile Module Readme, available by opening readme_Mobile.html on the installation media, for system requirements and instructions about installing the Mobile Module.
Contents
Installing Additional Tools...................................................................................................................1 Shared Variable Support ..............................................................................................................1 PNG Image Support .....................................................................................................................2 NI-VISA Support .........................................................................................................................2 WIDCOMM Bluetooth DLLs.......................................................................................................2 LabVIEW SMS Client..................................................................................................................2 NI-DAQmx Base..........................................................................................................................3 Windows Mobile Emulators.........................................................................................................3 Tutorial..................................................................................................................................................3 Creating the LabVIEW Project.....................................................................................................4 Creating the Build Specification...................................................................................................7 Building the VI into an Application and Deploying...................................................................10 Closing the Application..............................................................................................................11 Debugging the Application.........................................................................................................11 Related Documentation.......................................................................................................................15
NI-VISA Support
You must install NI-VISA on the target to use VISA in Mobile applications. If you did not install NI-VISA when you installed the Mobile Module, select StartAll ProgramsNational InstrumentsVISAWindows Mobile Driver Installation. Tip You also can right-click the target in the Project Explorer window and select InstallSupport for NI-VISA from the shortcut menu.
ni.com
Complete the following steps to install or uninstall the LabVIEW SMS Client on a Mobile target. 1. Perform a soft reset on the device. Refer to your device documentation for information about performing soft resets. 2. Connect the device to the host computer using ActiveSync. 3. Run Setup.exe on the host computer to install or uninstall the required DLLs. You also can right-click the target in the Project Explorer window and select InstallSupport for SMS Client from the shortcut menu.
NI-DAQmx Base
You can download the latest version of NI-DAQmx Base for use with Mobile devices from the National Instruments Web site. After you complete the NI-DAQmx Base installation, you must copy the driver files to the device. Complete the following steps to install NI-DAQmx Base on the Mobile device. 1. Select StartProgramsNational InstrumentsNI-DAQmx BaseUtilities. 2. Launch the Driver Installation utility that corresponds to the Mobile device. 3. Check the device screen to see if any additional steps are requested, such as replacing an older driver. Refer to the NI-DAQmx Base Readme and the NI-DAQmx Base 3.x Getting Started Guide for more information about NI-DAQmx Base.
ARM Emulators
If you are using ARM-based emulators, you must install Virtual PC 2007. (Windows Vista) If you want to use emulators on the host computer, you must download the Microsoft Device Emulator 2.0. Download Virtual PC 2007 and the Microsoft Device Emulator 2.0 from the Microsoft Download Center at www.microsoft.com/downloads.
x86 Emulators
(Windows XP) On the host computer, the Mobile Module installs ARM targets, including emulators, for Windows Mobile and Pocket PC. If you need x86 emulator targets, install the following Microsoft eMbedded Visual Tools: Microsoft eMbedded Visual C++ 4.0 Microsoft eMbedded Visual C++ SP 4 or later SDK for Windows Mobile 2003-based Pocket PCs Refer to the National Instruments KnowledgeBase at ni.com/info and enter the Info Code pdaevc for the most recent information about downloading and installing the Microsoft eMbedded Visual Tools.
Tutorial
Use this tutorial to learn how to use the Mobile Project Wizard to create a LabVIEW project and build, run, and debug a Mobile application. The VI in this tutorial simulates a sine wave with configurable offset and frequency values and displays the result in a graph.
c.
ni.com
3. 4.
Click the Next button. Select Windows Mobile 5.0 Pocket PC Emulator from the Device type pull-down menu, as shown in Figure 2.
Note You might see additional targets for Windows Mobile or Pocket PC if you configure additional devices through the Microsoft Device Emulator Manager. 5. 6. 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. Refer to the Creating the Build Specification section for more information about creating a build specification.
ni.com
b.
c. d.
(Optional) By default, the name of the application is the same as the top-level VI. If you do not want to use the top-level VI name for the application name, remove the checkmark from the Same as top-level VI checkbox and enter a name in the Target filename text box. Browse to and select the destination directory for the application on the host computer, which is where LabVIEW saves the .exe, in the Destination directory text box. Enter the destination directory for the application on the target in the Remote path for target application text box.
Note Although it is common to use the same name for the VI, application, and build specification, you are not required to do so. 2. 3. 4. (Optional) Click the Help button to open the LabVIEW Help and read a description of each build setting. Select the Device Information category to view which target and processor this build specification applies to. Select the Source Files category to select the source files to include when you build the VI into an application. When you use the Mobile Project Wizard to create a build specification, LabVIEW automatically uses the VI you import as the top-level VI. When you create build specifications outside of the wizard, you must manually select the top-level VI and click the blue arrow button
ni.com
to move the VI to the Top-level VI text box, as shown in Figure 5. Mobile applications can have only one top-level VI.
Note The Source File Settings and Machine Aliases categories are not used in this tutorial. You use the Source File Settings page to view and set VI-level code generation options. You use the Machine Aliases page to overwrite the default IP address of a target hosting shared variables so you can move the shared variables to a different host without rebuilding the application. Refer to the Using Shared Variables (Mobile Module) topic in the LabVIEW Help for more information about using shared variables. 5. 6. Select the Generated Files category to view the filenames and paths to the files the Mobile Module generates when you build the VI into an application. Click the OK button. The build specification you just created appears in the Project Explorer window under the Mobile target, as shown in Figure 6.
7.
Select FileSave Project in the Project Explorer window to save the project. LabVIEW saves any build specifications with the project.
10
ni.com
BuildBuilds the VI into an application. This option does not deploy or run the application automatically. Note An Application Builder Information dialog box may appear when you deploy, run, build or debug the application. By default, the Application Builder configures new build specifications to include compiler optimizations that optimize the run-time performance of your build application. However, if the target for your build specification does not support SSE2 instructions, you must remove the checkmark from the Enable SSE2 optimization checkbox on the Advanced page of the Properties dialog box for the relevant build specification. For more information about enabling and disabling SSE2 optimizations, refer to the Verifying That Target Hardware Supports SSE2 Instructions topic in the LabVIEW Help.
11
6.
7.
Select Source Files from the Category list and select Mobile Tutorial.vi in the Project Files list. Click the blue right arrow button to move the VI from the Project Files list to the Top-level VI text box. Click the OK button. The build specification you just created appears in the Project Explorer window, as shown in Figure 8.
12
ni.com
13
14
ni.com
LabVIEW builds the VI into an application, deploys the application to the target, and runs the application on the target as shown in Figure 10. A new instance of the emulator opens each time you build and deploy an application.
2. 3.
Click the Run button in the application on the target. Move the Frequency slider in the application running on the target and click the Run button again. The value in the Probe Watch Window on the block diagram updates as you move the slider in the application on the target. Note Any changes you make on the front panel of the Mobile VI on the host computer have no effect on the application running on the target.
4.
Click the Exit button in the application on the target to stop the application and end the debugging session.
Related Documentation
LabVIEW includes documentation for new and experienced LabVIEW users. The following documents contain information that you might find helpful as you use the Mobile Module: LabVIEW HelpRefer to the LabVIEW Help, available by selecting HelpLabVIEW Help in LabVIEW, for information about LabVIEW programming concepts, step-by-step instructions for
15
using LabVIEW, and reference information about LabVIEW VIs, functions, palettes, menus, and tools. Refer to the Mobile Module book on the Contents tab of the LabVIEW Help for information specific to the Mobile Module and Mobile applications. The LabVIEW Help uses (Mobile) in the index to indicate Mobile-specific topics. LabVIEW Mobile Module ReadmeRefer to the LabVIEW Mobile Module Readme, available by selecting StartAll ProgramsNational InstrumentsLabVIEWReadme and opening readme_Mobile.html, for last-minute information and known issues. Mobile Module ExamplesUse the Mobile Module examples to learn how to use certain VIs and functions as well as a starting point for developing your own Mobile VIs and applications. You can modify an example to fit an application, or you can copy and paste from one or more examples into a VI that you create. Browse or search the example VIs with the NI Example Finder by selecting HelpFind Examples. NI-DAQmx Base 3.x Getting Started Guide NI-DAQmx Base Readme Documentation for your device. LabVIEW PDFsIn addition to this document, the Getting Started with LabVIEW manual, LabVIEW Quick Reference Card, LabVIEW Release Notes, and LabVIEW Upgrade Notes are available as PDFs by selecting StartAll ProgramsNational InstrumentsLabVIEWLabVIEW Manuals. Note You must have Adobe Reader installed to view the PDFs. Refer to the Adobe Systems Incorporated Web site at www.adobe.com to download Adobe Reader. Refer to the National Instruments Product Manuals Library at ni.com/manuals for updated documentation resources.
LabVIEW, National Instruments, NI, ni.com, the National Instruments corporate logo, and the Eagle logo are trademarks of National Instruments Corporation. Refer to the Trademark Information section at ni.com/trademarks for other National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies. For patents covering National Instruments products/technology, refer to the appropriate location: HelpPatents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents. Refer to the Export Compliance Information at ni.com/legal/export-compliance for the National Instruments global trade compliance policy and how to obtain relevant HTS codes, ECCNs, and other import/export data. 371296F-01
Jun11