To download NI software, including the products shown below, visit ni.com/downloads.
Overview: This example shows how to identify which control triggered a particular event case that could be triggered by multiple different buttons.
Description: In LabVIEW, the event structure can be used to execute certain code when an event occurs. In this example, a value change on different front panel objects (Button 1, Button 2, Numeric, Stop) cause the same case to execute in the event structure. This example shows how to determine which of these front panel objects was the source of the event.
In order to do so, you can use the CtlRef output from the event structure's left Event Data Node. The CtlRef returns the reference that points to the control that was the source of this event. A property node can be used to access the label of the control which can then be displayed on the front panel.
Requirements: LabVIEW 2012 (or compatible).
Steps to Execute Code
Steps to Implement Code
Additional Information or References:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.