From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I modify a VI to log data quickly?

Solved!
Go to solution

Hi community!

 

I'm a very new Labview user, and I'm posting because I'm not sure the question to ask, so here goes.

 

I was given a VI to use for some very rudimentary data collection. My problem is that I would like to be able to log data every 1 second, and no matter what computer I use, the data is logged periodically anywhere from every 2-7 seconds, which is unhelpful for what I want to do.

 

So, to sum up:

 

I want to collect 1 data point per second per channel, and not kill my computer.

 

I have attached my VI.

 

Thank you very much to anyone who might be able to help!

 

PS- I am using 2 NI 9211 USB DAQ's for my data aquisition.

 

 

 

0 Kudos
Message 1 of 2
(2,537 Views)
Solution
Accepted by topic author sks2

1. No need for a Timed Loop.  Just use a normal While Loop.

2. Make your task a Continuous sampled at 1Hz.  Now the DAQmx Read will limit your loop rate.

3. Do not create, start, and clear your DAQmx task with each loop iteration.  Set it up once before your loop and close it once after the loop.

4. Make your life A LOT easier and use the DAQmx Configure Logging to tell DAQmx to stream the data straight to a TDMS file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,509 Views)