LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two controls that work together

I am using a tab control and would like to place a knob control on one tab and a slider control on another tab. I would like both of these control to always output to the same analog channel and always read the same value. i.e. Changing the slider to a value of 6.2 causes the knob to be set to a value of 6.2. Any help you be appreciated.
0 Kudos
Message 1 of 4
(2,735 Views)
There are many ways to do this, here's a simple one. Make an even structure with two event cases:
(1) knob:value changed
(2) slider:value changed

In case (1) write the new value to a local variable of the slider and in case (2) write the new value to a local variable of the knob. Use either control to drive your output.
0 Kudos
Message 2 of 4
(2,735 Views)
The method described above will certainly work for you. However, if you are using a case structure based on your the value of the tab control, there is a better way. I've attached a VI which gives you an example of how to use property nodes to perform the same functions. Property nodes will not work if you are not using the case structure due to the fact that you would only be able to control it one way or the other. Hope this helps.

Adam B.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(2,735 Views)
Here's what I had in mind.
0 Kudos
Message 4 of 4
(2,735 Views)