Acquire data from NI USB-6212

4 次查看(过去 30 天)
Gopika Akhil
Gopika Akhil 2018-5-15
My work involves checking the performance of a DAC. The steps involved are 1)Convert the continuous ECG signal to DIGITAL in matalab code. 2)It is send to Arduino uno which gives data to TLC 7528C DAC. 3) When output of DAC is seen on an oscilloscope its giving a perfect shape back. But it has to be compared with original signal in MATLAB code. 4)Output of DAC connected to NI-USB-6212,the NI automation explorer is giving a good ECG signal. 5)To get this signal in MATALB tried the following code
sobj = daq.createSession('ni'); sobj.addAnalogInputChannel('Dev1', 'ai13', 'Voltage') sobj.Rate = 125; sobj.DurationInSeconds = 1; lh = sobj.addlistener('DataAvailable',@(src,event) plot(event.TimeStamps,event.Data)); sobj.startBackground(); delete (lh)
But in the plot I am getting error signal. DATA ACQUISITION TOOL BOX is also giving plot of error signal.How can i get the ECG samples from NI USb-6212 in MATLAB?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Acquisition Toolbox Supported Hardware 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by