Siemens LOGO!Soft V8 CTU Counter for Batch Mixer PLC

David Krause12 min read
PLC HardwareSiemensTutorial / 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

Implementing a batch mixer control program on a Siemens LOGO! 8 using LOGO!Soft Comfort V8 requires three functional building blocks that do not have a one-to-one graphical match with the Allen-Bradley RSLogix 500 / LogixPro blocks used in most textbook coursework:

  • B5 — Pulse generator (German: Impulsgeber) used to emulate the open-collector pulse output of a flow meter.
  • B6 — Up/down counter (German: Vor-/Rückwärtszähler) that accumulates flow-meter pulses and is the LOGO! equivalent of the RSLogix CTU instruction.
  • Threshold comparators / digital flags used as the high/low count indicator that replaces the mechanical float switches on the mixer's tank.

The original Allen-Bradley solution uses B5: pulse generator and B6: up/down counter blocks; the LOGO!Soft Comfort V8 toolbox exposes the same functionality, but the icons, parameter dialog, and on-screen help are deliberately compact. The blocks live in the same FBD library tree, so once you locate one, the other is next to it.

Engineering note: The LOGO!Soft Comfort V8 "Up/down counter" block is the canonical Siemens substitute for the RSLogix CTU/Counter Up instruction. It supports a configurable count range, separate reset input, and direction input (count up / count down / count up with direction bit). Use the count-up configuration when the flow meter only generates pulses in one direction.

Prerequisites

Item Specification Notes
Programming software LOGO!Soft Comfort V8.x (V8.0 base, V8.4.1 update recommended) Order number 6ED1058-0BA08-0YA1
Firmware on LOGO! 8 base module FS04 or higher (matches LOGO!Soft Comfort V8.4) Update via SiePortal current firmware bundle
Demo / trial LOGO!Soft Comfort V8.4 Demo Siemens Support entry 109826921
Target hardware LOGO! 8 BM (e.g. 6ED1052-1MD08-0BA1) or LOGO! 8.3 BM with Ethernet Counter block requires digital inputs on BM or expansion DM
Reference manual LOGO! Soft Comfort V8.4 Online Help Press F1 on any selected block for context-sensitive help
If LOGO!Soft Comfort V8.3 has "stopped working" on Windows 10/11 after a cumulative update, repair the installation through "Apps & Features → LOGO!Soft Comfort → Modify" and re-apply the V8.4.1 service pack before continuing — a corrupted cache produces silent loss of the toolbox icons described below. Reference thread pattern: SiePortal V8.3 crash report.

Where the CTU / Up-Down Counter Lives in LOGO!Soft Comfort V8

The block the source question is looking for is the Up/down counter. In every screenshot, it is grouped with the other counters under the "Special functions" (Sonderfunktionen) section of the FBD toolbox. The default block number ranges from B1 onward; a freshly inserted counter will appear as B6 if four prior special-function blocks already exist, which matches the B6 reference from the Allen-Bradley solution.

  1. Open the LOGO!Soft Comfort V8 project editor.
  2. Switch to the FBD editor mode (View → FBD). Ladder view is not supported in V8 — LOGO!Soft Comfort uses FBD exclusively.
  3. In the right-hand toolbox, click the SF tab (Special Functions).
  4. Locate Counter group → drag the Up/Down Counter symbol into the editing canvas.
  5. With the block selected, press F1 to open the integrated Siemens help — this is the same manual shipped with the MLFB, no external download needed.
If you are migrating from RSLogix, do not search the toolbox for "CTU". The RSLogix terminology maps to LOGO! as follows: CTU = Up/down counter with direction input = up; CTD = Up/down counter with direction input = down; RES of the counter is wired to the LOGO! counter's R (reset) input. See the LOGO! Soft Comfort V8.4 manual section "Special functions — Up/Down counter" for the full I/O list.

Replicating a Flow Meter with the Pulse Generator

