Event Structure Does Not Capture the 'Value Change' of Indicator

Updated Feb 7, 2018

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

Issue Details

Using an Event Structure, I configured a case to execute when there is a Value Change of an indicator on my front panel. In my VI, the indicator is sent a value from another part of my code. When I run the VI, I can see the indicator value changing, but the code in the event case that I configured never executes.

Solution

The Event Structure only registers events generated by direct user interaction with the front panel. In this issue, the indicator value is changed programmatically, thus LabVIEW does not capture the Value Change event. Furthermore, Value Change events do not occur if you use VI Server, global variables, local variables, etc. to change VI or front panel objects programmatically.

There is one exception: Events for controls and indicators can programmatically be generated with a property node, using the property Val(Sgnl) (Value(Signaling)), like figure below. This write-only property creates an event that acts like a front panel value change each time it is written. Beware of using this property in a loop, however, because if it is written in each iteration of the loop, it will generate a value change trigger for each iteration, regardless of whether the value was actually changed.
 

See the figure below for a demonstration about Value Change event using Val(Sgnl) property.
 

 
This VI uses the Val(Sgnl) property to update the indicator as well as to generate an event.  When the "A*B" indicator is updated, the event structure will register the event and update the "Last Updated" indicator with the current time.

In contrast, see the figure below for a demonstration about Value Change event using Value property.
 
 
This VI uses the Value Change property to update the indicator.  When the "A*B" indicator is updated, the event structure will not register the event as there is no event to register. 

In both VIs, the product is written programmatically to the indicator "A*B." Both VIs also have an event structure meant to capture a value change event of the "A*B" indicator.  Only the VI using the Value (Signaling) property will register an event when the "A*B" indicator is updated.

WAS THIS ARTICLE HELPFUL?

Not Helpful