LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ assistant timing settings

Solved!
Go to solution

I have what I believe is a simple question. I'm running DAQmx with the following settings:

  Acquisition Mode - Countinuous Samples

  Samples to Read - 1k

  Rate (Hz) - 10k

 

First of all, my understanding is that under continuous samples it never stops reading data and that the 'samples to read' box controls how many readings it averages together to create a single datapoint. If this is incorrect, please clarify as my question may be void.

 

My question is; with my settings, is it outputting 10k datapoints per second (collected from 10,000,000 readings per second)? Or is it taking 10,000 readings and then averaging 1,000 of them at a time and outputting 10 datapoints per second?

0 Kudos
Message 1 of 10
(6,227 Views)
Solution
Accepted by topic author Timberwolf8199
It will output 1000 samples every 100 ms. Each sample will be taken at .1 ms intervals. There is no averaging going on anywhere. The arithmetic is basic - samples divided by samples/sec equals the time to acquire. If you had 1000 samples per second and requested 100 samples, the time to acquire would be the same but each sample would be 1 ms apart.
0 Kudos
Message 2 of 10
(6,222 Views)

Yeah, I realized as I poked around that the averaging is being done later in the program. I see from other posts that the number of samples is a buffer size but I'm not sure how to tell how often the buffer is emptied. Is there some sort of command/loop/timer that I should be looking for?

 

....In case you couldn't tell, I'm trying to understand an existing program.

0 Kudos
Message 3 of 10
(6,207 Views)
The buffer is emptied when a DAQmx Read is done. This, and most other details are hidden by the DAQ Assistant. You can attach your code of you get sick and need some more help.
0 Kudos
Message 4 of 10
(6,195 Views)

Hidden how? Is it a setting I can view/change somewhere or is it completely inaccessible? If the latter, how can I be certain that I am collecting it fast enough (or conversely, that my buffer is big enough)?

0 Kudos
Message 5 of 10
(6,149 Views)
Solution
Accepted by topic author Timberwolf8199
Like all Express VIs, the assistant is actually calling lower level functions. You can convert it by right clicking on it. You'll see several DAQmx functions such as Configure Channel, Start Task, Read, etc. These are functions that are available on your DAQmx palette and used in the examples (Help> Find Examples> Hardware Input and Output). Even with the lower level functions, the DAQmx driver will assign a buffer based on the sample rate, number of channels, etc. and this is often good enough, though you can use lower level DAQmx properties to set a bigger buffer.

When you run the code, do you get an error? Anything that indicates a buffer problem? Errors of this type can have different causes and fixes so if you do have errors, post the error code/message and your actual VI.
Message 6 of 10
(6,143 Views)

I'm not getting any error messages. We've been having two issues: One is noise in our readings (so I wanted to determine our reading resolution). The other is that for some reason the DAQ assistant would stop running. The rest of the code was still responding and updating, but the DAQ stopped collecting/sending info. No error messages that I've seen.

 

I noticed the DAQ assitant was off to the side on its own. I thought perhaps it was stopping at some point while the rest kept going because their loops hadn't yet been satisfied. I don't know why it would do this as there's no commands/timers telling it to stop (that I am aware of). But just to see if it made a difference, I put everything (including the DAQ) inside a continuous loop. I haven't had a test long enough to see if it solved anything yet.

0 Kudos
Message 7 of 10
(6,137 Views)

Please attach your code or a picture of block diagram.

0 Kudos
Message 8 of 10
(6,132 Views)

@JoeWork wrote:

Please attach your code or a picture of block diagram.


There's no point in posting a picture of a DAQ Assistant or Express VI since we can't see how they're configured.  Smiley Wink  

(It's really always better to post the actual VI unless you absolutely can't for some reason.)

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 9 of 10
(6,123 Views)

Here's the code I've been looking at.

0 Kudos
Message 10 of 10
(6,110 Views)