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

查看:236
本文介绍了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
  • childB

父母的变更将发送给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.

如果正确,则需要注册到父项的"Value Change"事件. 触发事件后,您将值通过'Value(signalling)'属性节点发送给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做同样的运动
  • 右键单击可见项->数字显示
  • 右键单击滑块->高级->自定义
  • 右键单击数字显示器->替换->滑块(子B)
  • Place a slider
  • Right click, visible items-> digital display
  • Right click on the slider -> Advanced -> Customize
  • Right click on the digital display-> Replace -> a Slider (child A) Do the same exercise for Child A
  • Right click, visible items-> digital display
  • Right click on the slider -> Advanced -> Customize
  • Right click on the digital display-> Replace -> a Slider (child B)

现在您有三个滑块,这些滑块将始终链接在一起,而无需任何额外的代码.

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

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

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