LabVIEW:单个变量有多个指示器(不同样式)
变量在整个 VI 中会发生多次更改。我想以不同的样式(温度计、数字指示器)将其显示在前面板上的两个不同选项卡上。
这个答案 对我不起作用,因为如果变量已经在其他地方显示,则没有可用的“数字显示”。
谢谢!
A variable gets changed throughout the VI several times. I would like to display it in on two different tabs in the front panel, in different styles (thermometer, numeric indicator).
This answer does not work for me, since there is no "digital display" available if the variable is already displayed elsewhere.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将任意数量的指标连接到同一数据源。只需使用接线工具将框图上的端子连接起来即可。
如果您正在将数据写入一个指标的局部变量,并且希望第二个指标同时更新,那么您有几种选择:
如果您选择带有 while 循环的选项之一,则需要弄清楚如何在程序的其余部分完成时停止循环。通知程序很方便,因为当您使用“force destroy”True 释放通知程序时,任何等待通知操作都将停止等待并返回一个错误值,您可以将其连接到循环终端。
You can wire any number of indicators to the same data source. Just use the wiring tool to link up the terminals on the block diagram.
If you're writing data to a local variable of one indicator and you want the second one to update at the same time, you have a few options:
If you choose one of the options with a while loop, you'll need to figure out how to stop the loop when the rest of your program is finished. Notifiers are handy because when you release the notifier with 'force destroy' True, any wait on notification operations will stop waiting and return an error value which you can wire to your loop terminal.
您可以将前面板与实际代码断开。有一个非常详尽的操作指南 在这里。
基本上,您通过引用控制(并对其做出反应)前面板,因此您可以将一组引用传递给实际执行操作的处理程序VI。通过这样做,切换用户界面非常容易。
You can disconnect the front-panel from the actual code. There is a very throughough how-to written here.
Basically you control (and react to) the front panel by references, so you'll pass a cluster of references to a handler VI that actually performs stuff. By doing that it's quite easy to switch UIs.