Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

MATLAB runtime error after analog out ends

Hello,
 
I'm trying to use the anolog output channel of an NI daq board.
 
My code is as follows:
ao = analogoutput('nidaq','Dev1');
chans = addchannel(ao,0);
set(ao,'SampleRate',1000);
set(ao,'TriggerType','Manual');
data = sin(linspace(0,2*pi*500,len))';
start(ao);
trigger(ao);
The board outputs the data correctly.  However, as soon as the prodedure ends (i.e. No more data in the buffer), instead of ending or giving me an error, MATLAB experiences a Visual C++ Runtime error and says "abnormal program termination".  Upon clicking OK, MATLAB exits.
 
Any suggestions?
 
Thanks,
-Jason
 
0 Kudos
Message 1 of 2
(2,986 Views)

Hi Jason,

Unfortunately, I do not have any ideas about this error.  However, I would recommend contacting The MathWorks about this error.

Regards,
Laura

0 Kudos
Message 2 of 2
(2,975 Views)