LabView 中的同步滑块 [英] Synced Sliders in LabView

查看:38
本文介绍了LabView 中的同步滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 LabView 2009 中,有没有办法让一个控件(滑块)影响另一个控件(滑块)的输出和显示?

In LabView 2009, is there a way to have one control (slider) affect the output and display of another control (slider)?

例如,有两个滑块可以调整两个单独的参数.我希望能够独立调整参数,但也可以同时使用单独的(父)滑块进行调整.由父滑块创建的值变化将通过每个参数的两个独立滑块的变化来表示.

For example, there are two sliders that adjust two separate parameters. I would like to be able to adjust the parameters independently but also simultaneously adjust both with a separate (parent) slider. The change in value created by the parent slider would be represented by a change in the two independent sliders for each parameter.

推荐答案

如果我理解正确你有三个滑块.

If I understand you correctly you have three sliders.

  • 父母
  • childA
  • 孩子B

父项的更改将发送给 childA 和 childB.childA 或 childB 的更改不会影响其他人.

A change in parent will be sent to childA and childB. A change in childA or childB won't affect the others.

如果这是正确的,您将需要注册到父级的值更改"事件.触发事件时,您使用值(信号)"属性节点将值发送到 childA 和 childB.价值信号将确保孩子的价值改变"事件也被触发.当您在滑块上移动时,孩子们会跟随.

If this is correct you will need to register to the 'Value Change' event of parent. When the event is triggered you sent the value to childA and childB with a 'Value (signalling)' property node. The value signalling will make sure that 'Value Change' events of the children get triggered as well. When you move around the slider the children will follow.

选项 B 当您需要三个滑块始终相同时,您可以通过以下步骤轻松完成:

Option B when you need the three sliders to always be the same you can do that quite easy with the following steps:

  • 放置一个滑块
  • 右键,可见项目->数字显示
  • 右击滑块 -> 高级 -> 自定义
  • 右击数显->替换->滑块(子A)为孩子 A 做同样的练习
  • 右键,可见项目->数字显示
  • 右击滑块 -> 高级 -> 自定义
  • 右击数显->替换->一个Slider(子B)

现在您有了三个滑块,它们将始终链接在一起,无需任何额外代码.

Now you have three sliders which always will be linked without any extra code.

这篇关于LabView 中的同步滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