Event Structure Does Not Capture the 'Value Change' Event When Values are Programmatically Changed Primary Software: LabVIEW Development Systems>>Full Development SystemPrimary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: LabVIEW Development Systems>>Base Package, LabVIEW Development Systems>>Professional Development System
Problem: 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. Why is the Event Structure not registering the value change of my indicator? Solution: The Event Structure only registers events generated by direct user interaction with the front panel. In this example, 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 Value (Signaling). 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 and the attached VI for a demonstration.
The objective is to detect the value change of the indicator Event Source, which is intended to be wired up to the control
In LabVIEW 7.1 or earlier, refer to the LabVIEW User Manual (linked below) for more information on registering for events. In LabVIEW 8.0 or later, refer to the User Events topic in the LabVIEW Help (linked below). Related Links: Product Manuals: LabVIEW User Manual LabVIEW Help: User Events Developer Zone Tutorial: Event-Driven Programming in LabVIEW KnowledgeBase 30BENK7Y. Value Change Event Case Not Reading the Correct Value Attachments:
Report Date: 03/04/2008 Last Updated: 03/04/2008 Document ID: 4J3DI2MA |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


