JavaFSM

by Karola Krönert and Ulrich Dallmann

ENGLISH translation by Holger Rehmeier
IPCT, PUCRS, BRASIL (more tools)

Example "Fahrstuhl" (elevator):

The "Fahrstuhl"-example models an elevator, that serves 4 floors.

As input-values, four buttons stand for the respective floors. It doesn't matter in this case, whether somebody in the elevator presses the button 2nd level or somebody in the 2nd level calls the elevator.

As output-values, we have four signals, that declare, in which floor the elevator is now.

The machine contains 6 conditions:
 
Condition Description K EC 1 2
Keller  the machine is in the cellar 
Erdgeschoß vu  the machine is coming to the ground floor from below 
Erdgeschoß vo the machine is coming to the ground floor from above 
1. Stock vu  coming from below the machine is in the 1.floor
1. Stock vo  coming from upwards the machine is in the 1.floor
2. Stock  the machine is in the 2. floor 

Is the elevator in the ground floor or 1. floor, so it shall, provided several buttons are pressed, proceed in the same direction first. Therefore two conditions were inserted for these floors for each case, that define from which direction the elevator is coming.

Transition-conditions:

If only one button is pressed, the elevator should go into this floor of course. If several buttons are pressed, it should retain its direction and should approach the next floor that has been called.
 
from after if
Keller  Erdgeschoß vu  Knopf_EG 
Keller 1. Stock  !Knopf_EG&Knopf_1 
Keller 2. Stock  !Knopf_EG & !Knopf_1&Knopf_2 
Erdgeschoß vu  Keller  !Knopf_2 & !Knopf_2&Knopf_K 
Erdgeschoß vu  1. Stock  Knopf_1 
Erdgeschoß vu  2. Stock  !Knopf_1&Knopf_2 
and so on     


JavaFSMTECHUlrich DallmannKarola Krönert