Answers to Frequently Asked Questions about NI-DAQmx and Traditional NI-DAQ (Legacy)

Similar documents
NI-DAQ mx Base 1.x. Contents GETTING STARTED GUIDE

Developing Measurement and Control Applications with the LabVIEW FPGA Pioneer System

Programming for the LabVIEW Real-Time Module Using LabWindows/CVI

NI-DAQmx Basic Course NITS John Shannon

Software-Defined Test Fundamentals. Understanding the Architecture of Modular, High-Performance Test Systems

Advanced NI-DAQmx Programming Techniques with LabVIEW

NI-DAQ mx for USB Devices

LabVIEW Basics I: Introduction Course

PXI Versus Industrial Computers

LabVIEW Real-Time Module for Mac OS X User Manual Addendum

NI-DAQmx: Reduce Development Time and Improve Performance

Designing Next Generation Test Systems An In-Depth Developers Guide

How to Choose the Right Bus for Your Measurement System

LabVIEW FPGA Module Release and Upgrade Notes

LabVIEW Datalogging and Supervisory Control Module

High-Accuracy M Series Multifunction DAQ 18-Bit, up to 625 ks/s, up to 32 Analog Inputs

LabVIEW Real-Time Module Release and Upgrade Notes

IMAQ Vision Deployment Engine Note to Users

IMAQ Vision Deployment Engine Note to Users

Designing Next Generation Test Systems. An In-depth Developers Guide

LabVIEW Graphical Development Platform. Part I An Open Platform for Long-Term Continuity

Getting Started with the LabWindows /CVI Real-Time Module

Developing Networked Data Acquisition Systems with NI-DAQ

PC-based data acquisition I

Getting Started with the LabVIEW Real-Time Module

LabVIEW Real-Time Module Release Notes

MOIS Overview. 1. Developer Walkthrough

Data Acquisition in LabVIEW

Contents. Software CALIBRATION PROCEDURE NI TC-4353

High-Speed M Series Multifunction DAQ 16-Bit, up to 1.25 MS/s, up to 80 Analog Inputs

Contents. Software Requirements CALIBRATION PROCEDURE NI TB-4353

The hardware implementation of PXI/PXIe consists of a chassis, controller or computer interface, and peripheral cards.

NI-Industrial Communications for EtherCAT

Using Desktop PCs as RT Targets with the LabVIEW Real-Time Module

Install the Software and Hardware

High-Speed M Series Multifunction DAQ 16-Bit, up to 1.25 MS/s, up to 80 Analog Inputs

LabVIEW Release Notes

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

Contents. Software. CALIBRATION PROCEDURE NI 9216/ Channel, 24-Bit, 100 Ω/1000 Ω RTD Analog Input Module

LabVIEW FPGA Module Version 2013

CALIBRATION PROCEDURE PXIe channel, 16-bit, 400 ks/s/ch, Ch-Ch Isolated Analog Input Module. ni.com/manuals

LabVIEW PDA Module Release Notes

Electromagnetic Compatibility Guidelines

GETTING STARTED NI 9501 C Series Stepper Drive Modules and NI SoftMotion Module

CALIBRATION PROCEDURE NI PXIe Channel, Isolated Voltage/Current Analog Output Module

CALIBRATION PROCEDURE CAL Contents. Software

Contents. Software Requirements. CALIBRATION PROCEDURE NI PXIe-4357

Where to Start with NI ELVIS

PCI/PXI Gigabit Ethernet Adapters

Getting Started with the LabVIEW Real-Time Module

Related Information Refer to the NI Switches Help for detailed information about features and programming options for your NI switch product.

LabVIEW Core 1. What You Need To Get Started. File Locations. The course installer places the course files in the following location: ni.

Hardware: Acquiring Data and Communicating with Instruments

CHAPTER 3 LabVIEW REAL TIME APPLICATION DEVELOPMENT REFERENCES: [1] NI, Real Time LabVIEW. [2] R. Bishop, LabVIEW 2009.

LABVIEW REAL-TIME. Contents. About LabVIEW Real-Time (RT) RELEASE NOTES. Version 6.1

The Measurement Revolution

ni.com/training Quizzes LabVIEW Core 1 ni.com/training Courses Skills learned: LabVIEW environment Certifications Skills tested: LabVIEW environment

Low-Cost Multifunction DAQ for USB

SCB-68 User Guide. 68-Pin Shielded Desktop Connector Block

CALIBRATION PROCEDURE NI channel, ±2- ma/±10 V, 24-bit Analog Input Module. ni.com/manuals

Automated Test Equipments

LabVIEW Release Notes

DT3016. High-Speed, Multifunction PCI Data Acquisition Board. Overview. Key Features. Supported Operating Systems

LabWindows /CVI Version 2015

LabVIEW FPGA in Hardware-in-the-Loop Simulation Applications

What s New in Data Acquisition

LabWindows /CVI Release Notes Version 2010

TestStand. Contents RELEASE NOTES. Version 2017

LabWindows /CVI Release Notes Version 9.0

Figure 3.174: Illustration of the code of the event f USB that plots an USB camera frame if the typed frame is under the acceptable limits (case 0)

LabWindows /CVI Version 2017

Where to Start with NI ELVIS

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

CALIBRATION PROCEDURE SCXI Contents. Software Requirements. ni.com/manuals

Developing Measurement and Analysis System using MATLAB

R Series for USB Multifunction RIO with Kintex-7 70T FPGA. ni.com/manuals. Electromagnetic Compatibility Guidelines

24-Channel, ±24 V Precision PXI Source Measure Unit

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

Getting Results with CompactRIO and LabVIEW

Contents. Software. CALIBRATION PROCEDURE NI Channel, 300 Vrms, 24-Bit, Simultaneous, Channel-to-Channel Isolated Analog Input Module

