05-28-2010 06:24 AM
Hello,
I have an application where I will acquire data from several sensors. For most of them (16) a relatively low sampling rate (10000Hz) will be fine, but, for one AE sensor I need a high sampling rate (50k - 100kHz). So, I've decided to store the data in binary format so as no to have way too big files.
I try writing the files with the express module, and afterwards, in a new .vi, reading and graphing it to check it, but signals don't match.
By now I'm working with simulated channels, so data stored in the file and read and graphed afterwards should be sine, but I don't see so.
Any suggestions?
05-28-2010 06:46 AM
05-28-2010 07:33 AM
Hello,
here it is. I show only the part where the EA sensor is acquired and written. On the upper part of the program, not shown, the other channels are created just like the one showed, chained together in a unique task.
regards.
05-28-2010 09:05 AM
Your wiring is a mess, as well as your error handling. You have uninitialized shift registers which means that if you stop the VI and then re-run it, the contents of the shift registers are remembered. You have one shift register that's being used for error handling, but it is going to only one of the Write to Measurement File VIs. You also have waveform data going every which way. Frankly, I'm surprised the code actually works. Based on the little that I can see, there's no way to tell which Write to Measurement File runs first, so you have no way of knowing which signals get written out first. This is a race condition.
If you upload the code then someone can try to clean it up for you.
06-04-2010 02:20 AM
Hello, just checking if the issue is solved. I see kudos for the last answer but I do not know if it solved your question. Is it already solved?
Kind regards.
06-07-2010 03:58 AM
Hello,
I have tried my best cleaning up the wiring, but it's still pretty messy. I attach the complete program.
My problem (still not solved) is that since EA needs to be measured at very high rate, I want to write it as binary data. But I cannot make it show me the correct data afterwards, with a different program, that doesn't matter.
I would also like to know how to convert this saved data to MatLab... any suggestions? (should I post this in a new thread?)
Regards,
Usuario
08-20-2010 02:07 AM
Hello,
Indeed it is still a bit messy . I would strongly recommend you to use only one task per device and try to clean your code a little bit more. There is a pretty good example for DAQmx acquisition and TDMS logging. It is called Cont Acq&Graph Voltage - Write Data to File (TDMS).vi. If you could combine this example with Producer/Consumer architecture, that would be perfect. As for the Matlab conversion, I guess that has been replied here.
Have a nice day.