|
|
(29 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | This exercise looks at testing the flowchart 'Lamp1.fcf' which you developed in the exercises [[Exercise - Creating Your First Flowchart|Creating Your First Flowchart]] and [[Exercise - Adding Devices to Your First Flowchart|Adding Devices to Your First Flowchart]].<br />
| + | For an excellent introduction guide, we recommend [https://www.flowcode.co.uk/education/ Introduction to microcontroller programming] |
− | The first part of this process is to simulate the flowchart. This tests the program only, and not the hardware.
| |
− | It is done within the Flowcode program itself, and does not require that any hardware is present.
| |
− | For more details about simulation, see [[Overview of Simulation]].
| |
− | | |
− | | |
− | | |
− | __TOC__
| |
− | | |
− | | |
− | ==Load the Flowcode Flowchart==
| |
− | | |
− | * Open the flowchart, called 'Lamp1.fcf' which you created in the exercise [[Exercise - Creating Your First Flowchart|Creating Your First Flowchart]].
| |
− | :(For help with this, see the exercise [[Exercise - Opening an Existing Flowchart|Opening an Existing Flowchart]])
| |
− | | |
− | | |
− | ==Run the simulation==
| |
− | | |
− | * Click on the 'Run' icon,(or hit the F5 function key.)[[File:gen_exerciseSImulatingFirstFlowcode_runicon_01.png|30px]]
| |
− | : The 'Simulation debugger window may open - ignore it for now! (For more information, see [[Simulation Debugger]])
| |
− | * Nothing happens until you switch the lamp on. To do this, click momentarily on the push switch.
| |
− | : The lamp comes on and the 'Simulation Delay' window opens, as Flowcode simulates the ten second delay.
| |
− | : At the end of this, the lamp goes off.
| |
− | * You can repeat the process as many times as you like. When you are ready, click on the 'Stop simulation' button, (or press the Shift and F5 keys.)[[File:gen_exerciseSimulatingFirstFlowcode_simstopicon_01.png|30px]]
| |
− | | |
− | | |
− | ==Step through the simulation==
| |
− | : When things don't go according to plan, it is useful to simulate the program step-by-step, (meaning icon-by-icon.)
| |
− | : To do this:
| |
− | :* Click on the 'Step Into' icon, (or press the F8 key.)
| |
− | | |
− | | |
− | ==What Next?==
| |