National Instruments NI-DAQ User Manual

GETTING STARTED GUIDE
NI-DAQ mx Base 3.x
This guide describes how to install and configure the NI-DAQmx Base 3.x software and a data acquisition (DAQ) device. This guide also describes how to verify that the device is operating properly.
Note For information about NI-DAQmx Base for Linux and Mac OS X, refer to
ni.com/info and enter rddqld.

Contents

Related Documentation........................................................................... 3
Overview.................................................................................................3
NI-DAQmx Base ............................................................................. 4
Device Support ................................................................................4
Operating System, Application Software, Programming Language,
and Device Support in NI-DAQmx Base 3.x ....................................... 4
Operating System Support ............................................................... 4
Install Application Software ................................................................... 5
Step 1. Install the NI-DAQmx Base Software ........................................ 5
Insert the CD.................................................................................... 5
Install Support Files ......................................................................... 6
Step 2. For Devices Using the LabVIEW 8.5 PDA Module for
Windows Mobile Only—Run the PDA Setup Utility.......................... 7
Step 3. Unpack the Devices, Accessories, and Cables............................7
Step 4. Install the Devices, Accessories, and Cables .............................. 8
NI PCMCIA Device Installation...................................................... 8
NI USB Device Installation ............................................................. 9
NI CompactFlash Device Installation.............................................. 10
Accessories and PCI/PXI Devices................................................... 11
Step 5. Confirm That Your Device Is Recognized ................................. 11
Devices Using the LabVIEW 8.5 PDA Module for
Windows Mobile........................................................................... 11
Step 6. Create and Configure Tasks........................................................ 11
Using the NI-DAQmx Base Task Configuration Utility ................. 11
Devices Using the LabVIEW 8.5 PDA Module for
Windows Mobile ....................................................................12
Create, Modify, and Configure a Task in NI-DAQmx Base.....13
Devices Using the LabVIEW 8.5 PDA Module for
Windows Mobile ...........................................................................14
Using Tasks in an Application .........................................................15
Documentation.........................................................................................15
Getting Started Developing an Application.............................................15
Examples ..........................................................................................15
Devices on LabVIEW 8.5 PDA Module for
Windows Mobile ....................................................................16
Obtaining Information about Measurement Applications
and Devices....................................................................................16
LabVIEW ..................................................................................16
ANSI C......................................................................................16
Training Courses .......................................................................17
Where to Go for Support .........................................................................17

Conventions

The following conventions are used in this guide.
» The » symbol leads you through nested menu items and dialog box options
to a final action. The sequence File»Page Setup»Options directs you to pull down the File menu, select the Page Setup item, and select Options from the last dialog box.
This icon denotes a tip, which alerts you to advisory information.
This icon denotes a note, which alerts you to important information.
This icon denotes a caution, which advises you of precautions to take to avoid injury, data loss, or a system crash. When this symbol is marked on the device, refer to the Read Me First: Safety and Radio-Frequency Interference document, shipped with the device, for precautions to take.
bold Bold text denotes items that you must select or click in the software, such
as menu items and dialog box options. Bold text also denotes parameter names.
italic Italic text denotes variables, emphasis, a cross-reference, or an introduction
to a key concept. Italic text also denotes text that is a placeholder for a word or value that you must supply.
monospace Text in this font denotes text or characters that you should enter from the
keyboard, sections of code, programming examples, and syntax examples. This font is also used for the proper names of disk drives, paths, directories,
NI-DAQmx Base Getting Started Guide 2 ni.com
programs, subprograms, subroutines, device names, functions, operations, variables, filenames, and extensions.
monospace italic
Italic text in this font denotes text that is a placeholder for a word or value that you must supply.

Related Documentation

The following documents contain information you might find helpful as you read this guide:
Software documentation
–NI-DAQmx Base Help
NI-DAQmx Base C Function Reference Help
NI-DAQmx Base 3.x Readme
–NI-DAQmx Help
Getting Started with the LabVIEW PDA Module for Windows
Mobile, available in PDF format by selecting Start»Programs»
National Instruments»LabVIEW 8.5»LabVIEW Manuals
and selecting
LabVIEW Help, available by selecting Help»Search the
LabVIEW Help
LabVIEW Fundamentals, available in PDF format by selecting
Start»Programs»National Instruments»LabVIEW 8.5» LabVIEW Manuals and selecting
Hardware documentation
CF-6004 User Guide
NI USB-6008/6009 User Guide and Specifications
NI USB-6501 User Guide and Specifications
E Series User Manual
Documentation for the PDA device you use
PDA_Getting_Started.pdf
LV_Fundamentals.pdf

