08-27-2011 04:34 AM
I am using matlab 2009b, 32bits on win XP pro 32bits SP3 to samples microphones with a National Instrument data acquisition card NI-4462.
I'm trying to use The DAQmxConfigureLogging NIDaqmx function and even though The documentation said The NI4462 is compatible with that function I could not succeed to make it work.
The implementation is:
file2data = 'C:\Documents and Settings\Holistic Lab\Desktop\expe_june_2011\data\microphone\test1234.tdms';
[err,ai] = calllib(lib,'DAQmxConfigureLogging',ai,file2data,... DAQmx_Val_Log,'Channel',DAQmx_Val_OpenOrCreate); DAQmxCheckError(lib,err);
it doesn't give an error, but when I use
[err,msg] = calllib(lib,'DAQmxTaskControl',ai,DAQmx_Val_Task_Verify); DAQmxCheckError(lib,err);
??? Error using ==> DAQmxCheckError at 24 DAQmx error - Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
DAQmxTaskControl doesn't give error before setting The Logging function.
Any idea?
Thanks in advance,
Solved! Go to Solution.
08-29-2011 04:18 PM
Hi guillaumegarreau,
Try calling DAQmxGetExtendedErrorInfo(). The extended error info string should tell you which property caused the error and what the supported values are.
Brad
08-30-2011 01:18 AM
thx for the quick answer
Using the Extended Error Info function i got:
errBuff =
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_Logging_Mode
Valid Values: DAQmx_Val_Off, DAQmx_Val_Log, DAQmx_Val_LogAndRead
Requested Value
Task Name: _unnamedTask<0>
Status Code: -200077
As i am using DAQmx_Val_Log when calling for DAQmx Logging mode, i am a bit confused, one thing is that maybe the numerical value i have for DAQmx_Val_Log (88132) is not correct.
regards,
08-30-2011 03:05 PM
Yes, that sounds like the problem. Here are the correct values from NIDAQmx.h:
//*** Values for DAQmx_Logging_Mode ***
//*** Value set LoggingMode ***
#define DAQmx_Val_Off 10231 // Off
#define DAQmx_Val_Log 15844 // Log
#define DAQmx_Val_LogAndRead 15842 // Log and Read
You should have a copy of this header file installed in %ProgramFiles%\National Instruments\Shared\ExternalCompilerSupport\C\include.
Brad