Acquire data from NI USB-6212

2 views (last 30 days)
Gopika Akhil
Gopika Akhil on 15 May 2018
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?

Answers (0)

Categories

Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!