371821A-01, November 2005
National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. 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.
© 2005 National Instruments Corporation. All rights reserved.
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.
This configuration guide describes how to find and use the nidaqmxconfig and nilsdev command-line utilities and options in NI-DAQmx 8.0 for Linux. This guide also includes how to find and execute test panels.
This guide includes the following main sections:
NI-DAQmx 8.0 for Linux includes nilsdev, a device-listing utility that displays the supported NI-DAQmx and Modular Instruments devices installed on your computer.
You can access this utility from /usr/local/bin/nilsdev or by entering nilsdev at the command-line prompt.
With nilsdev, you can display device information either in short mode (the default) or in long, or verbose, mode.
In short mode, nilsdev returns brief information about the devices installed, such as device name and location. For instance, the information displayed for a system configured with two devices and an SCXI chassis includes the following:
[user@computer home]$ nilsdev
NI PCI-6289: "Dev1"
NI PCI-6289: "Dev2"
SCXI-1000: SC1
Chassis Modules:
Slot 1: NI SCXI-1520: "SC1Mod1"
To display information in long mode, enter the following at the command-line prompt:
nilsdev --verbose
Long mode returns more specific details, such as serial number, IRQ level, memory range, and bus type, depending on the device. For instance, a system configured with three DAQ devices and an SCXI chassis returns the following information in long mode:
[user@computer home]$ nilsdev --verbose
NI PCI-6289: "Dev1"
Serial Number: 0xDF6F8F
Bus Type: PCI
PCI Bus: 0x0
PCI Device: 0x8
IRQ Level: 0x10
Memory Range: 0xDE000000-0xDE000FFF
Memory Range: 0xDE001000-0xDE001FFF
NI PCI-6289: "Dev2"
Serial Number: 0xDF7E3B
Bus Type: PCI
PCI Bus: 0x0
PCI Device: 0x10
IRQ Level: 0x9
Memory Range: 0xD0002000-0xD0002FFF
Memory Range: 0xD0001000-0xD0001FFF
SCXI-1000: SC1
Chassis Address: 0
Chassis ID: SC1
Chassis Communicator: NI PCI-6289: "Dev1"
Communication Mode: Front Connector
Chassis Modules:
Slot 1: NI SCXI-1520: "SC1Mod1"
Cabled Device: NI PCI-6289: "Dev1"
Digitizer Device: NI PCI-6289: "Dev1"
Operating Mode: Multiplexed
Slot 2: Empty
Slot 3: Empty
Slot 4: Empty
The information displayed varies depending on the device. For instance, with SCXI devices, nilsdev returns communication and digitization details.
[Not Present] appears next to devices that are installed in the system but are no longer plugged in, as shown in the following example:
[user@computer ~]$ nilsdev
NI PXI-6289: "PXI1Slot7" [Not Present]
NI PXI-6143: "PXI1Slot8" [Not Present]
NI PXI-6280: "PXI1Slot6" [Not Present]
NI PXI-6284: "PXI1Slot5" [Not Present]
If an error occurs with any of the supported devices, [Failed to Load] appears next to the device when you run nilsdev, as shown in the following example:
[user@computer ~]$ nilsdev
NI PCI-6289: "Dev1"
NI PCI-6289: "Dev2" [Failed to Load]
SCXI-1000: SC1
Chassis Modules:
Slot 1: NI SCXI-1520: "SC1Mod1"
With nidaqmxconfig, you can export and import hardware configuration in .ini format.
You can access this utility from /usr/local/bin/nidaqmxconfig or by entering nidaqmxconfig at the command-line prompt. To access usage guidelines, enter --help at the command-line prompt.
The initial configuration contains only supported devices plugged into the system. If you want to add any SCXI modules, accessories, or other external components, you must use the --export and --import options with nidaqmxconfig. After you export the .ini file, you can edit the configuration items. Then, you can save the .ini file and import it back into the configuration.
For instance, if you are configuring an SCXI chassis, you can export the initial configuration information to an .ini file. Then, you can add the chassis information to the .ini file and save the file to import. After you import the .ini file successfully, you can run nidaqmxconfig --export again to export the new configuration information to an .ini file.
General .ini syntax is as follows:
[section1]
item1 = value1
item2 = value2
; this is a comment because this line starts with a semicolon
[section2]
item1 = value3
item2 = value4
item3 = value5
Each .ini file includes a [DAQmx] section that specifies the version of NI-DAQmx. If the .ini file does not contain the [DAQmx] section, an error occurs on the report. The rest of the .ini file contains one section for each configuration item.
NI-DAQmx-specific .ini syntax is as follows:
[DAQmx]To export your configuration to an .ini file, use the --export option as follows, where my.ini is the file you want to export:
nidaqmxconfig –-export my.ini
Note: The –-export option overwrites existing files with the same name without prompting you. Also, if you attempt to write to a file or directory that is write-protected, an error occurs and the export fails.
You can use the –-import option to import an .ini file into your system configuration. To import the file, enter the following command, where my.ini is the file to import:
nidaqmxconfig --import my.ini
NI-DAQmx 8.0 for Linux does not support partial imports. If you attempt 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, you must either correct the conflicting configuration information or delete the existing configuration.
Also, importing plug-in hardware device configurations works differently than other imports. Configuration settings for plug-in hardware are not deleted and recreated. Instead, the –-import option compares the specifications in your file to the system and applies any changes to the system. If the configuration item does not match any plug-in hardware in the system, an error occurs.
In addition to the --import option, you can use --eraseconfig to delete the existing configuration before importing the new configuration. If you try to --import a file that causes configuration conflicts, you must use --eraseconfig to remove the hardware configuration items from the system.
Note: You can use --eraseconfig only when also using -–import. To delete your configuration before importing, run the following command, where my.ini is the file you want to import:
nidaqmxconfig --import my.ini --eraseconfig
The --eraseconfig option does not delete plug-in devices that are currently in the system. SCXI, SCC, RTSI, and other accessories are deleted, but PXI and PCI devices detected in the system are not deleted. However, the --eraseconfig option does delete plug-in devices that are no longer present in the system, such as a device that has been removed from the system. To override this behavior, use the --preserveabsentdevices option. This option keeps the absent devices in the system configuration while allowing the --eraseconfig option to delete the other items. To use this option, enter the following into the command line, where my.ini is the file to import:
nidaqmxconfig –-import my.ini –-eraseconfig --preserveabsentdevices
If an error occurs, the configuration is not deleted.
Note: The nidaqmxconfig utility does not support tasks, channels, or scales. If you want to use tasks, channels, or scales, you can use the NI-DAQmx API. Refer to the NI-DAQmx Help for more information.
When you plug in your hardware, the system automatically configures your device, including assigning it a default name. You can rename a device using the nidaqmxconfig utility.
For instance, to change the name of a PCI-6024E device from "Dev1" to "MyDevice" complete the following steps:
nidaqmxconfig --import my.ini --eraseconfig
Use the following guidelines for device names:
The following device and accessory configuration types are supported:
The following examples show the standard configuration settings for each of the supported devices and accessories.
NI-DAQmx Device
The following example shows the configurable settings for a PCI-6024E named
Dev1:
NI-DAQmx RTSI Cable
The following example shows the configurable settings for a RTSI cable:
SCXI Chassis
To configure SCXI chassis, modules, and accessories, you must create a section for each chassis you have and all the modules in those chassis. The following example shows the configurable settings for an SCXI-1000 chassis:
[DAQmxSCXIChassis SC1]
SCXIChassis.ProductType = SCXI-1000
SCXIChassis.Address = 0
SCXIChassis.CommDev = Dev1
SCXIChassis.CommModuleSlot = 1
SCXIChassis.CommMode = Front Connector
Note: Set SCXIChassis.CommDev to the communicating device for the chassis. Set SCXIChassis.CommModuleSlot to the slot number to which the communicating device is connected.
SCXI Module
The following example shows the configurable items for an SCXI module:
[DAQmxSCXIModule SC1Mod1]
ProductType = SCXI-1102
SCXIModule.Chassis = SC1
SCXIModule.Slot = 1
SCXIModule.CabledDev = Dev1
SCXIModule.DigitizingDev = Dev1
SCXIModule.DigitizationMode = Multiplexed
Note: Set SCXIModule.CabledDev to the device that is physically cabled to that module. Do not specify this attribute if no device is directly cabled to that module.
If you want digitization to occur for a specific module, you must specify both SCXIModule.DigitizingDev and SCXIModule.DigitizationMode. Set SCXIModule.DigitizingDev to the device you want to perform the digitization, and set SCXIModule.DigitizationMode to the desired digitization mode. Valid digitization modes are Multiplexed and Parallel. If you do not want to perform digitization on the module, do not specify these attributes.
Note: Do not specify the digitization attributes for SCXI switch modules.
Note: Refer to the SCXI section in the Device Properties for more information about the attributes of each device.
SCC Carrier
The following example shows the configurable settings for an SCC-2345
Carrier:
SCC
The following example shows the configurable settings for the SCC-FV01
module:
TEDS
The following example shows the configurable settings for the BNC-2096, a TEDS terminal block:
[DAQmxTEDSInterface TEDS1]Note: Do not break the TEDSInterface.PhysChans information with hard or soft returns. All the information must be on one line.
Accessories
DAQmxAccessory sections describe the accessories and terminal blocks connected to devices. The following example shows a BNC-2095 terminal block configuration:
[DAQmxAccessory BNC-2095/SC1Mod1/0]The above line configures a BNC-2095 terminal block on the SCXI module called SC1Mod1. The zero refers to the connector number on the device. For devices that only have one connector, specify 0 as the connector number.
The following example shows a BNC-2120 connected to the second connector of an M Series device called Dev1.
[DAQmxAccessory BNC-2120/Dev1/1]Some accessories have configurable settings. The following
example is an SCB-68 configured with a CJC sensor enabled:
[DAQmxAccessory SCB-68/Dev1/0]
Accessory.CJCSensorEnabled = 1
Similarly, you can configure the attenuation jumper settings on the SCXI-1327 with the Accessory.SCXI1327.AttenJumper property, as shown in the following example:
[DAQmxAccessory SCXI-1327/SC1Mod2/0]The following example shows the typical output of nidaqmxconfig --export for an SCC-2345 Carrier configured with an SCC-TC02 thermocouple module:
[DAQmx]
MajorVersion = 8
MinorVersion = 0
[DAQmxDevice Dev1]
ProductType = PCI-6251
DevSerialNum = 0xDEFB88
BusType = PCI
PCI.BusNum = 0x1
PCI.DevNum = 0x8
[DAQmxSCCCarrier SCC1]
SCCConnBlk.ProductType = SC-2345
SCCConnBlk.CabledDev = Dev1
SCCConnBlk.CabledDevConnNum = 0
[DAQmxSCC SCC1Mod1]
ProductType = SCC-TC02
SCCModule.ConnBlk = SCC1
SCCModule.Slot = 1
Property | Description |
---|---|
Accessory.CJCSensorEnabled | Specifies whether the CJC sensor on the accessory is enabled. |
Accessory.SCXI1327.AttenJumper | Specifies the attenuation jumper setting for each channel.
|
Property | Description |
---|---|
ProductType | Indicates the product name of the device. |
ProductNum | Indicates the unique hardware identification number for the device. |
BusType | Indicates the bus type of the device.
|
DevSerialNum | Indicates the serial number of the device. This value is zero if the device does not have a serial number. |
PCI.BusNum | Indicates the PCI bus number of the device. |
PCI.DevNum | Indicates the PCI slot number of the device. |
PXI.ChassisNum | Indicates the PXI chassis number of the device. |
PXI.SlotNum | Indicates the PXI slot number of the device. |
Property | Description |
---|---|
RTSI.ConnDevs | Specifies the device identifiers for the devices connected by the RTSI cable. |
RTSI.LineReservationMask | Specifies the lines that any driver other than NI-DAQmx drives. |
Property | Description |
---|---|
ProductType | Indicates the product name of the device. |
ProductNum | Indicates the unique hardware identification number for the device. |
SCCModule.ConnBlk | Indicates the SCC connector block in which the module is installed. |
SCCModule.Slot | Indicates the slot the module occupies in the SCC carrier. |
Property | Description |
---|---|
SCCConnBlk.CabledDev | Specifies the identifier of the device cabled to the connector block. |
SCCConnBlk.CabledDevConnNum | Indicates the connector number of the device to which the connector block is connected. |
SCCConnBlk.ProductType | Indicates the product type of the connector block. |
SCCConnBlk.ProductNum | Indicates the unique hardware identification number for the connector block. |
Property | Description |
---|---|
SCXIChassis.ProductType | Indicates the product name of the chassis. |
SCXIChassis.ProductNum | Indicates the unique hardware identification number for the chassis. |
SCXIChassis.Address | Specifies the chassis address. |
SCXIChassis.CommDev | Specifies the identifier of the device used to communicate with the chassis. |
SCXIChassis.CommModuleSlot | Specifies the chassis slot to which the communicator device is cabled. |
SCXIChassis.CommMode | Specifies the mechanism by which the communicator device
connects to the chassis.
|
Property | Description |
---|---|
ProductType | Indicates the product name of the device. |
ProductNum | Indicates the unique hardware identification number for the device. |
SCXIModule.Chassis | Indicates the identifier of the SCXI chassis in which the module is installed. |
SCXIModule.Slot | Indicates the slot the SCXI module occupies in the chassis. |
SCXIModule.DigitizingDev | Specifies the identifier of the device used to digitize channels on the module. |
SCXIModule.DigitizingDevChans | Specifies the physical channels on the digitization device
to use when in the parallel digitization mode.
|
SCXIModule.DigitizationMode | Specifies how the channels on the module are digitized by
the digitizing deivce.
|
SCXIModule.DigitizingDevChans | Specifies the physical channels on the digitization device
to use when in the parallel digitization mode.
|
SCXIModule.CabledDev | Specifies the identifier of the device, if any, directly cabled to the SCXI module. |
SCXI1100.FltrFreqJumper | Specifies in hertz the lowpass filter frequency jumper
setting for the module.
|
SCXI1100.FltrEnableJumper | Specifies the lowpass filter enable jumper setting for the module. |
SCXI1121.GainJumper | Specifies the gain jumper setting for each channel.
|
SCXI1121.ExcitTypeJumper | Specifies the excitation type jumper setting for each
channel.
|
SCXI1121.ExcitValJumper | Specifies the excitation value jumper setting for each
channel. This value is in volts for voltage excitation or in amps for current
excitation.
|
SCXI1121.FltrFreqJumper | Specifies in hertz the lowpass filter frequency jumper
setting for each channel.
|
SCXI1120.GainJumper | Specifies the gain jumper setting for each channel.
|
SCXI1120.FltrFreqJumper | Specifies the lowpass filter frequency jumper setting for
each channel in hertz.
|
SCXI1120D.GainJumper | Specifies the gain jumper setting for each channel.
|
SCXI1120D.FltrFreqJumper | Specifies in hertz the lowpass filter frequency jumper
setting for each channel.
|
SCXI1140.GainJumper | Specifies the gain jumper setting for each channel.
|
Property | Description |
---|---|
TEDSInterface.Address | Specifies the interface address. |
TEDSInterface.CommDev | Specifies the identifier of the device used to communicate with the interface. |
TEDSInterface.CommDevConnNum | Indicates the connector number of the connector cabled to the interface. |
TEDSInterface.PhysChans | Specifies the physical channels cabled to the interface channels. |
TEDSInterface.ProductType | Indicates the product type of the interface. |
TEDSInterface.ProductNum | Indicates the unique hardware identification number for the chassis. |
Use test panels to test the analog input, analog output, digital I/O, and counter I/O functions of DAQ devices. You can find test panels at /usr/local/bin/DAQmxTestPanels. You can also access test panels by running DAQmxTestPanels --devid=<device identifier> from the command line. For instance, if you are running the test panels on your first device, you might use DAQmxTestPanels --devid=Dev1.
To set up PXI hardware, use the PXI Resource Manager for Linux. You can access this utility at /usr/local/sbin/nipxiconfig. Enter man nipxiconfig at the command-line prompt for specific details about each command and how to use them. For usage guidelines, enter nipxiconfig --help.