The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: ni daq with matlab
Replies: 1   Last Post: Aug 7, 2013 9:38 AM

Advanced Search

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

Posts: 116
Registered: 5/24/12
ni daq with matlab
Posted: Aug 7, 2013 7:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

why can't i use ni daq to read milli volt signal however labview did on the same daq?

%%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

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

%start continuous aquisition and plot

h = s.addlistener('DataAvailable', @(src,event) plot(event.TimeStamps, event.Data/1));
s.NotifyWhenDataAvailableExceeds = 200;
%start sample aquisition and plot
%[data,time] = s.startForeground;
%irradiation = data/1
grid on
xlabel('Time (sec)')
ylabel('voltage in v')

Date Subject Author
Read ni daq with matlab
Read Re: ni daq with matlab
Steven Lord

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.