MATLAB: Do I get the error “No DMA channel is available for use” when using NI boards PCI-6013, PCI-6014, 602x-E or 603x-E

601360146026024e603analoginputanalogoutputData Acquisition Toolboxnipcisimultaneous

Why do I receive an error when using NI boards PCI-6013, PCI-6014, 602x-E or 603x-E?
I tried to concurrently create an instance of an ANALOGINPUT object and an ANALOGOUTPUT object using the NI 6024E board. However, when I start either of the objects I receive the following error:
??? Error using ==> daqdevice/start
NI-DAQ: No DMA channel is available for use.

Best Answer

The 6024-E is a low-cost board from National Instruments. One of the cost saving measures on the board is to provide only a single DMA channel. The Data Acquisition Toolbox objects are created to use the DMA transfer mode by default as it is the fastest, least resource intensive, mode available. To use analog input and analog output at the same time on the 6024-E, one of the objects must be configured to use interrupts.
1. If you are using NI-DAQmx drivers and Data Acquisition Toolbox 2.8 (R14SP3+) or later, the second object will be automatically configured to use Interrupt mode.
2. If you are using Traditional NI-DAQ drivers, you must manually configure one of the channels for Interrupt mode, as in the following code:
set(ai, 'TransferMode', 'Interrupts')
or
set(ao, 'TransferMode', 'Interrupts')
This applies to the PCI-6013, PCI-6014 and 602x-E as well as the 603x-E line of boards from NI.