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: daq 6008 process
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
mado

Posts: 116
Registered: 5/24/12
daq 6008 process
Posted: Aug 20, 2013 10:20 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

i want to process this data that are acquired by usb 6008 and this is the code

%%get connected devices
d = daq.getDevices
%create session
s = daq.createSession('ni')
%add analog channel s.addAnalogInputChannel('ID',channel num, 'measurement type')
s.addAnalogInputChannel('Dev1',0, 'Voltage')

% set rate of scan 4 scans/second , run for 3 seconds
s.Rate=1000;
s.DurationInSeconds=30;

v= s.Channels(1);
set(v)
%_____________________________
%%
v.TerminalConfig = ' Differential';
v.Coupling = ' DC';


%%
%start continuous aquisition and plot

h = s.addlistener('DataAvailable', @(src,event) plot(event.TimeStamps, event.Data/.001));
s.NotifyWhenDataAvailableExceeds = 200;
s.startBackground()



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.