Page 1 of 1

KUSB 3100 & Matlab getdata

Posted: January 31st, 2014, 4:38 am
by barlasbarlas

I am having troubles with KUSB 3100 Daq box and matlab snyc.
I can acquire data with quickdaq 2013 with no problem

then i go to matlab (quick daq is closed) i read in my daq box to matlab. If i want to acquire only one sample everything works fine as in the below code.
ai = analoginput ('dtol', 0)
addchannel(ai, 1)
s = getsample(ai)

However if i want to to sample with a fsampling and for some time it always gives me the error

ai = analoginput ('dtol', 0)
ch = addchannel(ai,1);
ai.SampleRate = 1000;
ai.SamplesPerTrigger = 1000;
wait(ai,16) % i change the waiting time it does not matter
[data, time] = getdata(ai);

the errors i get with the 'wait' command : ??? WAIT reached its timeout before OBJ stopped running.
the errors i get without the wait command. Error event occurred at 13:37:05 for the object: dtol0-AI.A timeout occurred during GETDATA.

cAN anyone help in this issue thanks

Re: KUSB 3100 & Matlab getdata

Posted: February 1st, 2014, 11:45 am
by barlasbarlas
so i guess the problem was due to matlab version.
it was 2011a 32 bit
i changed to 2013b 32bit
it works now.