An event structure executes when events occur. When there is no event, event structures sit idle, consuming no CPU resource, contrary to a while loop, which will execute constantly to poll for events. In addition to executing code based on actual events, it can execute code based on a software event (user event) that is triggered within the software. A user event can also be used to pass data. This recipe demonstrates how to pass data to an event structure.
In this example, we will create a program that passes data between loops based on user events.
Create User Eventand
Register For Eventsfunctions on the block diagram to create and register an user event. See the following screenshot: ...