Designing a 5-Floor Elevator Control Program for Siemens LOGO! 8

David Krause19 min read
HMI ProgrammingSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

A 5-floor elevator is one of the canonical training projects for compact PLCs. The Siemens LOGO! 8 family (6ED1052-x**08-0BA1) and the current LOGO! 8.3 family (6ED1052-x**08-0BA2) provide the I/O count, the relay/transistor output power, and the instruction set required to implement cabin call registration, hall call buttons, bi-directional motion control, automatic door sequencing, floor-position display, and the basic safety interlocks expected in any vertical-transport system.

This reference walks through the complete design path: physical layout, I/O allocation, state-machine formulation, call-queue policy, position-sensing strategy, door interlocks, safety logic, and the LOGO!Soft Comfort V8.x implementation. The scheduling policy is "collect-and-go with direction lock": the controller services the furthest active call in the current direction of travel before reversing. This is the simplest policy that guarantees every registered call is fulfilled without starvation and is the recommended starting point for a school or training rig.

Engineering judgment: A real passenger elevator requires EN 81-20 / ASME A17.1 compliant hardware (two independent braking systems, AC-leveling, door lock monitoring, buffer / buffer-stroke limits, firefighter service). The logic described here is intended for a low-mass training rig with reduced shaft height and is not a substitute for certified elevator controls.

Prerequisites

Item Catalog / Spec Purpose
LOGO! 8 base unit 6ED1052-1MD08-0BA1 (230 RCE) or 6ED1052-2MD08-0BA2 (8.3 variant) Main controller, 8 DI / 4 DO
LOGO!Soft Comfort V8.3 or newer Programming, simulation, and download
LOGO! DM8 expansion 6ED1055-1FB10-0BA2 (230R) or 6ED1055-1CB00-0BA2 (12/24R) Adds 4 DI / 4 DO for hall-call wiring
LOGO! AM2 analog module 6ED1055-1MA00-0BA2 Optional, for absolute position via potentiometer or 0–10 V sensor
LOGO! TDE text display 6ED1055-4MH00-0BA1 Optional, for floor + status display
Cabin floor buttons 5× momentary N/O, panel-mount Cabin floor selection F1–F5
Hall call buttons 8× momentary N/O (4 up-call + 4 down-call; top floor uses down-call only, bottom floor uses up-call only) Hall calls
Floor position sensors 10× inductive proximity or magnetic reed (2 per floor) Approach + stop indication per floor
Final limit switches 2× mechanical N/C, forced-disconnect type Top / bottom safety stop
Overload sensor 1× force sensor with comparator Cabin overload detection
Emergency stop 1× mushroom N/C, latching Hardwired safety stop
Motor contactors 2× mechanically interlocked, 3-pole + 1 N/C + 1 N/O aux Up and down motor control
Door contactors 2× reversing pair with mechanical interlock Door open / close
Door limit switches 2× N/O (open limit, closed limit) Door position feedback
Floor display 1× 7-segment common-anode + 7× driver resistors, or LOGO! TDE Floor indication F1–F5
Ethernet cable Cat5e or better LOGO! 8 programming port (RJ45)

Download the current LOGO! 8 system manual and LOGO!Soft Comfort online help before starting: LOGO! 8 System Manual (109757499), LOGO!Soft Comfort V8.3 Online Help (109761576), and the LOGO! 8.3 Release Notes (109769382).

Mechanical Architecture

The mechanical layout determines the I/O scope. For a 5-floor training rig the typical geometry is:

  • Shaft height: 5 × 3 m = 15 m (adjust per floor)
  • Carriage mass: 50–150 kg (training scale)
  • Counterweight: 50–150 kg, balanced to 50% rated load
  • Drive: 24 V DC gear motor with encoder, or 230 V AC single-phase motor through contactors
  • Doors: single-speed sliding, 0.8 m clear opening
  • Sensor markers: 50 mm × 25 mm magnetic strips bonded to guide rail; one reed switch on car for each floor

Sensor placement conventions:

