01-14-2010 10:37 AM
I have a problem using the niScope_FetchComplex function, it returns:
??? Error using ==> niScope_FetchComplexBinary16
Error BFFA408A occurred at niScope_FetchComplexBinary16.
Possible Reasons:
The requested fetch data type does not match the acquisition data type.
Device: Dev3
Status Code: -224211
or, the same:
??? Error using ==> niScope_FetchComplex
Error BFFA408A occurred at niScope_FetchComplex.
Possible Reasons:
The requested fetch data type does not match the acquisition data type.
Device: Dev3
Status Code: -224211
I have no problems fetching the data with any of the other functions, as I've tested them all: Fetch, FetchBinary8, FetchBinary16, FetchBinary32, Read, etc.
Since the Error Message states "...type does not match the acquisition data type" I changed the type to FlexRes and to Normal but nothing happened.
I am using two cards: 5122, 5922 and on neither it works (Dev3 is the 5922), and Matlab using the C functions library.
I guessed it was a problem of the NIComplexNumber "structure", but since I have no problems fetching the wfmInfo and wfm data, I discarded this idea.
I am setting the funtion to be: MyData=niScope_FetchComplex(handles.nis,'0',0,int32(-1))
I will gladly appreciate any help from anyone! Any idea! Thanks!
01-18-2010 08:56 AM
Update:
I probably found the problem. I am creating a mex file and compiling it under MATLAB, thus i need to convert NIComplexNumber to double or something...
Quote:
" cannot convert from 'NIComplexNumber' to 'double'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called "
If there are any ideas, or someone has already stumbled upon this problem, please let me know.