07-20-2010 03:11 PM
A software application was developed to collect and process readings from capacitance sensors and a tachometer in a running spin rig. The sensors were connected to an Aerogate Model HP-04 H1 Band Preamp connected to an NI PXI-6115. The sensors were read using AI Config and AI Start VIs. The data was saved to a file using hsdlConfig and hsdlFileWriter VIs. In order to add the capability of collecting synchronized data from two Eddy Current Position sensors in addition to the existing sensors, which will be connected to a BNC-2144 connected to an NI PXI-4495, the AI and HSDL VIs were replaced with DAQmx VIs logging to TDMS. When running identical tests, the new file format (TDMS) produces reads that are higher and inconsistent with the readings from the older file format (HSDL).
The main VIs are SpinLab 2.4 and SpinLab 3.8 in folders "SpinLab old format" and "Spinlab 3.8" respectfully. SpinLab 3.8 requires the Sound and Vibration suite to run correctly, but it is used after the part that is causing the problem. The problem is occuring during data collection in the Logger segment of code or during processing in the Reader/Converter segment of code. I could send the readings from the identical tests if they would be helpful, but the data takes up approximately 500 MB.
07-20-2010 10:48 PM - edited 07-20-2010 10:50 PM
First of all, how different is the data? You say that the reads are higher and inconsistent. How much higher? Is every point inconsistent, or is it just parts of your file? If it's just in parts of the file, does there seem to be a consistent pattern as to when the data is different?
Secondly, here are a couple things to try:
Finally, how confident are you in the results from the previous HSDL test? Which readings make more sense? I look forward to hearing more detail about how the data is inconsistent (all data, how different, any patterns). As well, I'll be looking forward to hearing the result of test #2 above.
07-20-2010 11:17 PM
After staring at the code, I have a theory about what could possibly be causing this problem. If my theory is correct, it's because of a situation encountered only in channel expansion (multiple device synchronization in the same task) and only with a start trigger was takes a while to signal (and thus could occassionally timeout a 10 second wait).
If my theory is correct, then solution #2 should work for you (though it's regrettably not ideal).
It would help me identify whether my theory is correct if you could just send your index file (not the whole tdms file). If you post that and verify that your scan rate is 204082 (or otherwise clarify), I should be able to identify whether my theory could be correct.
07-21-2010 06:56 AM
The data from the old HSDL test makes sense while the readout from the new TDMS test doesn't. For testing at 3000RPM, the gap readings in the TDMS file are consistently around 0.065" and the gap readings in the HSDL file are consistently around 0.044. For testing at 5000RPM, the gap readings are 0.083" in the TDMS and 0.056" in the HSDL. The results from the HSDL test are known to be correct from previous experience.
I had to change my program from "Log and Read" to "Log" previously because the generated TDMS file would be corrupt if I did "Log and Read" at 204082 Hz. I have NI case number 1553375 for that very issue.
07-21-2010 07:00 AM
I am not sure what you mean about channel expansion, but the index file from my previously generated TDMS file is below for a 3000RPM test and a 5000RPM test.
07-21-2010 09:01 AM
I'm not in the office yet, but something to try in the meanwhile:
Let DAQmx create the TDMS files and do not try to write the custom properties yet. Again, this is just a troubleshooting step. I'm wondering if the problem is introduced when combining the two segments into the same file. We can go from there.
As well, sorry these issues seem to have gone on for a bit for you (in looking at the service requests). I'll get involved and try to help you get to the bottom of this. Do we have your correct phone number on file? If not, please let Applications Engineering know so that they can note a good number to call you at later today, if that's convenient.
07-28-2010 09:57 PM
Studying and testing some more, the theory I had has been proven impossible. I found myself re-tracing my steps that I had made to ensure that that problem couldn't happen.
That being said, there's some good news and some bad news:
Good news: The issue you're seeing with "Log and Read" can simply be fixed by reading a specific number of samples in DAQmx Read instead of -1. When you read for -1, it has horrible performance. Additionally, you'll end up with a LOT of headers in the file, which will bloat file size and in your case seem to create some file corruption. When you read a specific size from DAQmx Read, the file will only have 2 headers in the file; everything else in the file will just be raw data. This means that you greatly reduce the file size and risk of corruption.
Bad news: I can't reproduce this problem. There are some Applications Engineers that have been working on reproducing it and I have tried, but we have not been able to recreate this behavior, thereby making it difficult to fix any potential problem. There is a solid workaround of reading a fixed size (note: does not need to be sector aligned; that just helps with performance). We will continue to work with you through your support request to try and get this reproduced, but at this point, it seems that you have a good workaround.
Let me know if you have any additional problems or concerns.