Sensor Distance from floor level Function
Approach sensor −30 cm (below floor level when traveling up) Initiate deceleration, slow-speed command
Stop sensor 0 cm (floor level) Confirm position, issue stop command to contactor
Final limit switch (top) +10 cm above top floor Hard-wired into up contactor coil, bypasses PLC
Final limit switch (bottom) −10 cm below bottom floor Hard-wired into down contactor coil, bypasses PLC
Wiring rule: The two final limit switches must be wired in series with the up and down contactor coils respectively (not just the PLC input). They must drop out the contactor even if the PLC hangs, so they cannot be implemented in software alone.

I/O Allocation

The base LOGO! 8 provides 8 digital inputs and 4 digital outputs. With careful assignment, this is sufficient for the cabin buttons and motor control. Expansion modules DM8 add the additional 4 DI / 4 DO required for hall calls, sensors, and indicators.

Base Unit Digital Inputs (I1–I8)

Terminal Symbol Description
I1 CB1 Cabin button Floor 1
I2 CB2 Cabin button Floor 2
I3 CB3 Cabin button Floor 3
I4 CB4 Cabin button Floor 4
I5 CB5 Cabin button Floor 5
I6 SB_OPEN Door open button (cabin)
I7 SB_CLOSE Door close button (cabin)
I8 ES_OK Emergency stop OK (N/C, true when not pressed)

Base Unit Digital Outputs (Q1–Q4)

Terminal Symbol Description
Q1 K_UP Up motor contactor coil
Q2 K_DN Down motor contactor coil
Q3 K_DOOR_OPEN Door open contactor coil
Q4 K_DOOR_CLOSE Door close contactor coil

DM8 Expansion #1 Inputs (I9–I12)

Terminal Symbol Description
I9 HCU2 Hall call UP from Floor 2
I10 HCU3 Hall call UP from Floor 3
I11 HCU4 Hall call UP from Floor 4
I12 HCD5 Hall call DOWN from Floor 5

DM8 Expansion #1 Outputs (Q5–Q8)

Terminal Symbol Description
Q5 IND_UP Direction indicator UP arrow
Q6 IND_DN Direction indicator DOWN arrow
Q7 LAMP_OL Overload lamp
Q8 LAMP_FAULT System fault lamp

DM8 Expansion #2 Inputs (I13–I16)

Terminal Symbol Description
I13 HCD4 Hall call DOWN from Floor 4
I14 HCD3 Hall call DOWN from Floor 3
I15 HCD2 Hall call DOWN from Floor 2
I16 OL_SENSE Overload sensor comparator output

DM8 Expansion #3 Inputs (I17–I24)

Terminal Symbol Description
I17 FS1A Floor 1 approach sensor
I18 FS1S Floor 1 stop sensor
I19 FS2A Floor 2 approach sensor
I20 FS2S Floor 2 stop sensor
I21 FS3A Floor 3 approach sensor
I22 FS3S Floor 3 stop sensor
I23 FS4A Floor 4 approach sensor
I24 FS4S Floor 4 stop sensor

The fifth-floor sensors (FS5A, FS5S), door limits (LS_OPEN, LS_CLOSE), and door obstruction photo-eye (LS_PE) consume four more inputs. These can be brought onto a fourth DM8 module, or alternatively one DM16 (6ED1055-1BM10-0BA2) can replace the third and fourth DM8 modules to consolidate the I/O count. See the LOGO! 8 system manual for maximum configuration rules: base + 4 expansion modules = 24 DI / 16 DO + 8 AI / 8 AO maximum.

State Machine Design

State machines are the recommended structure for sequential machine control. They convert the linguistic description of an elevator ("if the car is here and a call is registered there, run the motor; stop when the car arrives; open the door; wait; close the door") into a finite set of states with explicit transitions. LOGO!'s latching relay (B036), RS flip-flop (B012), and on-delay (B019) blocks implement state machines cleanly.

State Definitions

ID State Outputs Active Exit Condition
S0 IDLE None Any registered call AND no overload AND doors fully closed
S1 MOVING_UP K_UP, IND_UP Stop sensor at target floor asserts
S2 MOVING_DN K_DN, IND_DN Stop sensor at target floor asserts
S3 DOOR_OPENING K_DOOR_OPEN Door open limit (LS_OPEN) asserts
S4 DWELL None (waiting) Dwell timer expires (default 5 s) OR door close button pressed
S5 DOOR_CLOSING K_DOOR_CLOSE Door closed limit (LS_CLOSE) asserts
S6 FAULT LAMP_FAULT Operator reset AND fault condition cleared

