NI-DAQ™mx Base 1.4 Readme

Copyright 2004 National Instruments. All rights reserved. For patents covering National Instruments products, refer to ni.com/patents.

CVI™, LabVIEW™, Measurement Studio™, National Instruments™, NI™, ni.com™, NI-DAQ™, and SCXI™ are trademarks of National Instruments Corporation.

Product and company names mentioned herein are trademarks or trade names of their respective companies.


 

Thank you for using NI-DAQmx Base version 1.4.

The NI-DAQmx Base 1.4 software contains LabVIEW and C Application Programming Interfaces (API) which allows you to create applications for your device.

NI-DAQmx Base 1.4 supports USB-92xx, USB-600x, and USB-6501 devices on Windows 2000/XP.

Choosing the API to Use

The following sections provide a NI-DAQmx and NI-DAQmx Base 1.4 overview and include information about choosing the right API for the device and application.

NI-DAQmx

NI-DAQmx is the latest NI-DAQ driver with new VIs and functions and development tools for programming measurement devices. Install and use NI-DAQmx if the following situations apply:

·                    You are using Windows 2000/NT/XP.

·                    You are using only device(s) supported by NI-DAQmx. If you are using NI application software, you must use LabVIEW, LabWindows/CVI, or Measurement Studio version 7.x, or LabVIEW with the LabVIEW Real-Time Module 7.1 to use NI-DAQmx.

·                    If you use one of the Measurement Studio .NET languages or a device supported by NI-DAQmx, you must use NI-DAQmx.

NI-DAQmx Base 1.4

Install and use NI-DAQmx Base 1.4 if the following situations apply:

·                    You are using an operating system not supported by NI-DAQmx, such as Linux or MacOS X.

·                     You are using a device which is only supported by NI-DAQmx Base 1.4.

NI-DAQmx Base 1.0

Install and use NI-DAQmx Base 1.0 if the following situations apply:

  • You are developing a DAQ application for PocketPC 2003 with LabVIEW 7.1 PDA and E Series devices.

Operating System Support

NI-DAQmx Base 1.4 supports Windows 2000/XP, Linux with 2.4 kernels, and Mac OS 10.3.

Application Software Support

The following table lists the application software versions supported by NI-DAQmx Base 1.0 and 1.4.

NI Application Software

Versions Supported by NI-DAQmx Base 1.0

Versions Supported by NI-DAQmx Base 1.4

LabVIEW

7.1

7.x

LabVIEW PDA

7.1

Programming Language Support

The following table lists the language versions supported by NI-DAQmx Base 1.0 and 1.4

Programming Language

Versions Supported by NI-DAQmx Base 1.0

Versions Supported by NI-DAQmx Base 1.4

ANSI C

No

Yes

Device Support

The following lists the devices supported by NI-DAQmx Base 1.4. Device support is divided into the following categories:

Devices Supported by NI-DAQmx Base 1.0

NI-DAQmx Base 1.0 supports the following devices:

  • NI DAQCard-6024E 200 kS/s, 12-bit, 16 AI channel, 2 AO channel, 8 DIO line, 2 counter/timer device
  • NI DAQCard-6036E 200 kS/s, 16-bit, 16 AI channel, 2 AO channel, 8 DIO line, 2 counter/timer device
  • NI DAQCard-6062E 500 kS/s, 12-bit, 16 AI channel device
  • NI DAQCard-AI-16E-4 (6041E) 500 kS/s, 12-bit, 16 AI channels, 8 DIO lines, 2 counter/timer device

Devices Supported by NI-DAQmx Base 1.4

NI-DAQmx Base 1.4 supports the following devices:

  • NI USB-9211 4 AI Channels, 24-bit thermocouple input module
  • NI USB-9215 4 AI Channels, ±10 VDC, 16-bit simultaneous sampling analog input module
  • NI USB-6008 12-bit, 10 kS/s, 8 AI channel, 12 DIO line, 1 event counter device
  • NI USB-6009 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

System Requirements

Development

Minimum

Processor

Pentium III/Celeron 600 MHz or Equivalent

RAM

128 MB

Screen resolution

800 x 600 pixels

Operating system

Windows 2000/XP or later

Recommended

Processor

Pentium 4 or Equivalent

RAM

256 MB

Screen resolution

1024 x 768 pixels

Operating system

Windows 2000/XP or later

 

Deployment

Minimum

Processor

Pentium 200 MHz or Equivalent

RAM

64 MB

Screen resolution

800 x 600 pixels or no screen

Operating system

Windows 2000/XP or later

 Recommended

Processor

