Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Control PCI-6115 by matlab

HI,
I try  to use matlab 2007a to control my PCI-6115. There are a strange problem, I can acquire correct data(a DC 5V voltage) when I use LabView but when I use matlab there is always strange noise which is close to zero. How could I make this daq card work normally? thx
0 Kudos
Message 1 of 4
(3,505 Views)
Hi,

Can you tell us more about how you have the card configured (single ended, differential, input range, AC/DC coupling?)  Are you using NIDAQmx or Traditional NI-DAQ?  Can you post some MATLAB code?

-Rob

-----
Rob Purser
Manager, Test and Measurement
MathWorks
rob.purser@mathworks.com
0 Kudos
Message 2 of 4
(3,497 Views)
HI,
I give a 5V DC input and a 1.5V form a battery and use the MATLAB example code form here.

ai = analoginput('nidaq','Dev1');
addchannel(ai, 0);
ai.SampleRate = 10000;
ai.SamplesPerTrigger = 10000;
start(ai);
wait(ai,2);
data = getdata(ai);
plot(data);
stop(ai);
delete(ai);


0 Kudos
Message 3 of 4
(3,484 Views)
By default, I believe we will automatically choose ac coupling for this device.  You may want the Coupling property on your channel to be set to DC, if you're using a battery.

-Rob
-----
Rob Purser
Manager, Test and Measurement
MathWorks
rob.purser@mathworks.com
0 Kudos
Message 4 of 4
(3,476 Views)