State Diagram

IDLE (S0) Q1=0 Q2=0 MOVING_UP (S1) Q1=1 IND_UP=1 DOOR_OPEN (S3) Q3=1 DWELL (S4) 5s timer DOOR_CLOSE (S5) Q4=1 MOVING_DN (S2) Q2=1 IND_DN=1 FAULT (S6) Q8=1, all OFF call above call below arrived LS_OPEN timer / close btn LS_CLOSE → idle (or next call direction) any state → FAULT on E-stop / overload / limit trip reset

State Encoding in LOGO!

Implement the seven states with seven RS flip-flop blocks (function block B012, listed under "Special / Latching" in LOGO!Soft Comfort). Each RS flip-flop has:

  • S (Set) input: previous-state active AND transition condition
  • R (Reset) input: next-state active OR fault OR emergency stop
  • Q output: state-active flag, used downstream to drive outputs and to compute next-state logic

Mutual-exclusion rule: never let two states' S inputs evaluate true simultaneously. Use the previously-active state flag as a guard on the next state:

; pseudo-code: S1 (MOVING_UP) SET
S1.S = S0.Q AND (target_floor > current_floor) AND call_registered AND NOT fault
S1.R = S2.Q OR S3.Q OR S4.Q OR S5.Q OR S6.Q OR ESTOP

Motor and Contactor Sizing

The motor must accelerate the car + counterweight + load, overcome friction, and decelerate within the floor-to-floor distance. For DC gear motors common in school rigs (24 V, 100–200 W), the contactor rating is rarely the limiting factor. For AC single-phase or three-phase motors, use the following sizing check:

Single-phase apparent power at the contactor:

kVA = V × I / 1000

Three-phase apparent power:

kVA = √3 × V_LL × I_line / 1000

Verify whether the nameplate current is per-phase (typical for induction motors) or line current (typical for measured load). If the source is ambiguous, calculate both cases:

Case I Apparent Power
If 360 A is three-phase line current I_line = 360 A kVA = 1.732 × 400 V × 360 A / 1000 = 249 kVA
If 360 A is single-phase current I = 360 A kVA = 230 V × 360 A / 1000 = 82.8 kVA
If 360 A is three-phase per-phase current I_phase = 360 A kVA = 3 × V_phase × 360 A / 1000 = 3 × 230 V × 360 A / 1000 = 248 kVA

For a school rig the motor is typically 0.5–2 kW. A 24 V DC gear motor rated 100 W is typical. The contactor only needs to switch this load; a 10 A contactor (e.g., Siemens 3RT2015-1BB41) is more than adequate. The main engineering choice is the braking system: a spring-set electromagnetic brake that engages on power loss is required for any vertical-transport application.

Call Queue Algorithm

The call queue decides which registered call to service next. The simplest direction-lock policy:

  1. Maintain an "up-calls" bitmask M1 (bits 1–5 represent floors 1–5) and a "down-calls" bitmask M2.
  2. Cabin floor button sets the corresponding bit in both bitmasks (cabin call is served regardless of direction).
  3. Hall up-call sets bit n in M1; hall down-call sets bit n in M2.
  4. If the car is in MOVING_UP, find the lowest set bit in M1 that is above the current floor and target that floor. Clear the bit on arrival.
  5. If MOVING_UP and M1 has no set bit above the current floor, scan M2 from the current floor downward; if any bit set, reverse direction (set MOVING_DN).
  6. If the car is IDLE and any bit is set, choose the closest bit (regardless of direction) and start moving toward it.

In LOGO!Soft Comfort this is implemented with two shift registers (function block B030) plus comparison blocks (B027 greater-than, B028 less-than). The shift register word B030 stores the up-call queue as bits; another B030 stores the down-call queue. The "highest bit set" detector is implemented with a ladder of AND blocks in priority order, or more cleanly with the analog-threshold block B025 comparing the digital word (after MUX conversion) against constants 16, 8, 4, 2, 1.