±10 V, 20 MS/s/ch, 14-Bit, 4-Channel C Series Digitizer Module

CompactDAQ Chassis PRODUCT FLYER CONTENTS. Цены и срок поставки уточняйте на сайте по телефону: или

Solving the Data Transfer Bottleneck in Digitizers

Introduction to LabVIEW and NI Hardware Platform

Evaluating a Test Executive

DaqBoard/1000. Series 16-Bit, 200-kHz PCI Data Acquisition Boards

A variety of ECONseries modules provide economical yet flexible solutions

SCXI -1102/B/C. Contents CALIBRATION PROCEDURE. For NI-DAQmx

Measurement Studio Measurement Computing Edition

VXI-LXI DAQ System Ensures Mission Critical Reliability for Rocket Engine Test

PXIe Contents. Verifying the System Requirements GETTING STARTED GUIDE. 32-Channel Digital Pattern Instrument

Data Acquisition Fundamentals

LabWindows /CVI Release Notes

Personal Daqs USB Data Acquisition Modules Models /55 & /56

The PXI Modular Instrumentation Architecture

Migrating a Business-Critical Application to Windows Azure

For NI PXI and NI SCXI Switch Modules

12-Channel, ±24 V Precision PXI Source Measure Unit

LabWindows /CVI Using the Latest ANSI C Tools for High-Performance Automated Test

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

Transcription:

Answers to Frequently Asked Questions about NI-DAQmx and Traditional NI-DAQ (Legacy)

Introduction This document answers the most frequently asked questions about NI-DAQmx and Traditional NI-DAQ (Legacy). The questions are grouped logically into the four categories shown below.level 2 Head is Helvetica Condensed 14pt NI-DAQmx Description Q: Why is software so important to data acquisition? A: At the heart of every virtual instrument is flexible, powerful software. Let s look closer at virtual instrumentation software. Most people think immediately of the application layer, which is the primary development environment. It includes software like LabVIEW, LabWindows/CVI (ANSI C), and Measurement Studio (Visual Studio programming languages). The test executive layer incorporates the functionality developed by the application layer. The next layer is often overlooked, yet it is critical to maintaining the productivity of software development. The measurement and control services layer includes drivers that communicate with the hardware. Measurement and control services must access and preserve the functions and performance of the hardware. They also must work with all other drivers and the many modular types of I/O that are part of the solution. Figure 1. Virtual Instrumentation Software Q: What is measurement services software? A: Think of measurement services software as the I/O driver software layer. However, it is much more than just a driver. Measurement services are some of the most crucial elements of rapid application development. This software provides the connectivity between the virtual instrumentation software and the hardware for measurement and control. It features intuitive application programming interfaces (APIs), instrument drivers, configuration tools, rapid I/O assistants, and other software included with the purchase of National Instruments (NI) hardware. NI measurement and control services software offers optimized integration with both NI hardware as well as NI application development environments (ADEs). National Instruments Corporation 1

Table 1. NI-DAQmx includes a high-performance driver and additional software to increase productivity. Productivity Performance NI-DAQ Measurement Services Basic DAQ Driver Automatic code generation Configuration management Analog, digital, and counter test panels Ability to scale to real-world units Single API for all hardware and I/O types Measurement examples >3,000 <20 Data-logging software Pinpoint error diagnostics Optimized multithreaded I/O performance Optimized single-point loops Real-time capabilities Calibration of entire measurement path Advanced device calibration Industry de facto standard Good Best Not Available NI Measurement & Automation Explorer (MAX) and the DAQ Assistant are two examples of the tremendous value included with NI-DAQmx measurement services software, shipped with most NI data acquisition (DAQ) devices. NI also includes FREE data-logging software with every M Series and USB DAQ device and with many other devices. Configuration tools, such as MAX, include features for configuring and testing I/O, as well as storing, scaling, calibration, and channel-aliasing information. These tools are important for achieving short time to first measurement and for maintaining and troubleshooting test systems. I/O assistants are interactive tools for rapidly creating measurements or stimulus applications. One example of an I/O assistant is the DAQ Assistant, which, as shown in Figure 2, presents a panel you can use to configure common DAQ parameters without programming. You can use the resulting DAQ task in any NI ADE. The combination of easy-to-use assistants and powerful programming environments provides both rapid development and the capabilities to meet a breadth of application requirements. 2 ni.com

Figure 2. DAQ Assistant, available with NI-DAQmx, simplifies DAQ task creation. Q: Why did NI create NI-DAQmx? Why not continue to develop Traditional NI-DAQ (Legacy)? A: NI first released the Traditional NI-DAQ (Legacy) driver in the 1990s. Traditional NI-DAQ (Legacy) offered many improvements over existing DAQ libraries by providing extended functionality for a wide variety of devices. Improvements included double-buffered acquisition, built-in scaling for specific sensor types, such as thermocouples and strain gages, and signal conditioning, and a single library of functions that worked with multiple devices and OSs. In the late 1990s, the NI-DAQ team recognized that the need to maintain API compatibility with previous releases increased the difficulty of adding new features and devices to Traditional NI-DAQ (Legacy). In addition, the Traditional NI-DAQ (Legacy) API, through its long evolution, had developed many problems that needed to be fixed. NI-DAQ developers were having difficulty intuitively extending the API and optimizing the increasingly broad spectrum of customer applications. NI concluded that a new API design and architecture would help NI-DAQ developers more easily add new features and new devices, fix many existing driver problems, and optimize performance at the same time. Some ambitious goals of the NI-DAQmx project included the following: 1. Make it easier to add new features to the DAQ API. The Traditional NI-DAQ (Legacy) API had many functions with a large number of parameters and no efficient way to add new parameters. The NI-DAQmx API, in comparison, uses a property-based approach with a rich property hierarchy. This property-based approach is easy to extend. Adding a new feature is often as easy as adding a new property. 2. Make it easier to add new devices. NI had difficulty adding more devices to Traditional NI-DAQ (Legacy) without adding more bugs to existing functionality. Finding and National Instruments Corporation 3

