Difference between revisions of "Exercise - Exporting the LED Component"

From Flowcode Help
Jump to navigationJump to search
Line 1: Line 1:
Create a LED component as shown in the [[Exercise - Create a LED component]].
+
==Preliminaries==
 +
* Create a LED component as shown in the [[Exercise - Create a LED component]].
  
 
[[File:Gen exerciseLEDcreate macropropsLEDoff 01.png|300px|right]]
 
[[File:Gen exerciseLEDcreate macropropsLEDoff 01.png|300px|right]]

Revision as of 15:41, 26 May 2013

Preliminaries

Gen exerciseLEDcreate macropropsLEDoff 01.png

Configuring the interface

Before you export a component, you need to 'declare the interface'. The interface is the collection of macros and files publically available to the user. Declaring the interface means deciding which of the component routines to make available to the user, and to decide whether these are suitable for simulation or for download.

Declaring the interface

  • Move the mouse cursor over the System Panel, and right-click.
  • Configure this for the LED component. In particular, click on the 'Interface' tab, and set the 'LEDoff' and 'LEDon' macros as 'Component' macros. The 'PinChange' macro is a 'Hidden' macro.
  • Click on 'OK'.

Saving the component

  • You may be asked if you want to save the current flowchart. Do so if you wish.
  • The 'Save As' dialogue box opens. This will automatically point to a destination Flowcode will search for components. Select a suitable name for the component.
  • Click 'Save'. The component file is saved with a '*.fcpx' extension.

Testing the component

Select to create a new flowchart from the main menu.

Go to the category your component was assigned to be in. If you did not select a category you will find the component inMisc.

Drag your component onto a panel, or double click on it.

Create a test flowchart