Two interpretations of "replicate a flow meter" are valid; choose deliberately:

  • Generate pulses (simulate a flow-meter output): use the LOGO! Pulse generator block (B5). This block emits a periodic 1/0 pulse train on its output (Q). It replaces a hardware pulse generator for bench testing.
  • Read pulses from a real flow meter: wire the open-collector pulse output of the meter to a fast digital input on the LOGO! 8 BM (I1–I4 on the base module support up to 5 kHz counting). No software block is required to read the pulses; the pulses are routed into the counter's Cnt input directly.

The textbook batch mixer project needs both: the pulse generator to drive the simulation, and the counter to totalise the pulses.

Step 1 — Configure the Pulse Generator (B5)

The block diagram of a pulse generator wired into the counter looks like this:

[ Pulse Generator (B5) ]──Q──▶[ Up/Down Counter (B6) ]──Cnt

Recommended pulse-generator parameters for a flow-meter simulation:

Parameter Symbol Recommended value Engineering rationale
Time base TB Seconds (1 s) 1 pulse per second is visible in simulation without flooding the display
Pulse width W 50 % duty Symmetrical 0.5 s high / 0.5 s low; matches most turbine flow-meter outputs
Pulse/pause TH, TL TH = TL = 500 ms Editable on the LOGO! display in run mode
Retentive / No (R = 0) Resets on power cycle; matches meter behaviour after a power loss

Step 2 — Configure the Up/Down Counter (B6)

The up/down counter block has the following inputs and outputs in LOGO!Soft Comfort V8:

Pin Function Connection in batch mixer
Cnt Count pulse input From pulse generator Q (B5) or digital input wired to flow meter
Dir Direction: 0 = up, 1 = down Constant 0 (logic low) — count only upwards
R Reset to zero Bound to mixer drain-valve proven-open (recycle / refill cycle)
On On-threshold reached flag Wired to pump-off logic (tank full)
Off Off-threshold reached flag Wired to pump-on logic (tank low)
Q Counter value output (integer) Optional — connect to LOGO! display message or analogue flag

Set the threshold parameters inside the counter block:

  • On threshold = 10 pulses — equivalent to the tank "full" float switch in the original Allen-Bradley ladder.
  • Off threshold = 1 pulse — equivalent to the tank "low" float switch. Below 1, the block clamps at 0.
  • Start value = 0 so the counter begins empty every cycle.
Logic semantics — read carefully: In the LOGO! up/down counter, the On flag becomes high when the count reaches the On threshold, and the Off flag becomes high when the count drops to or below the Off threshold. So "On = 10" behaves like "tank full" and "Off = 1" behaves like "tank low" — exactly mirroring the RSLogix high/low level sensor pair that the original post is replacing.

Building the Batch Mixer FBD Network

The complete network, expanded from the source's B5/B6 minimum, is:

  1. Network 1 — Flow simulation: Pulse generator (B5) drives the count input of the up/down counter (B6).
  2. Network 2 — Mixer fill pump: Pump contactor is energised when B6.Off = 1 (tank low). Latches via RS flip-flop if a true hand-off-auto is required; otherwise tie directly to the Off flag.
  3. Network 3 — Mixer high-level trip: Pump contactor is dropped when B6.On = 1 (tank full). This is implemented with a NAND gate or an AND-with-NOT over the pump output to break the seal-in.
  4. Network 4 — Drain valve / counter reset: When the operator pushes the "Drain & refill" pushbutton, the drain valve opens and the counter's R input is asserted simultaneously, returning the count to zero.
  5. Network 5 — Display message: Use a LOGO! display text block to show the current counter value; this gives the student visual feedback equivalent to a tank-level bar graph.

Concrete Block Diagram (FBD)

 +-----------+      +-------------------+      +-----------------+
 | B5: Pulse |──Q──▶| B6: Up/Down Cnt   |──On──▶| NAND ──▶ Pump   |
 | Generator |      | On=10, Off=1      |      | (with Off pin   |
 +-----------+      |                   |──Off─▶|  inverted)      |
                    +-------------------+      +-----------------+
                            ▲
                            │ R (reset)
                            │
                    +-------------------+
                    | Drain pushbutton  |
                    +-------------------+

