LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

connecting two controls

I need to connect two controls (a slide control and a num control) so that if one is changed the other will automatically switch to the value of that one. So for example, if my current num control is 5, and my slide is 2, then when the num control is changed to 6, the slide must snap to 6. Currently I have each control wired to each other's local variable. This works somewhat, but the values simply switch. I am definately stumped with this one. Thanks. 

0 Kudos
Message 1 of 8
(5,623 Views)

Option 1.

Turn on the digital display of the the slide.  Now it is one control with two different ways of entering a value that are inherently linked.

 

Option 2.

You can use two different controls, but you should use an event structure that has cases to fire on the value changed event of either control.  When one control's value changes, it will write to the local of the other control.

Message 2 of 8
(5,619 Views)

I am supporting 'RavensFan'...

 

Option 3:- XControl

If you have more duplication of 'coupled controls' (and you can't use Option 1), you can create 'XControl', so that your Block Diagram will be clean.

https://decibel.ni.com/content/groups/niweek-2012/blog/2012/08/13/session-recap-xcontrols-in-theory-...

 

Regards,

Yogesh Redemptor

Regards,
Yogesh Redemptor
0 Kudos
Message 3 of 8
(5,594 Views)

Option #1 worked thank you very much. Please lock thread

0 Kudos
Message 4 of 8
(5,555 Views)

The thread will not be locked because someone else may have a related question and may wish to ask about it here.

 

What you should do is mark RavensFan's post as a solution. The check mark which shows up will let others who may be following the thread that it has reached a successful conclusion and gives RavensFan credit for helping.

 

Lynn

0 Kudos
Message 5 of 8
(5,551 Views)

Hello everyone! I am now trying to create a range by using two numerical controls, but I do not know how to connect these two controls together in Block Diagram.

I need to create this scenario, this range (given by this control) to be above a flunctuating number (temperature) before the fan is being turned on; sort of like a control 1 "AND" control 2.

Thank you in advance for the help!

0 Kudos
Message 6 of 8
(5,399 Views)

Please start a new thread.

 

This one is over a year old, and the question asked here was actually quite a bit different from what you are asking.

0 Kudos
Message 7 of 8
(5,393 Views)

sorry to resurrect an old thread. is there any chance you could post a picture of your code?

0 Kudos
Message 8 of 8
(3,642 Views)