MATLAB: Warning and Timeout in DAQ when using session on NI USB-6259

daqdaq sessiontimeout expiredusb 6259

Hi,
I'm running a very basic code in matlab (2012a 64bit) trying to attain some data through the NI USB-6259. But it prompts me back with multiple warnings due to a callback error (full error below), which ends in a timeout on the data sampling. I've tried searching around for the problem, but without success. It may be a very simple mistake on my part but i just can't see it so any help would be greatly appreciated.
If any additional information is needed for clarification, i'll provide them as soon as i see the message.
Kind regards, Simon
code:
Logtime = 10;
Fs = 20000;
s = daq.createSession('ni');
s.addAnalogInputChannel('Dev1','ai0','Voltage');
s.addAnalogInputChannel('Dev1','ai1','Voltage');
s.Rate = Fs;
s.DurationInSeconds = Logtime;
[data time]=s.startForeground();
Error/warning:
Warning: Error occurred while executing callback:
Error using +
Invalid type of input arguments (should be uint64)
> In Channel>Channel.onCustomEvent at 360
In Channel>@(source,data)obj.onCustomEvent(data.Type,data.Data) at 286
In Session>Session.doWait at 2365
In StateHardwareRunning>StateHardwareRunning.checkForTimeout at 193
In Session>Session.doStartForeground at 2240
In StateReadyToStart>StateReadyToStart.startForeground at 100
In Session>Session.startForeground at 613
Timeout expired before operation could complete.

Best Answer

Hi,
I tried your code with a simulated NI USB-6259 and it is working fine for me in 12a. Could it be that you are using the 12a prerelease? I have seen that kind of error there but not in the actual release version.
The release version has as version number:
>> version
ans =
7.14.0.739 (R2012a)
Related Question