Difference between revisions of "Component Macro Icon Properties"
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<sidebar>Sidebar: Icon Properties</sidebar> | <sidebar>Sidebar: Icon Properties</sidebar> | ||
− | [[File:Btn_Component_Macro.gif]] → [[File: | + | {| style="margin:auto; text-align:center;" |
+ | |- | ||
+ | |[[File:Btn_Component_Macro.gif|border]] | ||
+ | | width="50px" |→ | ||
+ | |[[File:Gen_Component_Macro_Flowchart_Icon_01.png]] | ||
+ | |width="50px" |→ | ||
+ | |[[File:Gen_Component_Macro_Icon_Properties_01.png]] | ||
+ | |} | ||
− | + | Macros are split into Macros and Component/Simulation macros. | |
− | Macros are split into Macros and Component macros. | ||
Line 11: | Line 17: | ||
Component macros have hatched outer bands on the icon. | Component macros have hatched outer bands on the icon. | ||
+ | |||
+ | |||
+ | [[Simulation Macro Icon Properties|Simulation macros]] are simulation-only Component macros - they provide a similar purpose, although they can only be used in simulation and cannot be run on hardware. | ||
Line 22: | Line 31: | ||
'''Adding a component macro''' | '''Adding a component macro''' | ||
− | [[Selecting Component Macros| | + | Select the component and then [[Selecting Component Macros|select the Component Macro icon.]] |
− | Select the component from the list of attached components | + | Select the component from the list of attached components to expand the list group to reveal the available component macros to choose from. |
− | + | Select the macro and add in any parameters required, and select a return value if required. | |
Line 43: | Line 52: | ||
The [[Variable Types|variable type]] of the return value will be listed. A variable of the specified type must be used to accept the return value. | The [[Variable Types|variable type]] of the return value will be listed. A variable of the specified type must be used to accept the return value. | ||
+ | |||
+ | ====Video instructions==== | ||
+ | |||
+ | See the [http://www.youtube.com/watch?v=Xh68YXcTdoU&list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ Component Macro] video to learn how to call component macros, this video features both the [[Component: ID 7aad74d6 b24e 4dab 91eb 5d72a973f12d|ADC]] Dial and [[Component: ID 0953aac0 9c23 4c2f 9843 88954a4191ea|LCD]] EB005 components and their associated Component Macros. | ||
+ | |||
+ | <div align="center"> | ||
+ | {{#ev:youtube|Xh68YXcTdoU|640}} | ||
+ | </div> |
Latest revision as of 09:09, 30 August 2013
<sidebar>Sidebar: Icon Properties</sidebar>
→ | → |
Macros are split into Macros and Component/Simulation macros.
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 only available for use with that particular component.
Component macros have hatched outer bands on the icon.
Simulation macros are simulation-only Component macros - they provide a similar purpose, although they can only be used in simulation and cannot be run on hardware.
Macros are those designed and created by the user.
Macros can be exported and imported allowing users to build up macro libraries of common or important tasks.
On Macros the outer bands are clear and not hatched.
Adding a component macro
Select the component and then select the Component Macro icon.
Select the component from the list of attached components to expand the list group to reveal the available component macros to choose from.
Select the macro and add in any parameters required, and 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 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 of the required type to be accepted.
Note that a full set of parameters must be provided.
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 the specified type must be used to accept the return value.
Video instructions
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}}