Lee Stanley
unread,May 23, 2013, 8:21:11 AM5/23/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
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;
s.startBackground()
while s.IsRunning
pause(0.5)
fprintf('While loop: Scans acquired = %d\n', s.ScansAcquired)
end
Plot Data function
function plotdata(src, event)
plot(event.TimeStamps, event.Data)
end
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?
Cheers,
Stanley