Position Sensing Strategy

Three sensor families are in common use:

Strategy A: Dual Reed per Floor (Recommended for School Rigs)

Place one reed switch on the car and one magnetic strip per floor on the rail. The strip length and the second reed offset define an approach/stop window. Logic:

  • When in MOVING_UP and FS(n)A asserts, switch motor to slow speed (high-speed contactor drops, slow-speed contactor picks). For a single-speed DC rig, reduce PWM duty to 30% via an analog output.
  • When FS(n)S asserts, drop K_UP. The car coasts to a stop; mechanical brake (spring-set) holds position.
  • For DOWN motion, mirror the logic on FS(n)A / FS(n)S at the next lower floor.

Strategy B: Single Reed + Counting (Lower Cost)

One reed on the car, one magnetic reference strip near each floor. Count up/down pulses from a rotary encoder on the motor. The counter (function block B023) holds the current floor number. On entry to the counter zone corresponding to the target floor, drop the motor contactor.

Strategy C: Analog Position (Highest Robustness)

String potentiometer or absolute encoder on the car, fed to a LOGO! AM2 analog input (AI1, 0–10 V). Convert to floor number with B025 threshold trigger blocks at 0, 3, 6, 9, 12 m scaled equivalents (depends on shaft scaling). This eliminates reed-switch bounce issues entirely.

Door Control Sequence

The door sequence is one of the most safety-critical parts. Implement with these blocks:

  1. B019 on-delay (Dwell timer): set to 5 s. Triggered when LS_OPEN asserts. Output drives the transition from DWELL to DOOR_CLOSING.
  2. Mechanical interlock: K_DOOR_OPEN and K_DOOR_CLOSE wired through the contactor's NC aux contacts. Even if both Q3 and Q4 energize from a PLC fault, the contactors cannot both pick.
  3. Re-open on obstruction: feed a photo-eye or light curtain input through an OR into the SET of the DOOR_OPENING state, gated by S5.Q. If the light curtain trips during DOOR_CLOSING, abort the close and re-open.
  4. Door lock: a switch on the closed-door latch must assert before K_UP or K_DN is allowed. Implement as an AND with K_UP / K_DN.

Safety Interlocks

Hazard Sensor / Input Logic Action
Emergency stop pressed I8 (ES_OK, N/C) NOT I8 → reset all motion outputs Drop K_UP, K_DN, K_DOOR_OPEN, K_DOOR_CLOSE; enter FAULT
Overload I16 (OL_SENSE) I16 → latch on B011 pulse relay Disable motion, latch LAMP_OL, refuse door close
Final limit top Hard-wired in K_UP coil Series contact Drop up contactor mechanically; report via input
Final limit bottom Hard-wired in K_DN coil Series contact Drop down contactor mechanically; report via input
Door open while moving LS_OPEN (N/O) AND with K_UP or K_DN active Enter FAULT; this condition must never occur
Both contactors picked Mechanical interlock + aux feedback PLC cannot detect, but mechanical interlock prevents Verify during commissioning
Floor sensor mismatch FS(n)A and FS(n)S both true simultaneously for > 2 s B019 on-delay 2 s Enter FAULT; sensor mis-calibration
Safety chain design: All E-stop, overload, and final-limit signals that affect motor contactors must be hard-wired in series with the contactor coils. The PLC supervises them as inputs but cannot be the sole means of energy removal. This is the same rule used in machinery safety per EN ISO 13849-1 PL d minimum.

HMI / Floor Display

Two common approaches:

Approach 1: LOGO! TDE Text Display (6ED1055-4MH00-0BA1)

The TDE is a 6-line text display that connects to the LOGO! base unit. Use LOGO!Soft Comfort "Message text" blocks (B038) to display the current floor number, direction arrows, and fault state. The TDE can also serve as a programming terminal.

Approach 2: 7-Segment Display Driven by Outputs