Step-by-Step Implementation in LOGO!Soft Comfort V8

  1. Create the project. File → New → "LOGO! 8" project. Give it a name (e.g., BatchMixer_B5B6.lsc).
  2. Pick the FBD view. The default is FBD in V8; if your installation opens ladder, change it via View → FBD.
  3. Place B5 — Pulse generator. Drag "Pulse generator" from the SF toolbox. Double-click to open the parameter dialog and set TH = 00:00:00.500 and TL = 00:00:00.500 for a 1 Hz pulse.
  4. Place B6 — Up/down counter. Drag the counter next to B5. Double-click and enter On = 10, Off = 1, start value = 0.
  5. Wire B5.Q to B6.Cnt. Click the Q output pin on B5, then click the Cnt input pin on B6. A green link appears.
  6. Constant on the Dir input. Drag a "Constant" from the Co (Constants) toolbox onto B6.Dir and set its value to 0 (count up only).
  7. Reset input. Place a digital input flag (I1 or an F flag for a simulation button) on B6.R. This is the refill reset.
  8. Output flag for On-threshold. Click B6.On and route it to a digital marker Q1 (pump). Or, more safely, route to a NAND gate together with the manual start so the seal-in breaks at high level.
  9. Output flag for Off-threshold. Route B6.Off to the pump-on permissive (or to the same NAND inversion shown above).
  10. Simulate. Press F3 (Start simulation) or click the play icon. The counter should increment once per second, the On flag should rise at count 10, and the Off flag should rise at count 1 after reset.
  11. Download to the LOGO! 8 BM. PC → LOGO! → Ethernet → Transfer. Select "Run LOGO!".

Verification

Before declaring the program complete, run the following acceptance test on the simulator:

Step Action Expected result Pass criterion
1 Power on with no inputs Counter = 0, Off = 1 (because 0 ≤ 1) Pump turns ON
2 Allow pulse generator to run for 10 s Counter steps 1→10 At count 10, On flag = 1, pump turns OFF
3 Press refill reset (R = 1) Counter returns to 0 Off flag = 1, pump turns ON again
4 Set Dir input to 1 during count Counter decrements Confirms direction control is wired
5 Disconnect PC → LOGO! link mid-cycle Counter retains its value (if retentivity enabled) Retentivity check passes

Use the integrated Tools → Online test in LOGO!Soft Comfort V8 to step through the program and watch every flag in real time without breaking the scan.

Parameter Cheat Sheet

For quick reference when porting between RSLogix and LOGO!Soft Comfort V8:

RSLogix 500 / LogixPro LOGO!Soft Comfort V8 equivalent Notes
CTU — Count Up Up/Down Counter with Dir = 0 Same accumulator, reset on R = 1
CTD — Count Down Up/Down Counter with Dir = 1 Single block handles both directions
RES — Counter reset R input on counter block Level-triggered
.CU / .CD done bit On / Off flag outputs Threshold-driven, not single-shot
.ACC — accumulator value Q output (integer tag) Exposed for display / messaging
High-level float On-threshold comparator No wiring needed if inside counter
Low-level float Off-threshold comparator Same block, second threshold
Pulse generator (one-shot) Pulse generator SF block Continuous by default; set infinite run

Troubleshooting Matrix

