MATLAB: Do I receive the error “MCC: Background operation already in progress” from the Data Acquisition Toolbox with a Measurement Computing USB-1208LS/FS, USB-1408FS, or Minilab 1008

10081208fscomputingdaqData Acquisition Toolboxmccmeasurementminilabpmd-1208fspmd-1208ls

When I run the following MATLAB code (assuming that the USB-1208LS is device 2) I receive the error:
 
ai = analoginput('mcc',2);
addchannel(ai,0);
dio=digitalio('mcc',2);
addline(dio,0,'out');
start(ai);putvalue(dio,0);
 
MCC: Background operation already in progress
The same error also occurs with a USB-1208FS if I start both analog input and analog output objects at the same time.

Best Answer

This is a limitation of the Measurement Computing device. This limitation affects a number of MCC devices including:
USB-1208LS (formerly PMD-1208LS)
USB-1208FS (formerly PMD-1208FS)
USB-1408FS
Minilab 1008
These devices have limited or no support for concurrent operations. This means that after an analog input or output object has been started, you will not be able to perform other analog or digital I/O operations.
This limitation also applies to the Analog Input and Analog Output blocks in Simulink. This means that with these boards, you can not have 2 types of blocks for the same board in a Simulink model when using these boards. For example you could not have an Analog Input and Analog Output block or an Analog Input block and a Digital Input block.
As a workaround, you may use a different acquisition device or to use 2 devices (for example, one to acquire analog data, and one to set/get digital I/O).
Devices other than the ones listed above may also not support concurrent operations. For details on your device, you should review MCC's Universal Library User's guide available here: