Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Real Time DAQ acquisition and Processing
Replies: 2   Last Post: Jan 17, 2014 6:56 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Lee Stanley

Posts: 1
Registered: 5/23/13
Real Time DAQ acquisition and Processing
Posted: May 23, 2013 8:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Is there anyway to use session based DAQ to capture real time and process signal simultaneously? I managed to acquire signal continuously but is there a way to log the data as well as to process the data and plot in different plot at the same time?

Acquiring Code

s = daq.createSession('ni');
s.addAnalogInputChannel('dev2', 0:1, 'Voltage');
set(s.Channels,'Range',[-10 10]);
s.IsNotifyWhenDataAvailableExceedsAuto = true;
lh = s.addlistener('DataAvailable', @plotdata);
s.IsContinuous = true;
while s.IsRunning
fprintf('While loop: Scans acquired = %d\n', s.ScansAcquired)

Plot Data function
function plotdata(src, event)

plot(event.TimeStamps, event.Data)


Summary: How to log the event data and time as well as to process the data at the same time to be plotted in another new plot?

Thanks.Any advice?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.