Siemens LOGO! Flywheel Speed Measurement with Inductive Sensor

David Krause11 min read
Sensor IntegrationSiemensTutorial / 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

Siemens LOGO! Flywheel Speed Measurement with Inductive Sensor

This engineering reference covers the end-to-end procedure for measuring the rotational speed of a toothed flywheel using a Siemens LOGO! logic module. The technique generalises to any pulse-train shaft-speed application: pump impellers, encoder wheels, conveyor rollers, centrifuge bowls and small motor shafts. The article focuses on the LOGO! 8 generation (6ED1052 family), which is the only platform that provides high-speed digital inputs up to 5 kHz required for measuring more than a few hundred RPM with single-tooth resolution.

Critical constraint: The relay-output LOGO! variants (LOGO! 12/24 RCEo, LOGO! 230 RCE, LOGO! 24 RCE) do not offer high-speed digital inputs on all terminals. Verify the part number before purchase; see the compatibility table below.

1. Measurement Principle

A toothed flywheel acts as a passive pulse generator. Each tooth passing the sensor face produces one edge. With n teeth on the wheel, the relationship between pulse frequency f and rotational speed N is:

f (Hz) = n × N / 60 N (RPM) = 60 × f / n f = pulse frequency N = rotational speed [RPM] n = number of teeth

Design example: a flywheel spinning at 3 000 RPM with a single tooth produces f = 1 × 3000 / 60 = 50 Hz. The same wheel with 60 teeth produces 3 000 Hz. To stay below the LOGO! hard limit of 5 kHz on its high-speed inputs, choose a tooth count and operating range that produces at most ~4 kHz. For higher shaft speeds add an external frequency divider, or switch to a S7-1200 with its high-speed counter onboard.

2. Prerequisites

2.1 Hardware

  • Siemens LOGO! 8 base module with high-speed inputs (see Section 4).
  • 24 V DC power supply, 2 A minimum (LOGO! PSU 24 V / 1.3 A, 6EP1331-1SH03, or equivalent).
  • PNP (sourcing) 3-wire inductive proximity sensor, 24 V DC, 200 mA short-circuit protected, shielded cable, M12 or M18 housing.
  • Sensor target material must be ferrous (steel). Aluminium and austenitic stainless produce little or no eddy-current change; use a target lug of mild steel welded to the flywheel if the wheel itself is non-ferrous.
  • LOGO! Soft Comfort programming cable (Ethernet for LOGO! 8, 6ED1057-1BA00-0AB0, or direct RJ45 patch cable).
  • LOGO! TDE text display (optional, 6ED1055-4MH00-0BA0) or PC with Web Server access.

2.2 Software

3. Sensor Selection

Sensor family Output Suitable? Notes
SICK IME12-xxxN (NPN, dark-on) Sink No LOGO! 24 V inputs source current; NPN devices will not pull the input low to 0 V reliably.
SICK IME12-xxxP (PNP, light-on) Source Yes Standard choice; 200 mA short-circuit proof.
IFM IE5-1808-ZO PNP, NO Yes 4 mm flush, 200 mA; very common on flywheels.
Pepperl+Fuchs NBB2-8GM30-E2 PNP, NO Yes 2 mm flush; compact housing fits tight spaces.
Capacitive sensor (e.g. SICK CM12) PNP Yes (alternative) Detects non-metallic targets; sensitive to humidity and dust.
Optical retroreflective / fork sensor PNP Yes (clean env.) Use only when the wheel has a defined contrasting mark.

Mounting distance must remain within the sensor's rated switching distance sn (typically 1.0 × sn ≤ gap ≤ 0.81 × sn for reliable detection on a flat tooth). Verify by rotating the wheel by hand while watching the sensor's LED indicator.

4. Selecting the Correct LOGO! Module

High-speed digital inputs on LOGO! 8 are limited to specific terminals, hardware revision, and power class. The table below is the definitive list for the current product family.

Part Number Description High-speed inputs (max freq.)
6ED1052-1CC08-0BA1 LOGO! 24 CE (transistor out) I3, I4, I5, I6 up to 5 kHz
6ED1052-1MD08-0BA1 LOGO! 12/24 RCE (relay out) I1, I2, I3, I4 up to 5 kHz
6ED1052-2CC08-0BA1 LOGO! 24 CEo (no display) I3–I6 up to 5 kHz
6ED1052-2MD08-0BA1 LOGO! 12/24 RCEo (no display) I1–I4 up to 5 kHz
6ED1052-1FB08-0BA1 LOGO! 230 RCE (relay, 230 V AC in) No high-speed inputs (max 4 Hz)
6ED1052-1HB08-0BA1 LOGO! 24 RCE (relay out, 24 V) No high-speed inputs (max 4 Hz)
Field note: Earlier LOGO! 6 (6ED1052-1xxxx-0BA0) and LOGO! 7 generations also support 5 kHz on the same input pairs. Legacy modules firmware < FS:04 will not be recognised by LOGO! Soft Comfort V8.x and must be upgraded before download.