fixing the accidental bugs took too much time each release. NI-DAQmx, in comparison, uses a componential plug-in design that facilitates adding new devices. 3. Make multithreaded data acquisition more efficient. Traditional NI-DAQ (Legacy) was initially designed for older OSes without multithreading. To run safely under a multithreaded OS, Traditional NI-DAQ (Legacy) restricts access to one thread at a time. For applications that need to concurrently perform two or more DAQ tasks, this restriction causes problems because both tasks cannot access the driver at the same time. NI-DAQmx solves this problem with a multithreaded design so that multiple threads can access the driver at the same time. 4. Speed up DAQ performance, especially single-point performance. Some applications using Traditional NI-DAQ (Legacy) experienced poor software-timed single-point performance because they implemented expensive operations, such as validating the configuration (verify), reserving resources (reserve), and programming the hardware (commit) repeatedly in the main loops. Traditional NI-DAQ (Legacy) did not give applications enough control over when to perform verify, reserve, and commit, so users could not rewrite these applications to run faster. NI-DAQmx speeds up performance with a design based on a well-defined state model. NI-DAQmx provides users with advanced API functions, such as verify, reserve, and commit; therefore, users have more control over when to perform expensive operations. 5. Improve driver quality and reliability. NI-DAQmx is designed with world-class data acquisition quality and robustness in mind. Since the beginning of NI-DAQmx development, every time a user adds a new feature or makes a change to the driver, a rigorous and comprehensive suite of automated functional and performance tests verifies that the change has not introduced a bug. This suite tests common and uncommon driver uses in a variety of device, sensor, and OS configurations. Uncommon or exceptional driver uses are important to overall reliability. NI-DAQmx is designed to handle exceptional conditions such as DAQ task abortion, watchdog timer expiration, and surprise device removal (such as unplugging a USB device from the computer). 6. Make data acquisition easier. In the mid-1990s, the NI-DAQ team added an Easy I/O and Intermediate I/O layer to Traditional NI-DAQ (Legacy) to make some common DAQ tasks easier. However, the layered approach caused some problems because as soon as users needed to add more advanced features to applications, they had to rewrite the applications with the more advanced API. NI-DAQmx makes developing applications easier through the following: Configuration tools such as the NI-DAQmx DAQ Assistant. With the DAQ Assistant, users can graphically select the type of measurements they want to perform, save the configurations for later use, and generate code to include in applications. Advanced NI-DAQmx routing features. These features simplify DAQ device triggering and synchronization. Descriptive error reporting in NI-DAQmx. This feature helps users precisely identify the cause of an error and recommends solutions. Users have found that the advanced error reporting in NI-DAQmx makes debugging a DAQ application much easier. 4 ni.com

Ease-of-use features beginning with LabVIEW 7. New features introduced in LabVIEW 7 that especially apply to NI-DAQmx include the ability to create Express VIs and polymorphic VIs. With Express VIs, users can replace large parts of a complex DAQ application with a simple configuration dialog. With polymorphic VIs, users can find features more easily. Because of both of these features, users develop applications in less time. Figure 3. Polymorphic VIs simplify the NI-DAQmx API. Q: Which hardware does NI-DAQmx support? Not support? A: NI-DAQmx, the latest in NI measurement services software, supports the newest NI DAQ hardware, including M Series plug-in DAQ devices, some of the latest NI USB DAQ devices, and hundreds of DAQ devices also supported by Traditional NI-DAQ (Legacy). Although NI-DAQmx supports many of the newest NI DAQ hardware devices, NI-DAQmx does not support all NI DAQ devices. For example, legacy DAQ devices, such as devices using the ISA bus for desktop PCs, are supported only by NI legacy driver software, Traditional NI-DAQ (Legacy). For current lists of NI-DAQmx-supported devices, visit ni.com/dataacquisition/ software and click Device Support, or refer to the NI-DAQmx Readme included with NI-DAQmx. Q: Why are some DAQ devices supported only by NI-DAQmx? A: Devices such as M Series DAQ devices are the latest and greatest in DAQ hardware. M Series devices are the first 18-bit plug-in DAQ devices on the market, the first plug-in DAQ devices with six DMA channels for maximum data throughput, and innovative device calibration. These devices are supported by NI-DAQmx not by Traditional NI-DAQ (Legacy). Future NI DAQ devices will be supported by NI-DAQmx but not by Traditional NI-DAQ (Legacy). NI engineers focus on the productivity and performance of NI-DAQmx instead of using resources to develop legacy driver software. Q: With which programming languages can I use NI-DAQmx? A: You can use NI-DAQmx with a number of different programming languages including: National Instruments LabVIEW ANSI C Microsoft Visual C++ class libraries (with NI Measurement Studio 7 or later) National Instruments Corporation 5

Microsoft Visual C++ Microsoft C#.NET Microsoft Visual Basic.NET Microsoft Visual Basic (beta) For additional information on programming using NI-DAQmx and text-based languages, visit Programming NI-DAQ in Text-Based Languages and NI-DAQ Readme. Q: With which application development environments can I use NI-DAQmx? A: NI-DAQmx works with many of the most popular ADEs. When installing NI-DAQmx, you can choose to install support for various ADEs including: NI LabVIEW 7 or higher NI LabVIEW Real-Time 7.1 or higher NI LabWindows/CVI 7 or higher.net Languages NI Measurement Studio for Visual C++.NET (requires Measurement Studio 7 or higher) Microsoft Visual C support To install support for these ADEs, select the appropriate support during the NI-DAQmx installation. When you first install NI-DAQmx, expand the NI-DAQmx section on the feature tree. Then, select the APIs you plan to use to install the appropriate support. Figure 4. NI-DAQmx provides APIs for use with many ADEs. 6 ni.com

