Difference between revisions of "Simulation Events"

From Flowcode Help
Jump to navigationJump to search
Line 21: Line 21:
  
 
===Video instructions===
 
===Video instructions===
See the [http://www.youtube.com/watch?v=DflA2gULQuw&list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ&index=26 Simulation Events] video for a overview of the simulation events and demonstrates the [[Event Mouse.Click|Mouse.Click]] event by creating the macro Ev_Click event macro and using a [[Simulation Macro Icon Properties|Simulation Macro]] to change the colour of an object.
+
The [http://www.youtube.com/watch?v=DflA2gULQuw&list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ&index=26 Simulation Events] video consists of an overview of the simulation events and a demonstration of the [[Event Mouse.Click|Mouse.Click]] event by creating the macro Ev_Click event macro and using a [[Simulation Macro Icon Properties|Simulation Macro]] to change the colour of an object.
  
 
<div align="center">
 
<div align="center">
 
{{#ev:youtube|DflA2gULQuw|640}}
 
{{#ev:youtube|DflA2gULQuw|640}}
 
</div>
 
</div>

Revision as of 16:01, 4 September 2013

<sidebar>Sidebar: What Is a Macro?</sidebar>

ProjectExplorerEventsTab.jpg

A Flowcode simulation event is similar to an Interrupt but aimed at performing a specific job. The events will not be referenced at all for downloaded microcontroller code but may be used in the generation of such code.

Another key difference between events and interrupts is that events can occur at any time whereas interrupts can only occur whilst the simulation is running.

Event Management

The Project Explorer events tab is used to list all the available events and provides a quick way of seeing which events are active in your Flowcode project.


When an event is active a small macro icon will appear next to the event.

By hovering over the events you can see a short description of when the event will be called and what parameters will be passed to it.

By double clicking the event you can edit the macro assigned to it. Double clicking the macro item will automatically add an event macro for you with a name specific to the event name. Selecting disabled will deactivate the event and prevent it from firing.

Each event macro will have a return variable which may or may not be used internally by Flowcode, refer to the event description for specific details.

The Component Debugger window has a option to log events as they are fired which is useful for debugging purposes.


Video instructions

The Simulation Events video consists of an overview of the simulation events and a demonstration of the Mouse.Click event by creating the macro Ev_Click event macro and using a Simulation Macro to change the colour of an object.

{{#ev:youtube|DflA2gULQuw|640}}