Simulation Events

From Flowcode Help
Jump to navigationJump to search
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.

Full details surrounding each of the events in Flowcode can be found here Event_Reference.


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}}