No BSD License  

MATLAB Programming Example for U2300A Modular USB Data Acquisition (DAQ) module’s Analog Output

by

 

This program sets the USB DAQ module to output a continuous sine wave.

AO_RepeatOutput.m
ao=analogoutput('agilentu2300',0);
out=daqhwinfo(ao)
addchannel(ao,0:1);

data = sin(linspace(0,2*pi*500,44100)');
set(ao, 'SampleRate', 100000);
set(ao, 'RepeatOutput', -1); %for continuous output
putdata(ao, [data data]);
start(ao);
ao
stop(ao);

daqfind;
delete(daqfind);
clear ao;

Contact us