Siemens LOGO! 8 PWM Output: Frequency Limits and Configuration

David Krause15 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

Pulse Width Modulation (PWM) on the Siemens LOGO! 8 logic module is implemented as a dedicated function block inside LOGO! Soft Comfort. The block toggles a digital output at a user-defined period and duty cycle, which lets the controller drive proportional loads such as DC pumps, solenoids, heaters, valves, and LED dimmers without an analog output card.

For pump-control applications with a fixed-frequency PWM input (for example, 70 Hz with a 13% to 85% duty-cycle window), three constraints dominate the design:

  1. Output stage type: relay outputs cannot switch faster than a few hertz because of contact bounce and mechanical wear. Transistor outputs are required.
  2. LOGO! cycle time: the achievable PWM frequency is bounded by the scan time of the entire program, not only by the block parameter.
  3. LOGO! Soft Comfort block resolution: the period field is entered in 1/100 s units (10 ms), so the maximum nominal frequency the editor exposes is 100 Hz. Whether the hardware can reach it is a separate question.

This reference walks through parameter setup, hardware selection, scan-time verification, PT100 feedback integration, and the fallback path when the LOGO! 8 cannot meet the load's frequency requirement.

Hardware Selection: Base Module and Expansion Outputs

The first decision is whether the base LOGO! 8 module already exposes a transistor output, or whether a digital output expansion module is required.

Module Order Number (example) Output Type PWM Usable
LOGO! 8 12/24RCE (relay) 6ED1052-1MD08-0BA1 4 x relay, 10 A No (mechanical)
LOGO! 8 12/24 (transistor) 6ED1052-1CC08-0BA1 4 x 24 V DC / 0.3 A Yes
LOGO! 8 230RCE (relay) 6ED1052-1FB08-0BA1 4 x relay No
DM8 24 expansion 6ED1055-1CB00-0BA2 4 x 24 V DC transistor Yes
DM8 230R expansion 6ED1055-1FB00-0BA2 4 x relay No
AM2 PT100 expansion 6ED1055-1MA00-0BA2 (verify current part) 2 x analog PT100 input Not output, but pairs with pump control
Confirm the exact order number against the current Siemens catalog (LOGO! 8.3 / 8.4 generation) before ordering. The base modules listed above are representative; Siemens ships multiple regional and feature variants (RCE, CE, E).

For any PWM application above ~2 Hz, the relay outputs are disqualified. Use a base LOGO! 8 with transistor outputs (12/24 or 24 V variant) or add a DM8 24 expansion module.

PWM Function Block Parameters in LOGO! Soft Comfort

Open the program in LOGO! Soft Comfort (V8.x or later, matching the LOGO! 8 firmware). Insert PWM from the Special Functions palette. The block exposes the following parameters:

Parameter Units / Range Meaning
Period (T) 0.01 s to 99.99 s (1/100 s resolution in the editor) Total cycle time of one PWM period
Duty Cycle (On portion of T) 0% to 100% (entered as 0 to 1000 in 1/1000 steps) Fraction of the period during which the output is high
Minimum Period 10 ms (T_min = 0.01 s) Software-imposed; corresponds to 100 Hz nominal

Conversion rules used internally by the editor:

  • Frequency f [Hz] = 1 / T [s]
  • T [s] = 1 / f [Hz]
  • Duty cycle entry 0 to 1000 represents 0% to 100% in 0.1% increments.

For a 70 Hz target the period is T = 1 / 70 = 0.0142857 s = 14.2857 ms. The editor's 10 ms resolution allows selecting 14 ms (≈71.4 Hz) or 15 ms (≈66.7 Hz) — neither hits 70 Hz exactly. This is the first place where the LOGO! 8 starts to diverge from a strict 70 Hz requirement.

Example Parameter Entries

Translate the pump spec (70 Hz, 13% to 85% duty cycle) into block inputs:

Period: 0.01 s (smallest editor value, equivalent to 100 Hz)
Duty min: 130 (13.0%)
Duty max: 850 (85.0%)

If the application allows approximating 70 Hz with 14 ms or 15 ms instead of 10 ms, recompute duty values in absolute milliseconds:

T = 14 ms
  13% duty = 0.13 * 14 ms = 1.82 ms
  85% duty = 0.85 * 14 ms = 11.9 ms

Frequency Limits: Editor Resolution vs Hardware Reality

