Component Macro Icon Properties

From Flowcode Help
Revision as of 11:02, 12 June 2026 by SteveT (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

IconComponentMacro.png

Component macros are pre-defined macros supplied with the components. For example LCD macros are used to display numbers and characters on the LCD display.


Old Versions

This page is current for Flowcode v9 and later. Earlier versions can be found below:

Flowcode v8


Details

IconComponentMacro.png Gen Component Macro Flowchart Icon 01.png Properties CompMacro.png


Adding a component macro

Components macros are listed in the properties window and are grouped by component.

Find the component from the list of attached components and click the "+" sign to its left to expand the list group to reveal the available component macros.

Select the macro and add in any parameters required, then optionally select a return value if required.


Parameters

If the device macro requires any parameters then these can be entered in this field. They can be numeric values, strings or existing variables. Clicking on the down arrow Btn Arrow.png brings up the variables dialog window allowing you to select an existing variable or to create a new one.

The parameter details will list the parameter type. Parameters must be a compatible type to be accepted, and a full set of parameters must be provided.

Expressions can be used as parameters for example (5 + a) where a is a numeric variable. Expressions cannot contain string functions or other functions requiring the use of arrays.


Return value

If the device macro returns a value then you can assign that value to an existing variable for use later in the flowchart. If the function returns a value but you do not wish to retrieve it then leave this field empty.

The variable type of the return value will be listed. A variable of compatible type must be used to accept the return value.


Macro types

Macros are 3 types of macro that can be called using this command icon:

Macros Macros designed and created by the user that are created as part of this project.
Components Pre-defined macros supplied with the components. Only components that have been added to this project are available.
Built-in Functions Simulation-only macros for advanced Flowcode use such as component creation.


Video

See the Component Macro video to learn how to call component macros, this video features both the ADC Dial and LCD EB005 components and their associated Component Macros.

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