Difference between revisions of "Simulation Macro Icon Properties"

From Flowcode Help
Jump to navigationJump to search
Line 28: Line 28:
 
'''Adding a simulation macro'''
 
'''Adding a simulation macro'''
  
[[Selecting Component Macros|Select the component and macro to use.]]
+
[[Selecting Component Macros|Select the component and select the Simulation Macro.]]
  
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 component name 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.
 
Select the macro and add in any parameters required, and select a return value if required.

Revision as of 15:33, 14 August 2013

<sidebar>Sidebar: Icon Properties</sidebar> Btn Simulation Macro.gifFile:Gen Simulation Macro Flowchart Icon.pngFile:Gen Simulation Macro Icon Properties.png


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.


As well as calling simulation-only Component macros Simulation Macros can alsocall Events which are simulation-only functions which can not run on hardware. Events are used to create advanced digital programs and can be used to test concepts for applications to be build using hardware later on.


Adding a simulation macro

Select the component and select the Simulation Macro.

Select the component name 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 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 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.