Overview

National Instruments measurement devices are packaged with NI-DAQmx or NI-DAQmx Base driver software. NI-DAQmx includes an extensive library of VIs and ANSI C functions that you can call from your application software, such as LabVIEW or NI LabWindows features of your NI measurement devices. The NI-DAQmx Base driver software has an application programming interface (API), which is a library of VIs and ANSI C functions for creating applications for your device.
© National Instruments Corporation 3 NI-DAQmx Base Getting Started Guide
/CVI™, to program all the

NI-DAQmx Base

Note If you are familiar with NI-DAQmx, refer to the NI-DAQmx Base 3.x Readme for
information about the differences between NI-DAQmx Base and NI-DAQmx.

Device Support

NI-DAQmx Base is a driver that allows you to build applications that run using a PDA device and Windows. NI-DAQmx Base includes the following features:
NI-DAQmx Base is a subset of the NI-DAQmx API and is similar in
functionality to NI-DAQmx.
NI-DAQmx Base consists of a LabVIEW VI framework, which allows
you to customize the driver, if needed, when using LabVIEW.
NI-DAQmx Base provides a high-level interface on the
LabVIEW 8.5 PDA Module for Windows Mobile,
Windows 2000/XP, and Windows Vista x86/x64.
NI-DAQmx Base 3.x supports the following devices under the LabVIEW 8.5 PDA Module for Windows Mobile:
NI CF-6004
NI DAQCard-6024E
NI DAQCard-6036E
NI DAQCard-6062E
NI USB-6008
NI USB-6009
NI USB-6501

Operating System, Application Software, Programming Language, and Device Support in NI-DAQmx Base 3.x

Operating System Support

NI-DAQmx Base 3.x supports Windows 2000/XP and Windows Vista x86/x64. The development environment for devices on the LabVIEW 8.5 PDA Module for Windows Mobile is supported on Windows 2000/XP and Windows Vista x86/x64.
Note Only one version of NI-DAQmx Base (such as NI-DAQmx Base 3.0) can be
installed on the same computer at the same time.
NI-DAQmx Base Getting Started Guide 4 ni.com

Install Application Software

Install the NI application software, including LabVIEW, NI LabWindows/CVI, and NI Measurement Studio. PDA Module users must use LabVIEW 8.5 PDA Module for Windows Mobile with NI-DAQmx Base 3.0. Refer to the Operating System, Application
Software, Programming Language, and Device Support in NI-DAQmx Base 3.x section for more information. Also, refer to Getting
Started with the LabVIEW PDA Module for Windows Mobile for more
information by selecting Start»Programs»National Instruments» LabVIEW 8.5»LabVIEW Manuals and selecting
PDA_Getting_Started.pdf.
Note PDA Module users should make sure that LabVIEW 8.5 PDA Module for Windows
Mobile is completely installed and configured before continuing.

Step 1. Install the NI-DAQmx Base Software

The following sections describe how to install the NI-DAQmx Base software.

Insert the CD

Note Install your driver software before installing new hardware devices, or the operating
system might not detect your device, and you might see warnings asking you to install the driver.
Inserting the CD launches the NI-DAQmx Base install window.
If the NI-DAQmx Base install window does not open automatically, complete the following steps:
1. Select Start»Run.
2. Enter
3. Click Install NI-DAQmx Base.
© National Instruments Corporation 5 NI-DAQmx Base Getting Started Guide
x
:\setup.exe, where
x
is the letter of the CD drive.

Install Support Files

The NI-DAQmx Base installer detects the NI software installed on the operating system and automatically selects the latest versions of the driver, application software, and language support files from the CD.
The NI-DAQmx Base installer displays which features will be installed on your computer, as shown.
Complete the following steps to install NI-DAQmx Base.
1. In the Features window, shown in the previous figure, verify that the
installer detected and selected the correct support files and the correct
version number of the application software.
2. Click the + in front of the feature to expand the list of feature
subcomponents, as shown in the previous figure. You can select
additional options to install the support files, examples, and
documentation.
3. Follow the software prompts.
4. Click Finish and wait for the installer to complete. NI-DAQmx Base
might require you to reboot your computer to complete installation.
NI-DAQmx Base Getting Started Guide 6 ni.com
Step 2. For Devices Using the LabVIEW 8.5 PDA Module for Windows Mobile Only—Run the PDA Setup Utility
After running the NI-DAQmx Base installation, you must copy the driver files to the PDA device. Complete the following steps to run the Pocket PC Driver Installation utility.
1. Select Start»Programs»National Instruments»NI-DAQmx Base» Utilities.
2. Click Windows Mobile-CE Driver Installation. Clicking Windows Mobile-CE Driver Installation launches the Pocket PC Add/Remove Programs utility window.
3. Click Ye s in the Pocket PC Add/Remove Programs utility window to install the device driver into the default application install directory.
4. Check the PDA device screen to see if any additional steps are requested, such as replacing an older driver.
If there are no error messages, you have successfully completed the steps to install the driver files on the PDA device.

