The task is to design and implement the control logic for an automatic car park. The car park has two separate access gates, for cars to get in and out.
Each gate has the following set of inputs and outputs:
Inputs:
- Inductive sensor: Detects if a car is in front of the gate.
- Card Reader: Reads driver ID from driver card.
- Safety Sensor: Detects any object that blocks the gate from closing.
- Gate fully open.
- Gate fully closed.
- License Plate Reader.
- Emergency Stop.
Outputs:
- Open Gate.
- Close Gate.
- Traffic Light: Red, Yellow and Green lights
Requirements:
- A gate should only open for authorized drivers.
- A gate should never open when a car is not present.
- A parking lot has 150 total parking spaces.
- A gate should never close when it is not safe to do so.
- A gate should not open if the read license plate matches one that is currently in the park.
- When an emergency stop button is pressed any movement on that gate should stop until the button is released.
DOUBT:
I thought a first modeling approach was a state machine.
What I did was an analysis only for the entrance gate to the car park.
I have identified 3 states for the entrance gate which could be (Open, Closed, Locked)
Then, since in my opinion a subsequent state depends not only on the current state but also on the inputs, I thought of a Mealy state machine.
It’s a good idea ?
I then drew the transition table of the states in relation to the inputs and then calculated the various subsequent states and outputs.
Is the basic idea right in your opinion?
Are the states I have identified correct? (important for me)
Or is it all wrong?
I attach an important image that represents my work done.
Thank you!!!