LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reusable function inside vi

Solved!
Go to solution

Hi All,

 

I am working on a front panel with multiple input controls(rings and textboxes). I want to set  the availability of the proceed button based on the values of the input controls. My idea was to validate the input when the value of one of the input controls changes. Is it possible to write the validation code only once and hook it to multiple events (input controls value change) ?

 

Thanks in advance,

 

0 Kudos
Message 1 of 4
(3,035 Views)
Solution
Accepted by topic author svh

If you use an event structure for it, you can have several events using the same event case.

 

If this VI is used as a dialog, you can configure multiple Value Change events from different UI sources for one event case (use the blue + Add Event button).

If this VI is a subvi, you will not be able to work like this as passing parameters does not fire the Value Change event....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(3,028 Views)

Another option is to place your "input controls" in a cluster (cluster borders can be hidden).

One Event case covers any change.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 4
(3,002 Views)

I bundled the value changed event of all the input controls to one event case.

It works perfect, thanks.

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