Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue using DAQmxConfigureLogging NIDaqmx function in Matlab with NI-4462

Solved!
Go to solution

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,

0 Kudos
Message 1 of 4
(3,227 Views)

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

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 4
(3,209 Views)

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,

 

0 Kudos
Message 3 of 4
(3,202 Views)
Solution
Accepted by topic author guillaumegarreau

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

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 4
(3,193 Views)