Using nidaqmxconfig for NI-DAQmx 8 for Linux
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.
Table of Contents
- How do I use nidaqmxconfig?
- What is the structure of the NI-DAQmx for Linux Configuration File?
- How do I configure an SCXI Chassis?
- How do I configure an SCXI Module?
- How do I configure a Signal Conditioning Carrier?
- How do I configure a Signal Conditioning Module?
- How do I configure connector accessories and RTSI cables?
- How do I configure TEDS sensors?
- Can I add comments to the configuration file?
- Are there any example configuration files?
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:
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]
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:
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:
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:
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:
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:
MajorVersion = 8
MinorVersion = 0
[DAQmxDevice Dev1]
ProductType = PCI-6251
DevSerialNum = 0xDEFB88
BusType = PCI
PCI.BusNum = 0x1
PCI.DevNum = 0x8
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:
ProductType = PCI-6251
DevSerialNum = 0xDEFB88
BusType = PCI
PCI.BusNum = 0x1
PCI.DevNum = 0x8
How do I configure an SCXI Chassis?
[DAQmxSCXIChassis SC1]
SCXIChassis.ProductType =
SCXIChassis.Address =
SCXIChassis.CommDev =
SCXIChassis.CommModuleSlot =
SCXIChassis.CommMode =
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:
ProductType = SCXI-1125
SCXIModule.Chassis = SC1
SCXIModule.Slot = 1
SCXIModule.CabledDev = Dev1
SCXIModule.DigitizingDev = Dev1
SCXIModule.DigitizationMode = Parallel
SCXIModule.DigitizingDevChans = 0-7
[DAQmxSCXIModule SC1Mod1]
ProductType = SCXI-1125
SCXIModule.Chassis = SC1
SCXIModule.Slot = 1
SCXIModule.CabledDev = Dev1
SCXIModule.DigitizingDev = Dev1
SCXIModule.DigitizationMode = Parallel
Options include Multiplexed, Parallel, and Cascade.
Options include 0-7, 16-23, 32-39, and 48-55.
The following screenshot shows an import of an SCXI Chassis configuration using the example file at the bottom of this page:
In addition to the examples used above, some modules have their own options, as listed below:
SCXI.1100.FltrFreqJumper =
Options include 4 and 10.
Options include 0 and 1.
Options include 1, 2, 5, 10, 20, 50, 100, 200, 250, 500, 1000, and 2000.
Options include Voltage and Current.
SCXI1121.ExcitValJumper =
Options include 0.00015, 0.00045, 3.33, and 10.0.
Options include 4 and 10000.
Options include 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, and 2000.
Options include 4 and 10000.
Options include 0.5, 1, 2.5, 5, 10, 25, 50, 100, 250, 500, and 1000.
Options include 4500 and 22500.
Options include 1, 10, 100, 200, 300, 500, 600, 700, and 800.
How do I configure a Signal Conditioning Carrier?
[DAQmxSCCCarrier SCC1]
SCCConnBlk.ProductType =
SCCConnBlk.CabledDev =
SCCConnBlk.CabledDevConnNum =
How do I configure a Signal Conditioning Module?
[DAQmxSCC SCC1Mod1]
ProductType =
SCCModule.ConnBlk =
SCCModule.Slot =
How do I configure connector accessories and RTSI cables?
[DAQmxAccessory BNC-2095/SC1Mod1/0]
The format is:
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]
RTSI.ConnDevs = Dev1, Dev2
RTSI.LineReservationMask = 0
How do I configure TEDS sensors?
[DAQmxTEDSInterface TEDS1]
TEDSInterface.ProductType =
TEDSInterface.Address =
TEDSInterface.CommDev =
TEDSInterface.PhysChans =
TEDSInterface.CommDevConnNum =
Can I add comments to the configuration file?
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
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/).


