LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best method for collecting low frequency data

Hello everyone,

 

I'm looking for suggestions on the best way to collect relatively low frequency data (about 1 Hz). I know there are a few different ways to do so in labview such as the DAQ assistant or making DAQ mx and making your own virtual channel. Also there are an abundence of different settings to choose from. I'm using an NI 9215 DAQ card and am collecting voltages. I would be interested to here any opinions on a method for doing so and maybe the settings that they would use.

 

The reason I'm asking is because I'm just using the DAQ assistant but I'm really not sure if that's what I want to be using. I feel like there is a better way.

 

Thank you all!

0 Kudos
Message 1 of 10
(3,437 Views)

It really depends on your requirements. How accurately does the time between samples need to be controlled? What will you do with the data after you collect it?

 

Generally the DAQ Assistant is a quick way to get started but is limited in its versatility and, possibly performance, although that is probably not an issue at 1 Hz. Learning to use the DAQmx VIs will be better for you in the long run.

 

Lynn

0 Kudos
Message 2 of 10
(3,431 Views)

You really should be using the DAQmx API.  Set up the task before your loop and close it after the loop.  This will help eliminate a little of the overhead associated with the DAQ Assistant.  Do a search in the LabVIEW Example Finder (Help->Find Examples).  There should be a decent example in there for doing a continuous measurement with an analog input.


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
0 Kudos
Message 3 of 10
(3,424 Views)

I think in my situation the time between samples is maybe the most important aspect. Right now I don't know how best to control it. I just want to collect the data in an array as I get it.

 

Thanks for the reply Lynn!

0 Kudos
Message 4 of 10
(3,420 Views)

Of Course you could get "Righteous" and toss down a project based on the "Contineous Measurement and Logging (DAQmx)" Project template.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 10
(3,410 Views)

The best way to control the time between samples is to use hardware timed acquisition. This is done with either the DAQ Assistant or the lower level DAQmx functions and using anything other than on-demand sampling. There are several tutorials on data acquisition fundamentals. One place to start is with https://www.ni.com/en/support/documentation/supplemental/06/getting-started-with-ni-daqmx--main-page...

Message 6 of 10
(3,405 Views)

Is this different from triggering? Because this particular DAQ card can't be triggered.

 

I appreciate the replies everyone, very helpfulSmiley Happy

0 Kudos
Message 7 of 10
(3,390 Views)

@winterfresh11 wrote:

Is this different from triggering? Because this particular DAQ card can't be triggered.


There is a big difference between triggering and sample clock.  The trigger tells the DAQ to start acquiring data.  The sample clock tells the DAQ when to take a sample.  You trigger once per acquisition.  The sample clock just keeps on going until the acquisition is complete (either aborted or desired number of samples is acquired).


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 8 of 10
(3,386 Views)

Oh I see, I'm familiar with the sample clock I was just a bit confused

0 Kudos
Message 9 of 10
(3,376 Views)

If the timing is important, you should use a device with an internal timing / sample clock and use that hardware timing. If you measure for days, this clock will sligthly differ from the PC clock / network timing. 

 

If you want to measure with a DAQ with hardware timing once a second:

Think about aliasing! High(er) frequency content (here most probably line noise/hum, and switched power supply noise) can mix down and show up as slow drifts. An easy way to avoid it: Sample with a higher samplerate, use aliasing filters provided by the DAQ, and build mean values.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 10 of 10
(3,331 Views)