If you have already installed NI-DAQmx and want to change your preferences, run Add/Remove Programs. Select the NI Software entry and click Change. Next, select NI-DAQmx on the list of NI software installed on your machine. Click Modify to launch the NI-DAQmx installer, where you can specify your API support preferences. Q: When will NI-DAQmx be available for Linux? Mac OS X? A: NI-DAQmx is available only for users developing and deploying their applications for Microsoft Windows. NI does not currently have a date for NI-DAQmx expansion to Linux and Mac OS X. However, both of these platforms have experienced recent growth in scientific and engineering computing, and this demand has prompted NI to create NI-DAQmx Base. NI-DAQmx Base offers a subset of NI-DAQmx functionality on Windows, Linux, Mac OS X, and Pocket PC OSs and supports the majority of the most popular NI DAQ devices including the new low-cost USB DAQ products. Visit ni.com/linux and ni.com/mac to find the latest NI product offerings for Linux and Mac OS X. Q: Is NI going to continue to develop Traditional NI-DAQ (Legacy)? A: NI has no plans to continue developing Traditional NI-DAQ (Legacy). However, to maintain existing applications, NI will continue to support Traditional NI-DAQ (Legacy) and make it available for users. Q: How is NI-DAQmx different from NI-DAQmx Base? A: The best way to compare these software tools is to use the driver comparison chart at ni.com/dataacquisition/software. However, a few points of differentiation are also mentioned here. Although NI-DAQmx and NI-DAQmx Base have a similar API, the two APIs also have completely different architectures. NI-DAQmx Base is written with the NI tool for custom driver development using register-level programming the NI Measurement Hardware DDK (driver development kit). One of the benefits of this is that NI-DAQmx Base is open source. This gives you the ability to open subvis and tunnel down to view/edit register accesses in LabVIEW and add or modify functionality. NI-DAQmx Base does not have several of the software features included with NI-DAQmx. A few of the features available only in NI-DAQmx include the following: DAQ Assistant Property nodes for advanced DAQ tasks Multithreaded I/O performance Q: Why would I choose not to develop using NI-DAQmx? A: While NI encourages you to take advantage of NI-DAQmx benefits in your applications, there are a couple of situations where using NI-DAQmx is not ideal. National Instruments Corporation 7

Install and use Traditional NI-DAQ (Legacy) if one of the following situations apply: You have a device that is not supported by NI-DAQmx, such as an AT E Series multifunction DAQ board. You are using a version of LabVIEW, LabWindows/CVI, or Measurement Studio earlier than version 7. You are using Visual Basic 6. You are upgrading from NI-DAQ 6.9.x and have existing applications that you do not want to port to NI-DAQmx now. Install and use NI-DAQmx Base if one of the following situations apply: You are developing your application for use on Linux, Mac OS X, or Pocket PC. You have a USB DAQ device supported only by NI-DAQmx Base. Install and use the Measurement Hardware DDK if one of the following situations apply: You are developing a custom driver using register-level programming. For additional help deciding which driver software option is right for you, use the device support tables and driver software comparison chart, available at ni.com/dataacquisition/software as well as the NI-DAQ Readme file. Q: How do I get NI-DAQmx? A: When you purchase hardware supported by NI-DAQmx from NI, you receive an NI-DAQ CD that contains the latest version of NI-DAQmx. You can download the latest version of NI-DAQmx by navigating to ni.com and clicking Drivers and Updates under Technical Support. Then, click Current Software Versions and then Multifunction DAQ. Concepts Introduced by NI-DAQmx Q: What is the DAQ Assistant? A: The DAQ Assistant is a step-by-step guide that helps you configure DAQ tasks, virtual channels, and scales with zero programming required. You can launch the DAQ Assistant from NI application software such as LabVIEW, LabWindows/CVI, Measurement Studio, VI Logger, or MAX. 8 ni.com

Figure 5. The DAQ Assistant is available for all NI ADEs. Note You must use version 7.x or later of LabVIEW, LabWindows/CVI, and Measurement Studio and 2.x of VI Logger to use the DAQ Assistant. You also can use the DAQ Assistant to generate NI-DAQmx code, run your tasks and global virtual channels, or move them to other systems. Using the DAQ Assistant, you can do the following: Create and edit tasks and virtual channels Add virtual channels to tasks Create and edit scales Test your configuration Save your configuration Generate code in your NI application software for use in your application View connection diagrams for your sensors Q: Why would I use the DAQ Assistant instead of the NI-DAQmx API? A: The DAQ Assistant is built on top of the NI-DAQmx API and can serve as both a configuration tool and a learning tool to help you get up to speed quickly on the new NI-DAQmx API. After configuration, the DAQ Assistant Express VI in LabVIEW contains all the API code necessary to run your configured task, but it is hidden from the block diagram. If you want National Instruments Corporation 9