Symptom Likely cause Fix
Up/down counter block is greyed out / missing in the toolbox Project opened with the wrong device class (e.g., LOGO! 6) File → Properties → Hardware → switch to LOGO! 8 BM (e.g., 0BA8)
Counter never increments Pulse generator TH/TL both zero (output stuck low) Open B5 parameter dialog, set TH and TL ≥ 50 ms
On flag never rises On threshold set above available count range or memory layout corrupted Verify On = 10, save project, re-simulate
Simulation runs but download fails LOGO! 8 base module firmware < FS04 Update firmware via SiePortal firmware bundle
LOGO!Soft Comfort V8.3 "stopped working" on launch Windows App-V / .NET cache corruption Repair install + apply V8.4.1 service pack; see SiePortal V8.3 crash entry
Help (F1) opens a blank page Online help not installed (only run-time present) Reinstall LOGO!Soft Comfort V8 with "Custom → install HELP files"
Counter jumps by 2 per pulse Wired to a noisy mechanical input without debounce Enable the digital input's filter or insert a threshold switch before the Cnt pin
Counter resets spontaneously R input wired to a toggling flag Trace R pin with Online test; replace with a stable edge-triggered flag
Pump chatters at threshold boundary On and Off thresholds too close together Maintain a hysteresis gap: On = 10, Off = 1 (9-step gap) is the recommended minimum

Performance & Timing Considerations

The LOGO! 8 base module executes its program in a deterministic scan cycle. With a typical mix of 30–50 blocks the scan time is ~1–4 ms. The pulse generator block is software-emulated, not a hardware PWM channel, so its accuracy is bounded by the scan period. For metering applications requiring better than ±2 % pulse timing, use:

  • Fast counter mode on LOGO! 8.3 / 8.4 BM digital inputs I1–I4 (up to 5 kHz) wired directly to the counter Cnt input.
  • External hardware pulse source (e.g., Siemens SITRANS F M MAG 5000) for the simulation instead of the software pulse generator.

Migration Notes: From RSLogix to LOGO!Soft Comfort V8

The source's frustration — "RSLogix seems easier to use than the Siemens software" — is a common observation that comes from the I/O numbering convention rather than from a functional gap. RSLogix uses file-style addressing (B5:1, B6:2), while LOGO! uses instance numbers (B5, B6). The mapping is one-to-one; only the visual idiom differs. Two practical adjustments:

  1. Bookmark F1. The integrated help on every LOGO!Soft Comfort V8 block is the equivalent of the RSLogix instruction tooltip. Press F1 once, leave the help window open, and refer to it as you wire.
  2. Work in FBD. LOGO!Soft Comfort V8 dropped native ladder logic; if your coursework expects ladder, plan to convert it manually or use LOGO!Soft Comfort's "Ladder view" plugin (only available on legacy V7).

Related Resources

Where is the CTU counter in LOGO!Soft Comfort V8?

The CTU equivalent is the Up/down counter special function block, located in the SF toolbox. Drag it onto the FBD canvas, double-click, and set On and Off thresholds. With Dir = 0 it behaves exactly like an RSLogix CTU.

How do I replicate a flow meter in LOGO!Soft Comfort?

Use the Pulse generator (B5) block to generate a continuous pulse train, then wire its Q output to the Cnt input of the up/down counter (B6). For a 1 Hz simulation, set TH = TL = 500 ms in the pulse-generator parameters.

What on/off thresholds should I set for a tank with high at 10 and low at 1?

Set the up/down counter On threshold to 10 and Off threshold to 1. The On flag becomes true at 10 pulses (tank full, pump off) and the Off flag becomes true when the count drops to or below 1 (tank low, pump on), mirroring the original float-switch logic.

Can I use ladder logic instead of FBD in LOGO!Soft Comfort V8?

Ladder view was removed from LOGO!Soft Comfort V8 onward; the programming editor is FBD only. If ladder is mandatory, use legacy LOGO!Soft Comfort V7 or convert the logic to FBD by mapping each rung to a network of blocks.

Why does LOGO!Soft Comfort V8.3 stop working on Windows 10/11?

V8.3 has a known .NET App-V cache issue after certain Windows cumulative updates. Repair the installation through "Apps & Features → Modify" and apply the V8.4.1 service pack to restore the toolbox and the F1 context help.

Back to blog