http://www.mathworks.com/matlabcentral/newsreader/view_thread/326203
MATLAB Central Newsreader  Real time data acquisition and display with Data Acquisition Toolbox
Feed for thread: Real time data acquisition and display with Data Acquisition Toolbox
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Tue, 29 Jan 2013 18:57:06 +0000
Real time data acquisition and display with Data Acquisition Toolbox
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326203#896588
Breanna
Hi everyone,<br>
I have recently come up with a Matlab program using the Data Acquisition Toolbox that will read in voltages from a force transducer(ATI) via a National Instruments box. I display a sine wave (red) and then the force is collected and plots on the screen (white) along with the sine wave. I've minimized the code running between getdata and plot, and it appears that the time between plots is about 100 ms. I've made the display rate 100 or 120 ms, and it seems to be plotting in "real time" as much as I can tell. If I run the trial for 30 seconds, however, it seems to slow down around 22 seconds or so, and then there is perceptible (around 3 seconds or so) delay.<br>
<br>
My question is whether or not the DAQ codes can actually display real time data. I've been told that Matlab can't do this because it's a compileasitgoes software, however, it seems that the DAQ commands are designed to stop background processing etc... so my hope is that this will work. Also, Does anyone know how I could assess the time delay so that I could report it in a manuscript in the future?<br>
<br>
Thanks for any help,<br>
Bree

Wed, 30 Jan 2013 13:46:37 +0000
Re: Real time data acquisition and display with Data Acquisition Toolbox
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326203#896637
Maxim Vedenev
It is possible real time processing, for example my speech osciloscope in matlab<br>
<a href="http://www.youtube.com/watch?v=jz4Rp71weYo">http://www.youtube.com/watch?v=jz4Rp71weYo</a><br>
<br>
In real time it is need to use bufer. The delay is defined by buffer lenght. Then more buffer length then biger delay. But too small boffer will not work.<br>
<br>
<br>
Maxim Vedenev, Matlab expert<br>
vedenev@ngs.ru<br>
<a href="http://simulations.narod.ru/">http://simulations.narod.ru/</a>

Wed, 30 Jan 2013 22:58:07 +0000
Re: Real time data acquisition and display with Data Acquisition Toolbox
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326203#896692
Breanna
Maxim Vedenev <vedenev.maxim@gmail.com> wrote in message <95742a24eca7481d84ab4a7faefbeba4@googlegroups.com>...<br>
> It is possible real time processing, for example my speech osciloscope in matlab<br>
> <a href="http://www.youtube.com/watch?v=jz4Rp71weYo">http://www.youtube.com/watch?v=jz4Rp71weYo</a><br>
> <br>
> In real time it is need to use bufer. The delay is defined by buffer lenght. Then more buffer length then biger delay. But too small boffer will not work.<br>
> <br>
> <br>
> Maxim Vedenev, Matlab expert<br>
> vedenev@ngs.ru<br>
> <a href="http://simulations.narod.ru/">http://simulations.narod.ru/</a><br>
<br>
Hi Maxim,<br>
I appreciate your response. I seem to have gotten the program to run with no delay using the session interface. In this case, I am sampling at 200 Hz, and the total duration is 10 seconds. I've added a listener, and it is plotting segments of 20 samples. I've preallocated all 20 segment plots and then I use the set function to change the color of these so that the plot function doesn't bog down the program as it displays a voltage traveling across the screen.<br>
<br>
In this case, is my buffer 20 samples? By buffer do you mean that I need to make sure the code between different plots of 20 samples each takes less time than it takes to collect the 20 samples? If so, is there a way to test this other than to collect time stamps after each plot and difference them?

Thu, 09 May 2013 23:01:09 +0000
Real time data acquisition and display with Data Acquisition Toolbox
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326203#904115
Nick
Bree,<br>
Hello  I am working on a simiilar problem. I don't suppose I could appeal to your sense of charity and take a look at your code could I?<br>
<br>
Thanks for your time,<br>
<br>
<br>
"Breanna " <breanna.studenka@usu.edu> wrote in message <ke9622$q8e$1@newscl01ah.mathworks.com>...<br>
> Hi everyone,<br>
> I have recently come up with a Matlab program using the Data Acquisition Toolbox that will read in voltages from a force transducer(ATI) via a National Instruments box. I display a sine wave (red) and then the force is collected and plots on the screen (white) along with the sine wave. I've minimized the code running between getdata and plot, and it appears that the time between plots is about 100 ms. I've made the display rate 100 or 120 ms, and it seems to be plotting in "real time" as much as I can tell. If I run the trial for 30 seconds, however, it seems to slow down around 22 seconds or so, and then there is perceptible (around 3 seconds or so) delay.<br>
> <br>
> My question is whether or not the DAQ codes can actually display real time data. I've been told that Matlab can't do this because it's a compileasitgoes software, however, it seems that the DAQ commands are designed to stop background processing etc... so my hope is that this will work. Also, Does anyone know how I could assess the time delay so that I could report it in a manuscript in the future?<br>
> <br>
> Thanks for any help,<br>
> Bree