to view or modify the API functions in your configuration instead of using DAQ Assistant dialogs, the DAQ Assistant includes code-generation capability for LabVIEW, LabWindows/CVI, and Measurement Studio applications. Q: What is an NI-DAQmx task? A: An NI-DAQmx task is a collection of one or more virtual 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 the configuration information in a task and use the task in an application. Q: What is the difference between a local virtual channel and a global virtual channel in NI-DAQmx? A: In NI-DAQmx, you can configure virtual channels as part of a task or separate from a task. Virtual channels created inside a task are local virtual channels. Virtual channels defined outside a task are global virtual channels. You can create global virtual channels in MAX or in your application software and save them in MAX. You can use global virtual channels in any application or add them to a number of different tasks. If you modify a global virtual channel, the change affects all tasks in which you reference that global virtual channel. Q: When should I use a task instead of a global virtual channel? A: A task is a collection of one or more virtual channels with timing, triggering, and other properties. A global virtual channel references only a single physical channel and does not contain timing or triggering. However, a global virtual channel can be contained and referenced by multiple tasks, whereas a task is a stand-alone entity and cannot be contained or referenced by other tasks. Q: Can I programmatically save virtual channels with NI-DAQmx? A: With NI-DAQmx 7.4 and later, you can programmatically create and save tasks, global virtual channels, and scales. The programmatically saved objects appear in MAX, and you can use them in the DAQ Assistant and in your applications. Programmatically saving tasks, channels, and scales simplifies system configuration and deployment to multiple locations and reduces the chance for error and need for debugging. To learn more about how to use this feature and to see examples, visit ni.com/dataacquisition/nidaqmx. Q: How do I import/export device, task, channel, and scale configurations? A: Using MAX, you can export your system configuration for use as a backup or for deployment to other machines. Use the export wizard to copy configuration data from a system to a file. To start the Export Wizard, select File»Export in MAX. 10 ni.com

Q: What are property nodes? A: Property nodes are LabVIEW constructs that you can use to access attributes on the referenced object. NI-DAQmx uses these constructs to provide complete programmatic control for all properties supported by the NI-DAQmx API, and these property nodes form the base functionality of the API. In addition to property nodes, NI-DAQmx also provides a set of NI-DAQmx VIs that you can use to write your application. These VIs are functionally equivalent to using property nodes but are generally easier and more convenient to use. For instance, the following two examples are equivalent in functionality; however; the first example uses NI-DAQmx VIs, and the other example uses NI-DAQmx property nodes. Figure 6. Use NI-DAQmx property nodes for advanced task customization. For most applications, NI-DAQmx VIs provide the functionality required. However, for more advanced applications, you may need the property nodes to access less-used driver attributes and features. National Instruments Corporation 11

Q: How do I filter the list of property nodes? A: When you first open and navigate through a property node, the list of properties presented may seem overwhelming. To navigate this list more easily, take advantage of several filter options available through the dialog window shown below. Figure 7. Simplify the property node list using filtering attributes. To reach this dialog, right-click the property node and click Select Filter. Show All Attributes displays all attributes supported by the NI-DAQmx API. Show Attributes For Configured Devices displays all properties supported by devices currently installed and configured on your system. Use Show Attributes For Selected Devices to select the installed devices for which you would like to display properties. In addition to the filtering options, you can also view a complete list of properties by device through the LabVIEW help. To find this list, click Help in the menu bar and select VI, Function, & How-To Help. From the Contents tab of the help window that is displayed, navigate to VI and Function Reference»NI Measurements VIs and Functions» DAQmx Data Acquisition Vis and Functions»Additional Information»Device Considerations»Supported Properties by Device. Q: What is an NI-DAQmx simulated device? A: With NI-DAQmx 7.4 and later, you can create an NI-DAQmx simulated device. You can choose any device supported by NI-DAQmx and add it as a simulated device to your hardware configuration in MAX. This makes the device available for use by the application software. 12 ni.com

Physical Device Simulated Device Performance Figure 8. Create NI-DAQmx simulated devices. NI-DAQmx simulated devices are useful for creating and running NI-DAQmx programs and for trying out tools such as the DAQ Assistant or SignalExpress without any physical hardware present. NI-DAQmx simulated devices are useful for discovering the capabilities of a device without the physical hardware actually being present. Tasks using NI-DAQmx simulated devices are verified just as they are on real devices. If a property is set to an invalid value, the error returned for a simulated device is identical to the error returned for a real device. All resources necessary for the task are reserved for NI-DAQmx simulated devices. RTSI lines, PXI trigger lines, DMA channels, counters, and so on are counted and reserved just as they are on real devices. Q: Which performance improvements does NI-DAQmx offer? A: DAQ performance in a user application is a combination of many factors, including sampling rate, bus speed, driver performance, analysis, and other operations. NI-DAQmx can increase application performance over Traditional DAQ (Legacy) in many applications because of the driver architecture improvements including the following: 1. Multithreaded operation. With NI-DAQmx, if you use LabVIEW or a multithreaded C program, performance increases because multiple threads can access the NI-DAQmx driver at the same time as long as those threads are executing different NI-DAQmx tasks. The ability to access the driver from multiple threads unblocks bottlenecks in DAQ applications and can greatly improve performance in some cases. Multithreaded operation makes the most difference in applications that are performing multiple tasks and are also reading or writing multiple samples at a time. 2. Better control of expensive DAQ operations. With NI-DAQmx, you have more control over driver operations such as checking the configuration (verify), reserving resources (reserve), and programming the hardware (commit) that can bottleneck some applications. With NI-DAQmx, you can develop an application that verifies, National Instruments Corporation 13

