03-26-2010 08:06 AM
Should there be a delay in the VI where using NI-5133 digitzer to collect data at fine frequwncy and power steps to address the settling time issues of the front end amplifiers and clearing the RAM content?
I was collecting data using this digitizer at 10KHz steps for 50 drive frequencies and 5 different power levels and doing the Power spectrum density simultaneously. I got some funny ffts which mader absolute no sense. I had sharp peaks of the end frequencies in first few frequencies quite consistently. I have now introduced a 1sec delat between each frequency step and each power step which seems to do a better job but this 1 sec delay is randomly selected. Am I doing the right thing?
I have attached the vi picture and the vi if this adds more sense to what I have described. (The number of frequency steps and power steps can be altered by changing the for loop count)
Thanks,
Shrijit
03-31-2010 03:57 PM
Hi Shrijit,
You should not need any kind of delays in the code to allow the digitizer to settle between repeated runs of the inner most acquisition loop, especially since you are performing processing in the loop which will inherently add delay between acquisitions. However, I am not familiar with your other instrument, so that may very well need some time after it is updated before you acquire anything with the digitizer to allow for settling. As far as your FFTs, it is hard to tell what exactly you are configuring the digitizer for since it is all contained in the Express VI. Additionally ,without seeing images of the FFTs, I am also not clear what you are seeing from those. Another thing to consider is to make sure you are acquiring a power of 2 for your total number of samples, otherwise the FFT function will pad with zeros to get the total samples to be a power of 2. Regards,
04-07-2010 06:49 AM
Hi Daniel,
Thanks for your reply. I honestly thought I had replied you and was waiting to hear from you but clearly I can't see my post here!
I would appreciate if you have a look at the attachments I have got with the VI and the FFT express VI properties. I haven't got any delay in the innermost loop as I totally agree with you and that's what I thought while writing the VI. I have got 2 delays one each in the first and the second loop. I have got 1000 averages and that's why I am collecting the sample 1000 times in the innermost loop. I would like you comments on that.
Is there any way I can tell the vi to lose all the previous content in the RAM of th digitizer before collecting data for the next et of parameters or do you think it does it automatically?
Since I am writing the data in a I/O file in each iteration in the second loop, which is inherently a slow process, do you think I need something else in the VI?
Can I perform FFT on only a section of the time domain data instead of the whole set each time? (May not be in the same VI but later?)
Many thanks,
Shrijit
04-08-2010 04:30 PM
Hi shrijit,
The acquisition and averaging seems to be correctly implemented within the innermost loop. However, you will probably want to restart your averaging on the first iteration of the inner For Loop or the Express VIs will keep old data in memory when you reconfigure your generator and try to compute the FFTs again at the new frequency. There is no need to clear anything from the digitizer's memory as that data will be cleared once you initiate each new acquisition.
Also, while it does introduce some delay in between when you reconfigure your other instrument, since you are reconfiguring and performing an acquisition during every single loop iteration as it is, I do not see any problems with the file I/O. It appears that it only writes to file the last acquisition of the 1000 acquisitions you take, which shouldn't be a problem. If you wanted to log all the data you acquire, then it may start to become a little more difficult.
I may not fully understand the question, but if you have data from the digitizer written to file, you can perform processing, such as an FFT, on that data at a later time by just reading it from the file. If you wanted to perform the FFT on a smaller "section" of data (I assume you mean less samples), then I believe that this just means you will have less resolution in your frequency domain.
Hope this helps,