按下一次后Labview按钮冻结

编程入门 行业动态 更新时间:2024-10-28 06:27:21
本文介绍了按下一次后Labview按钮冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试编程一些东西,以从Labview ULx库中读取电压并将该电压添加到阵列中.在将布尔按钮的机械动作设置为按下时闩锁"时,我尝试使用事件结构来执行此操作.但是,按下时闩锁"选项似乎不起作用,程序会读取电压并将其正确添加到阵列中并冻结.

I'm trying to program something to read voltage from the Labview ULx library and add the voltage into an array. I tried to do so using an event structure while setting a boolean button 's mechanical action to "Latch when pressed". However, the "Latch when pressed" option seems doesn't work and the program reads the voltage and adds it to the array correctly and it freezes.

前面板

框图:

推荐答案

当您将Value Changed事件与锁存的布尔控件一起使用时,您需要在事件结构内读取控件的值以重置闩锁.

When you use a Value Changed event with a latched Boolean control, you need to read the control's value inside the event structure in order to reset the latch.

只需将Sample控件的终端移动到事件结构内部,即可正常使用.

Just move the Sample control's terminal inside the event structure, then it should work as you expect.

提示:您可以随意使用Latch When Pressed操作,但是OS(Windows等)中的UI按钮的标准操作实际上是Latch When Released.您可以通过以下方式进行检查:单击按钮,将鼠标指针拖离按钮,然后再释放按钮-按钮不起作用.您可能想要确定哪种对您的应用程序更有意义.

Tip: you are free to use the Latch When Pressed action if you want, but the standard action for UI buttons in the OS (Windows etc) is actually Latch When Released. You can check this by clicking on a button, dragging the mouse pointer off the button and then releasing it - the button shouldn't operate. You might want to decide which one makes more sense for your application.

更多推荐

按下一次后Labview按钮冻结

本文发布于:2023-10-12 21:20:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1485928.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按下   按钮   Labview

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!