Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Nov 6, 2007


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

Using nidaqmxconfig for NI-DAQmx 8 for Linux

1 ratings | 5.00 out of 5
Print

Overview

NI-DAQmx is National Instruments next-generation data acquisition driver. NI-DAQmx incorporates a driver architecture and API, complete with VIs/functions and development tools for controlling National Instruments DAQ devices.

NI-DAQmx 8 for Linux marks the first release of NI-DAQmx for Linux.

This document explains the configuration file options for NI-DAQmx 8 for Linux. It demonstrates the usage of nidaqmxconfig, the console-based DAQmx configuration utility for Linux-based systems.

How do I use nidaqmxconfig?

nidaqmxconfig is the console-based utility that configures NI-DAQmx Devices in Linux.

The NI-DAQmx 8 installer puts this utility in /usr/local/natinst/nidaqmx/bin. A symlink is created in /usr/local/bin, so should be globally executable as long as /usr/local/bin is in the current executable path.

nidaqmxconfig creates and uses configuration files that are in plain-text INI format.

Running nidaqmxconfig at the command prompt returns the following:

Usage: nidaqmxconfig [ --import <filename> [--eraseconfig] ] | [--export <filename>] [-y | -n] [--help]

Mandatory arguments are either –import or –export:
--export <filename>
Creates a file containing the current NI-DAQmx configuration in the current working directory.

Upon the first time running nidaqmxconfig, the exported file contains the base configuration of any supported devices physically attached and detected in the computer (see documentation for nilsdev).

nidaqmxconfig does not detect modules, accessories, and other external components; you must configure them and import them into the DAQmx driver.

The –export option overwrites existing files with the same name without prompting you. Any attempt to write to a file or directory that is write-protected will result in error.

Example:
nidaqmxconfig –export my.ini

--import <filename> [--eraseconfig]
Imports a user-defined configuration file into your DAQmx system configuration.

Example:
nidaqmxconfig –import myconfig.ini

NI-DAQmx 8 for Linux does not support partial imports. If the user attempts to import a file that contains configuration information that conflicts with what is in the system, an error occurs and the entire import fails. To import the file, the user must either correct the conflicting configuration information or erase the configuration.

--eraseconfig is an optional flag that erases the current system configuration before the utility imports the new file. Thus, it will erase SCXI, SCC, RTSI, and other accessories inside of the system configuration before the import. –eraseconfig does not delete PXI and PCI devices still detected in the system.

--eraseconfig only works with the –import flag and when the import is error-free.

Example:
nidaqmxconfig –import myconfig.ini --eraseconfig

Note that the --eraseconfig option deletes plug-in devices that are no longer present in the system, such as a device that has been removed from the chassis. To override this behavior, use the --preserveabsentdevices option.

Example:

nidaqmxconfig –-import my.ini –-eraseconfig --preserveabsentdevices

The following screenshot shows the series of commands to create a basic NI-DAQmx Configuration File:

[+] Enlarge Image

What is the structure of the NI-DAQmx for Linux Configuration File?


The NI-DAQmx for Linux configuration files use INI file syntax.

nidaqmxconfig –export returns a configuration file that begins with a header section and contains the version of NI-DAQmx:
[DAQmx]
MajorVersion = x
MinorVersion = y

The next sections contain hardware information detected in the system by NI-DAQmx. Each of these sections begins with DAQmxDevice. The nidaqmxconfig –export flag returns this information for a PCI-based system:
[DAQmxDevice DevX]
ProductType = PCI-xxxx
DevSerialNum = 0xYYYYYY
BusType = PCI
PCI.BusNum = 0xZ
PCI.DevNum = 0xQ

User-defined sections follow. NI-DAQmx currently supports the following configuration item types:
DAQmxDevice (hardware sections returned by nidaqmxconfig –export)
DAQmxRTSICable
DAQmxSCXIChassis
DAQmxSCXIModule
DAQmxAccessory
DAQmxSCCCarrier
DAQmxSCC
DAQmxTEDSInterface

The following chapters of this document detail each configuration type.

As an example, nidaqmxconfig –export returns the following example on a system with a PCI-6251 M-Series board:
[DAQmx]
MajorVersion = 8
MinorVersion = 0

