Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-9215A BNC error 200170

Solved!
Go to solution
I am programming a little script/GUI with Matlab for some measurements and I get an window alert in reference to Runtime Libraries C++, if I press de OK button matlab crashes, if I wait some secondes I get a message error saying:
 
Error event occurred at 17:48:29 for the object: nidaqmxDev1-AI.

NIDAQmx error : Physical channel specified does not exist on this device.

Refer to the documentation for channels available on this device.

Task Name: MWDAT0253

Status Code: -200170

??? A timeout occurred during GETDATA.

Error in ==> NI_DAQ_SoundRecord at 15

data = getdata(ai);

Error in ==> fase_max at 5

NI_DAQ_SoundRecord

Error in ==> gui_fase_max>pushbutton1_Callback at 107

fase_max; % Run the script for calculations of Max & phase shift

Error in ==> gui_mainfcn at 75

feval(varargin{:});

Error in ==> gui_fase_max at 42

gui_mainfcn(gui_State, varargin{:});

??? Error using ==> gui_fase_max('pushbutton1_Callback',gcbo,[],guidata(gcbo))

A timeout occurred during GETDATA.

??? Error while evaluating uicontrol Callback

Error event occurred at 17:48:30 for the object: nidaqmxDev1-AI.

A timeout occurred during GETDATA.

>>

 

My script for acquisition data from the card is very small and simple, I called each time that I need data:

SampleRate = 44100;

nfft = 1*SampleRate;

daqregister('nidaq');

ai = analoginput('nidaq','Dev1');

chans = addchannel(ai,0:1);

set(ai,'SampleRate',SampleRate,'SamplesPerTrigger',1*SampleRate); %'StartFcn',''

start(ai);

data = getdata(ai);

delete(ai);

clear ai;

 

That error code is DAQmxErrorPhysicalChanDoesNotExist, but I am using just 2 channels (addchannel(ai, 0:1);) and thats are channels 1 and 2 of my 4 channel card. This error came randomly when I am calling my script. I am using Matlab 7.2.0.232 R2006a, Data Acquisition Toolbox 2.8.1, Windows XP SP2, NI-DAQmx driver 7.5 

 

0 Kudos
Message 1 of 2
(2,838 Views)
Solution
Accepted by topic author sopapo

Hi sopapo-

You may need to contact the Matlab people to see exactly how the implement the DAQmx Create Channel wrapper, but if you were working with the NI-DAQmx C API directly your channel string "ai,0:1" would be a problem.  I would suggest that you try "ai0:1".  Either way, you should check with them to see if their implementation requires the input parameters in a different format because NI neither supports nor has tested the Matlab toolbox for NI-DAQmx.

Hopefully this helps-

Tom W
National Instruments
Message 2 of 2
(2,831 Views)