gpt4 book ai didi

LabVIEW:机械 Action "Latch until released"和 "Switch until released"有什么区别?

转载 作者:行者123 更新时间:2023-12-04 14:46:16 59 4
gpt4 key购买 nike

在什么情况下我们应该使用“Latch until release”而不是“Switch until release”?

根据 LabVIEW 2011 Help :

Latch until released—Changes the control value when you click it and retains the value until the VI reads it once or you release the mouse button, depending on which one occurs last. You cannot select this behavior for a radio buttons control.

Switch until released—Changes the control value when you click it and retains the new value until you release the mouse button. At this time, the control reverts to its default value, similar to the operation of a door buzzer. The frequency with which the VI reads the control does not affect this behavior. You cannot select this behavior for a radio buttons control.

最佳答案

文档解释得很清楚。 Switch Until Released更改值,直到您释放它。但是,根据 VI 的复杂程度,您可以在读取值之前按下按钮并松开按钮。在这种情况下,不会对新值采取任何操作。 Latch until released保证关闭/打开转换至少被读取一次。

至于你将它们用于什么,这取决于你的情况。对于大多数单击启动操作的按钮,您通常会使用 Latch until released - 这些是用户希望点击按钮来做某事或切换某事等的按钮。使用 Switch until released在这些情况下,有时用户会单击按钮但什么也不会发生。
Switch until released通常用于实时类型的控件,您可以单击并按住按钮以维持 Action ,然后松开按钮以停止 Action 。

作为一般指南,您可能会想到 Latch until released作为离散操作(一键式操作)和 Switch until released 的理想选择对于模拟 Action (按钮按下时 Action 继续)。

关于LabVIEW:机械 Action "Latch until released"和 "Switch until released"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18304162/

59 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com