取消
显示结果 
搜索替代 
您的意思是: 

DAQ assistant timing settings

已解决!
转到解答

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 项奖励
1 条消息(共 10 条)
8,040 次查看
解答
已被主题作者 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 项奖励
2 条消息(共 10 条)
8,035 次查看

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 项奖励
3 条消息(共 10 条)
8,020 次查看
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 项奖励
4 条消息(共 10 条)
8,008 次查看

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 项奖励
5 条消息(共 10 条)
7,962 次查看
解答
已被主题作者 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.
6 条消息(共 10 条)
7,956 次查看

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 项奖励
7 条消息(共 10 条)
7,950 次查看

Please attach your code or a picture of block diagram.

0 项奖励
8 条消息(共 10 条)
7,945 次查看

@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.  眨眼表情  

(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
0 项奖励
9 条消息(共 10 条)
7,936 次查看

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

0 项奖励
10 条消息(共 10 条)
7,923 次查看