TAMS / Java / Hades / applets (print version): contents | previous | next
Traffic light controller demoDescriptionA simple traffic-light
as a first demonstration of the JavaFSM
interactive state-machine editor included in Hades.
The stop input can be used to keep the traffic-light
in the green-states for either of both roads.
An (active low) value at the reset input will force the
state-machine into its starting state.
Note that the graphical symbol for the state machine
shows an interactive miniature version of the FSM,
highlighting the current state and the currently active transition.
To edit the state-machine, activate the popup-menu on the
FSM symbol and select the edit menu item.
This opens the editor window for the FSM,
which uses a mode-oriented user-interface.
JavaFSM can also be used as a standalone applet,
e.g. to demonstrate simple Mealy- or Moore-machines.
for the standalone JavaFSM applet.
Run the applet | Run the editor (via Webstart)
- move-mode: Click-and-drag any one of the state
symbols (circles) to a new location on the editor canvas.
The currently selected state is highlighted in red.
Use the textfield on the lower left to set the name
of the selected state.
To change the output values for Moore-type outputs in the selected state,
first select that output in the list on the lower left and then
select the new output-value (0 or 1) in the radio-button on the
- state-mode: Click the mouse to create a new state
and set its name and the default output values via the GUI controls
on the lower left part of the editor window.
- transition-mode: To create a new transition between states,
first click of the initial state, then on the final state.
Enter the logical condition that activates the transition
in the textfield on the lower left, e.g. "*" for an always active
transition, or "A&B" for a transition that is only active if
the "A" and "B" inputs are both active (1).
- comment-mode: Click the mouse to specify the position for
a new text comment on the editor canvas; next enter the comment
into the text-area in the lower left part of the editor window
and finally press "apply" to create the comment.
- delete-mode: Click the mouse to delete a state,
transition, or comment.
- starting state-mode: Click the mouse on a state symbol
to select that state as the initial starting-state of the FSM.
- Click the test FSM button to run a simple selftest that
checks for each state whether transitions are active for any
combination of inputs.
- Use the load and save as operations to load or save
the FSM design file.
Impressum | 24.11.06