Problem communicating with NI-DAQ 6353 using NI DAQ MX DLL's in MATLAB

3 views (last 30 days)
I'm currently using the NI-DAQmx Device Driver 9.7, and am having trouble loading all of the functions available in the DLL (see below). However, no error gets thrown when I create a task, but when I try to create an Analog output voltage line, it gave me the following error:
Warning: NIDAQ_Driver Error!! -- 01-Mar-2013 11:59:01
-200088::Task specified is invalid or does not exist.
> In NIDAQ_Driver>NIDAQ_Driver.CheckErrorStatus at 88
In NIDAQ_Driver>NIDAQ_Driver.WriteAnalogOutVoltage at 243
In NIDAQ_Driver>NIDAQ_Driver.WriteAnalogOutLine at 197
In NIDAQ_Driver>NIDAQ_Driver.WriteAnalogOutAllLines at 218
However, when I called the NI IT service guy, he helped me communicate with the DAQ using the Matlab control toolbox (followed directions from here: http://home.hit.no/~hansha/documents/matlab/training/Data%20Acquisition%20in%20MATLAB/Data%20Acquisition%20in%20MATLAB.pdf)
So in summary, if I use the MATLAB control toolbox, I can communicate with the DAQ. But if I use the DLLs, I can't even create an analog out task. I really need to use the DLLs because I have a lot of control code already written in MATLAB. This has worked before, but it seemed to stop working after I updated the drivers. Also on the other computers in the lab, this code seems to work fine on the NI-DAQ 6351 (using R2010B, Driver 9.2)
Thanks,
Ed
====== DLL functions not loaded =======
Functions not loaded:
Warning: The data type 'error' used by function DAQmxGetTaskAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'FcnPtr' used by function DAQmxRegisterEveryNSamplesEvent does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'FcnPtr' used by function DAQmxRegisterDoneEvent does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'FcnPtr' used by function DAQmxRegisterSignalEvent does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetChanAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetChanAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetTimingAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetTimingAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetTimingAttributeEx does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetTimingAttributeEx does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetTrigAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetTrigAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetReadAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetReadAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetWriteAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetWriteAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetExportedSignalAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetExportedSignalAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetScaleAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetScaleAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetBufferAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetSwitchChanAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetSwitchDeviceAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetSwitchDeviceAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetSwitchScanAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetDeviceAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxCreateWatchdogTimerTask does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetWatchdogAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetWatchdogAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetCalInfoAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetCalInfoAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetPhysicalChanAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetRealTimeAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetRealTimeAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetPersistedTaskAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetPersistedChanAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetPersistedScaleAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetSystemInfoAttribute does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetDigitalPowerUpStates does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetDigitalPowerUpStates does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetDigitalPullUpPullDownStates does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetDigitalPullUpPullDownStates does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxSetAnalogPowerUpStates does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75
Warning: The data type 'error' used by function DAQmxGetAnalogPowerUpStates does not exist.
> In loadlibrary at 403
In NIDAQ_Driver>NIDAQ_Driver.Initialize at 135
In NIDAQ_Driver>NIDAQ_Driver.NIDAQ_Driver at 75

Accepted Answer

Ed
Ed on 4 Mar 2013
Actually, I found the fix with the help of a post-doc in my lab:
We had to edit the nidaqmx.h file to change the pointer type for the TaskHandle from *void to uint32.

More Answers (1)

Walter Roberson
Walter Roberson on 2 Mar 2013

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!