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
- last edited on
11-20-2025
01:43 PM
by
Content Cleaner
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:
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/decimate-1d-array.html
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:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kGedSAE&l=en-US
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.
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