reserves, or commits a task outside of the main DAQ loop so that the driver does not need to perform these operations repeatedly. 3. Built-in hardware-timed single-point operation. NI-DAQmx 7.2 introduced built-in support for applications that need to perform hardware-timed single-point data acquisition. The new built-in mode has several advantages over Traditional NI-DAQ (Legacy), including better performance for single-point tasks using multiple channels. The NI-DAQmx team constantly works to improve the performance of NI-DAQmx. Q: Why does NI-DAQmx use 100 percent of my CPU? A: Some users have noticed cases when their DAQ process is using 100 percent of their CPUs. This can happen when using NI-DAQmx versions 7.3 or earlier when the application is in the middle of a Read or Write call. Normally the excess CPU usage is not a problem when running other applications, but on a laptop computer, NI-DAQmx can consume battery power and may cause the CPU fan to turn on. The 100 percent CPU usage occurs because of the way NI-DAQmx versions 7.3 or earlier wait for new data to become available during a Read or Write operation. While waiting for data to become available, NI-DAQmx 7.3 yields to other processes if, during a Read operation, data is not yet available. If another process needs to use the CPU, NI-DAQmx shares the CPU with that process. However, if no other process or task needs to use the CPU, NI-DAQmx continues polling for new data to become available. This solution offers very excellent performance if the computer is implementing only data acquisition and good performance when sharing the CPU with other applications; however, a side effect is that NI-DAQmx uses 100 percent of the CPU when no other application is running. The best solution to this problem is to use the most recent release of NI-DAQmx, such as NI-DAQmx 7.4. NI-DAQmx 7.4 changed the default wait mode of buffered Read and Write operations. When polling is required, NI-DAQmx sleeps for a small length of time (1 ms) before continuing the Read or Write operation. This change has virtually no impact on performance for most applications when compared to previous versions of NI-DAQmx. However, other NI-DAQmx 7.4 Read and Write improvements and optimizations more than compensate for possible performance reduction. Applications upgrading to NI-DAQmx 7.4 see both improved performance and reduced CPU use. If you want more control over the way NI-DAQmx 7.4 waits for data, you can select a different sleep time or change the Read wait mode to poll or yield. Using the yield wait mode results in behavior similar to NI-DAQmx 7.3. Using poll results in best throughput but is not suitable when running other applications at the same time. Q: Has single-point I/O performance improved? A: NI-DAQmx offers better single-point I/O performance than Traditional NI-DAQ (Legacy) in almost every case. However, there are cases when Traditional NI-DAQ (Legacy) offers better performance. Specifically, NI-DAQmx offers better single-point performance for the following: 1. Software-timed Reads and Writes for analog and counter channels 2. Software- or hardware-timed Reads or Writes involving multiple channels 14 ni.com

Traditional NI-DAQ (Legacy) offers better performance for the following: 1. Reads or Writes using digital channels 2. Hardware-timed single point for applications with only one input and one output channel Note Traditional NI-DAQ (Legacy) users may not be familiar with hardware-timed single point. More specifically, these applications use hardware timing, a buffer size of zero, and reading or writing one sample at a time. Sometimes Traditional NI-DAQ (Legacy) is faster because NI-DAQmx offers more functionality than Traditional NI-DAQ (Legacy). For instance, you can arbitrarily group lines and ports with NI-DAQmx digital channels. Support for multithreading and handling exceptional conditions, such as surprise device removal, adds some additional overhead. Many DAQ applications require the absolute best performance, and the NI-DAQmx team is constantly working on new features that improve the performance of the driver. Q: How does a state machine help improve the performance of NI-DAQmx? A: The NI-DAQmx task state machine keeps track of which configuration operations you need to perform before a data acquisition or generation can begin. Configuration operations include checking the configuration (verify), reserving resources (reserve), and programming the hardware (commit). NI-DAQmx implements a state machine to ensure that expensive operations such as task verification, resource reservation, and hardware programming are performed only when needed. A DAQ application can benefit from improved performance when performing explicit configuration operations outside the main acquisition or generation loop. NI-DAQmx offers explicit commands that cause a verify, reserve, or commit operation to be performed. When a task is explicitly verified, reserved, committed, or started outside an acquisition or generation loop, NI-DAQmx does not repeat these operations at every loop iteration, so overall, the application runs faster. Figure 9. NI-DAQmx improves performance by enforcing a state model for DAQ tasks. For additional information about each of the NI-DAQmx states, refer to the NI-DAQmx Help. National Instruments Corporation 15

Disk I/O Bandwidth CPU Bandwidth Bus Bandwidth Q: What are the primary factors that limit streaming-to-disk performance? A: Disk I/O Bandwidth, CPU Bandwidth, and Bus Bandwidth. The typical system with an IDE drive is primarily limited by the disk throughput. Potential improvements include adding a dedicated drive or controller for streaming. A dedicated drive circumvents performance problems due to fragmentation and disk access by the OS or other application. High-speed drives and a high-speed RAID controller increase the disk I/O bandwidth. Note Check the CPU bandwidth and bus bandwidth before investing in drives and controllers to avoid increasing disk I/O beyond what you can realistically use. For unscaled data, processor bandwidth generally impacts performance only in systems where a high-speed RAID controller has been installed. In these systems, the CPU can impact how quickly you can retrieve and write acquired data to the disk drive. Even with a dedicated RAID controller, a portion of the CPU bandwidth is consumed while writing data to disk. For scaled data, processor bandwidth is often the limiting factor. Increasing the number of CPUs in the system and the speed of the CPUs increases the system bandwidth. Even when CPU use is less than 100 percent, minimize tasks and operations done in parallel. Competition for scarce resources can lower streaming-to-disk performance. Finally, tune the streaming code for the particular system. For systems with multiple CPUs, executing some code in parallel may increase the throughput of the system. (Note: Parallel disk I/O operations to the same drive generally reduce performance.) Optimize code to avoid memory copies and other operations that waste CPU bandwidth. A typical desktop system with a single PCI/PXI bus can be limited by bus bandwidth. The theoretical bandwidth for standard PCI/PXI is around 130 MB/s. The actual bandwidth is lower depending on the amount of bus contention. Generally, more devices operating at the same time on the same bus lower bus bandwidth. Note A single NI 6115 DAQ device can generate 80 MB/s of data. Increasing the number of buses in the system is the only way to increase bus bandwidth. For example, some high-end motherboards include two or more independent PCI buses. This helps you set up a system with a RAID controller and DAQ devices on separate buses. For these motherboards, bridge chips may limit the total throughput of all of the combined buses. 16 ni.com