Drive a common-anode 7-segment display with seven LOGO! outputs through current-limiting resistors. Encode the floor number with a BCD-to-7-segment decoder built from basic AND/OR blocks, or use a B080 analog multiplexer to select one of five pre-encoded segment patterns. Five floors map to patterns: 1 = 0x06, 2 = 0x5B, 3 = 0x4F, 4 = 0x66, 5 = 0x6D (common-anode, low-true segments).

Direction Arrows

Q5 / Q6 (IND_UP / IND_DN) drive separate indicator lamps or LED arrows. These lamps illuminate when the corresponding motion state is active AND doors are closed. Add an AND with NOT (S3 OR S4 OR S5) to suppress the direction lamp while doors are cycling.

LOGO!Soft Comfort Implementation

Program structure (FBD):

  1. Section A — Input conditioning: debounce buttons with B019 on-delay 50 ms, debounce sensors with B019 on-delay 20 ms. Use the B019 output rather than the raw input downstream.
  2. Section B — Call queue: two B030 shift registers hold up-call and down-call bitmasks. Cabin button CBn sets bit n in both registers. Hall call button sets bit n in its direction register. On arrival, RESET bit n in both registers for the cabin call, or only the corresponding direction for a hall call.
  3. Section C — Target floor computation: for MOVING_UP, find the lowest set bit above the current floor in M1. For MOVING_DN, find the highest set bit below the current floor in M2. Use B027 / B028 comparators with constants.
  4. Section D — State machine: seven B012 RS flip-flops with mutual exclusion guard. Each state's Q output is a memory marker (M1–M7).
  5. Section E — Output drivers: AND-gate the motion outputs with door-locked AND NOT overload AND NOT E-stop. AND-gate direction lamps with NOT in door cycle.
  6. Section F — Message text: B038 message text blocks tied to the current-floor marker to drive the TDE.

Sample Block Diagram (Section D Excerpt)

The state machine in Section D is the largest block. A single state (S1 MOVING_UP) wired in LOGO!Soft Comfort FBD looks like:

   I_prev_state   ────┐
   AND(target_gt_current) ── AND NOT fault ── S input of B012 (RS)
   I_target_floor_arrived ── R input of B012
   B012.Q  ── M1 marker (state active)
   M1.Q    ── drives K_UP via AND with door-locked, NOT overload, NOT E-stop

Repeat for S2–S6. The complete program typically occupies 150–250 function blocks, well within the LOGO! 8 maximum of 400 blocks.

Commissioning Procedure

  1. Bench test (no motor): program the LOGO! with LOGO!Soft Comfort. Open Simulation mode. Click inputs I1–I24 manually and verify the state machine progresses correctly and the output indicators (M1–M7 markers) toggle in the expected order.
  2. Wiring check: with main power off and E-stop pressed, ring out every terminal from the LOGO! to the field device. Verify each button is N/O, each sensor pulls to 24 V (or 230 V per the LOGO! variant chosen), and each contactor coil is wired with its own fuse.
  3. I/O test with power: apply control power only (contactor coils isolated). Force each LOGO! output high from LOGO!Soft Comfort online mode and verify the corresponding field device operates. Listen for the contactor pull-in; verify with a multimeter at the coil terminal.
  4. Single-floor test: place the car at Floor 2 manually. Press cabin button Floor 1. Verify the car runs down, slows on FS1A, stops on FS1S, doors open, dwells 5 s, doors close. Repeat for Floor 3, 4, 5.
  5. Multi-floor collect test: from Floor 1, register cabin calls to Floors 3, 4, 5 in that order. Verify the car visits 3, 4, 5 in sequence and stops only at registered floors.
  6. Direction reversal test: from Floor 1 with hall up-call Floor 4 and hall up-call Floor 3 active, verify the car stops at 3 first (closest in current direction first in this policy). Document the policy explicitly when training students so they understand.
  7. Safety test: press E-stop while the car is moving. Verify all motion outputs drop within 100 ms and the car stops within its braking distance. Verify final limit switch at top: drive the car into the top final limit manually (or use the test mode of LOGO!Soft Comfort to force the input) and verify the up contactor cannot be re-energized until reset.
  8. Door obstruction test: during a door close, block the photo-eye. Verify the door re-opens and the close cycle restarts after the obstruction clears.
  9. Endurance test: run 50 random call sequences over 30 minutes. Record any unexpected state transitions.

