This is my plan to make the door work automatically. I hade made the flow chart by using logicator 2004.
The picture in the left side is the picture using logicator.
It even has the program to open the door when the fire alarm rings and when the fire alarm rings It keeps on checking if there is people inside and if there is the people inside the door keeps on opening for 500 seconds and if the people all gets out it is going to close.
The other program is when there is people coming the motion sensor will work and then the door will open for 4 seconds and then it is going to close.