Step 3. Unpack the Devices, Accessories, and Cables

Your device ships in an antistatic package to prevent electrostatic discharge (ESD) damage to the device. ESD can damage several components on the device.
Caution Never touch the exposed pins of connectors.
To avoid such damage, take the following precautions:
Ground yourself using a grounding strap or by touching a grounded object.
Touch the antistatic package to a metal part of the computer chassis before removing the device from the package.
Remove the device from the package and inspect the device for loose components or any sign of damage. Notify NI if the device appears damaged in any way. Do not install a damaged device in the computer, PDA device, or PXI chassis.
Store the device in the antistatic package when the device is not in use.
For safety and compliance information, refer to the device documentation packaged with your device.
© National Instruments Corporation 7 NI-DAQmx Base Getting Started Guide

Step 4. Install the Devices, Accessories, and Cables

NI PCMCIA Device Installation

Caution Follow proper ESD precautions to ensure you are grounded before installing the
hardware.
The NI PCMCIA device supports hot insertion on a PDA device, which means the NI PCMCIA device can be installed and removed without rebooting the PDA device. You can install an NI PCMCIA device in any available Type II PC Card slot.
1
3
1 PDA with Type II PC Card Slot 2 Type II PC Card Socket 3 PDA Expansion Pack
To install the NI PCMCIA device, refer to the preceding figure while completing the following steps.
1. Attach the Type II PC cardsleeve or expansion pack to the PDA device,
2. NI PCMCIA devices have two connectors: a 68-pin PCMCIA bus
DA
QCard-6062
2
4 NI PCMCIA Device 5 I/O Cable
4
5
6
7
®
6 Accessory 7 I/O Signals
if necessary.
connector on one end and an I/O connector on the other end. The NI PCMCIA device is keyed so that you can only insert it one way. Insert the NI PCMCIA device in the slot until the connector is firmly seated.
NI-DAQmx Base Getting Started Guide 8 ni.com
Caution Always grasp the cable by the connector you are inserting or removing.
Never pull directly on the I/O cable to unplug it from the PCMCIA device.
3. Attach the I/O cable. Be careful not to put strain on the I/O cable when inserting or removing the cable connector.

NI USB Device Installation

Caution Follow proper ESD precautions to ensure you are grounded before installing the
hardware.
The NI USB devices support hot insertion on a PDA device, which means you can install and remove the NI USB device without rebooting the PDA device. You can install an NI USB device into any USB port that supports USB host controller capabilities.
1
7 1
l at i
g i
D
9
2
0
3
O
0
/
I n
6
-
o
BS
i tc
n
U
u
f
I
i tl
N
u
M , t i b-
4
1 , s t
u
p n I 8
1
A n a
ol
1 6
2
3
1 USB Cable 2 USB Adapter Cable 3 Synchronization Port
1. Connect the USB adapter cable to the synchronization port on the PDA.
2. Connect the USB device to the adapter cable with the USB cable.
Note If you are using the USB device on a computer with Windows 2000/XP/Vista and
NI-DAQmx 7.5 or later installed on it, make sure the correct firmware is installed on the device. Go to
Note Before connecting a USB device to a PDA for the first time, you must connect the
ni.com/info and enter code USBFirmware for more information.
USB device to a computer with NI-DAQmx Base 3.x installed on it in order to install the appropriate firmware on the USB device. Go to
USBFirmware for more information.
© National Instruments Corporation 9 NI-DAQmx Base Getting Started Guide
ni.com/info and enter code

NI CompactFlash Device Installation

