LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

led value change in event structure

Solved!
Go to solution

hello,

 

 

please the the attached VI.

 

 

I would like to know which event fires when the true/false value of the led changes?

 

 

In the case structure above the event structure, the true/false values of the led are changed. 

 

 

Based on that I change, the analog ouput to the Acquisition board changes. However, the Value Changed event in the event stucture never fires, I know this as I run the Vi with the highlight execution tool selected.

 

Thank You,

Venkat Rao

 

 

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

The value change in an event structure only occurs if one of two things happens.

 

1.  The user changes the front panel control.  This can't happen since those LED's are indicators and not controls.

2.  The program writes a value to the control/indicator's Value(signalling) property node.  Writing to the indicator's terminal, or to the control/indicator's local variable will not fire the event.  Since you aren't using any value(signalling) property nodes in your program as of right now, this won't happen either.

 

Note, the value change event is a little bit misnamed.  The change event will fire, even if you are not actually changing the data.  So if your LED is currently true, and you write a True boolean to the Value(signalling) property node, the event will still fire even though you technically aren't changing the data.

Message 2 of 4
(3,349 Views)

One thing that would help the readability of your vi is to flatten out the logic by using the select vi located on the comparison pallet. When you use case structures you can never see all the logic at the same time.

0 Kudos
Message 3 of 4
(2,887 Views)

Also note that in the inner case structures you have way too many local variables. if an output is written in all cases of a case strcuture, the output (terminal, local variable, etc.) belongs after the case structure. Only one instance needed. If the tunnel is configured to "use default if unwired", you don't even need the FALSE or ZERO diagram constants.

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