Difference between revisions of "Component Macro Icon Properties"
| Line 2: | Line 2: | ||
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. | 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: | ||
| + | {| class="wikitable" | ||
| + | |+ | ||
| + | |- | ||
| + | | [[Special:PermanentLink/41380|Flowcode v8]] | ||
| + | |} | ||
| Line 11: | Line 20: | ||
|[[File:Gen_Component_Macro_Flowchart_Icon_01.png]] | |[[File:Gen_Component_Macro_Flowchart_Icon_01.png]] | ||
|width="50px" |→ | |width="50px" |→ | ||
| − | |[[File: | + | |[[File:Properties_CompMacro.png]] |
|} | |} | ||
| Line 17: | Line 26: | ||
'''Adding a component macro''' | '''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, | + | Select the macro and add in any parameters required, then optionally select a return value if required. |
| Line 28: | Line 37: | ||
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 [[File:Btn_Arrow.png]] brings up the variables dialog window allowing you to select an existing variable or to [[Creating Variables|create a new one]]. | 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 [[File:Btn_Arrow.png]] brings up the variables dialog window allowing you to select an existing variable or to [[Creating Variables|create a new one]]. | ||
| − | The parameter details will list the parameter type. Parameters must be | + | 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. | 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. | ||
| Line 39: | Line 46: | ||
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. | 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 Types|variable type]] of the return value will be listed. A variable of | + | The [[Variable Types|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: | ||
| − | [[ | + | {| class="wikitable" |
| − | + | |+ | |
| − | + | |- | |
| − | + | | [[Macro_Icon_Properties|Macros]] | |
| − | + | | Macros designed and created by the user that are created as part of this project. | |
| − | + | |- | |
| − | + | | [[Component_Macro_Icon_Properties|Components]] | |
| − | [[ | + | | Pre-defined macros supplied with the components. Only components that have been added to this project are available. |
| + | |- | ||
| + | | [[Simulation_Macro_Icon_Properties|Built-in Functions]] | ||
| + | | Simulation-only macros for advanced Flowcode use such as component creation. | ||
| + | |} | ||
Latest revision as of 11:02, 12 June 2026
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.
Contents
Old Versions
This page is current for Flowcode v9 and later. Earlier versions can be found below:
| Flowcode v8 |
Details
| → | → |
|
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
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}}
