Elevator PLC Ladder Diagram & Ladder Logic (Run It Free)
An elevator (or lift) controller is one of the most instructive PLC state-machine projects you can build: it combines call-button latching, nearest-floor priority logic, hoist motor interlocks, door sequencing with a photo-eye obstruction reversal, and an overload safety hold. Below you will find the full I/O table, the key ladder rungs, a timing diagram of a complete call cycle, and a step-by-step build guide — all grounded in the live three-floor elevator scenario you can run right here in the browser without installing anything.
state-machinesafetyprioritypro
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
A three-floor service elevator with exterior call buttons (up on floors 1 and 2, down on floors 2 and 3), in-cabin floor buttons, a reversing hoist motor, a horizontally-parting door, an obstruction photo-eye in the doorway, and an overload weight switch. The controller must park the cab at the requested floor, open the doors on arrival, dwell for three seconds, close the doors, and resume servicing the next pending call. When multiple calls are pending the cab should choose the closest floor first; tie-breaks from the middle floor prefer going up. The doors must never close while OBSTRUCT_PE is made — if the door is mid-close when the beam breaks, it reverses to fully-open and restarts the dwell timer. When OVERLOAD_SW is on the car must sit still with the doors open. And critically: the hoist motor must NEVER run while the door is not fully closed, and MOTOR_UP and MOTOR_DN must never be energised in the same scan.
Objectives
Latch a pending-call bit for each floor; clear it on arrival at that floor
Pick a destination (one-hot DEST_F1/F2/F3) using nearest-first priority; tie-break from floor 2 goes UP
Drive MOTOR_UP or MOTOR_DN only while DOOR_CLOSE_LIMIT is made AND OVERLOAD_SW is clear
Open the doors on arrival at a requested floor; run DOOR_OPEN_MOTOR until DOOR_OPEN_LIMIT trips
After a 3 s dwell at DOOR_OPEN_LIMIT, close the doors — but only if OBSTRUCT_PE is clear AND OVERLOAD_SW is clear
Obstruction during close must drop DOOR_CLOSE_MOTOR immediately and reverse to DOOR_OPEN_MOTOR
Overload (OVERLOAD_SW) forces the doors open and holds the motors off, regardless of pending calls
Light INDICATOR_LAMP_N when the cab is resting at floor N; light DIRECTION_UP/DN_LAMP while the matching motor runs
MOTOR_UP and MOTOR_DN must never be simultaneously energised (assert via state.everBothMotorContactorsOn)
Hints
Aggregate calls into one pending bit per floor: CALL_FN := SET on any button for that floor, RESET on AT_FN
Use SET/RESET latches for AT_F1/F2/F3 driven by the FLOOR_SENSORs — "last known floor" persists while the car is between sensors
One-hot DEST latches arm only when no DEST is currently active: `CALL_FN AND /AT_FN AND /DEST_F1 AND /DEST_F2 AND /DEST_F3 | S= DEST_FN` — add /CALL_F2 and /CALL_F3 guards to the F1/F3 rungs so F2 wins ties
Factor motor intent into helper bits GO_UP / GO_DN, then gate with DOOR_CLOSE_LIMIT and /OVERLOAD_SW on the actual motor coils
Dwell timer: T_DWELL(IN := DOOR_OPEN_LIMIT AND /DOOR_CLOSING AND /OBSTRUCT_PE AND /OVERLOAD_SW, PT := 3000). Its .Q sets DOOR_CLOSING
Obstruction reset priority: `| OBSTRUCT_PE | R= DOOR_CLOSING ;` followed by `| OBSTRUCT_PE AND DOOR_CLOSING | S= DOOR_OPENING ;` — RESET wins if written after SET in the same scan, but the read of DOOR_CLOSING uses the committed value from the previous scan
I/O Table
Inputs
CALL_UP_1
Floor 1 up-call button
BOOL · %I0.0
CALL_UP_2
Floor 2 up-call button
BOOL · %I0.1
CALL_DN_2
Floor 2 down-call button
BOOL · %I0.2
CALL_DN_3
Floor 3 down-call button
BOOL · %I0.3
INSIDE_BTN_1
In-cabin floor-1 button
BOOL · %I0.4
INSIDE_BTN_2
In-cabin floor-2 button
BOOL · %I0.5
INSIDE_BTN_3
In-cabin floor-3 button
BOOL · %I0.6
FLOOR_SENSOR_1
Cab-at-floor-1 position sensor
BOOL · %I1.0
FLOOR_SENSOR_2
Cab-at-floor-2 position sensor
BOOL · %I1.1
FLOOR_SENSOR_3
Cab-at-floor-3 position sensor
BOOL · %I1.2
DOOR_OPEN_LIMIT
Door fully-open limit switch
BOOL · %I1.3
DOOR_CLOSE_LIMIT
Door fully-closed limit switch
BOOL · %I1.4
OBSTRUCT_PE
Doorway obstruction photo-eye
BOOL · %I1.5
OVERLOAD_SW
Cab overload weight switch
BOOL · %I1.6
Outputs
MOTOR_UP
Hoist motor up contactor
BOOL · %Q0.0
MOTOR_DN
Hoist motor down contactor
BOOL · %Q0.1
DOOR_OPEN_MOTOR
Door open motor
BOOL · %Q0.2
DOOR_CLOSE_MOTOR
Door close motor
BOOL · %Q0.3
INDICATOR_LAMP_1
Floor-1 indicator lamp
BOOL · %Q0.4
INDICATOR_LAMP_2
Floor-2 indicator lamp
BOOL · %Q0.5
INDICATOR_LAMP_3
Floor-3 indicator lamp
BOOL · %Q0.6
DIRECTION_UP_LAMP
Direction-up indicator lamp
BOOL · %Q0.7
DIRECTION_DN_LAMP
Direction-down indicator lamp
BOOL · %Q1.0
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
#1Call from floor 2 dispatches the cab up and opens doors
Press CALL_UP_2 while parked at floor 1. MOTOR_UP engages, car travels up, arrives at floor 2, doors open.
#2Simultaneous calls to floors 2 and 3 — cab visits floor 2 first
Parked at floor 1, press CALL_UP_2 AND CALL_DN_3 together. F2 (closer) is serviced first, then F3.
#3Obstruction keeps DOOR_CLOSE_MOTOR off while doors are open
Dispatch to floor 2, wait for doors to start opening, then fire OBSTRUCT_PE. DOOR_CLOSE_MOTOR must stay false for the entire obstruction window.
#4Call during door dwell holds motors off until DOOR_CLOSE_LIMIT
Dispatch to floor 2, wait for doors to open, press CALL_DN_3 while open. Motors stay off until the doors re-seal; state.everMovedWithDoorsOpen stays false.
#5OVERLOAD_SW holds the motors off and forces the doors open
Assert OVERLOAD_SW, press a call. Motors must stay off; doors open on overload.
#6Multi-floor sequence never energises both car-motor contactors at once
Full round-trip: F1 → F3 → F1. Assert state.everBothMotorContactorsOn stayed false throughout.
Elevator PLC I/O table: inputs, sensors and outputs
A three-floor lift controller needs two classes of input: call and cabin buttons that create service requests, and position or safety sensors that feed back the physical state of the cab and door.
Inputs include exterior up-call buttons on floors 1 and 2, exterior down-call buttons on floors 2 and 3, and in-cabin floor buttons for each of the three floors. Sensor inputs are the three floor position sensors (FLOOR_SENSOR_1/2/3), a door-fully-open limit switch (DOOR_OPEN_LIMIT), a door-fully-closed limit switch (DOOR_CLOSE_LIMIT), a doorway obstruction photo-eye (OBSTRUCT_PE), and a cab overload weight switch (OVERLOAD_SW).
Outputs are the hoist motor up contactor (MOTOR_UP), the hoist motor down contactor (MOTOR_DN), a door-open motor (DOOR_OPEN_MOTOR), a door-close motor (DOOR_CLOSE_MOTOR), three floor indicator lamps (INDICATOR_LAMP_1/2/3) and two direction lamps (DIRECTION_UP_LAMP, DIRECTION_DN_LAMP).
The three-floor elevator I/O: 14 inputs (call buttons, floor sensors, door limits, photo-eye, overload) and 9 outputs (hoist motors, door motors, lamps).
Latching floor calls in ladder logic
The first ladder logic task is converting momentary button presses into sticky pending-call bits — one per floor. Any button that references floor N (an external call button or the in-cabin floor-N button) sets a CALL_FN latch. The latch is reset only when the cab arrives at floor N and FLOOR_SENSOR_N trips, so a call is never lost even if the passenger releases the button during travel.
Using SET and RESET coils for the latch means the pending state survives scan-to-scan without an external memory bit: the SET rung captures the button press in one scan, and the RESET rung clears it when FLOOR_SENSOR_N is true. This is the foundation of the entire elevator PLC program — all priority and motor-dispatch logic reads the CALL_F1/F2/F3 bits rather than the raw buttons.
A floor call latch: any call button for floor N sets CALL_FN; the floor position sensor resets it on arrival.
Up/down motor interlock rung
The most safety-critical rule in any elevator PLC program is that MOTOR_UP and MOTOR_DN must never be energised at the same time — simultaneous contactors would short the motor supply and destroy the drive. The interlock is built as a pair of mirror-image rungs: the MOTOR_UP coil rung has a normally-closed MOTOR_DN contact in series, and the MOTOR_DN coil rung has a normally-closed MOTOR_UP contact in series.
Beyond the electrical interlock, both motor rungs are gated by DOOR_CLOSE_LIMIT (the cab must not move unless the door is fully shut) and by a normally-closed OVERLOAD_SW contact (an overloaded cab must not travel). This three-condition gate — motor intent, door closed, no overload — is the safest way to structure hoist motor control in ladder logic for a lift or elevator.
The MOTOR_UP rung: direction intent AND DOOR_CLOSE_LIMIT AND /OVERLOAD_SW AND /MOTOR_DN interlock — so both contactors can never energise together.
Elevator call-to-arrival timing diagram
The timing diagram traces a complete lift call cycle from floor 1 to floor 2: a momentary press of CALL_UP_2 sets the CALL_F2 latch, MOTOR_UP energises once DOOR_CLOSE_LIMIT is confirmed, the cab travels until FLOOR_SENSOR_2 trips, MOTOR_UP drops, DOOR_OPEN_MOTOR runs until DOOR_OPEN_LIMIT trips, and the 3-second dwell timer runs before DOOR_CLOSE_MOTOR takes over.
Note that MOTOR_UP is always OFF during the door-open and dwell phases — the DOOR_CLOSE_LIMIT gate ensures the hoist cannot re-start until the door has fully re-sealed. This is the sequence the live simulator graded test case validates automatically.
One complete lift call cycle: call latched → MOTOR_UP travel → FLOOR_SENSOR arrival → door open → 3 s dwell → door close.
How to write an elevator PLC program step by step
Building the elevator ladder logic in the simulator follows a natural layered sequence. Start with the I/O wiring — assign the floor sensors, limit switches, photo-eye, overload switch, motor outputs, door motor outputs and lamps to the address slots provided in the wiring panel.
Then build the call latches (SET/RESET pairs for CALL_F1, CALL_F2, CALL_F3), followed by the floor-tracking latches (AT_F1/F2/F3 driven by FLOOR_SENSOR rising edges). Next add the one-hot destination selector that picks the nearest pending floor using the AT and CALL bits. Then wire the motor coils behind the three-condition gate (intent AND DOOR_CLOSE_LIMIT AND /OVERLOAD_SW AND /opposite-motor interlock). Finally build the door sequence: DOOR_OPEN_MOTOR on arrival, dwell TON, DOOR_CLOSE_MOTOR when dwell expires unless OBSTRUCT_PE is made.
The simulator's six graded test cases verify each layer independently, so you can build and pass them one at a time.
Build order: I/O wiring → call latches → floor tracking → destination selector → motor interlocks → door sequence.
2, 3 and 4 floor elevator PLC ladder logic — scaling the call logic
The same ladder pattern scales cleanly from a 2 floor elevator PLC ladder logic exercise up to a 4 floor (and beyond) controller — only the number of repeated blocks changes, not the structure. For every floor N you add one CALL_FN latch (SET on any button referencing floor N, RESET when FLOOR_SENSOR_N trips) and one AT_FN floor-tracking bit. The nearest-floor destination selector then compares the current AT_FN position against every pending CALL bit and dispatches MOTOR_UP or MOTOR_DN accordingly — a 2 floor lift only ever travels in one direction at a time, while a 3 or 4 floor lift needs the up/down priority comparison so it serves the nearest call in its current direction first.
The motor interlock, door sequence, obstruction reversal and overload hold are written once and shared by all floors, so a 4 floor elevator PLC program is mostly copy-and-relabel of the per-floor call and tracking rungs. Everything on this page is runnable and auto-graded in your browser — and to keep a copy of this elevator PLC ladder diagram (I/O table plus every rung) beside you while you build, press Ctrl/Cmd+P on this page and choose Save as PDF.
Frequently asked questions
What is the PLC program for lift control?
A lift PLC program uses SET/RESET latches to record floor calls, a nearest-floor priority selector to choose a destination, a hoist motor coil gated on DOOR_CLOSE_LIMIT and /OVERLOAD_SW, and a door-sequence state machine with a timed dwell and obstruction reversal. The full ladder diagram for a three-floor lift is in the live simulator scenario on this page.
What is the ladder diagram for lift control?
The lift control ladder diagram has three groups of rungs: call-latch rungs (one SET/RESET pair per floor), destination-select rungs (one-hot priority logic reading AT and CALL bits), motor-coil rungs with DOOR_CLOSE_LIMIT and interlock contacts, and door-sequence rungs with a TON dwell timer and an obstruction reversal latch.
How do you interlock the up and down contactors in an elevator PLC program?
Add a normally-closed MOTOR_DN contact in series on the MOTOR_UP coil rung, and a normally-closed MOTOR_UP contact in series on the MOTOR_DN coil rung. This hardware-equivalent interlock in the PLC ladder logic ensures both contactors can never be simultaneously energised regardless of what the destination-select logic outputs.
What happens when the door photo-eye detects an obstruction?
When OBSTRUCT_PE goes true the DOOR_CLOSING latch is reset immediately, dropping DOOR_CLOSE_MOTOR. If the door was mid-close, DOOR_OPEN_MOTOR is SET to reverse the door back to fully open, and the dwell timer restarts. The door will only attempt to close again after the obstruction clears and the 3-second dwell completes.
Can I run this elevator PLC ladder diagram without a real PLC?
Yes. This page is a live browser-based simulator — write the ladder logic, click Run, and the three-floor elevator animation runs in real time. Six automated test cases check call latching, nearest-floor priority, obstruction inhibit, overload safety, and the motor interlock, and grade your program with pass/fail feedback. No hardware, no software install and no licence required.
What does OVERLOAD_SW do in the elevator ladder logic?
When OVERLOAD_SW is true the PLC holds both hoist motor coils off (protecting the drive) and opens the door, keeping DOOR_OPEN_MOTOR on until DOOR_OPEN_LIMIT is confirmed. The car stays stationary with the door open for the entire duration of the overload, regardless of any pending floor calls.
How do you write a PLC program for a 3 floor elevator?
For a 3 floor elevator you write one CALL latch and one AT (floor-tracking) bit per floor — CALL_F1/F2/F3 and AT_F1/F2/F3 — then a nearest-floor destination selector that reads the AT and CALL bits to pick where the car goes next. The hoist motor coils sit behind a three-condition gate (direction intent AND DOOR_CLOSE_LIMIT AND NOT OVERLOAD_SW AND the opposite-motor interlock), and a single door-sequence state machine (open → 3 s dwell → close, with obstruction reversal) is shared by all three floors. You can write and run exactly this 3-floor program in the browser scenario on this page.
What does an elevator PLC ladder diagram look like?
An elevator PLC ladder diagram has four rung groups: call-latch rungs (one SET/RESET pair per floor), destination-select rungs (one-hot priority logic reading the AT and CALL bits), hoist-motor rungs (MOTOR_UP and MOTOR_DN each with a normally-closed interlock contact for the opposite motor plus DOOR_CLOSE_LIMIT and NOT OVERLOAD_SW in series), and door-sequence rungs (DOOR_OPEN_MOTOR on arrival, a TON dwell timer, then DOOR_CLOSE_MOTOR with an OBSTRUCT_PE reversal). To keep a copy of this exact ladder diagram, press Ctrl/Cmd+P on this page and choose Save as PDF.
How do you write an elevator control system using PLC?
An elevator control system using a PLC is built in layers: latch the floor calls so they survive the button release, track the car position from the floor sensors, select the nearest pending destination, gate the up/down hoist motors behind a door-closed and overload-safe interlock, and run a timed door open/close sequence with a photo-eye obstruction reversal. Build it one layer at a time — the live simulator on this page grades each layer with its own test case so you can verify the call logic before adding motor and door control.