Caution Follow proper ESD precautions to ensure you are grounded before installing the
hardware.
The NI CompactFlash device supports hot insertion on a PDA device, which means you can install and remove the NI CompactFlash device without rebooting the PDA device. You can install an NI CompactFlash device in any available Type II CompactFlash slot.
To install the NI CompactFlash device, refer to the following figure while completing the following steps.
2
1
3
5
4
1 PDA with Type II CompactFlash Slot 2 NI CompactFlash Device
3 I/O Cable 4 Accessory
5 I/O Signals
1. NI CompactFlash devices have two connectors: a 50-pin CompactFlash bus connector on one end, and an I/O connector on the other. The NI CompactFlash device is keyed so that you can insert it only one way. Insert the NI CompactFlash device in the slot until the connector is firmly seated.
Caution Always grasp the device by the connectors you are inserting or removing.
Never pull directly on the I/O to unplug it from the NI CompactFlash device.
NI-DAQmx Base Getting Started Guide 10 ni.com
2. Attach the I/O cable. Be careful not to put strain on the I/O cable when inserting or removing the cable connector.

Accessories and PCI/PXI Devices

Install accessories and/or terminal blocks according to the instructions in their user guides. Install PCI and PXI devices according to the instructions included with your device.

Step 5. Confirm That Your Device Is Recognized

The following section discusses how to confirm that your device is recognized.

Devices Using the LabVIEW 8.5 PDA Module for Windows Mobile

Windows Mobile devices only indicate whether a hardware installation error occurred. If there are no error messages, you have successfully installed the features and the device is recognized by the NI-DAQmx Base driver. If you receive an Unknown Device error message, you have not correctly installed NI-DAQmx Base on the PDA device. Refer to Step 1.
Install the NI-DAQmx Base Software for more information about how to
install the PDA features of the NI-DAQmx Base driver.

Step 6. Create and Configure Tasks

A task, an important concept for NI-DAQmx and NI-DAQmx Base, is a collection of one or more channels with timing, triggering, and other properties. Conceptually, a task represents a measurement or generation you want to perform. You can set up and save all configuration information in a task and use the task in an application.

Using the NI-DAQmx Base Task Configuration Utility

The following sections describe how to use the NI-DAQmx Base Task Configuration Utility.
© National Instruments Corporation 11 NI-DAQmx Base Getting Started Guide

Devices Using the LabVIEW 8.5 PDA Module for Windows Mobile

Using the NI-DAQmx Base Task Configuration Utility is required when using devices with the LabVIEW 8.5 PDA Module for Windows Mobile. In NI-DAQmx Base 3.0, task information is embedded in the built application. Prior to building and downloading your VI to the PDA device, you must configure and save the tasks you want to use.
To use the Task Configuration Utility, complete the following steps:
1. Open LabVIEW.
2. Select Tools»NI-DAQmx Base Task Configuration Utility.
Note You also can launch the Task Configuration Utility from Start»Programs»
National Instruments»NI-DAQmx Base.
NI-DAQmx Base Getting Started Guide 12 ni.com

Create, Modify, and Configure a Task in NI-DAQmx Base

Create a new task or modify an existing task in the Task Configuration Utility task list. The pre-installed tasks are configured to work with the examples without modifications. To modify an existing task, select it in the task list. To create a new task, complete the following steps:
1. Click Create New Task. The Create New Task.vi window opens.
2. Enter a name for the new task.
3. Select the device. For devices using the LabVIEW 8.5 PDA Module for Windows Mobile, select the device that matches your installed hardware.
4. Select the acquisition type. Click OK when finished.
5. Each acquisition type contains a set of tabbed dialog boxes for configuring the task. Configure all options specific to your task.
© National Instruments Corporation 13 NI-DAQmx Base Getting Started Guide
Tip You can view context help for the Task Configuration Utility by pressing <Ctrl-H>.
6. Click Save & Exit when you are finished configuring your tasks.
The task configuration is automatically saved into LabVIEW global variables. You do not need to explicitly save the configuration.
To transfer the task configuration to other computers, click Export
Configuration and save the tasks to a file. You then can use Import Configuration to import the task configuration.
Note The Import Configuration and Export Configuration options operate on the entire set
of tasks shown in the Task Configuration Utility. Importing a configuration replaces any existing tasks, including the predefined tasks for the example programs.

Devices Using the LabVIEW 8.5 PDA Module for Windows Mobile

When you are using devices that use the LabVIEW 8.5 PDA Module for Windows Mobile, the task configuration is built into the target application. You cannot retrieve the task information after it is embedded in a built application. Exporting the configuration allows you to preserve the task in case of accidental deletion when using the Task Configuration Utility.
NI-DAQmx Base Getting Started Guide 14 ni.com

Using Tasks in an Application

