dispenser, when the driver withdraws a ticket. The driver watches the
semaphore, the ticket dispenser and the stopping bar to ascertain when it is
time to proceed and to withdraw the ticket.
The control program
The controller imposes a behaviour on the access control system consisting
of the following sequence of phases.
Phase 1: The controller is waiting for a car to occupy the area of the first
Phase 2: The car is proceeding towards the ticket dispenser. The con-
troller waits for the car to clear the first photocell. The controller sets the
semaphore to red and sends the command to deliver a ticket. If a new car
arrives, it must wait for the semaphore to become green.
Phase 3: Both the car and the controller are waiting for the ticket to be
Phase 4: The ticket dispenser delivers the ticket. The controller waits for
the car driver to withdraw the ticket. When the driver withdraws the
ticket, the controller sends the command to raise the stopping bar.
Phase 5: Both the car and the controller wait for the stopping bar to be up.
Phase 6: The stopping bar is up. The car proceeds into the parking area.
The controller waits for the car to occupy the second photocell.
Phase 7: The car has occupied the second photocell. The controller waits
for the car to clear the second photocell. When the car has cleared the
second photocell, the controller sends the command to lower the stopping
Phase 8: The controller waits for the stopping bar to be down. When the
stopping bar is down the controller sets the semaphore to green. A new
car can proceed along the access lane.
The control program should be highly reconfigurable: the programmer
might implement control programs that handle new scenarios. For example,
the behaviour of the access control system is different in the case of mal-
functioning (e.g. the dispenser needs maintenance) or emergency (e.g. a fire
engine is not required to obtain a ticket).
The simulator is a program that animates the access area depicted in
It visualizes the car while it is proceeding along the access lane. The car
should be represented graphically in a sequence of consecutive positions
every 100 milliseconds.
It visualizes the light beam of the photocells with a dashed red line that
crosses the access lane. When the car occupies the photocells, the red line
is not displayed.