GitHub picture of ramblehead

NI CompactDAQ Application Notes

Collection of NI CompactDAQ application hints and resource references.

Python

References

Linux

Drivers and Software

Download NI-DAQmx Linux installer. This zip archive contains ni-ubuntu*-drivers-*.deb packages for a few Linux distributives, including the latest versions of Ubuntu:

  • ni-ubuntu*-drivers-stream.deb is the most up-to-date release.
  • ni-ubuntu*-drivers-*Q?.deb is the current snapshot release.

To check Ubuntu version from CLI:

lsb_release -a

Installing one of those deb packages adds apt ppa list for National Instruments software that can be then installed with apt install commands:

sudo dpkg -i <ni-ubuntu*-drivers-*.deb>
sudo apt update

sudo apt install ni-daqmx ni-daqmx-cdaq-firmware

# This can only be used in GUI environemts
sudo apt install ni-hwcfg-utility

sudo dkms autoinstall
sudo reboot

Linux software does not include NI MAX GUI that is included in Windows software. Instead, use ni-hwcfg-utility for GUI and nidaqmxconfig for CLI, as explained in this NI support thread.

References

Getting NI DAQ lines and terminals from CLI

The following are Linux CLI utilities could be used to identify and configure NI DAQ devices recognised by the system nipxiconfig, nidaqmxconfig, nilsdev.

Unfortunately, non of the above utilities allow listing available device ports, lines and terminals (PFIs). Small Python scripts can be used to obtain such information:

import nidaqmx

# replace with your device name
device_name = "cDAQ1Mod2"
device = nidaqmx.system.Device(device_name)

# Print all digital input lines
for di in device.di_lines:
    print(di.name)

# Print all terminals (PFIs)
for terminal in device.terminals:
    print(terminal)

Windows

Drivers and Software