当前位置:网站首页>LabVIEW continuous sampling and limited sampling mode
LabVIEW continuous sampling and limited sampling mode
2022-06-28 00:27:00 【LabVIEW development】
LabVIEW Continuous sampling and finite sampling mode
Continuous sampling 、N sampling 、 Or other sampling modes , What do they mean ?
In each case, a suitable sampling timing mode is required , And each sampling timing makes a specific DAQ The programming process makes more sense . Before we start , It is necessary to describe the two steps for converting measurements into numbers in your computer .
The first step is by DAQ Hardware determined . This step is to actually convert the input voltage value into RAM The process of bits in a buffer . This is by the analog-to-digital converter in the hardware (ADC) Realized .
The second step is to read out the bits of the buffer . In most cases, these bits are read in the format of floating-point numbers , And this is done by the computer CPU and CPU Program implementation in .
The frequency of these two steps is the main difference between continuous sampling and finite point sampling .
Continuous sampling means DAQ The hardware continuously follows the rate set by the sampling clock , Converts the input voltage into bits of the buffer . If you are worried that the delay of the computer or program will lead to missing sampling points , Then continuous sampling would be a good choice .DAQ The speed of hardware sampling is always determined by the sampling clock setting , The acquisition of this part is completely realized by hardware . Hardware sampling is very fast and stable , At the same time, the software reads asynchronously , And at an indefinite rate . To solve this conflict ,DAQ The board adopts the structure of buffer .
For continuous sampling tasks , When “ Start task ”vi When it's running , The collection begins . Because it requires certain expenses and CPU Interaction , This vi Only allow to prevent in While The front of the loop . after , In a cycle ,DAQmx Start actually reading the buffer . So it explains why you read a lot of points at once , Because if you read too little at a time , It will cause buffer overflow .DAQ The drive only allows two or more samples to be read in one continuous sample . If you find that you only need one sample at a time , Then you should consider redesigning the program or sampling mode . If the set number of read points ( Number of samples per channel ) Exceeded the data prepared by the buffer , that DAQmx Read vi It will wait until there are enough sampling points . This will show that there will be a certain delay in the graphic refresh process , However, it does not mean that some sampling points have been omitted . The number of sampling points is set to -1, As many sampling points as possible will be read each time .
N sampling ( Also called finite point sampling ) It is used for the acquisition task when the total number of sampling points required is known , Especially for sampling tasks with triggers . for example , It may be necessary to acquire after the start of a trigger signal 10 Seconds of data , You can use finite point sampling . The finite point pattern only buffers calls “ Start task ” This VI When .DAQmx Function will read the data from the buffer , Therefore, you need to set the number of samples N. This task is related to While Loops or state machines are matched .
But unlike continuous sampling , Must be called in each loop “ Start task ”, Then proceed “ Read ”, Next “ Stop task ”. otherwise , otherwise DAQ The driver will continue to try to read the data , Although the sampling requirements are over , This will lead to errors . It should be noted that , The time interval between each sampling is timed by the software . If you need to accurately control the timing problem , Continuous sampling is recommended .
Single sampling is performed through hardware timing or software timing, and the previously mentioned N The sampling is consistent . If you need to process or react to the data every time , And not very concerned about accurate timing , So this sampling method is worth recommending . such as , A battery is slowly discharging , The whole process takes a few minutes or hours . In the process , Each time the voltage is lower than a set value , Just send an email to the controller . This is the case with single sampling . Usually , Sampling in “ Start task ” Start when called . If it is hardware timed , Consider hardware synchronization . The sampling point will “ Start task ”VI The next sampling clock after being called is collected .
Select the appropriate sampling method , Program correctly , Will write the most effective program , It will also avoid the occurrence of error messages .

edit
Add picture comments , No more than 140 word ( Optional )
LabVIEW、LabVIEW Development 、LabVIEW Programming 、LabVIEW Program
Examples and information mentioned above , Both in word In the attachment in , Click to download . Learn more , Can you contact us .
边栏推荐
- RNA-seq入门实战(一):上游数据下载、格式转化和质控清洗
- Oracle数据库的启停
- On charsequence
- 炼金术(3): 怎样做好1个业务流程的接口对接
- 夏日的晚会
- How to select documents for literature review? For example, I can't finish reading more than 200 search results. How to select documents
- HCIP/HCIE Routing&Switching / Datacom备考宝典系列(十九)PKI知识点全面总结(公钥基础架构)
- QStringList 的学习笔记
- 吴恩达《机器学习》课程总结(14)_降维
- [paper reading | deep reading] sdne:structural deep network embedding
猜你喜欢

Msp430f5529 MCU reads gy-906 infrared temperature sensor

吴恩达《机器学习》课程总结(14)_降维

Summary of wuenda's machine learning course (11)_ Support vector machine

Mongodb- install a mongodb database locally on the windows computer

数据仓库入门介绍

Hcip/hcie Routing & Switching / datacom Reference Dictionary Series (19) comprehensive summary of PKI knowledge points (public key infrastructure)

MySQL企业级参数调优实践分享

翻译(5): 技术债务墻:一种让技术债务可见并可协商的方法
![[paper reading | deep reading] sdne:structural deep network embedding](/img/6a/b2edf326f6e7ded83deb77219654aa.png)
[paper reading | deep reading] sdne:structural deep network embedding

本地可视化工具连接阿里云centOS服务器的redis
随机推荐
Safe, fuel-efficient and environment-friendly camel AGM start stop battery is full of charm
How many securities companies can a person open an account? Is it safe to open an account
request对象、response对象、session对象
MATLB|基于复杂网络的配电系统微电网优化配置
Alchemy (2): why use issue management software
Smart wind power | Tupu software digital twin wind turbine equipment, 3D visual intelligent operation and maintenance
Alchemy (8): parallel development and release
单片机之IIC通信协议「建议收藏」
MongoDB-在windows电脑本地安装一个mongodb的数据库
本地可视化工具连接阿里云centOS服务器的redis
Alchemy (7): how to solve problems? Only reconstruction
Matlb| improved forward push back method for solving power flow of low voltage distribution network
智慧风电 | 图扑软件数字孪生风机设备,3D 可视化智能运维
Hcip/hcie Routing & Switching / datacom Reference Dictionary Series (19) comprehensive summary of PKI knowledge points (public key infrastructure)
[digital ic/fpga] detect the position of the last matching sequence
Startup and shutdown of Oracle Database
Sword finger offer 65 Add without adding, subtracting, multiplying, dividing
Redis主从复制、哨兵模式、集群的概述与搭建
Understand the basic structure of wechat applet project
mysql数据库旅游管理系统_JSP+MySQL基于ssm的旅游管理系统[通俗易懂]