Communication between Matlab and National Instrument card
이전 댓글 표시
Hello,
I am trying make a communication between Matlab and my NI-USB6221 card.
Here is my Matlab code :
loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni')
taskh1=uint32(1);
[a,b,taskh1] = calllib('myni','DAQmxCreateTask','master',taskh1)
I precise that the files 'nicaiu.dll' and 'nidaqmx.h' are in the Matlab workspace (so I don't have to use addpath). And I don't have Data Acquisition Toolbox.
And this is what I get :
Warning: Warnings messages were produced while parsing. Check the
functions you
intend to use for correctness. Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary at 381
??? Error using ==> loadlibrary at 461
There was an error loading the library "C:\Documents and
Settings\uidt1982\Desktop\CARTE_NI\nicaiu.dll"
*La procédure spécifiée est introuvable.*
Caused by: Error using ==> loaddefinedlibrary La procédure spécifiée est introuvable.
For the ones who doesn't speak french at all, the sentence in bold means : "the specified procedure cannot be found"
I don't understand this error and I am really stuck...
Some help would be welcome.
채택된 답변
추가 답변 (2개)
Clownfish
2012년 7월 27일
편집: Walter Roberson
2012년 7월 27일
Hi,
I have Matlab R2012a 32bit and a NI PCI-6229 card.
When I enter the command loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni') I get a hell of Warnings. Seems that Matlab cant load the library.
Any Hints?
Here are the Warnings:
> In loadlibrary at 344
Warning: The data type 'error' used by function DAQmxGetTaskAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'FcnPtr' used by function DAQmxRegisterEveryNSamplesEvent does not exist.
> In loadlibrary at 403
Warning: The data type 'FcnPtr' used by function DAQmxRegisterDoneEvent does not exist.
> In loadlibrary at 403
Warning: The data type 'FcnPtr' used by function DAQmxRegisterSignalEvent does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetChanAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetChanAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetTimingAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetTimingAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetTimingAttributeEx does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetTimingAttributeEx does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetTrigAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetTrigAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetReadAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetReadAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetWriteAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetWriteAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetExportedSignalAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetExportedSignalAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetScaleAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetScaleAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetBufferAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetSwitchChanAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetSwitchDeviceAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetSwitchDeviceAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetSwitchScanAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetDeviceAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxCreateWatchdogTimerTask does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetWatchdogAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetWatchdogAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetCalInfoAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetCalInfoAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetPhysicalChanAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetRealTimeAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetRealTimeAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetPersistedTaskAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetPersistedChanAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetPersistedScaleAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetSystemInfoAttribute does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetDigitalPowerUpStates does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetDigitalPowerUpStates does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetDigitalPullUpPullDownStates does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetDigitalPullUpPullDownStates does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxSetAnalogPowerUpStates does not exist.
> In loadlibrary at 403
Warning: The data type 'error' used by function DAQmxGetAnalogPowerUpStates does not exist.
> In loadlibrary at 403
댓글 수: 2
TAB
2012년 7월 27일
Clownfish, please post this question in a new thread.
Kaustubha Govind
2012년 7월 30일
Yes, please do.
카테고리
도움말 센터 및 File Exchange에서 LabVIEW에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!