To use a preconfigured task in your application, complete the following steps:
1. Right-click the task/channels in terminal on a NI-DAQmx Base VI.
2. Select Create»Control or Create»Constant.
3. Type the name of the task in the control or constant.
4. To set the value as the default for the control, right-click the control and select Data Operations»Make Current Value Default.

Documentation

The NI-DAQmx Base software kit includes online documentation for supported devices and accessories, including PDF and help files describing device terminals, specifications, features, and operation.
After installation, the documents are accessible from Start»Programs» National Instruments»NI-DAQmx Base»Documentation.
Note You must have Internet Explorer version 5.0 or later to use some features of the
NI-DAQmx Base documentation, including the help system.

Getting Started Developing an Application

Examples

Each API includes a collection of programming examples to help you start developing an application. You can modify example code and save it in an application. You can use examples to develop a new application or add example code to an existing application. NI-DAQmx Base examples are accessible from Start»Programs»National Instruments» NI-DAQmx Base»Examples.
© National Instruments Corporation 15 NI-DAQmx Base Getting Started Guide
The following figure illustrates a typical NI-DAQmx Base application in LabVIEW. The pictured task uses a preconfigured task to acquire and display a finite number of points for multiple channels.

Devices on LabVIEW 8.5 PDA Module for Windows Mobile

Refer to Getting Started with the LabVIEW PDA Module for Windows Mobile for more information about how to create a PDA application.

Obtaining Information about Measurement Applications and Devices

Each application software package and driver includes information about writing applications for taking measurements and controlling measurement devices. The following references assume you have NI-DAQmx Base and, where applicable, LabVIEW installed on your computer.

LabVIEW

If you are a new user, complete Getting Started with LabVIEW to get acquainted with LabVIEW. Select Start»Programs»National Instruments»LabVIEW»LabVIEW Manuals and open
LV_Getting_Started.pdf.
The LabVIEW NI-DAQmx Base Help describes the LabVIEW VIs and properties. In LabVIEW, select Help»Search the LabVIEW Help and the VI reference help section for NI-DAQmx Base.

ANSI C

The NI-DAQmx Base C Function Reference Help contains an API overview. Select Start»Programs»National Instruments» NI-DAQmx Base C Function Reference Help.
NI-DAQmx Base Getting Started Guide 16 ni.com

Training Courses

National Instruments offers training courses for those interested in receiving more help developing an application with NI products. To enroll in a course or obtain a detailed course outline, refer to

Where to Go for Support

The National Instruments Web site is your complete resource for technical support. At troubleshooting and application development self-help resources to email and phone assistance from NI Application Engineers.
National Instruments corporate headquarters is located at 11500 North Mopac Expressway, Austin, Texas, 78759-3504. National Instruments also has offices located around the world to help address your support needs. For telephone support in the United States, create your service request at instructions or dial 512 795 8248. For telephone support outside the United States, contact your local branch office:
Australia 1800 300 800, Austria 43 662 457990-0, Belgium 32 (0) 2 757 0020, Brazil 55 11 3262 3599, Canada 800 433 3488, China 86 21 5050 9800, Czech Republic 420 224 235 774, Denmark 45 45 76 26 00, Finland 385 (0) 9 725 72511, France 01 57 66 24 24, Germany 49 89 7413130, India 91 80 41190000, Israel 972 3 6393737, Italy 39 02 413091, Japan 81 3 5472 2970, Korea 82 02 3451 3400, Lebanon 961 (0) 1 33 28 28, Malaysia 1800 887710, Mexico 01 800 010 0793, Netherlands 31 (0) 348 433 466, New Zealand 0800 553 322, Norway 47 (0) 66 90 76 60, Poland 48 22 3390150, Port ugal 351 210 311 210, Russia 7 495 783 6851, Singapore 1800 226 5886, Slovenia 386 3 425 42 00, South Africa 27 0 11 805 8197, Spain 34 91 640 0085, Sweden 46 (0) 8 587 895 00, Switzerland 41 56 2005151, Taiwan 886 02 2377 2222, Thailand 662 278 6777, Turkey 90 212 279 3031, United Kingdom 44 (0) 1635 523545
ni.com/support you have access to everything from
ni.com/training.
ni.com/support and follow the calling
© National Instruments Corporation 17 NI-DAQmx Base Getting Started Guide
National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or trad e names of their respective companies. For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your CD, or ni.com/patents.
© 2004–2007 National Instruments Corporation. All rights reserved.
371259F-01 Jun07
Loading...