07-07-2014 08:05 AM
Hello,
I am trying to log all data from my DAQ at a slow frequency, but I want it to capture at a higher frequency when a certain trigger occurs. As of right now, I have two separate while loops going at once (one with the slow logging and the other with the trigger logging). Is there a better way to do this? Is it possible to reduce this down to one while loop and still capture all the data in real-time? I found something in the DAQ assistant called "Logging" but I am not sure if this will help in this case. Thanks!
*Note that the "Enable Snapshot" and "Take Snapshot" buttons must be toggled from ON to OFF consecutively, as of now. I.e. Enable ON, Enable OFF, Take ON, Take OFF
07-08-2014 07:53 AM
Anyone?
07-08-2014 02:49 PM - edited 07-08-2014 02:59 PM
Hi ntsirak1,
I have a couple suggestions for you. First is to let you know that you can acquire at a certain frequency and then decimate the acquired data to log certain samples, giving the impression that you are logging data at a slower rate. Here are some LabVIEW functions you could use to decimate the acquired data:
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/decimate_1d_array/
http://zone.ni.com/reference/en-XX/help/371361H-01/lvanls/decimatecont/
Additionally, you can use the DAQmx Configure Logging VI to save your acquired data to a TDMS file, but once the acquisition has started you cannot stop the data logging process. Here’s some information on the DAQmx Configure Logging VI:
http://zone.ni.com/reference/en-XX/help/370469AA-01/lvdaqmx/mxlogging/
http://www.ni.com/white-paper/9574/en/
Lastly, here’s an example that I’d like you to take a look at. This example implements a continuous acquisition with producer/consumer architecture that allows you to enable/disable data logging with a Boolean button. I think this example might come in handy for your application.
https://decibel.ni.com/content/docs/DOC-2431
I hope this information is useful to you. Let me know if you have any more questions or concerns.
Regards
07-08-2014 06:34 PM
Thank you for your response! This might be exactly what I'm looking for