Thx 1000x for your solution working with DAQmx.
I have 1 problem left: I cant load the 'DAQmxCfgSampClkTiming' function, as I get an error message due to the uint64 data type.
I use Matlab 6.5.0, Release 13.
I can now set the 'DAQmxCfgSampClkTiming' in the MAX tool, but thats not very elegant. Is there a better solution?
How did you load that function?
disp('NI: Config Sample Clock')
I use Matlab 7.0 (which has its own problems...),
but I think Matlab 6.5 should fully work with uint64.
What is the error message you get?
Thanks again for the very fast response.
So I played with the card yesterday and I am pretty sure its the uInt64 in the sampsPerChanToAcquire
When I load the dll like in your example,
funclist = loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni');
I get : Warning: The data type 'uint64' used by function DAQmxCfgSampClkTiming does not exist
When I then call
??? method was not found
I then used funclist = loadlibrary('nicaiu.dll',@mxproto); to change the header into uint32 for the sampsPerChanToAcquire, after which the "??? method was not found"
didnt come up again, but the call didnt work.
So the only way right now is to start MAX, set all the timing parameters and then run your program. Not very elegant, hmmm.
This must be hidden somewhere in the 6.5 and 7.0 difference how they handle the uint64, I can remember seeing threads on that somewhere, but cant track it down.
Maybe there is a fix around? Something with 2*uint32 or *uint64..I dont know, I am not a C expert (as u might already have realized)