Pentium III/Celeron 600 MHz or Equivalent

RAM

256 MB

Screen resolution

1024 x 768 pixels or no screen

Operating system

Windows 2000/XP or later

 

NI-DAQmx Base 1.4 Notes

This section contains information specific to NI-DAQmx Base 1.4.

NI-DAQmx Base 1.4 is Incompatible with NI-DAQmx Base 1.0

NI-DAQmx Base 1.4 does not provide any upgrades to the NI-DAQmx Base 1.0 for PocketPC.

If you want to develop LabVIEW 7.1 PDA applications with DAQ support, install NI-DAQmx Base 1.0.  To use USB-92xx, USB-600x, and USB-6501, install NI-DAQmx Base 1.4.

Currently, NI-DAQmx Base 1.0 and NI-DAQmx Base 1.4 cannot coexist on the same computer. A future release of NI-DAQmx Base might allow NI-DAQmx Base 1.0 and NI-DAQmx Base 1.4 to coexist on the same computer.

Detecting and Listing NI-DAQmx Base Devices

Anytime a new device is added or removed, you should run Start » Programs » National Instruments » NI-DAQmx Base » List Devices.

Make note of the device name (Dev1 for example) as this is the name you need to specify when creating channels in your program. A device name might change each time a device is added or removed.

Installing, Reinstalling, or Repairing the LabVIEW 7.1 or 7.1.1 Installation

If you are installing, reinstalling, or repairing LabVIEW 7.1 or 7.1.1, reinstall NI-DAQmx Base 1.4 after the LabVIEW operation.

Launching the NI-DAQmx Base Configuration Tool While a Task is Running

Do not launch the NI-DAQmx Base Configuration Utility while an acquisition task is in progress as this might cause the running task to hang.

Using Multiple USB Devices

You can use multiple USB devices concurrently, providing that they are accessed from within the same process.

Hotplug USB Support

If a USB device is added or removed, you must update the device list either by selecting Refresh Device in the NI-DAQmx Base Configuration Utility or by launching (or re-launching) LabVIEW prior to using the device. Note that updating the device list might change the device order (such as, "Dev1" becomes "Dev2").

USB-9215 Maximum Sample Rate

The USB-9215 maximum sample rate is determined by the highest channel number read, not by the number of channels read.

Highest Channel Number

Maximum Sample Rate

0

20 kS/sec

1

10 kS/sec

2

6.67 kS/sec

3

5 kS/sec

USB-6009 Aggregate Scan Rates

When sampling more than 2 channels, the maximum aggregate scan rate is determined by the number of channels.

Number of Channels

Maximum Aggregate Sample Rate

1

48 kS/sec

2

48 kS/sec

3

45.5 kS/sec

4

44 kS/sec

5

43.5 kS/sec

6

43 kS/sec

7

42 kS/sec

8

40.5 kS/sec

USB-9211 Sample Process

When performing a thermocouple task, the USB-9211 automatically reads both the Cold-Junction and Autozero channels and uses these values when calculating the temperature every time the scan list is sampled. Both reads count towards the overall sample rate. Thus the effective maximum sample rate for thermocouple tasks is 12/(N+2) S/sec where N equals the number of channels being read. For example, if three channels are being read by a thermocouple task, the maximum sample rate is then 12/(3 + 2) = 2.4 S/sec. Higher sample rates might be obtained by reading the desired thermocouple channel as a voltage channel in an Analog Input task. However, as an Analog Input task, the resulting units are volts, and temperature calculation is not performed by the driver.

The Cold-Junction Compensation sensor can be read by using physical channel 4 as a voltage channel. The Autozero channel is not available as a physical channel.

USB-92xx LED Might Blink Sporadically

The USB-92xx LED might not blink at a steady rate when acquiring data. Sporadic blinking is normal and does not affect data acquisition.

NI-DAQmx Base Tasks Are Not Listed in the LabVIEW Task Constant and Task Control Dialog Boxes

To use static tasks created with the NI-DAQmx Base Configuration Utility, type the desired task name into the Task Constant or Task Control.

When using any NI-DAQmx Base control from the control palette, make sure the Allow Undefined Names attribute is enabled. To enable the Allow Undefined Names attribute, right-click on the control and select I/O Name Filtering. Place a checkmark in the Allow Undefined Names checkbox and click OK.

USB Devices Might not be Available After Hibernation

After resuming from hibernation, USB devices might not register in NI-DAQmx Base. Physically re-inserting the USB devices or refreshing the Windows Device Manager allows NI-DAQmx Base to detect the USB devices again.

Restoring Default Tasks

