08-22-2012 04:52 AM
Hi,
I have two problems relating to my NI-DAQ USB 6229. Ultimately I am trying to collect data from my DAQ using Matlab and it's Data Acquisition Toolbox:
1: How can I run a calibration or call a previously calibrated 'task' in matlab
for my DAQ
I've calibrated my NI-DAQ using Measurement and Automation and now I want to use
this saved task in Matlab so that I can ensure it's recording at the correct
range etc. I can't figure out how to call this task from Matlab.
2: When I run a FFT on my data collected through matlab and DAQ toolbox or using the DAQ Assistant in Labview I get a
value of '0' every time. When I look at the FFT plot I can see the actual FFT
value I want but there appears to be a huge amount of noise around 0Hz which
obviously causes the max value to be '0'.
Is this related to the calibration of the DAQ or is there another fundamental
issue with my DAQ?
Any help would be greatly appreciated. I have gone through many of the DAQ
toolbox guides but they don't mention calibration or how to call a task in
Matlab.
kind regards,
Alan
08-28-2012 07:19 AM
Hi Alana,
Have you considered possibly creating a calibration vi and packaging it as a DLL? This way you could call the DLL from matlab and use that to calibrate the device.
With regards to your FFT showing a value of 0, what is the original data that you are collecting that you want to perform the FFT on? A lot of noise around 0Hz I would not associate with calibration but with something more fundamental in your measurements.
Kind Regards,
08-28-2012 11:50 AM
Hello,
I will attempt to create a dll in labview and see if I can load it through matlab. I have limited experience with using and loading dll's in matlab and so far I have had a lot of errors and difficulty trying to load the 'niaicu.dll' which appears on a few sample codes online of how to calibrate a dAQ through matlab.
That data that I am collecting is simply voltage that is collected via a handhelp pendulum connected to my DAQ. I have attached two files of my data if you would like to take a look. The old file is data I collected last year using the same pendulum and DAQ, the FFT works fine with this data. But my new data whether it is collected in labbview or through matlab shows a false FFT vlaue of 0Hz every time. I think you are correct in saying that this means it is something fundamental with my measurement but I am unsure how I can fix this problem.
Both data sets were recorded at 250Hz for 40seconds and are from human subjects. The 'DAQ_data_working(old)' file was calibrated and collected using the daq assistant in labview and set to -500 and +500.
thank you for your help and I look forward to your response,
Alan
09-14-2012 04:50 AM
Hi Alana,
I am sorry I have not replied to your post sooner, I completely missed your last post and have only just stumbled across it.
Are you still having trouble with getting correct FFT values? If not would it be possible to explain how you are creating the FFT calculations?
Also, how have you got on with implementing a DLL call of a LabVIEW program?
Kind Regards,