Two independent ceilings constrain the achievable PWM frequency:

  1. Block input resolution. LOGO! Soft Comfort's PWM block does not accept a period smaller than 0.01 s. This defines a 100 Hz maximum in the editor.
  2. Transistor-output hardware ceiling. Per Siemens documentation for LOGO! 8 digital outputs, the transistor outputs support a switching frequency up to 10 Hz with full electrical load (24 V / 0.3 A). Above 10 Hz, the output stage starts to lose drive integrity depending on load, cable capacitance, and ambient temperature.
  3. Program cycle time. The maximum sustained switching rate is also bounded by the LOGO! 8 program scan time. Each additional function block extends the cycle. The PWM block cannot toggle faster than once per scan.

The combined practical ceiling is therefore the minimum of {100 Hz, 10 Hz hardware ceiling, 1 / scan time}. For any non-trivial program, 1 / scan time becomes the binding constraint well before the hardware limit.

A common misconception is that setting Period = 0.01 s (100 Hz) yields a 100 Hz output. The block parameter is a target; the actual edge-to-edge time is also governed by the LOGO! 8 cycle time and the output stage. Measure with an oscilloscope or counter input on a LOGO! analog/digital block to verify.

Measuring and Reducing LOGO! 8 Cycle Time

The cycle time is not a fixed number; it depends on the program length. Each function block adds work for the CPU. The official Siemens manual (LOGO! 8 system manual, available in the Siemens Industry Online Support portal) lists a per-block execution cost that should be summed for an upper bound.

Two practical approaches to estimate and reduce cycle time:

  1. Insert a cycle-time counter. Use a high-speed counter input or an unused digital input as a feedback channel and route the PWM output through an AND gate with itself to derive a single-tick-per-cycle signal. Read the period on a frequency input or display block. Detailed wiring examples are shown in the LOGO! 8 application examples (Siemens support entry ID 109751433 and related).
  2. Inspect LOGO! Soft Comfort simulation. The simulation panel shows the cycle time for the current program. Aim for cycle time < 10 ms if the goal is 70 Hz PWM; aim for < 100 ms for 10 Hz PWM.

Cycle-time reduction techniques:

  • Minimize the number of function blocks between the PWM block and the output terminal.
  • Replace sequential logic with parallel branches where possible.
  • Avoid long-running blocks such as up/down counters with large setpoints, PI controllers, and math blocks if the program can be restructured.
  • Offload PID/PT100 calculations to a separate scan group if the firmware version supports it.

Pump Application Configuration (70 Hz, 13% to 85%)

Given the constraints above, configure the system as follows for a 70 Hz PWM-controlled pump:

Step-by-Step

  1. Select a transistor base module or add DM8 24. Wire the pump's PWM input to a 24 V transistor output. Use a flyback diode if the pump input is inductive; many commercial pumps include internal protection, but verify.
  2. Wire the PT100 to AM2 RTD input. Map the PT100 input to an analog value block. Apply scaling if the pump expects a 0 to 100% duty cycle driven by temperature.
  3. Build the scaling logic. Use an Analog Threshold or Amplifier block to convert PT100 temperature to a duty-cycle target between 13% and 85% (e.g., 130 to 850 in the PWM block's 0 to 1000 input range).
  4. Configure the PWM block. Set Period to the smallest value your hardware can sustain. Begin with 0.01 s (100 Hz target) and verify with a scope. If the pump is unstable, step up to 0.014 s (≈71 Hz, close to 70 Hz) or 0.015 s (≈67 Hz) and re-check the pump.
  5. Clamp the duty cycle. Use Analog Multiplexer or comparator blocks to enforce a minimum of 130 (13%) and maximum of 850 (85%) on the PWM block's duty input. Duty cycles below 13% typically stall the pump; above 85% many centrifugal pumps cannot gain further flow.
  6. Add error handling. Route a digital flag from a watchdog timer to a relay output to disable the PWM output if the duty cycle stays outside the safe band for more than a few seconds. Pump error mode often presents as the PWM signal being absent or stuck low; a hardware watchdog catches both.
If the pump manufacturer states that lower PWM frequencies improve control quality, configure the LOGO! 8 to run at 50 Hz (T = 20 ms) or 33 Hz (T = 30 ms) and remap the duty cycle window accordingly. The 70 Hz value is not a hard requirement; it is the value the original installer selected after testing.

Integrating PT100 Temperature Feedback

The AM2 RTD (PT100) expansion module exposes 2 RTD inputs and supports both PT100 and PT1000 sensors in 2-wire or 3-wire connection. Wiring topology for 3-wire PT100:

  • Terminal 1: One end of the PT100 element
  • Terminal 2: Junction to the second wire (sense)
  • Terminal 3: Junction to the third wire (compensation)

In LOGO! Soft Comfort, the PT100 input appears as an analog value scaled in ohms or as a temperature in °C (depending on the block configuration). The block also reports open-circuit and short-circuit faults on the same analog value with a saturated high/low reading; route this to the watchdog described above.

Typical scaling chain for a pump where 25 °C = min duty (13%) and 80 °C = max duty (85%):

T_min = 25 °C  -> Duty = 130
T_max = 80 °C  -> Duty = 850
Slope m = (850 - 130) / (80 - 25) = 720 / 55 = 13.09 / °C
Offset b = 130 - 13.09 * 25 = -197.27
Duty = 13.09 * T_C - 197.27

Implement this with the Arithmetic block or Analog Amplifier + Addition blocks. Always clamp the result between 130 and 850 before passing it to the PWM duty input.

Alternatives When LOGO! Cannot Meet the Spec

If the LOGO! 8 cycle time cannot be reduced below the PWM period the pump requires, choose one of the following paths.

Option 1: External PWM Generator Module

Use a standalone PWM module (DIN-rail mount, 0 to 10 V or 4 to 20 mA input, PWM transistor output). Drive the PWM module's analog input from the LOGO! 8 analog output (AM2 AQ module, 0 to 10 V). This decouples PWM frequency from LOGO! cycle time and lets the LOGO! remain the system controller. The external PWM module handles edge generation at 70 Hz (or any other frequency) with sub-millisecond jitter.

Option 2: Arduino or Compatible Microcontroller as PWM Coprocessor

An Arduino Uno, Nano, or ESP32 can generate a stable 70 Hz PWM with 1 µs resolution using the analogWrite() function on a PWM-capable pin (Arduino Uno: 5, 6, 9, 10, 11 at ~490 Hz or ~980 Hz default; for 70 Hz use a custom timer configuration). Configure Arduino to:

  1. Receive a 0 to 10 V or 4 to 20 mA setpoint from the LOGO! 8 analog output.
  2. Convert the analog setpoint to a duty cycle in the 13% to 85% range.
  3. Generate the 70 Hz PWM on a digital output, optionally with an optocoupler between the Arduino ground and the pump to isolate ground loops.

Reference the official Arduino PWM guide for syntax and pin maps: Use PWM output with Arduino. For non-default frequencies, use the AVR Timer/Counter register configuration described in the ATmega328P datasheet.

Option 3: Step Up to a Siemens SIMATIC S7-1200

The S7-1200 with a signal module (SM) supports hardware-timed PWM up to 100 kHz depending on the output module and PTO/PWM configuration. The Pulse-width modulation (PWM) documentation for STEP 7 / TIA Portal describes the configuration flow for the ET 200MP distributed I/O. Use this option when higher output current, galvanic isolation, or frequency above 10 Hz is a hard requirement.

Verification and Commissioning

  1. Oscilloscope check. Connect a two-channel scope to the PWM output and a 1 Hz reference pulse. Verify period, duty cycle, rise/fall time, and absence of contact bounce (relay outputs would show bounce on every edge).
  2. Frequency counter check. Route the PWM signal back into a high-speed counter input on the LOGO! (e.g., DI1 to DI4 on a transistor base). Display the measured frequency on the LOGO! display and compare to the target.
  3. Duty cycle linearity check. Sweep the input analog value through its full range and record the measured duty cycle at 10 points. Confirm linearity, clamp behavior at 13% and 85%, and absence of dropout near the lower bound.
  4. PT100 open-circuit check. Disconnect the PT100 and verify that the PWM output either forces to a safe state (e.g., 50% duty) or trips a fault indicator on the LOGO! display.
  5. Thermal soak test. Run the loop with the actual pump for at least one thermal time constant of the system (typically 30 minutes for a small cooling loop) and verify temperature stability, pump oscillation, and absence of PWM-induced noise on the PT100 cable.

Troubleshooting Matrix

Symptom Likely Cause Diagnostic Remediation
PWM output reads 0 Hz on scope Output assigned to relay, not transistor Check block terminal assignment Reassign PWM to Q1 to Q4 on a transistor module
Output frequency lower than expected (e.g., 30 Hz instead of 70 Hz) Cycle time too long Read cycle time in simulation Reduce block count, restructure logic
Output jitters, unstable duty cycle Cycle time too long and PWM input changes mid-period Scope trigger on rising edge Add hysteresis on the duty input or use S7-1200
Pump stalls at low duty cycle Duty cycle dips below 13% due to rounding Measure duty at low end Clamp duty minimum to 130 (13%)
Pump runs away or overshoots setpoint Duty cycle too high or no clamp on PT100 input Check duty maximum Clamp duty maximum to 850 (85%) and PT100 maximum
LOGO! display shows E: PT100 sensor open Broken PT100 wire or wrong wiring mode (2-wire vs 3-wire) Inspect terminals Reconnect in 3-wire mode or replace sensor
PWM output appears inverted (active low) Pump expects sink input, LOGO! configured as source Check pump datasheet Add an inverter block or use a pull-up configuration
Relay output chatter, audible buzz, premature failure Using relay output for PWM Scope shows mechanical bounce Migrate to DM8 24 transistor expansion

PWM Signal Topology Diagram

0% 50% duty, T = 1/f 100% Period T f = 1/T (e.g., T = 14.3 ms → f = 70 Hz)

Key Specifications Reference

Item Value
LOGO! 8 PWM block minimum period 10 ms (100 Hz nominal max)
LOGO! 8 PWM block duty resolution 0.1% (0 to 1000 input range)
Transistor output switching ceiling 10 Hz with full load (per LOGO! 8 manual)
Transistor output current 0.3 A per channel, 24 V DC
Relay output current (RCE base) 10 A resistive, 3 A inductive
Pump PWM requirement (example) 70 Hz, 13% to 85% duty
PT100 measurement range -50 °C to +200 °C (AM2 RTD)
AM2 RTD resolution 0.25 °C typical

Field-Commissioning Checklist

  • Confirm firmware version of LOGO! 8 base module (V1.08.x or later recommended for full PWM stability on transistor outputs).
  • Verify expansion module seating: a DM8 24 not fully seated may switch but report diagnostic errors.
  • Load program from LOGO! Soft Comfort with PC cable or SD card; verify checksum.
  • Power up without load; verify base PWM signal on scope.
  • Connect load; verify pump ramp from 13% to 85% duty without stall or overshoot.
  • Record baseline cycle time, frequency, and duty cycle.
  • Validate PT100 reading against a reference thermometer at three points.
  • Document the configuration on the panel or in the project file.

Can the Siemens LOGO! 8 generate a true 70 Hz PWM signal with transistor outputs?

The PWM block accepts a 10 ms minimum period (100 Hz nominal), but the transistor-output hardware ceiling per the LOGO! 8 manual is 10 Hz with full electrical load, and the program cycle time further limits the actual switching rate. In practice, 70 Hz is achievable only if the program cycle time is well below 14 ms, which is unusual. Most users fall back to 10 Hz, 33 Hz, or 50 Hz, or use an external PWM module driven by the LOGO! 8 analog output.

Why do relay outputs fail for PWM, and how do I add transistor outputs?

Relay outputs have mechanical contacts with bounce times in the millisecond range and a lifetime derated by switching frequency. Even at 1 Hz the contact wear is significant. Add a DM8 24 expansion module (6ED1055-1CB00-0BA2) or select a LOGO! 8 base module with transistor outputs (12/24 variant).

How do I scale a PT100 temperature reading into a PWM duty cycle range?

Use an Analog Amplifier block followed by an Arithmetic or Offset block to convert the PT100 temperature to a duty-cycle integer between 130 and 850 (13% to 85%). Apply minimum and maximum clamps on the resulting value to prevent the duty cycle from leaving the pump's safe band. Confirm linearity by sweeping temperature and measuring duty cycle on an oscilloscope.

What happens if the LOGO! cycle time exceeds the PWM period?

The PWM output will not update every period; edges will be skipped or stretched, and the duty cycle will become unpredictable. The pump may stall, oscillate, or run at a fixed speed regardless of the duty-cycle setpoint. Use the LOGO! Soft Comfort simulation to read the cycle time and reduce block count, or move to an external PWM module.

Can I use an Arduino as a PWM coprocessor for the LOGO! 8?

Yes. Drive the Arduino's analog input from the LOGO! 8 AM2 AQ module (0 to 10 V), then call analogWrite() on a PWM-capable pin to generate the 70 Hz signal. See the official Arduino PWM guide for pin maps. Add an optocoupler or isolated DC-DC converter to prevent ground loops between the LOGO! and Arduino.

How do I migrate this application to a Siemens S7-1200 if the LOGO! 8 is too slow?

In TIA Portal, configure a digital output module as PWM (or PTO) under the device configuration, then use the PWM instruction in the user program to drive a pulse train with hardware timing. The TIA Portal PWM documentation covers the ET 200MP distributed I/O configuration. The S7-1200 supports PWM frequencies well above 70 Hz with sub-microsecond jitter.

Back to blog