[DAQmxDevice Dev1]
ProductType = PCI-6251
DevSerialNum = 0xDEFB88
BusType = PCI
PCI.BusNum = 0x1
PCI.DevNum = 0x8
Note that you do not need to modify these sections.

NI-DAQmx names the device “Dev1”, which is how you reference it in LabVIEW and C.

Additionally, you can rename a device name in your configuration file after the DAQmxDevice declaration. For instance, edit the preceding configuration as shown below and import your changes:
[DAQmxDevice MyDevice]
ProductType = PCI-6251
DevSerialNum = 0xDEFB88
BusType = PCI
PCI.BusNum = 0x1
PCI.DevNum = 0x8

How do I configure an SCXI Chassis?

SCXI Chasses are setup using a DAQmxSCXIChassis section in the configuration file. These sections are setup using the following options:

[DAQmxSCXIChassis SC1]
Defines an SCXI Chassis named SC1. SC1 is a user-defined name that you reference when adding its accessories.

SCXIChassis.ProductType =
Defines the SCXI Chassis model, such as SCXI-1000.

SCXIChassis.Address =
Specifies the chassis address. This is normally 0 unless additional chasses are added.

SCXIChassis.CommDev =
Specifies which device defined in a DAQmxDevice section that you will use to communicate with the chassis.

SCXIChassis.CommModuleSlot =
Specifies the chassis slot that connects to the communicator device.

SCXIChassis.CommMode =
Specifies the mechanism by which the communicator device connects to the chassis.
Options include Front Connector and PXI Backplane.

See the Examples section in this document for example SCXI configuration files.

How do I configure an SCXI Module?


Configure SCXI Modules using a DAQmxSCXIModule section in the configuration file. The following example measures using parallel mode:
[DAQmxSCXIModule SC1Mod1]
ProductType = SCXI-1125
SCXIModule.Chassis = SC1
SCXIModule.Slot = 1
SCXIModule.CabledDev = Dev1
SCXIModule.DigitizingDev = Dev1
SCXIModule.DigitizationMode = Parallel
SCXIModule.DigitizingDevChans = 0-7

[DAQmxSCXIModule SC1Mod1]
Defines an SCXI Module named SC1Mod1, which is an arbitrary name.

ProductType = SCXI-1125
Specifies the SCXI module model. In this case, an SCXI-1125 (8 channel isolation amplifier).

SCXIModule.Chassis = SC1
Indicates the user-defined name of the SCXI chassis that contains the module.

SCXIModule.Slot = 1
Indicates the slot the SCXI module occupies in the chassis.

SCXIModule.CabledDev = Dev1
Specifies the device, if any, which directly cables to the SCXI module.

SCXIModule.DigitizingDev = Dev1
Specifies the device used to digitize the channels on the module.

SCXIModule.DigitizationMode = Parallel
Specifies how the digitization device digitizes the channels on the module.

Options include Multiplexed, Parallel, and Cascade.
SCXIModule.DigitizingDevChans = 0-7
Specifies the channels used on the digitization device when in parallel digitization mode.

Options include 0-7, 16-23, 32-39, and 48-55.
SCXIModule.Chassis = SC1
Indicates the user-defined name of the SCXI chassis that contains the module.

The following screenshot shows an import of an SCXI Chassis configuration using the example file at the bottom of this page:

[+] Enlarge Image


In addition to the examples used above, some modules have their own options, as listed below:


SCXI.1100.FltrFreqJumper =
Specifies the lowpass filter enable jumper setting for the SCXI-1100 module.

Options include 4 and 10.
SCXI1100.FltrEnableJumper =
Specifies the filter enable jumper setting for an SCXI-1100 module.

Options include 0 and 1.
SCXI1121.GainJumper =
Specifies the gain jumper setting on an SCXI-1121 module.

Options include 1, 2, 5, 10, 20, 50, 100, 200, 250, 500, 1000, and 2000.
SCXI1121.ExcitTypeJumper =
Specifies the excitation type jumper setting for each channel on an SCXI-1121 module.

Options include Voltage and Current.

SCXI1121.ExcitValJumper =
Specifies the excitation value jumper setting for each channel on an SCXI-1121 module. Specify the value in volts for voltage excitation and amps for current excitation.

Options include 0.00015, 0.00045, 3.33, and 10.0.
SCXI1121.FltrFreqJumper =
Specifies the lowpass filter frequency jumper setting for each channel in Hertz on an SCXI-1121 module.