Verification Checklist

Item Pass Criteria Verification Method
All five floor sensors detected Each FS1S–FS5S asserts at corresponding floor level Manual jog, observe LOGO! online
State machine reaches all 7 states M1–M7 markers cycle as expected LOGO!Soft Comfort online observation
No two motion outputs simultaneously Q1 and Q2 never both true Online monitor over 50 cycles
E-stop response time Outputs drop ≤ 100 ms Oscilloscope on Q1 with E-stop break
Final limits effective Contactor drops with PLC powered down Power cycle test
Door re-open on obstruction Photo-eye break reverses door Hand-held obstruction test
Dwell timer accurate 5.0 ± 0.2 s Stopwatch over 10 cycles
Direction lamp suppressed during door cycle IND_UP / IND_DN false during S3 / S4 / S5 Visual inspection

Troubleshooting Matrix

Symptom Likely Root Cause Diagnostic Step Remedy
Car does not move when button pressed State machine stuck in FAULT Check M7 (FAULT marker) in LOGO!Soft Comfort online Clear fault condition, press reset
Car overshoots floor Brake not set or sensor offset wrong Measure FS(n)S trigger distance from floor level Adjust sensor bracket 5–10 mm
Door reopens continuously Photo-eye misaligned or obstruction sensor stuck Observe I25 in online monitor Realign photo-eye, clean emitter / receiver
Floor display shows wrong number BCD-to-7-segment mapping error or wrong floor marker Compare M-current_floor to display input Correct mapping in FBD
Hall call registered but car ignores it Call queue logic reversed or bit set in wrong mask Observe M1 / M2 markers Verify mask assignment per button
Car moves in wrong direction Sensor wiring inverted Drive car up manually; verify FS2A triggers before FS2S when approaching Floor 2 from below Swap sensor wires
LOGO! reports "program too large" Function block count exceeds 400 Count blocks in LOGO!Soft Comfort Consolidate logic, use sub-programs via UDF
Ethernet programming port not found LOGO! 8 default IP 192.168.0.3 not in PC subnet PC ipconfig Set PC to 192.168.0.10 / 255.255.255.0
LOGO! date / time wrong after power cycle Battery not installed or dead Check battery holder Replace CR2032, set time
Expansion module not detected Bus terminator missing or wrong order Power cycle and watch LOGO! startup LED pattern Insert terminator on last module

FAQ

How many function blocks does a typical 5-floor elevator program consume on the LOGO! 8?

A complete design with state machine, call queue, position sensing, door logic, and message text runs 150–250 function blocks, well under the 400-block maximum of LOGO! 8 and LOGO! 8.3. If you exceed 400, consolidate the call-queue comparators into User-Defined Functions (UDFs) or migrate to a S7-1200.

Can the LOGO! 8 base unit handle a 5-floor elevator without expansion modules?

No. The base unit has 8 DI and 4 DO. Five cabin buttons plus motor control consume all of those. Hall calls, sensors, and indicators require at least two DM8 expansion modules (adds 8 DI and 8 DO), and a third module if you want door limits and fifth-floor sensors wired to discrete inputs.

What is the recommended scheduling policy for an educational elevator project?

Collect-and-go with direction lock. The car serves all calls in the current direction of travel before reversing. This is the simplest policy that guarantees no call is starved, is easy to implement with two bitmask shift registers, and is the policy taught in most PLC textbooks.

Do the final limit switches need to be wired to the PLC?

Yes for indication, no for function. The final limit switches must be wired in series with the contactor coil so they cut power even if the PLC fails. The PLC should also receive the same signal as an input for fault reporting and display, but the PLC must not be the only device capable of stopping the motor.

Which LOGO! variant should I buy, 12/24 V or 230 V?

Choose 12/24 V (6ED1052-1CC08-0BA1) if the motor contactor coils are 24 V DC and the buttons / sensors are 24 V. Choose 230 V (6ED1052-1MD08-0BA1) if the contactor coils are 230 V AC and the sensors are 230 V. Mixing voltages requires interposing relays; it is simpler to keep everything on the same voltage as the LOGO! supply.

Back to blog