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. It, in itself, is not the event but rather the list of things to do when an event occurs. When the event is called the Actions listed will be fired.
In this example 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
- Button Press
- Script Routine Call
- System Created Event
- Other User Events
- 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.