The NI-DAQmx Base installer does not overwrite existing task configuration files. To restore the task list to the default tasks, import the configuration file installed in the static example directory.

USB-9211 and USB-9215 Channel Voltage Range

The USB-9211 and USB-9215 devices do not provide a user-configurable channel range. The following lists the supported channel ranges per device:

USB-9211

±80 mV

USB-9215

±10 V

Building C Examples with Visual Studio .NET

To build DAQmx Base examples in Visual Studio.NET, complete the following steps:

1. Launch Start » Program Files » Microsoft Visual Studio .Net 2003 » Visual Studio .Net Tools » Visual Studio .NET 2003 Command Prompt.

2. Then enter "cd C:\Program Files\National Instruments\NI-DAQmx Base\Examples".

3. Enter the example type: ai, ao, ctr, or dio.

4. Enter "nmake <examplename>.mak"

Documentation Errata

·        The documentation does not contain a list of possible timing and triggering sources. All of the Terminal Names, when used in DAQmx Base, but be prefixed with /Dev#/ where # is the device number with the exception of OnboardClock, which is used alone. The following is a list of the possible timing and triggering sources:

Terminal Names

Onboard Clock

An alias for the terminal within a device where the default source for a clock can be found. If your application does not set the source of a clock (or uses an empty string as the source), the clock's particular onboard clock is used. For example, the onboard clock for the ai sample clock is the ai Sample Clock Timebase.

PFIn

Programmable Function Interface—general-purpose input terminals, fixed-purpose output terminals. The name of the fixed output signal is often placed on the I/O connector next to the terminal as a hint.

PXITrign

PXI Trigger bus—general-purpose input/output lines.

RTSIn

Real Time System Integration bus—general-purpose input/output lines. RTSI7 is the exception. It is the only line to use for the 20 MHz Timebase signal.

ai/SampleClock

A terminal within a device where the analog input sample clock can be found.

ai/StartTrigger

A terminal within a device where the analog input Start Trigger can be found.

ai/ReferenceTrigger

A terminal within a device where the analog input Reference Trigger can be found.

ao/SampleClock

A terminal within a device where the analog output sample clock can be found.

ao/StartTrigger

A terminal within a device where the analog output Start Trigger can be found.

20MHzTimebase

A terminal within a device where the onboard clock source for the master timebase can be found.

MasterTimebase

A terminal within a device where the master timebase signal can be found. This signal originates either from the 20MHzTimebase terminal or the RTSI7 terminal. This signal is the onboard source for the Sample Clock Timebases and is one of the possible sources for the AI convert clock timebase.

100kHzTimebase

A terminal within a device where the 100 kHz Timebase signal can be found. This signal is created by dividing the signal at the 20MHzTimebase terminal by 200 and is one of the possible sources for the Sample Clock Timebases.

ai/ConvertClock

A terminal within a device where the AI Convert Clock can be found.

ai/ConvertClockTimebase

A terminal within a device where the AI Convert Clock Timebase can be found. This is the onboard clock source for the AI convert clock.

ai/HoldCompleteEvent

A terminal within a device where the AI Hold Complete Event signal can be found.

AI Hold Complete

The terminal at the I/O connector (external to the device) where the AI Hold Complete Event signal can be emitted.

ai/PauseTrigger

A terminal within a device where the analog input pause trigger can be found.

ai/SampleClockTimebase

A terminal within a device where the AI Sample Clock Timebase can be found. This is the onboard clock source for the AI sample clock.

AnalogComparisonEvent

A terminal within a device where the output of the analog comparison circuit, the Analog Comparison Event signal, can be found. This circuit is active whenever an analog edge or window trigger is configured.

ao/PauseTrigger

A terminal within a device where the analog output pause trigger can be found.

ao/SampleClockTimebase

A terminal within a device where the AO Sample Clock Timebase can be found. This is the onboard clock source for the AO sample clock.

Ctr0Out, Ctr1Out

Terminals at the I/O connector where the output of counter 0 or counter 1 can be emitted. You also can use Ctr0Out also as an input terminal for driving an external signal onto the RTSI bus.

Ctr0Gate, Ctr1Gate

Terminals within a device whose purpose depends on the application. Refer to Counter Parts in NI-DAQmx for more information on how the gate terminal is used in various applications.

Ctr0Source, Ctr1Source

Terminals within a device whose purpose depends on the application. Refer to Counter Parts in NI-DAQmx for more information on how the source terminal is used in various applications.

Ctr0InternalOutput, Ctr1InternalOutput

Terminals within a device where you can choose the pulsed or toggled output of the counters. Refer to Counter Parts in NI-DAQmx for more information on internal output terminals.