Q: How well does NI-DAQmx perform high-speed streaming to disk? A: NI-DAQmx primarily affects streaming-to-disk performance because it uses CPU bandwidth while moving and scaling data acquired by devices. Therefore, on systems where CPU bandwidth is a limiting factor, it is critical that NI-DAQmx efficiently uses the CPU. NI-DAQmx has undergone multiple optimizations since its first release to reduce CPU usage while reading and writing. For example, between the NI-DAQ 7.3 and 7.4 releases, the performance of scaled analog input benchmarks has increased from 8 to 60 percent. The performance of unscaled analog input benchmarks has increased from 12 to 40 percent. The performance increase translates directly to higher streaming-to-disk throughput on systems where CPU bandwidth is an issue. NI-DAQmx implements an extremely simple form of compression. Bits at the end of samples are simply thrown out and the resulting samples are packed into memory. NI-DAQmx does not implement any other lossless or lossy compression algorithms such as LZW or JPEG. In some cases, no data is lossed because the samples already contain unused bits. For example, a channel with 12-bit resolution and a 16-bit sample size contains four unused bits. You can discard the four bits with no loss while reducing the required disk space by 25 percent. In addition, you can configure NI-DAQmx to discard one or more of the least significant bits in a sample. For example, you can configure a channel with 24-bit resolution and a 32-bit sample size to return only the 20 highest-order bits. A total of 12 bits are discarded, including eight unused bits, which reduces the required disk space by 37.5 percent. Upgrading from Traditional NI-DAQ (Legacy) Q: Why would I upgrade to NI-DAQmx from Traditional NI-DAQ (Legacy)? A: There are a number or reasons to upgrade from Traditional NI-DAQ (Legacy) to NI-DAQmx. One important reason is that NI engineers focus on improving the productivity and performance of NI-DAQmx, not Traditional NI-DAQ (Legacy). NI-DAQmx users stand to reap the benefits of this innovation if they are using the latest version of this measurement services software. Independent of the current engineering efforts, users may choose to upgrade to NI-DAQmx simply because of software feature advantages when compared to Traditional NI-DAQ (Legacy). A few of these advantages include the following: Improved state model Multithreaded driver Reliability in exceptional conditions Simplified synchronization Decreased LabVIEW diagram clutter Smooth transition from easy to advanced programming National Instruments Corporation 17

Note To learn more about these advantages and others, refer to the Advantages of NI-DAQmx tutorial available in the Developer Zone on ni.com. Another reason to upgrade to NI-DAQmx is to take advantage of the latest DAQ hardware NI offers. The newest and most innovative DAQ devices provide technologies available with no other vendor and on no other devices. The latest NI DAQ devices are supported only by NI-DAQmx. Q: Which resources are available to help me upgrade my applications from Traditional NI-DAQ (Legacy) to NI-DAQmx? A: The Developer Zone at ni.com includes excellent resource for helping Traditional NI-DAQ (Legacy) users upgrade their applications to NI-DAQmx. One tutorial, Transition Traditional NI-DAQ to NI-DAQmx, shows that although many of the programming techniques are similar between Traditional NI-DAQ (Legacy) and NI-DAQmx, there are some slight differences. This tutorial describes the similarities and differences between the most common VIs and functions in each of the APIs. A second tutorial, Learn 10 Functions in NI-DAQmx and Solve 80 Percent of Data Acquisition Applications, describes how you can use NI-DAQmx to replace dozens of Traditional NI-DAQ (Legacy) functions and VIs with 10 functions and VIs in NI-DAQmx. This tutorial illustrates how to use each of the 10 VIs that make up the NI-DAQmx API core. For users who plan to upgrade to NI-DAQmx but want to use their current Tradition NI-DAQ (Legacy) applications with new NI-DAQmx-supported hardware, NI has created the Traditional NI-DAQ (Legacy) compatibility VIs. These VIs replace certain Traditional NI-DAQ (Legacy) VI libraries with libraries that work with both Traditional NI-DAQ (Legacy) and NI-DAQmx. These VIs look identical to the existing Traditional NI-DAQ (Legacy) VIs and integrate seamlessly into existing applications. The compatibility VIs were created to use while waiting for the application to be rewritten using NI-DAQmx, but you can still use NI-DAQmx-only devices. Users should be careful when implementing the compatibility VIs because they do not support all features on all devices and are not guaranteed to be updated with future revisions. To learn more about these VIs, visit ni.com. Additionally, the NI Web site has thousands of DAQ example programs available at ni.com/examples. Hundreds of these examples show how to use NI-DAQmx to accomplish the most common DAQ tasks. Q: Can I use Traditional NI-DAQ (Legacy) and NI-DAQmx at the same time? A: You can use Traditional NI-DAQ (Legacy) and NI-DAQmx at the same time if you have two DAQ devices and one of them is using Traditional NI-DAQ (Legacy) and the other NI-DAQmx. If you only have one DAQ device, you can still use both Traditional NI-DAQ (Legacy) and NI-DAQmx but only in sequence not at the same time. You need to reset your device to switch between Traditional NI-DAQ (Legacy) and the NI-DAQmx driver as part of the sequence. 18 ni.com

In LabVIEW, use the Device Reset VI at the end of Traditional NI-DAQ (Legacy) sequence and the DAQmx Reset Device VI at the end of your NI-DAQmx sequence. You still need to create a Traditional NI-DAQ (Legacy) virtual channel and an NI-DAQmx Task for use with each driver respectively. Figure 10. Traditional NI-DAQ (Legacy) and NI-DAQmx can be used in the same application. Q: Which DAQ software should a Visual Basic 6.0 developers use? A: Many data acquisition system developers using Visual Basic 6.0 have not yet made the move to Microsoft s.net languages. Developers using Visual Basic 6.0 have the following DAQ software options: Upgrade to VB.NET and use NI-DAQmx: The benefits of this choice include the latest software from both Microsoft and National Instruments. Use Visual Basic 6.0 and NI-DAQmx: NI-DAQmx 7.4 includes beta support for Visual Basic 6.0 developers. When C++ support is installed a Visual Basic type library is also made available. This option is not currently supported by National Instruments and no documentation is currently provided. Use Traditional NI-DAQ (Legacy) and Visual Basic 6.0: Although this choice is most likely the path of least resistance in the short term, it requires you use legacy software from both Microsoft and National Instruments. Q: How do I move my configuration between machines without the NIConfig.DAQ file? A: You can now use the Export function in NI-DAQmx to transfer your hardware configurations between machines. Go to MAX and select File»Export to start the Configuration Export Wizard. Using this wizard, you can select the configurations to export and save them to a file of your choice for exporting. To import the configurations, go to MAX, File»Import and import the configurations from the file generated by the Configuration Export Wizard. National Instruments Corporation 19

