Overview
The Siemens LOGO! logic module sits between a relay and a small PLC. In the LOGO! 7+ / 8 / 8.3 / 8.4 generation, the base unit exposes 8 or 16 digital I/O plus Ethernet on the RCE variants, but it is not engineered as a motion controller. There is no dedicated Pulse Train Output (PTO) channel, no hardware-accelerated stepper pulse generator, and no trapezoidal or S-curve profile engine. Engineers nevertheless use LOGO! to command external stepper drivers that already integrate indexer and amplifier — that is, drivers that accept a step / direction / enable interface from an external low-power logic source.
This reference describes the two practical paths to stepper control from a LOGO!:
- Native LOGO! pulse generation using the DM16 24 transistor expansion and the Asynchronous Pulse Generator (APG) or PWM function block. Maximum reliable step rate: 50 Hz.
- Hybrid topology where the LOGO! handles direction, enable, and interlocks, while an external microcontroller (Arduino, PIC, ESP32) generates the high-frequency step pulse train.
The reference also covers:
- Voltage-level shifting from 24 V PLC outputs to 5 V TTL driver inputs using a resistive divider
- DM16 24 output ratings (Siemens part number
6ED1 055-1AA00-0BA0) - Why the base unit's relay outputs cannot be used for stepping
- 5 kHz high-speed counter (HSC) input for low-bandwidth closed-loop positioning
- Step rate / motor RPM conversion formulas
- A practical switch-over to S7-1200 motion control when 50 Hz is insufficient
System Architecture
A stepper drive chain has three functional blocks:
- Indexer: produces the step pulse stream and direction signal. Historically a PC parallel port, a microcontroller, or a PLC PTO channel.
- Driver / amplifier: receives step / dir / enable, switches the two H-bridges that drive the two motor windings, and applies microstepping.
- Stepper motor: bipolar (4-wire) or unipolar (5/6-wire), with phase resistance, rated current, and step angle — typically 1.8° (200 full steps / rev).
The LOGO! can act as the indexer for low-speed applications, or as a supervisory controller that hands the indexer role to a separate MCU. The driver stage is always external because LOGO! outputs are 24 V signal-level only — they cannot source motor phase current.
In the hybrid topology, the LOGO! sets direction and enable; the external MCU (e.g., Arduino Uno with a TRINAMIC TMC2208 carrier) generates the step pulses at the required rate.
Prerequisites
Hardware
- LOGO! 7+ / 8 / 8.3 / 8.4 base module. A
12/24 RCEbase is fine as long as an expansion module provides the transistor outputs. -
DM16 24 transistor output module — Siemens part number
6ED1 055-1AA00-0BA0. 8 digital outputs, 24 V DC, 0.3 A per channel, sourcing (PNP). The module referred to in the source thread; it is required because the base unit's relay outputs cannot be PWM'd cleanly and the APG must drive a transistor output to produce a clean edge. - 24 V DC power supply sized for the LOGO!, DM16, and driver logic supply (typical 1.5–2 A budget).
- External stepper driver with step / dir / enable inputs at 5 V or 3.3 V TTL — for example a TRINAMIC TMC2208 / TMC2209 carrier, an Oriental Motor CVD series, or a Microchip integrated solution (see Microchip stepper motor drivers).
- Stepper motor sized to the driver (NEMA 17 with 1.5 A phase, NEMA 23 with 2.8 A phase are common).
- 1.5 kΩ resistors for the level-shifting network.
- 24 V and 5 V reference commons, optionally a 5 V regulator for the driver side of the divider.
Software
- LOGO! Soft Comfort V8.x (V8.4 recommended for firmware 1.81.x compatibility). The program is uploaded via Ethernet or micro-SD.
- For the hybrid path, the Arduino IDE 2.x with the AccelStepper library, or a Microchip MPLAB X project on a PIC18F device.
Hardware Wiring
The wiring below matches the reference implementation documented in field reports. The critical rule: Pulse+, Direction+, and Enable+ on the stepper driver are 5 V TTL (or 3.3 V) inputs. The DM16 24 outputs are 24 V PNP sourcing. A voltage divider is mandatory on every control line unless the driver input is optocoupler-isolated with its own internal current-limit resistor.
Pin Map
| LOGO! / DM16 terminal | Signal | Stepper driver terminal |
|---|---|---|
| DM16 Q1 (terminal 1Q0.0) | STEP+ | PUL+ |
| LOGO! Q1 (base) | DIR+ | DIR+ |
| LOGO! Q2 | ENA+ | ENA+ |
| DM16 0V (terminal M) | STEP− | PUL− |
| LOGO! 0V | DIR− / ENA− | DIR− / ENA− |
| 24 V DC (+) | 24 V supply | V+ (driver logic) |
| 24 V DC (−) | 0 V | GND (driver logic) |
Level Shifting Network
For each control line, install a 1.5 kΩ / 1.5 kΩ divider at the driver end:
The unloaded divider drops 24 V to:
V_out = 24 × R2 / (R1 + R2) = 24 × 1.5k / (1.5k + 1.5k) = 12 V
Why Not the Base Unit Relay Outputs?
The LOGO! 12/24 RCE base exposes 4 relay outputs rated 10 A. A relay cannot be cycled at the step rate because:
- Mechanical bounce: 1–5 ms contact chatter would translate to missed or extra steps.
- Operating life: 100,000 operations at full load — a 100 Hz step pulse would destroy the relay in under 17 minutes.
- PWM distortion: the LOGO! soft-PWM is implemented over the cycle time (typical 10–250 ms) and the relay cannot debounce.
Transistor outputs on the DM16 24 switch in < 100 µs and are rated for 0.3 A continuous — they can drive optocoupler LEDs directly.
Software Configuration in LOGO! Soft Comfort
Open LOGO! Soft Comfort and create a new circuit diagram. The minimum program has three elements:
- Asynchronous Pulse Generator (APG) — drives Q1 of the DM16 (the STEP+ line)
- Digital input or flag — drives Q1 of the base (the DIR+ line)
- Digital input or flag — drives Q2 of the base (the ENA+ line)
Asynchronous Pulse Generator — The 50 Hz Ceiling
The APG block is the only built-in LOGO! block that can produce a free-running pulse train with a programmable mark/space ratio. Locate it in the Special functions list (folder "Other" or "Pulse" depending on the version). The block has three settable parameters:
- TH (high time): minimum 10 ms in LOGO! firmware 1.81.x. Values below 10 ms are clipped.
- TL (low time): same 10 ms minimum.
- Output behavior: starts at high or low after power-up.
The maximum reliable step frequency is therefore:
f_max = 1 / (TH + TL) = 1 / (10 ms + 10 ms) = 50 Hz
At 50 Hz, with a 1.8° stepper (200 full steps / rev), the rotational speed is:
n = f × 60 / (steps_per_rev × microstepping)
Full step (µ = 1): n = 50 × 60 / 200 = 15 rpm
1/8 microstepping (1600 µsteps / rev): n = 50 × 60 / 1600 = 1.875 rpm
This is the firmware ceiling field engineers have documented. The 50 Hz ceiling is not a driver limitation; it is hard-coded in the LOGO! runtime as the minimum APG high/low time.
PWM Block — Why It Is Not a Substitute
The PWM function block (folder "Analog") produces a variable duty-cycle output at a fixed period. The period itself is settable from 10 ms to a higher value, but cannot be changed dynamically from the program in real time on older firmware. The PWM block is intended for thermal, lighting, or proportional valve control — not for stepper indexing, because:
- The output is a duty cycle, not a frequency. A 50% duty cycle at 100 Hz is not the same pulse train as a 50% duty cycle at 1 kHz.
- The driver expects a defined step pulse width (typically ≥ 1 µs). A PWM output held high for the full half-period would be interpreted as "step once, then wait".
PWM is therefore not a substitute for APG in stepper applications unless the driver is a fully integrated motion controller that interprets analog voltage as speed.
Direction and Enable Logic
- DIR+ (Q1 base): tie to a switch input or a flag. Toggle before enabling the step stream. Most drivers latch direction on the rising edge of the step pulse; a mid-motion change corrupts the count.
- ENA+ (Q2 base): tie to a "Run" interlock. When low, the driver removes power to the motor (holding torque off) — useful for emergency stop and manual override.
A safe sequencing macro:
[Run request] ──┐
AND ── ENA+ (Q2)
[Drive OK flag] ─┘
[Run request] AND [NOT(ESTOP)] ── enable APG via EN input
Wire the EN input of the APG to a flag that the program can de-assert. This pauses the pulse train cleanly without losing the internal counter.
Alternative: External Pulse Generator + LOGO! Supervisory Control
When 50 Hz is not enough, offload the step pulse generation to a microcontroller. The LOGO! retains supervisory control: it sets direction, enables the driver, monitors the home sensor and the end-of-travel limit, and can command start / stop.
Wiring
LOGO! Q1 (DIR+) ──▶ Driver DIR+
LOGO! Q2 (ENA+) ──▶ Driver ENA+
Arduino D9 ──▶ Driver PUL+ (drives at 1–20 kHz)
Arduino GND ──▶ Driver PUL− (and shared with LOGO! 0V)
Home sensor ──▶ LOGO! I1 (5 kHz HSC capable on I3/I4)
End limit ──▶ LOGO! I2
E-STOP ──▶ Driver ENA+ (in series with LOGO! Q2 via diode AND)
The Arduino runs a small sketch that receives direction and enable commands over a digital or serial link from the LOGO!, then accelerates to a target step rate using AccelStepper:
#include <AccelStepper.h>
AccelStepper motor(AccelStepper::DRIVER, 9, 8); // step pin, dir pin
void setup() {
motor.setMaxSpeed(2000); // steps per second
motor.setAcceleration(500); // steps/sec^2
pinMode(7, INPUT); // ENA from LOGO! (active low)
}
void loop() {
if (digitalRead(7) == LOW) {
motor.enableOutputs();
motor.run(); // pulses on pin 9
} else {
motor.disableOutputs();
}
}
The LOGO! sets the direction bit on a digital output and the Arduino reads it on pin 8. For closed-loop supervisory control, the LOGO! can run the loop in 10 ms cycles and adjust a "speed reference" PWM that the Arduino interprets as a percentage of max speed.
LOGO! High-Speed Counter for Positioning Feedback
LOGO! 7+ and later support up to 5 kHz high-speed counter (HSC) on inputs I3, I4, I5, I6 of the base unit. When the indexer is external (the Arduino in the previous section) the LOGO! can read a low-rate single-channel encoder on the HSC to verify that the correct number of steps has been issued — essentially an open-loop check, not a true closed-loop position controller.
In LOGO! Soft Comfort, insert an Up/Down Counter or High-Speed Counter block:
- Reference: I3 (5 kHz)
- Threshold: target step count
- Output: drive a flag that de-asserts the ENA line when the count is reached
Because the HSC samples at 5 kHz, a step stream faster than 5 kHz cannot be counted directly — divide it down with a prescaler, or use the Arduino's "done" digital output as the LOGO!'s "position reached" input instead.
Step Rate and Speed Conversion
| Symbol | Definition | Units |
|---|---|---|
| n | Motor speed | rpm |
| f_step | Step pulse frequency | Hz |
| s_rev | Steps per revolution (full-step count × microstepping) | steps / rev |
| θ | Step angle | degrees |
| µ | Microstepping factor (1, 2, 4, 8, 16, 32) | — |
Full-step count for a 1.8° motor: 360 / 1.8 = 200 steps / rev. Total steps / rev: s_rev = 200 × µ.
Step frequency for desired motor RPM:
f_step = n × s_rev / 60
Inverting to find motor RPM from step frequency:
n = 60 × f_step / s_rev
For the LOGO! APG ceiling f_step = 50 Hz and µ = 1 (full step):
n_max = 60 × 50 / 200 = 15 rpm
For µ = 8:
n_max = 60 × 50 / (200 × 8) = 1.875 rpm
The driver must accept a 50 Hz step pulse width of at least 10 ms (high time). Most drivers sample the step input at the rising edge and ignore the duty cycle as long as the high time exceeds 1 µs; the APG's 10 ms high time is more than adequate.
Why the LOGO! Hits the 50 Hz Wall
The LOGO! 8 cycle time is 10 ms (or 250 µs for a subset of math blocks). The APG high/low time parameter is internally quantized to a multiple of the cycle time. The minimum quantization is 10 ms. There is no firmware hack to lower this. The S7-1200 does not have this constraint: it has dedicated PTO (Pulse Train Output) hardware that runs at 100 kHz or higher depending on the CPU, and the motion control libraries support trapezoidal and jerk-limited S-curves.
For applications above 50 Hz (1.875 rpm at 1/8 µstep), step away from the LOGO! and use:
-
S7-200 SMART (
6ES7 288-1SR20-0AA0) — discontinued in non-Chinese markets but still available; PTO up to 100 kHz. - S7-1200 (CPU 1211C / 1212C / 1214C / 1215C) — PTO up to 100 kHz on most CPU variants, with Motion Control V5+ libraries for axis homing, jog, and absolute / relative moves.
The widely repeated field recommendation is correct: for proper motion control, use the S7-1200.
Verification
After wiring and program download, verify in this order:
- Power check: 24 V present on the DM16 V+ terminal; 5 V (or 3.3 V) present on the driver logic supply if the driver requires a separate supply.
- ENA behavior: with no program running, force ENA+ (Q2) low. The motor should be de-energized and free to rotate by hand.
- DIR behavior: with ENA+ high and the step generator paused, toggle DIR+ (Q1) and observe the driver's DIR LED or status display.
- Single-step test: configure the APG for TH = TL = 1000 ms (0.5 Hz). Each pulse should produce exactly one audible detent on a full-step driver.
- Run test: lower to TH = TL = 100 ms (5 Hz) and confirm smooth rotation in the commanded direction.
- Top-speed test: lower to TH = TL = 10 ms (50 Hz) and verify the motor still tracks without skipping steps. Measure with a tachometer or a strobe; the reading should match the calculated n.
- Endurance test: run for 5 minutes; motor should be warm but below its rated temperature (typically < 80 °C case).
- Stop test: assert E-STOP. The motor should de-energize within 10 ms (one APG cycle). The stepper will lose holding torque and may drift if a vertical load is present — add a mechanical brake for vertical axes.
Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
| Motor does not move at all | ENA not asserted; direction wrong; 24 V missing on driver logic | Check Q2 status in LOGO! online view; check driver V+ with DMM |
| Motor vibrates but does not rotate | Step pulse too short for driver sample window; voltage level too low | Increase TH to 50 ms; check divider output voltage with scope |
| Motor rotates in wrong direction | DIR polarity inverted | Invert the input to the base unit Q1 or swap A+/A− at the driver |
| Motor skips steps at high speed | Mechanical resonance; current limit too low | Add mechanical damping; raise driver current to rated phase current; enable microstepping |
| LOGO! APG output is constant high | TH set to 0 ms; firmware version does not support 10 ms minimum | Verify parameter; upgrade LOGO! firmware to ≥ 1.81 |
| Driver fault LED on | Overcurrent, overtemperature, or undervoltage | Check driver datasheet fault code; verify motor phase resistance is within driver range |
| LOGO! relay chatters at 50 Hz | Base unit outputs are relays, not the DM16 transistor outputs | Use DM16 24 expansion for the STEP+ line |
| Counter on LOGO! misses pulses | HSC input > 5 kHz | Reduce step rate or move counter to the Arduino |
| Position drift over time | Open-loop system; missed steps accumulate | Add home sensor and re-zero on every cycle; consider closed-loop stepper (NEMA 17 with integrated encoder) |
Field-Proven Caveats
- Vertical loads: a de-energized stepper has zero holding torque. If the LOGO! E-STOP de-asserts ENA+, the load will free-fall. Add a normally-on contactor in the mains path of an external 24 V regulator that holds the driver enabled, or fit a mechanical brake.
- Resonance: at step rates between 50 and 200 full steps / sec, most 1.8° steppers hit a mechanical resonance and stall. Use microstepping (1/8 or 1/16) to push the effective step rate above the resonance band.
- EMI: the step and direction lines radiate. Use shielded twisted pair, keep cable length under 3 m, and place a 100 nF X7R capacitor across the optocoupler LED on the driver side.
- E-STOP category: the LOGO! ENA+ is not a safety-rated output. To meet ISO 13849-1 PL d or higher, use a dedicated safety relay wired in series with the ENA+ line.
- 5 V reference: the divider's lower resistor must return to the driver's 5 V ground, not the LOGO!'s 24 V ground, unless the driver is a common-ground type. Confirm in the driver data sheet.
FAQ
Can I use the LOGO! 8 base unit alone, without a DM16, to drive a stepper?
No, not reliably. The base unit's relay outputs (on 12/24 RCE variants) or low-power transistor outputs (on 24 CE variants) cannot be cycled at the step rate needed for motion. The DM16 24 (0.3 A) is the minimum viable expansion. Some engineers report success with the LOGO! 24 CE transistor outputs (Q1–Q4) on the base, but these are also software-PWM limited and bounce on rising edges.
What is the actual maximum step rate from a LOGO! 8?
50 Hz, set by the 10 ms minimum high / low time on the Asynchronous Pulse Generator in firmware 1.81.x. This corresponds to 15 rpm on a 200 steps / rev motor with no microstepping, or 1.875 rpm with 1/8 microstepping.
Can I generate 5 kHz with the PWM block by setting a 0.2 ms period?
No. The PWM block on LOGO! has a 10 ms cycle resolution. The minimum PWM period is 10 ms (100 Hz). Use the APG if you need a regular pulse train.
My driver needs 5 V on the STEP input, but the LOGO! DM16 output is 24 V. Is a single resistor enough?
Only if the driver input is optocoupler-isolated with its own internal current-limiting resistor. For a hard 5 V CMOS input, use a resistive divider (10 kΩ / 3.3 kΩ for example) and a 5.1 V Zener clamp to ground to prevent overvoltage.
Can I run the LOGO! in closed-loop position with a stepper?
Crude closed-loop only. Use a low-rate (≤ 5 kHz) incremental encoder on the LOGO! HSC inputs (I3, I4) and re-issue missed steps via the APG when the count diverges from the target. True closed-loop motion control requires an S7-1200 with a servo drive or a closed-loop stepper module.
Why not just use an S7-1200 for this?
For most stepper applications, you should. The S7-1200 has dedicated PTO channels at 100 kHz or higher, full Motion Control libraries, and S-curve profiling. The LOGO! is appropriate when the application is slow (sub-15 rpm), the budget is tight, the panel space is limited, and the engineer already has LOGO! code for the surrounding machine.
Does the DM16 24 need a separate 24 V supply?
Yes. The DM16 24 requires 24 V DC at terminal L+ and M, separate from (but paralleled to) the LOGO! base supply. Current draw is small (~30 mA idle, up to 2.4 A if all 8 outputs are loaded to 0.3 A). Use a 5 A supply to allow margin.