|
Hi, I d like to know if somebody could help me to solve a problem with
my Data Acquisition Card. I have got a National Instruments Lab-
PC-1200 DAQ with a BNC-2081 board and I d like to work just with the
channels 2 and 4 (in differential input mode). My Matlab code is the
following:
ai = analoginput('nidaq',1);
chans = addchannel(ai,[4 2]);
%measuring to get the offset
%INPUT
t=3;
%setting the SampleRate (half of maximum possible)
temp = propinfo(ai,'SampleRate');
aiSR = temp.ConstraintValue(2)*0.50; %100000
act_aiSR = setverify(ai,'SampleRate',aiSR);
%setting SamplesPerTriegguer for t seconds
samples=floor(t*act_aiSR);
set(ai,'SamplesPerTrigger',samples)
%set(ai,'Timeout',10)
start(ai);
pause(t+1);
%getting the signals
[inputdata,tai]=getdata(ai,samples);
stop(ai);
offset=mean(inputdata);
But the programm takes channels 2 and 0
and if I use
chans = addchannel(ai,[4 2 0]);
An error occurs at line: "start(ai);"
Some suggestion?
Thank you very much
|