The User Event is a way of causing a series of actions to take place in response to an "event" which could be a button press for example or a timer expiring. The User Event will contain the list of things to do or "Actions" when triggered. A trigger event could be another event, a button press, a variable changing values, or a timer expiring.
In the programming tab right click on a folder then create a new User Event.
In the Event Actions tab you can add actions that need to occur.
When the event is called the Actions listed will be fired.
In this example in the Page Designer tab, Button 1 behavior is assigned to fire the User Event shown above and consequently the actions shown in its list will fire whenever someone presses button 1.
Some events are driven by the system from lower level application code or firmware. An example of this is the screen.screenready event. This event executes when the bootloader finishes loading the program out of Flash memory into RAM and the processor is ready to start executing configuration code. This is a good place to add initialization code.
User Events can be fired from the following:
- Timer Expiring - User event timer or state machine timer
- Button Press - hard button or touch button
- Script Routine Call
- System Created Event - see list of events available for each application in the Applications tab.
- Other User Events
- Variable State Change
- State Machines
- Activity Programs
The example in this tutorial builds off of the engine temperature control example created in the tutorials using State Machines, Activity programs, and Scripting. We show you how to accomplish the same logic just using user events and timers.
Download this configuration and follow along
Comments
0 comments
Please sign in to leave a comment.