Reference: LOGO! 8 System Manual (entry ID 109751654), chapter 2.3 "Wiring the inputs".

5. Wiring

Wiring Diagram — 24V CE base, PNP inductive sensor 24V PSU (+24 V) ──► Sensor Pin 1 (BN) Sensor Pin 4 (BK) ──► LOGO! terminal I3 Sensor Pin 3 (BU) ──► PSU 0V / LOGO! M Shield drain ──► PSU 0V terminal (single point) In LOGO! Soft Comfort: - Set I3 function to "Counter" or "High-Speed Counter". - Enable "Frequency measurement" on the counter block.

Use a twisted three-core shielded cable (e.g. Lapp UNITRONIC LiYCY 3×0.34 mm²) and ground the shield at the cabinet end only. Run the signal cable in a separate conduit at least 100 mm from VFD motor cables. A maximum cable length of 50 m keeps capacitive loading low; for runs beyond 50 m, fit a sensor with 4 mA … 20 mA analogue output and use a LOGO! AM2 analogue module instead.

6. LOGO! Soft Comfort Configuration

  1. Open LOGO! Soft Comfort V8.4, create a new network project, and select LOGO! 24 CE / 6ED1052-1CC08-0BA1 as the target.
  2. Drag a Counter function block (Co) from the Special Functions palette onto the network.
  3. Configure the block:
Parameter Setting Effect
Input source I3 Pulse input on high-speed terminal.
On threshold 1 Count every rising edge.
Reset input M25 (1 s pulse from T01) Reset at one-second window boundary.
Counter type High-speed Activates 5 kHz hardware path.
Output Cnt (integer) Holds pulses counted in last 1 s window.
  1. Insert an On-delay / Off-delay block configured as a 1 s pulse generator (use the system clock M1 or a Pulse Generator Bl) to drive the counter reset. This converts the count to a frequency in Hz.
  2. Insert an Arithmetic Instruction (AI) block to compute RPM:

    AI: B = A × 60 / n

    where A is the counter value (Hz), n is the tooth count stored in a constant block, and B becomes the RPM value.
  3. Send the RPM word to the Display function block so it appears on the LOGO! onboard LCD / LOGO! TDE / Web Server dashboard.

For multi-axle applications or RPM values above 5 000 RPM, switch to the Frequency Counter block (Fc) introduced in LOGO! Soft Comfort V8.2. The Fc block directly outputs frequency with 0.01 Hz resolution and handles up to 5 kHz on the same terminals.

7. Frequency-to-RPM Calculation Example

Assume a 12-tooth flywheel in a packaging-machine seeder. The expected operating range is 200 … 1 800 RPM. Pulse frequency range:

f_min = 12 × 200 / 60 = 40 Hz f_max = 12 × 1800 / 60 = 360 Hz

360 Hz is comfortably below the 5 kHz hardware limit and well above the 4 Hz ceiling of standard inputs, so the high-speed input path is mandatory and the input pair I3 … I6 is correctly selected. The arithmetic block constant for n = 12 is set as a parameter block in LOGO! Soft Comfort so the program can be reused for other wheels without editing the LSC file.

8. Display, Logging, and Web Server

On the LOGO! 8 base LCD, the built-in display shows up to four values per page. Drag the Display block and select the AI output (RPM) and a text label like "FW Spd:". On the LOGO! TDE (6ED1055-4MH00-0BA0) you can plot a bar graph and set amber/red alarm thresholds using the same Display function block.

The Web Server (enabled by selecting LOGO! → Web Server Access in LOGO! Soft Comfort or directly on the device menu) exposes a live dashboard at http://<LOGO_IP>. You can additionally enable Data Logging on the LOGO! 8 SD card slot: the LOGO! writes CSV files at the configured sample interval (min 1 s). Pull the SD card and post-process in Excel, MATLAB, or Python (pandas.read_csv).

Reference: LOGO! 8 System Manual, chapter 7 "LOGO! functions" and chapter 11 "Web Server".

9. Verification Procedure

  1. Power up the LOGO! and load the program via Ethernet.
  2. Hold the flywheel stationary and confirm the sensor LED is OFF; the LOGO! counter should read 0.
  3. Rotate the wheel by one full turn by hand. The counter should increment by exactly n (the tooth count). This proves wiring polarity and sensitivity.
  4. Drive the wheel from a known reference (e.g. a 50 Hz line-frequency AC motor at 1 500 RPM) and compare the LOGO! reading with a handheld tachometer (DT-2234C or similar). Tolerance should be within ±2 RPM at 1 500 RPM.
  5. Run the wheel at maximum operating speed and log 60 s of data. Verify the CSV file in the SD card slot and check the data plot for noise, dropouts, or double-counting.
  6. Inject a square-wave test signal with a function generator at 1 kHz, 24 V amplitude, into the same terminal. The LOGO! display should read 1 000 Hz ± 0.5 Hz. This proves the input path is operating at full bandwidth.

10. Troubleshooting Matrix

