‎02-21-2005 04:46 PM
‎02-21-2005 05:09 PM
‎02-23-2005 01:51 AM
‎02-23-2005 03:49 AM
‎06-03-2005 12:17 AM
‎06-03-2005 07:46 PM
‎07-25-2005 10:16 PM
Hi Jens,
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?
Thanks
Wendelin
‎07-26-2005 06:06 AM
disp('NI: Config Sample Clock')
[a,b]=calllib('myni','DAQmxCfgSampClkTiming',taskh1,'',samprate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,nsample)
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?
Cya
Jens
‎07-26-2005 08:24 AM
Jens,
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
[a,b]=calllib('myni','DAQmxCfgSampClkTiming',taskh1,'',samprate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,nsample)
I get
??? 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)
Regards
Wendelin
‎07-26-2005 09:00 AM