From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A Variable range depends ON other

Solved!
Go to solution

Hope Every one would be doing fine.

 

I came up with an intresting question : I have three Variables on the Fornt Panel,  lets say A,B and C

 

I have restricted users to  eneter value which is in the range (through Data Entery range Limits) for the Variable A and B

 

But for the C  maximum range ( data entery limits) depends on the  product of A and B.

User shouldnot be able to enter the value which is higher than the product ,so How shall I impliment this Smiley Tongue 

 

 

Looking forward.

 

thanks in advance

 

 

0 Kudos
Message 1 of 7
(3,028 Views)

use one of this two method for this question 

0 Kudos
Message 2 of 7
(3,022 Views)
In an event-driven environment an easy solution is to not try to prevent the entry of invalid inputs, but to prevent invalid inputs from being acted on.

Have a value change event for each of our inputs and when one of them is changed test whether that set of inputs is valid. If it is, use it, enable an ok button, or whatever.

If that combination is not valid, don't use it or disable the ok button. You can also put a tip-strip on the last input changed, or the ok button in this situation that says what the problem.

Also, if you have multiple inputs you will often want to have a button that tells the program to accept the new inputs all at once. This is what I have been referring to as the "ok button".

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 7
(3,002 Views)

Thanks Hate.fouladi for the answer but  i am unable to open it in Labview 2013

 

And Thank You Mike I got your Idea which sounds good 

0 Kudos
Message 4 of 7
(2,991 Views)
Solution
Accepted by topic author SEMAK

try this 

0 Kudos
Message 5 of 7
(2,974 Views)
Solution
Accepted by topic author SEMAK
The advantage of the approach I described is that the limit checks can be arbitrarily complex.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(2,966 Views)

Thank you Hate.fouladi and Mike ,Igot an idea It worked .

0 Kudos
Message 7 of 7
(2,945 Views)