To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI uses an Event Structure to discard mouse clicks and prank co-workers.
Description
There are two types of events that the Event Structure can be configured to handle: Notify Events and Filter Events.
Notify events are the most common and only react to what has occurred on the front panel. In this example, a Key Press is a notify event. Any press of the keys on the keyboard will result in the Key Press Case executing. It looks to see which keys were pressed, and from this outputs either a true or false to stop the program. In this way we are able to create a keypress combination, CTRL+C, that will stop the Prank VI from running.
Filter events catch an event performed by the user before LabVIEW processes that event. In this example, a Mouse Click, or mouse down, is a filter event. When the program is running, any mouse clicks on the front panel will be registered before they are actually processed. This gives us the ability to discard them without having the clicks act on anything.
In the Edit Events window, notify events have green arrows while filter events have red arrows and end in ?'s signifying thier ability to be discarded.
Requirements
Steps to Implement or Execute Code
Additional Information or References
Block Diagram of VI
For additional information over Event Programming or further examples of event structures in use, check out the links below.
Event-Driven Programming in LabVIEW
Have Fun!
Mallori
**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.