LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numberic control dependence

Does anyone know if its possible to make numberic controls depend on each other? For example I have 3 controls that represent the percent composition of a mixture and I want their combined value to not exceed 1.0.
0 Kudos
Message 1 of 4
(2,667 Views)

Hi CorrAtm,

you can use an event structure and check it in your code.

 

Mike

0 Kudos
Message 2 of 4
(2,660 Views)

You can use property nodes. 

 

Right click on the the control select Create>Property Node>Data Entry Limits>Maximum

 

You will then have to create an algorithm to set the max value

 

If you entered a number in first control say .5 then the max for the other two would be set at .5 if you entered .5 for the second control the max for the 3rd would be 0.

Brian
0 Kudos
Message 3 of 4
(2,655 Views)

Hi CorrAtm,

 

One way to do this, as mentioned by MikeS81, is to use event structures. You could have an event trigger whenever you change the value of any of the numeric controls on your front panel. Inside the event structure you would then adjust the other numeric controls as necessary. You can change the value of the numeric controls via local variables or property nodes. The algorithm to adjust the numeric controls would be up to you.

 

For more information on event structures, please check out this Help article.

 

Thank you for choosing National Instruments.

 

Aaron Pena

National Instruments

Applications Engineer

http://www.ni.com/support 

0 Kudos
Message 4 of 4
(2,625 Views)