Figure 11. Import/Export hardware configurations using MAX. Q: How do I use SCXI devices now? The ìob0!sc1!md1!0î channel string syntax doesn t work in NI-DAQmx. A: SCXI channel strings used in Traditional NI-DAQ (Legacy) are no longer used with NI-DAQmx. The format is now SCxMody/channel. 1. x refers to the SCXI chassis ID chosen when configuring the chassis. 2. y refers to the slot position of the module. The slots in the chassis are numbered from left to right, starting at 1. 3. I/channel has different formats depending on the type of data acquisition performed: Analog Input: /ai#. # is the number of the analog input channel on the module. For example, SC1/MOD1/ai1 refers to the physical analog input channel 1 of the module in slot 1 of the SCXI chassis that has ID of 1. If you have multiple channels configured with the same SCXI module, you can include them all in the format of SC1/MOD1/ai1, 2, 4. It refers to analog input channel 1, 2, and 4 of the same SCXI module. Analog Output: /ao#. # is the number of the analog output channel on the module. For example, /ao2 refers to the physical analog output channel 2. Digital I/O: port#/line#. The first number refers to the digital port and the second number refers to the digital line of the port being used. For example, port0/line2 means the physical digital port 0 line 2. Counter I/O: ctr#. # is the number of the counter on the module. For example, /ctr0 means the counter 0 of the module. 20 ni.com

Q: How do I program with counters using NI-DAQmx? A: The table below shows similar NI-DAQmx and Traditional NI-DAQ (Legacy) VIs to help convert them: Traditional NI-DAQ (Legacy) Counter Group Config VI NI-DAQmx DAQmx Create Channel VI Counter Set Attribute VI DAQmx Channel Property Node VI Counter Source (TIO) VI Counter Source (STC) VI Counter Control VI Counter Get Attribute VI Counter Control VI DAQmx Trigger Property Node VI DAQmx Property Node VI DAQmx Start VI DAQmx Read VI DAQmx Stop VI Refer to the Transition Traditional NI-DAQ to NI-DAQmx tutorial in the Developer Zone at ni.com for additional help on writing counter applications in NI-DAQmx. Q: How can I do double-buffered acquisition in NI-DAQmx? A: If you are doing double-buffered I/O, you would most likely be polling the buffers to continuously acquire data. In NI-DAQmx, you can achieve this simply by using the NI-DAQmx timing function and setting the Sample Mode parameter to Continuous. NI-DAQmx uses circular buffers. For input operations, portions of data are read from the buffer while the buffer is filled. Likewise for output operations, portions of the buffer can be written to while the buffer is emptied. Using a circular buffer, you can set up your device to continuously acquire data in the background while NI-DAQmx retrieves the acquired data. Figure 12. NI-DAQmx simplifies double-buffered data acquisition. National Instruments Corporation 21

Q: How do I configure my SCXI modules using NI-DAQmx? A: You can still set SCXI module properties in MAX by selecting NI-DAQmx Devices, right-clicking the SCXI chassis, and selecting Properties. You see each module that resides in your chassis and you can set the properties of each module by clicking the Details tab. Figure 13. Configure SCXI modules and chassis with MAX. The only property not exposed in MAX is the gain setting. NI-DAQmx can automatically configure the device for the best gain settings based on the I/O limits of your signal. Q: How is pulse train polarity and duty cycle control functionality different in NI-DAQmx? A: In NI-DAQmx, you can simplify your program by using the general DAQmx Create Channel functions and select Counter Output»Pulse Generation»Frequency. In Traditional NI-DAQ (Legacy), you must use the Generate Pulse Train function to define the polarity, frequency, and duty cycle of the pulse train. Besides frequency and duty cycle, NI-DAQmx uses the Idle State parameter to configure the polarity of the pulse train. 22 ni.com

Figure 14. NI-DAQmx simplifies counter/timer applications. Q: How can I perform remote data acquisition (RDA) with NI-DAQmx? A: The RDA feature is not available in NI-DAQmx. To remotely control your DAQ device, you can use the Remote Front Panel feature in LabVIEW 7 and later. With this feature, you can remotely control the DAQ application via the Internet. Q: Can I change the frequency of my pulse train generation in NI-DAQmx without restarting the task? A: Yes, you can update the frequency and duty cycle of a continuous pulse train generation at any time, including while the task is running. This is useful for applications that require pulse-width modulation such as PID loop control applications. Within the DAQmx Write function, the Frequency and Duty Cycle parameters can automatically update the pulse train when the task is running. When updating the rate of the pulse generation, a complete period of the current rate is generated before the new rate takes effect. National Instruments Corporation 23

Figure 15. Dynamically update pulse train frequency and duty cycle using NI-DAQmx. *342515A-01* 342515A-01 Mar05 11500 North Mopac Expressway Austin, TX 78759-3504 USA Tel: (512) 683-0100 Fax: (512) 794-8411 Email: info@ni.com 2005 National Instruments Corporation. All rights reserved. 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 Instrumentstrademarks. Other product and company names mentioned herein are trademarks or trade 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.