当前位置:网站首页>LabVIEW learning note 9: capture the "value change" event generated by the program modifying the control value
LabVIEW learning note 9: capture the "value change" event generated by the program modifying the control value
2022-07-27 21:14:00 【Gutie_ bartholomew】
Problems encountered , I simplified this problem into a vi, There is 2 An OK button ( Mechanical action : Triggered after clicking ), Use the event structure ( Value change ) A light is controlled to light up .
I hope to achieve : I click a button a Rear control a lamp a Light up ( It represents some data calculation ), Judging by the results of these calculations , After judging, let another button b Also trigger ( The event structure of another button is also value change ), then b The light is on . In this process, I just click the button a, It looks like you clicked the button a Then I clicked the button b( Actually, there is no button b)
ps: For some reason , Can't take a,b Change the value of and put it into the same event Branch , You can't put two lights in the same event structure .

I didn't understand , Forced to change a program writing , Later, I happened to see a series of tycoons on the Internet , It's like being enlightened .
When using event structures , Respond to the value change event of a display control in the front panel in the event branch , The display control dynamically changes its value in other parts of the program .VI When it's running , It can be observed that the value of the display control has been changed , But the corresponding event branch does not execute . Why is there no response in the event structure to the value change event of the display control ?
answer :
The event structure only registers events generated by direct front panel user input , And in the problem , The value of the display control is not entered by the user, but changed by the program , So this is “ Value change ”LabVIEW Won't catch , Therefore, it cannot respond to the corresponding event Branch . and , Even if you use the program VI The server , Global variables , Local variables, etc VI And front panel controls ,“ Value change ” Events will not be LabVIEW capture .
There is one exception , The events of the input control and the display control can be controlled by calling the value ( The signal ) The attribute node of . This property is write only , Every time the attribute node is written, it is like the user's operation on the front panel changes the value . It should be noted that , When using this property in a loop , If the attribute is written every time in the loop iteration , Regardless of whether the control actually has a value change , The program will generate a set of value change events .
Refer to the picture below and the... In the attachment VI.

In the above example , The event structure is used to capture the input control to connect to Numeric Of Event Source Displays the name of the control “ Value change ” event .
In the event structure Numeric“ Value change ” In the branch Numeric Assign a new value to Event Source , Instead of directly outside the event structure Numeric Connect to Event Source, This can avoid every time Event Source A change in the value of “ Value change ” event . once Numeric The value has changed , The corresponding event branch will respond , adopt Event Source Value ( The signal ) The attribute node can generate Event Source Of “ Value change ” event , His corresponding event branch also performs , As shown in the figure below .

————————————————
Copyright notice : This paper is about CSDN Blogger 「LabVIEW Development 」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/bjcyck/article/details/124519385
边栏推荐
- LeetCode每日一练 —— 21. 合并两个有序链表
- 实名认证在文旅出行行业的应用场景有哪些?
- [today in history] July 27: model testing pioneer was born; Microsoft acquires qdos; The first laser typesetting Chinese newspaper
- R language uses t The test function performs a t-test to verify whether the population mean is a specific value (inferring the population mean from the sample set)
- PG free space map & visibility map
- Ipv4/ipv6, DHCP, gateway, routing
- Force deduction solution summary 592 fraction addition and subtraction
- 成分句法分析综述(第二版)
- Automated testing ----- selenium (II)
- Uncaught SyntaxError: redeclaration of let page
猜你喜欢

【R语言】【1】初学R语言语法使用Rstudio编辑

Knowledge management system promotes the development of enterprise informatization

Unity 安装个人免费版

Typroa 拼写检查: 缺少对于 中文 的字典文件

Brand list cases

Win11用户名和密码备份方法

Leetcode daily practice - 203. remove linked list elements

How to make personalized recommendations instantly accessible? Cloud native database gaussdb (for redis) to help

PHP code audit 5 - XSS vulnerability

IOU target tracking II: viou tracker
随机推荐
Leetcode daily practice - 21. Merge two ordered linked lists
14 day Hongmeng device development practice - Chapter 7 device networking cloud learning notes
R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies the function list us
Second uncle, why is it so hot?
论文赏析[EMNLP18]用序列标注来进行成分句法分析
Command line PDF Converter::: fcoder 2PDF
mysql 最大建议行数2000w,靠谱吗?
LeetCode每日一练 —— 206. 反转链表
IOU target tracking II: viou tracker
Codeforces 1706e merge + heuristic merge + st table
Qt opengl 让物体在关照下动起来,形成动画
Hexagon_ V65_ Programmers_ Reference_ Manual(6)
一种比读写锁更快的锁,还不赶紧认识一下
Ue5 uses DLSS (super sampling) to improve the FPS of the scene away from the optimization scheme of Caton
Face recognition 5.1- insightface face face detection model training practice notes
MapGIS三维场景渲染技术与应用
R language uses LM function to build multiple linear regression model, writes regression equation according to model coefficient, and uses deviance function to calculate the sum of squares of residual
Know the transmission medium, the medium of network communication
访问共享文件夹时提示“因为文件共享不安全 SMB1协议”请使用SMB2协议
Dobot Magician 机器臂-简介