Table of Contents
Analog and Digital IO Devices
- Data sheet for the 6221 and other M series PCI boards, a shorter version for the 6220 and 6221 boards, and the absolutely necessary user manual.
NI-DAQmx Resources
- The NI-DAQ family of libraries for NI instruments can be accessed through the ctypes module. This cookbook article from SciPy translates a sample C program for analog signal acquisition into Python.
- Help with the C API is not available as a pdf but only through the help menu: programs > national instruments > NIDAQmx > C reference help.
- find_devices.py shows how many devices are present.
- A nice explanation: using python for test and measurement. The programs measure.py and plot_example1.py use the module contAcquireNChan.py.
- Some useful forum exchanges: passing data to NI-DAQmx from Python and numpy via ctypes and multi-channel reads from a USB 6008 using ctypes and NI-DAQ.
- For Java, Nidaq is a wrapper-style class used to make calls to the NI-DAQmx dll.
- A very rough PDF of the C Reference is posted here.
NI-DAQmx Applications
- This 3 Volt, 100 Hz waveform was acquired by Acq_IncClk.py, a modified version of the cookbook article to allow for plotting with matplotlib and saving the data as a text file.
- To read a single analog input channel: ain_nidaqmx.py uses the module nidaqmx.py.
- Digital trigger with analog input: ain_nidaqmx_trig.py.
NI-VISA
- NI-VISA enables register-level communication with PCI (or PXI) DAQ cards which are bound to NI-DAQmx by treating them as PXI resources. To view what can be done with a PXI card with NI-VISA, select something similar to "PXI2::6::INSTR" that shows up under PXI System and press "Open VISA Test Panel". The accessible functionality should be evident.
- This sample program can connect to a pci-6221 board but ends abruptly when there is no communication language.
PyVisa
- PyVisa can be used with XP to communicate with VISA compliant instruments. As the documentation shows, this is accomplished using a VISA-compatible DLL.
- Use PyVisa to find all available devices, and then use the appropriate resource name to establish communication.