当前位置:网站首页>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 .
边栏推荐
- Thread pool implementation: semaphores can also be understood as small waiting queues
- NDSS 2022 received list
- Sentinel
- Alchemy (7): how to solve problems? Only reconstruction
- What is promise
- Feign通过自定义注解实现路径的转义
- logging日志的使用
- Customize MySQL connection pool
- 什么是cookie,以及v-htm的安全性隐患
- Msp430f5529 MCU reads gy-906 infrared temperature sensor
猜你喜欢

Local visualization tool connects to redis of Alibaba cloud CentOS server
![[untitled]](/img/e4/7c65c6823559b8501a1777cc4eb7ba.jpg)
[untitled]

GFS 分布式文件系统概述与部署

赛尔笔记|视频文本预训练简述

剑指 Offer 65. 不用加减乘除做加法
![Using two stacks to implement queues [two first in first out is first in first out]](/img/de/07297816f1a44d41389bb45d012c80.png)
Using two stacks to implement queues [two first in first out is first in first out]

Chenyun pytorch learning notes_ Build RESNET with 50 lines of code

Squid代理服务器(缓存加速之Web缓存层)

Character interception triplets of data warehouse: substrb, substr, substring

Promise是什么
随机推荐
Quickly master grep commands and regular expressions
代码整洁之道--函数
Recyclerview implements grouping effects in a variety of ways
Matlab基本函数 length函数
现代编程语言:Rust (铁锈,一文掌握钢铁是怎样生锈的)
股市小白在网上股票开户安全吗?
Alchemy (8): parallel development and release
mysql数据库旅游管理系统_JSP+MySQL基于ssm的旅游管理系统[通俗易懂]
软件工程作业设计(1): [个人项目] 实现一个日志查看页面
Comprehensive evaluation of free, easy-to-use and powerful open source note taking software
The Internet industry has derived new technologies, new models and new types of industries
logging日志的使用
[untitled]
QStringList 的学习笔记
NDSS 2022 received list
本地可视化工具连接阿里云centOS服务器的redis
Acwing第 57 场周赛【未完结】
代码整洁之道--格式
吴恩达《机器学习》课程总结(11)_支持向量机
Summary of wuenda's machine learning course (14)_ Dimensionality reduction