Symptom Probable cause Action
Counter reads 0 even when wheel spins Sensor is NPN on a PNP-only input, or polarity reversed (BK and BN swapped) Verify PNP part number; measure voltage between I3 and M with the sensor powered: should be 24 V when tooth is present.
Counter increments only at low speed, freezes at high speed Sensor wired to a standard (4 Hz) input terminal Move wire to I3 … I6 (24 CE) or I1 … I4 (12/24 RCE); recheck the part number.
Reading is exactly 4 Hz regardless of speed Firmware bug in pre-FS:02 modules; input de-bounce active Upgrade firmware to FS:05 or later via LOGO! Soft Comfort → Tools → Firmware Update.
Reading is half or double the expected value Wrong tooth-count constant, or double-edge triggering on long dwell tooth Check that the wheel has uniform tooth-to-gap ratio. Use a logic analyser on I3 to confirm one edge per tooth.
Reading drifts up over time Counter not reset each measurement window Verify the 1 s pulse generator is firing the counter reset; check the reset flag bit in the online monitor.
Display flickers / unstable last digit Sampling window too short or sensor jitter at low speed Increase window to 2 s, or add a moving-average filter block in LOGO! Soft Comfort.
No communication from PC to LOGO! Wrong subnet or Ethernet cable defect Ping the LOGO! default address 192.168.0.3 from the PC. Set PC adapter to the same /24 range if needed.
LOGO! displays "Memory card missing" or "Program invalid" SD card formatted as NTFS, or program created for older firmware Re-format SD card FAT32 with 32 KB allocation unit size; re-save program as current LSC version.

11. Scaling Beyond 5 kHz

If the design calls for shaft speeds above 5 000 RPM with more than 50 teeth, the LOGO! 5 kHz ceiling is reached. Two alternatives are common in industrial retrofits:

  • External prescaler. A CD4018 divide-by-N stage in front of the LOGO! input. Divide by 10 for a 50 kHz effective ceiling. Trade-off is a 10× worse resolution at low speed.
  • Upgrade to a SIMATIC S7-1200 CPU 1215C DC/DC/DC (6ES7215-1AG40-0XB0). The onboard high-speed counter accepts up to 200 kHz single-phase on Ia.0/Ia.1. The STEP 7 program uses the CTRL_HSC instruction and a frequency measurement ladder. Reference: S7-1200 System Manual.

12. Field Commissioning Checklist

  • Sensor PNP, 24 V DC, snubbed output → verified.
  • Shield grounded at cabinet end only → verified.
  • LOGO! part number supports 5 kHz on chosen terminal → verified.
  • Counter block parameter “High speed” ticked in Soft Comfort → verified.
  • Tooth count constant matches physical wheel → verified.
  • Hand tachometer cross-check within ±2 % → verified.
  • SD-card data log continuous for 60 s → verified.
  • Web Server dashboard accessible from plant LAN → verified.

13. Frequently Asked Questions

Can the standard (relay) LOGO! measure a flywheel speed?

No. The relay-output LOGO! modules (230 RCE, 24 RCE, 12/24 RCE with relay outputs) limit digital inputs to 4 Hz, so they cannot resolve a typical shaft speed. Use a transistor-output LOGO! 24 CE (6ED1052-1CC08-0BA1) or 12/24 RCE (6ED1052-1MD08-0BA1), both of which provide 5 kHz on specific terminals.

Which terminal accepts a 5 kHz signal on the LOGO! 24 CE?

Terminals I3, I4, I5, I6 on the LOGO! 24 CE base module accept pulses up to 5 kHz. Terminals I1 and I2 are limited to 4 Hz. For the LOGO! 12/24 RCE the high-speed terminals are I1 … I4.

Do I need a special inductive sensor for a toothed wheel?

Use a standard 3-wire PNP inductive sensor (sourcing) rated for the target material (mild steel). For aluminium or austenitic stainless targets, install a steel target lug on the wheel. A 4 mm rated switch distance sensor (e.g. IFM IE5-1808) is the typical choice.

How do I display the live RPM value?

Use the LOGO! onboard LCD, the optional LOGO! TDE text display (6ED1055-4MH00-0BA0), or activate the integrated Web Server in LOGO! Soft Comfort V8.x. The Web Server dashboard runs on any browser at the LOGO! IP address and provides a live RPM indicator plus a data-logging download.

What is the maximum RPM I can measure with one tooth and the LOGO! 5 kHz input?

5 000 Hz × 60 = 300 000 RPM for a single-tooth wheel, but mechanical limits and sensor bandwidth usually cap shaft speed well below this. Practical industrial applications sit at 60 … 10 000 RPM with 1 … 60 teeth, which keeps the pulse frequency between 1 Hz and 10 kHz.

Can I log RPM to the SD card for trend analysis?

Yes. In LOGO! Soft Comfort V8.3 or later, enable Data Logging on the SD card and assign the AI output block (RPM value) to the log. The LOGO! writes a CSV file at the sample rate you set (1 s minimum). Pop the SD card into a PC and open the file in Excel or any text editor for trend analysis.

Back to blog