Options include 4 and 10000.
SCXI1120.GainJumper =
Specifies the gain jumper setting for each channel on an SCXI-1120 module.

Options include 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, and 2000.
SCXI1120.FltrFreqJumper =
Specifies the lowpass filter frequency jumper setting for each channel in Hertz on an SCXI-1120 module.

Options include 4 and 10000.
SCXI1120D.GainJumper =
Specifies the gain jumper setting for each channel on an SCXI-1120D module.

Options include 0.5, 1, 2.5, 5, 10, 25, 50, 100, 250, 500, and 1000.
SCXI1120D.FltrFreqJumper =
Specifies the lowpass filter frequency jumper setting for each channel in Hertz on an SCXI-1120D module.

Options include 4500 and 22500.
SCXI1140.GainJumper =
Specifies the gain jumper setting for each channel on an SCXI-1140 module.

Options include 1, 10, 100, 200, 300, 500, 600, 700, and 800.

How do I configure a Signal Conditioning Carrier?

Configure SCC Carriers using a DAQmxSCCCarrier section in the configuration file. The following options apply:

[DAQmxSCCCarrier SCC1]
Defines an SCC Carrier named SCC1, which is an arbitrary name.

SCCConnBlk.ProductType =
Indicates the product type of the connector block.

SCCConnBlk.CabledDev =
Specifies the device cabled to the connector block.

SCCConnBlk.CabledDevConnNum =
Indicates the connector number of the device attached to the connector block.

How do I configure a Signal Conditioning Module?

Configure SCC Modules using a DAQmxSCC section in the configuration file. The following options apply:

[DAQmxSCC SCC1Mod1]
Defines an SCC Module named SCC1Mod1, which is an arbitrary name.

ProductType =
Indicates the product type of the SCC Module.

SCCModule.ConnBlk =
Indicates the user-defined name of the SCC connector block the module is installed in.

SCCModule.Slot =
Indicates the slot the SCC module occupies in the SCC carrier.

How do I configure connector accessories and RTSI cables?

Configure accessories using a DAQmxAccessory section in the configuration file. One such example using a BNC-2095 connector is as follows:

[DAQmxAccessory BNC-2095/SC1Mod1/0]

The format is:
AccessoryType/ConnectedDevice/DeviceConnector

After you export your device configurations from nidaqmxconfig, use a DAQmxRTSICable section to notify the DAQ driver of a RTSI cable. This section is setup using the following options:

[DAQmxRTSICable RTSICable0]
Defines a RTSI cable configuration named RTSICable0, which is an arbitrary name.

RTSI.ConnDevs = Dev1, Dev2
Specifies the devices connected by the RTSI cable. Separate these devices with a comma and a space.

RTSI.LineReservationMask = 0
Specifies the lines that will be driven by any driver other than NI-DAQmx.

How do I configure TEDS sensors?

Configure TEDS using a DAQmxTEDSInterface section in the configuration file. This section is setup using the following options:

[DAQmxTEDSInterface TEDS1]
Defines a TEDS interface named TEDS1, which is an arbitrary name.

TEDSInterface.ProductType =
Indicates the product type of the TEDS interface. For example, BNC-2096 (a TEDS BNC Terminal Block).

TEDSInterface.Address =
Specifies the TEDS interface address.

TEDSInterface.CommDev =
Specifies the device used to communicate with the TEDS Interface.

TEDSInterface.PhysChans =
Specifies the physical channels cabled to the interface channels. Separate the physical channels with a comma and a space. This configuration item may be very long, and must remain on one line.

TEDSInterface.CommDevConnNum =
Indicates the connector number of the connector cabled to the interface.

Can I add comments to the configuration file?

Yes. Comment lines with a semicolon (;) at the beginning of a line. The semicolon must be the first character of the line – you cannot add comments after individual configuration items.

Are there any example configuration files?


Yes, here are links to some example configuration files:
See Also:
NI-DAQmx 8.0 For Linux Example nidaqmxconfig Configuration File: SCC Carrier
NI-DAQmx 8.0 For Linux Example nidaqmxconfig Configuration File: SCXI Chassis

Related Links:
Learn more about NI-DAQmx
Frequently Asked Questions About NI-DAQmx for Linux 
National Instruments Products Supported on Linux
1 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).