LabVIEW布尔值的机械作用是什么

简介: LabVIEW布尔值的机械作用是什么

LabVIEW布尔值的机械作用是什么

布尔控件具有机械操作,这些操作控制使用鼠标激活如何影响控件的值。机械动作允许控制模仿某些物理执行器(例如电灯开关或紧急停止按钮)。

六种类型的机械动作是:

可以通过从前面板右键单击布尔值来更改布尔值的机械动作。

机械操作不仅会更改控件对用户输入的反应方式,还会影响从框图访问控件值的方式(如果设置为任何Latch 操作)。查看控件的属性时,更改是可见的。虽然可以只访问开关操作的布尔值,但锁存操作的类型从布尔值更改为变体。这样做的原因是,如果在框图上的多个位置读取闭锁行为,则会导致争用条件。这就是为什么只有控件返回实际的布尔值,而不是属性节点。


为了访问锁存类型控件的布尔值,必须使用事件结构。


Themechanical action not only changes how a control reacts to user input, it alsoaffects how control values can be access from the block diagram if set to anyof the Latch actions. The changes are visible when looking at the Valueproperty of the control. While it is possible to just access the Boolean valuefor switch actions, the type for latch actions changes from Boolean to Variant.The reason for this is, that the latching behavior would cause race-conditionsif it was read in multiple places on the block diagram. This is, why only thecontrol returns the actual Boolean value, but not the property node.


In orderto access the Boolean value for latch type controls, an event structure must beused.


布尔按钮和控件可以配置为具有六种不同类型的机械动作中的任何一种:按下时切换、释放时切换、释放前切换、按下时闩锁、释放时闩锁、释放前闩锁。这可以通过右键单击按钮并选择适当的机械动作来完成。有一个关于每个机械动作如何影响控件行为的小象形图,但只需将它们放在一个循环中,就可以更容易理解每个动作的工作原理。


Booleanbuttons and controls can be configured to have any of six different types ofmechanical action: Switch When Pressed, Switch When Released, Switch UntilRelease, Latch When Pressed, Latch When Release, Latch Until Release. This canbe done by right-clicking the button and selecting the proper MechanicalAction. There is a small pictogram on how each mechanical action affects thebehavior of the control, but it can be easier to understand how each actionworks by simply putting them in a loop.


This VIimplements each action and maps them to two buttons - one for a mouse click andone for a function key. By running the VI, you will be able to more easilyunderstand how each mechanical action works in a loop, and how changing theloop timing affects certain mechanical actions.


需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。


LabVIEW程序,如下附件所示。

相关文章
|
4月前
|
数据格式
LabVIEW编程LabVIEW控制JJ天平例程与相关资料
LabVIEW编程LabVIEW控制JJ天平例程与相关资料
41 1
|
4月前
|
数据格式
LabVIEW编程LabVIEW开发控制安东电子LU-926U04Y四路调节模例程与相关资料
LabVIEW编程LabVIEW开发控制安东电子LU-926U04Y四路调节模例程与相关资料
32 1
|
4月前
LabVIEW控制前面板对象
LabVIEW控制前面板对象
33 1
|
4月前
|
数据格式
2021-07-28LabVIEW编程LabVIEW开发控制SWJ型数字温度计例程与相关资料
2021-07-28LabVIEW编程LabVIEW开发控制SWJ型数字温度计例程与相关资料
26 1
|
4月前
LabVIEW编程LabVIEW控制DUSTTRAK气溶胶监测仪8530例程与相关资料
LabVIEW编程LabVIEW控制DUSTTRAK气溶胶监测仪8530例程与相关资料
29 2
|
4月前
LabVIEW编程LabVIEW开发吉时利Keithley 7001开关例程与相关资料
LabVIEW编程LabVIEW开发吉时利Keithley 7001开关例程与相关资料
40 1
|
4月前
LabVIEW实现编程改变EnumeratedType说明与例程
LabVIEW实现编程改变EnumeratedType说明与例程
38 2
|
4月前
|
安全
LabVIEW编程LabVIEW控制ELT-400家电电磁辐射测量仪例程与相关资料
LabVIEW编程LabVIEW控制ELT-400家电电磁辐射测量仪例程与相关资料
29 2
|
4月前
LabVIEW编程LabVIEW开发 研华PCIE-1751更改DIO方向 例程与相关资料
LabVIEW编程LabVIEW开发 研华PCIE-1751更改DIO方向 例程与相关资料
30 2
|
4月前
|
数据采集 数据管理 数据库
LabVIEW编程LabVIEW开发TSI 8587A型气溶胶光度计例程与相关资料
LabVIEW编程LabVIEW开发TSI 8587A型气溶胶光度计例程与相关资料
21 0