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: 

Dynamically validate the values based on limits

Solved!
Go to solution

Dear sir,

 

I have two controls Freq-1 and Freq-2. These two controls are fall in different bands and consider the bands are 0.5 - 2, 2 - 6, 6 - 18, 2 - 18 and 0.5 - 18. Based on band selection the two controls should be validated. If the values are out of range it should display the message box and wait until correct the value. Some times I will not change the band but i will change the controls, the controls should validate with existing band. For this I implemented state machine concept but strucked some position. Kindly solve the issue and let me know the any other method to implement. kindly find the enclosed VI which is developed by me and the band ranges are different with above mentioned bands.

 

Thanks & Regards,

S Nagaraju

0 Kudos
Message 1 of 3
(2,522 Views)
Solution
Accepted by topic author Sonti_11532

Hi 11532,

 

your VI looks overly complicated!

 

Create an array constant holding your band limits. Compare current readings with band limits using InRangeAndCoerce function:

check.png

No need to use 10 cases for 10 bands…

 

HInt: Read the help for the event structure, especially all those "caveats". Never create multiple event structures in one VI looking at the very same event…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,507 Views)

Thank you for the replay, I will try with this and ley u know.

 

Kindly comment if any other methods to implement.

0 Kudos
Message 3 of 3
(2,427 Views)