Procedure
Follow these steps to run the simulation:
- 1
. - Double-click on the Examples block in the Stateflow model window.
Double-click on the Carousel and then the Basic Functional Carousel block.
- 2
. - Choose Start from the graphics editor Simulation menu.
- The first time you run the simulation, and any time you have modified the
Stateflow diagram, choosing Start will parse the machine, generate
simulation code and generate the simulation target. If the target build takes
place, informational messages are displayed in pop-up windows and in the
MATLAB command window.
- In any case, the graphics editor is "iced" and modifications to the Stateflow
diagram are prohibited during a simulation.
- 3
. - The power switch has an off (down) and an on (up) position. Turn the power
on by clicking the power switch from off to on. (This may require switching
off, then switching on again.)
- 4
. - Ensure that the running speed switch is in the normal position.
- 5
. - If it is not already visible, double-click on the Scope block.
- 6
. - The start switch is a toggle. Click the start switch from up to down or from
down to up to start the carousel. Observe the speed in the Scope block. The
ride runs for
Duration seconds but can be stopped prematurely by changing
the running speed switch to overspeed or by clicking the emergency
switch.
- 7
. - The emergency switch is also a toggle. Click the emergency switch from up
to down or from down to up to bring the carousel to an emergency stop.
- 8
. - Choose Stop from the graphics editor Simulation menu to stop the
simulation (and unfreeze the graphics editor). The simulation must be
stopped to be able to close the model.
- 9
. - Choose Close from the File menu of the carousel model solution window.
[ Previous | Help Desk | Next ]