I am using the following code to output a constant voltage on channel 2 of a NI-PCI-6229 DAQmx device. I am using Matlab R2014a.
The problem is that after some period of time (sometimes 5-20 minutes), the device stops outputting the data continuously. After stopping, the device property: IsDone changes from 'flase' to 'true'. No error messages are generated upon completion.
devices = daq.getDevices;
s = daq.createSession('ni');
s.Rate = 10000;
s.IsContinuous = true;
outputSignal = ones(s.Rate,1);
lh = addlistener(s, 'DataRequired', @(src,event) src.queueOutputData(outputSignal));