PairedCtrInternalOutput

An alias for one of the counter internal output terminals. For example, if you use counter 1, PairedCtrInternalOutput refers to Ctr0InternalOutput. If you use counter 0, PairedCtrInternalOutput refers to Ctr1InternalOutput. Refer to Paired Counters for more information.

PairedCtrOutputPulse

A terminal within a device that chains counters together without using any external connections. If you configure counter 0, PairedCtrOutputPulse refers to the pulsed output of counter 1. If you configure counter 1, PairedCtrOutputPulse refers to the pulsed output of counter 0. Refer to Paired Counters for more information. When the counter reaches terminal count (zero when counting down, its maximum count when counting up), the output of the PairedCtrOutputPulse pulses. By using this terminal, you can chain counters together to create a wider counter, perform buffered event counting using the other counter as your clock source, perform finite pulse-train generation, and create other custom applications.

·        The DAQmx Base C Function Reference Help states that for DAQmxCreateCOPulseChanFreq that the idle state parameter is supported. Currently, only the low idle state is supported.

·        The example source string for functions DAQmxBaseCfgDigEdgeStartTrig, DAQmxBaseCfgAnlgEdgeStartTrig, DAQmxBaseCfgAnlgEdgeRefTrig, and DAQmxBaseCfgDigEdgeRefTrig in the DAQmx Base C Function Reference Help should be /Dev1/PFI0 (note the beginning forward slash).

·        The first paragraph of the Purpose for DAQmxBaseClearTask in the DAQmx Base C Function Reference Help should read:

"Clears the task. Make sure the task has been stopped by calling DAQmxBaseStopTask before calling this function. Before clearing, this function releases any resources the task reserved. You cannot use a task after you clear it unless you recreate the task."

·        The DAQmx Base LabVIEW Help states that for Create Virtual Channel CO Pulse Ticks and Create Virtual Channel CO Pulse Freq that the idle state parameter is supported. Currently, only the low idle state is supported.

·        The first paragraph of the Purpose for DAQmxBase Clear Task in the DAQmx Base LabVIEW Help should read:

"Clears the task. Make sure the task has been stopped by calling DAQmxBase Stop Task before calling this VI. Before clearing, this VI releases any resources the task reserved. You cannot use a task after you clear it unless you recreate the task."

 

Known Issues

·        Using DAQmxBase CreateTask, DAQmxBase Create Virtual Channel, and DAQmxBase Clear Task in a loop leaks approximately 110 bytes per iteration. If you pass in a string for the taskName parameter in DAQmxBase Create Task, the memory leak does not occur.

·        Using DAQmxBaseCreateTask, a DAQmxBaseCreateXXChannel function, and DAQmxBaseClearTask in a loop leaks approximately 110 bytes per iteration.  If you pass in a string for the taskName parameter in DAQmxBaseCreateTask, the memory leak does not occur.

·        If, when building an executable or shared object project using NI-DAQmx Base VIs, the Application Builder catches an error, you must restart LabVIEW before running any NI-DAQmx Base VI.

·        When building an executable or shared library project using NI-DAQmx Base VIs and using USB devices, the 'USB-92xx Bulk Reader.vi' must be set so that its front panel is not removed.

·        DAQmxBaseIsTaskDone and DAQmxBase Is Task Done do not currently support analog input.

·        When using the USB-600xdevicesyou must specify the input terminal configuration as RSE when using channel ai4, ai5, ai6 or ai7. If you do not specify the input terminal configuration as RSE, error -200077 displays.

 

NI-DAQmx Base 1.4 Error Codes

The following is a list of the supported error codes in NI-DAQmx Base 1.4:

·        -223700 Internal software error.

·        -200797 An empty string was specified as a terminal name which is not supported.  Specify a valid terminal name.

·        -200608 Acquisition cannot be started, because the selected buffer size is too small.  Increase the buffer size.

·        -200561 Attempted writing analog data that is too large or too small.

·        -200559 Task cannot contain a channel with the specified channel type, because the task already contains channels with a different channel type.  Create one task for each channel type.

·        -200558 One task cannot contain multiple independent devices.  Create one task for each independent device.

·        -200552 Specified string is not valid, because it contains an invalid character.

·        -200536 Specified value is smaller than the minimum value supported for this property.

·        -200527 Requested values of the Minimum and Maximum properties for the counter channel are not supported for the given type of device.  The values that can be specified for Minimum and Maximum depend on the counter timebase rate.

·        -200526 Write cannot be performed because this version of DAQmxBase Write does not match the type of channels in the task. Use the version of DAQmxBase Write that corresponds to the channel type.

