01
def
flask.route('/')
1
0
if ai.ready():
1
SELECT
0
render(app)
1
0
import pandas
0
1
df.fillna(0)
1
0
SELECT *
FROM clients
0
1
0
plt.show()
1
0
0
1
1
0
sql.connect()
1
AI
0
1
0
module.exports
1
0
return result
1
0
0
1
0
async def run():
1
0
1
1
0
for i in range(n):
0
1
0
1
0
1
PLC.run()
1
0
1
0
1
0
def predict(x):
1
0
1
vba.exe
0
0
1
1
try(x)
0
1
0
1
0
web.deploy()
1
0
1
0
0
1
CAD.export()
1
0
1
1
0
0
1
MATLAB
0
1
0
1
0
1
0
1
0
PLC

Automatic Garage Door System

A PLC program written in Ladder Diagram in OpenPLC Editor that controls an automatic garage door. It has six inputs (open, close and stop push buttons, an open limit switch, a closed limit switch and an obstacle sensor), four outputs (open motor, close motor and two indicator lamps) and three internal memory bits: Open_Request, Close_Request and Reverse_Request. The program is split into seven rungs. Three rungs hold the door's state: each one latches its request with a seal-in contact and drops it on Stop or at the limit switch. Two rungs drive the motors, and two more light a lamp while the door is opening or closing. How it behaves: pressing Open starts the door opening until it reaches the open limit switch, and pressing Close starts it closing until it reaches the closed limit switch. Stop cancels any movement at once. The two directions are interlocked, so the open and close motors can never run together, and a Close command is refused while the door is opening. The safety function is the obstacle reversal: if the sensor detects an obstacle while the door is closing, the closing motor stops immediately and the Reverse_Request bit latches. It then drives the door back open until the open limit switch is reached, and resets itself there. Where it is used: this logic is the core of residential and commercial garage doors, roller shutters, sliding gates and barriers, where a motor must be limited by end-of-travel switches and must reverse when something is in the way. Latched requests, direction interlocks and limit-switch cut-outs are the same building blocks used in much larger automation systems.

Automatic Garage Door System screenshot
Automatic Garage Door System screenshot