TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Reply To:
Tue, 27 Oct 1998 19:07:26 EST
text/plain (1258 bytes) , ADA-HE~1.DOC (19 kB)
Please can anyone in your group help with the following problem: -

I require modelling the operation of a real time box sorter using ADA
programming language.  The system being modelled comprises of two of pistons,
which direct boxes onto specific conveyor belts depending on their colour.

Please see attachment for Real World Model of the system.

An optical sensor determines whether a box is 'blue' or 'red'.  Depending upon
its colour a box is directed to different conveyor belts using pistons, the
first piston must be activated within 7.0 (+-) 0.5secs of a sensor detecting a
'blue' box and second piston must be activated within 9.0 (+-) 0.5secs of the
sensor detecting a 'red' box.

A piston will take 1.0 (+-) 0.1secs to direct a box onto another conveyor belt
and require 0.1secs before being reactivated.  Boxes arrive at intervals of
1.5secs (standard deviation 0.2secs).

If pistons miss a box then an alarm is sounded for a manual operator to
intervene.  The arrival of boxes and the actual time taken for pistons to
respond should be simulated using a random number generator.  At least three
communicating tasks should be used and the program should provide clear screen
display of how the system behaves in response to real world inputs.

Any help with this problem would be much appreciated.