·        -200525 Read cannot be performed because this version of DAQmxBase Read does not match the type of channels in the task. Use the version of DAQmxBase Read that corresponds to the channel type.

·        -200524 Write cannot be performed, because the data does not contain data for all channels in the task.  When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.

·        -200523 Read cannot be performed because this version of DAQmxBase Read only returns data from a single channel, and there are multiple channels in the task.  Use the multichannel version of DAQmxBase Read.

·        -200498 Syntax for a range of objects in the input string is invalid. For ranges of objects, specify a number immediately before and after every colon (":") in the input string. Or, if a name is specified after the colon, it must be identical to the name specified immediately before the colon. Colons are not allowed within the names of the individual objects.

·        -200489 Specified channel cannot be added to the task, because a channel with the same name is already in the task.

·        -200485 The specified task cannot be loaded, because it is not a valid task.

·        -200478 Specified operation cannot be performed when there are no channels in the task.

·        -200474 Specified operation did not complete, because the specified timeout expired.

·        -200473 Read cannot be performed when the Auto Start property is false and the task is not running or committed.

·        -200459 Write failed, because there are no output channels in this task to which data can be written.

·        -200452 Specified property is not supported by the device or is not applicable to the task.

·        -200430 I/O type of the physical channel does not match the I/O type required for the virtual channel you are creating.

·        -200428 Value passed to the Task/Channels In control is invalid. The value must refer to a valid task or valid virtual channels.

·        -200361 Onboard device memory overflow. Because of system and/or bus-bandwidth limitations, the driver could not read data from the device fast enough to keep up with the device throughput.  Reduce the sample rate, or reduce the number of programs your computer is executing concurrently.

·        -200341 Generation was configured to use only onboard memory, but the corresponding buffer is larger than onboard memory. Buffer size is provided implicitly when data is written or explicitly when the buffer is configured.

·        -200330 An attempt has been made to use the PFI0 terminal of the device for both an analog and digital source. Use a terminal other than PFI0 as the source of your digital signal.

·        -200326 An attempt has been made to perform a route when the source and the destination are the same terminal.  In many cases, such as when configuring an external clock or a counter source, you must select a PFI, PXI Trigger, or RTSI line as the source terminal.

·        -200287 Attempted to write to an invalid combination of position and offset. The position and offset specified a sample prior to the first sample generated (sample 0). Make sure any negative write offset specified will select a valid sample when combined with the write position.

·        -200284 Some or all of the samples requested have not yet been acquired. To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger, make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.

·        -200278 Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available. Specify a position and offset which selects a sample up to, but not beyond, the final sample acquired. The final sample acquired can be determined by querying the total samples acquired after an acquisition has stopped.

·        -200265 An attempt has been made to use an invalid analog trigger source. If you explicitly named the virtual channel using DAQmxBase Create Channel, you must use the name assigned to that channel.

·        -200261 An attempt has been made to use an analog trigger in multiple situations with differing properties. Change the analog trigger properties so they are the same, or do not use an analog trigger for all situations.

·        -200254 Terminal for the device is invalid.

·        -200220 Device identifier is invalid.

·        -200214 Analog trigger circuitry unavailable on the device. Select a non-analog trigger type, or use a device with analog triggering hardware.

·        -200170 Physical channel specified does not exist on this device. Refer to the documentation for channels available on this device.

·        -200099 Physical channel not specified.

·        -200096 Number of samples to read must be -1 or greater.

·        -200089 Task name specified conflicts with an existing task name.

·        -200082 Minimum is greater than or equal to the maximum.

·        -200077 Requested value is not a supported value for this property.

·        -200040 Source terminal to be routed could not be found on the device. Make sure the terminal name is valid for the specified device. Refer to help for valid terminal names.

·        -200012 Specified physical channel does not support digital output.

·        -89136 Specified route cannot be satisfied, because the hardware does not support it.

·        -89131 An attempt has been made to perform a route when the source and the destination are the same terminal.  In many cases, such as when configuring an external clock or a counter source, you must select a PFI, PXI Trigger, or RTSI line as the source terminal.

·        -89120 Source terminal to be routed could not be found on the device. Make sure the terminal name is valid for the specified device.

·        -50256 USB Device error: Feature not supported.

NI-DAQmx Base 1.4 Warning Code

·                    233700 Internal software warning.

MHDDK Error Code

·                    15 Resource Not Found - The application cannot get access to the hardware. Occurs if the DAQ device is not installed on the PDA or the reference to the hardware is invalid. For an invalid reference, restart LabVIEW.