PCS7 V7.1 SP1 SM321 QBAD Resolving Channel Driver Input

David Krause14 min read
I/O ModulesSiemensTroubleshooting
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

1. Problem Description

The SM321 digital input module 6ES7 321-1BL00-0AB0 is operated as part of a redundant pair inside a SIMATIC PCS7 V7.1 SP1 automation station. After loading HW Config and downloading the CFC chart that hosts the digital-input channel driver block, the block reports QBAD = 1 and the process image remains at the configured safe substitute value. The same station continues to operate its redundant digital-output and redundant analog-input channels without QBAD, indicating the failure is local to the digital-input channel driver wiring rather than to the underlying AS runtime, OB1 cycle, or CFC chart execution.

Symptoms observed in the field:

  • QBAD on the digital-input channel driver block is set permanently, although both modules report "OK" in module diagnostics.
  • The MODE output of the channel driver reads 16#40 ("invalid input / invalid process variable").
  • Disabling redundancy in HW Config (single-mode operation) returns QBAD = 0 on the same block.
  • No diagnostic interrupt (OB82) is raised; the modules remain in RUN without SF / BF LEDs.
  • Re-seating the modules, cycling power, and re-downloading HW Config do not change the behaviour.
MODE 16#40 is the PCS7 standard indication that the driver block sees a value that has not yet been flagged "good" by the underlying I/O driver FB. It is not a module hardware fault. The value comes from the value-status flag of the channel driver and from the channel-error word returned by the driver generation step. Treat the MODE word as the primary diagnostic output when troubleshooting QBAD.

For an architectural overview of redundancy in SIMATIC PCS7, see the SIMATIC PCS7 Process Control System product page at siemens.com/PCS7 and the SIMATIC Industry Online Support portal at support.industry.siemens.com.

2. Environment and Components

Component Designation Role in Failure Path
Process Control System SIMATIC PCS7 V7.1 SP1 AS runtime, CFC, SFC, driver generator
Digital Input Module 6ES7 321-1BL00-0AB0 (SM321) Slot-mapped redundant pair
Channel Driver Block CH_DI (PCS7 driver library) Where QBAD and MODE are surfaced
Engineering Tool SIMATIC Manager with HW Config STEP 7 V5.4 SPx compatible with PCS7 V7.1 SP1
Redundancy Mode Channel redundancy / Module redundancy Set in HW Config object properties
Process Image Partition PIP 1 (default for OB1 / OB35) Source of value-status bits

3. Root Cause Analysis

The QBAD with MODE = 16#40 on a redundant SM321 pair in PCS7 V7.1 SP1 has a small set of recurring root causes. The driver block does not fail because the module is faulty; it fails because the value arriving at PV_IN has not been marked "good" by the underlying I/O driver FB. The general definition of input redundancy (multiple distinct inputs producing identical output for the same initial state) and the related switched-system analysis can be reviewed in Input redundancy under input and state constraints — ScienceDirect and Input Redundancy of Switched Systems — IEEE Xplore. These references are general; the PCS7-specific causes are itemised below.

3.1 Cause A — Wrong Symbol on PV_IN

The PCS7 driver generator expects the PV_IN of the digital-input channel driver to be wired to the absolute address (symbol) of the module with the lowest logical base address in the redundant pair. The partner module's higher address must not have a symbolic I-channel name connected to any CFC symbol, because the driver block will read it as a stray input. Symptom: QBAD = 1, MODE = 16#40 on the lower-address block. Counter-check: open the symbol table, search for the partner address, and confirm zero CFC references via the cross-reference list (Ctrl+Alt+F in SIMATIC Manager).

3.2 Cause B — Channel/Module Redundancy Toggled in HW Config

Channel redundancy and module redundancy are mutually exclusive settings on the SM321 object properties ("Redundancy" tab). If the option is left at the default (none) but the application expects redundancy, the value-status bit of every channel is set to "invalid" because the partner slot is treated as ordinary I/O. Switching from "Channel redundancy" to "Module redundancy" without regenerating the CFC driver blocks produces the same 16#40 symptom until the driver generator is re-run.

3.3 Cause C — Driver Generator Not Re-Run After Symbol Change

After HW Config changes (slot reorder, address shift, redundant-pair creation, MLFB change), the CFC "Generate Module Drivers" step must be re-invoked. Stale driver FBs continue to point at the old single-channel signal and report QBAD regardless of the live HW state. This is the single most common cause of "it worked yesterday" regressions after a hotfix deploy.

3.4 Cause D — Mismatched Module Order / Single-Sided Reference

HW Config requires that only one of the two redundant modules is declared as the reference (the one with the lowest address). The partner module's redundancy pointer should follow the reference automatically. Manually setting both modules to reference each other, or setting the wrong slot as reference, leaves the value-status word uninitialised and surfaces as 16#40.

3.5 Cause E — I/O Consistency / Process Image Partition Mismatch

If the redundant pair straddles the boundary of the process image partition (PIP) used by the OB1 cycle or by the PCS7 task, the driver block reads only the lower half of the value-status double-word and the upper byte is zero-filled, producing 16#40. This is most often seen after a PIP reorganisation driven by a CPU upgrade or by an OB35 task split.

3.6 Cause F — Module-Firmware Asymmetry

Mixing 6ES7 321-1BL00-0AB0 with a later hardware revision of the same MLFB on the partner slot breaks the value-status convention in some firmware levels. PCS7 V7.1 SP1 expects identical FW on both modules of the pair. Verify via "Module Information → Identification" in HW Config online.

4. Preconditions for a Healthy Redundant SM321 Pair

  1. Both modules must carry the same order number (MLFB) and the same firmware release. Mixing 6ES7 321-1BL00-0AB0 with later ...-0AA0 or ...-0BA0 variants is unsupported for redundancy in PCS7 V7.1 SP1.
  2. Both modules must be plugged into slots of the same ET200M / central rack segment configured as a redundant DP/PA slave, or into a redundant slot pair of the central rack.
  3. The HW Config "Redundancy" tab on the lower-address module must have either "Channel redundancy" (for per-channel voting) or "Module redundancy" (for whole-module failover) selected, with the partner module referenced by slot.
  4. The CFC chart must contain the channel driver block generated by "Generate Module Drivers". Manually inserted F-CH-DI blocks are not auto-rewired and must be deleted before regeneration.
  5. The PV_IN of the channel driver must reference the lower-address symbol. The higher-address symbol may remain in the symbol table but must not be connected to PV_IN.
  6. Both modules must be assigned to the same process image partition. PIP 1 (default) is acceptable for OB1 and OB35 tasks.

5. Step-by-Step Resolution

5.1 Inspect HW Config

  1. Open SIMATIC Manager → AS station → HW Config.
  2. Select the lower-address SM321 module. Open "Object Properties" → "Redundancy" tab.
  3. Confirm "Channel redundancy" or "Module redundancy" is selected. Cross-check that the partner slot listed matches the higher-address SM321.
  4. On the partner module, verify the redundancy pointer mirrors the reference. Do not set a redundant partner on both modules.
  5. Save, compile, and download HW Config.

5.2 Verify Process Image Assignment

In HW Config, double-click each SM321, open "Addresses" tab, and confirm both modules sit in the same process image partition (PIP) — usually PIP 1 (OB1 / OB35 cycle). If a custom PIP is in use, ensure the OB references both PIPs and that the CFC task is assigned to the same partition. Misaligned PIPs are a common silent cause of 16#40 after CPU upgrades.

5.3 Regenerate Module Drivers

  1. Open the CFC chart that owns the affected signals.
  2. Right-click → "Generate Module Drivers". Confirm the wizard lists both redundant SM321 modules.
  3. The driver wizard creates one F-CH-DI block per channel of the lower-address module and one F-CH-DI block per channel of the partner module. Only the lower-address set is wired to PV_IN.
  4. Compile and download the CFC chart.

5.4 Rewire Symbols

Confirm the symbol table entry for the partner address has no CFC reference. A quick check is the cross-reference list (Ctrl+Alt+F in SIMATIC Manager) filtered by the partner absolute address. If any reference exists, delete it and recompile the S7 program.

5.5 Online Diagnosis

  1. Open the channel driver block online (CFC → Monitor).
  2. Observe MODE on the next cycle. Expected: 16#80 (good) once redundancy is correctly wired; 16#40 means invalid.
  3. If MODE = 16#40 persists after the steps above, open "Module Information" (right-click module → Module Information) and check "Diagnostic Buffer" for OB82 / OB122 entries.
  4. Force a fault on the higher-address module (pull and re-seat). The lower-address driver should continue updating PV_IN with the partner's process value without setting QBAD = 1.

6. MODE Word Interpretation

MODE Meaning Typical Action
16#00 No error, good value None — proceed
16#40 Invalid input / process variable Check redundancy wiring, value-status, PIP alignment
16#44 Substitute value active Channel driver is in fallback mode — review feature bit
16#80 Initial value / start-up Wait for one full OB1 scan; if persistent, check restart OB
16#C0 Simulation active Disable simulation bit on the driver FB

The exact mapping of MODE bits is defined in the PCS7 driver library documentation for the channel driver block. The values listed are the patterns observed on PCS7 V7.1 SP1 with the standard CH_DI driver block; consult the library reference for newer releases and verify against your installed library version.

7. Diagnostic Buffer Pattern

When a redundant SM321 pair fails with QBAD / 16#40, the diagnostic buffer of the CPU shows a recognisable pattern. Use this matrix to triage quickly:

Diagnostic Buffer Entry Frequency Likely Cause
No entries on either slot Always Cause A / C (wiring or stale driver) — value-status is silent
OB82 "Channel fault" on lower address One-shot Cause D (partner reference mismatch)
OB82 "Channel fault" on both slots Repeated Cause E (PIP split) or Cause F (FW asymmetry)
OB122 "I/O access error" Every cycle Cause C (driver points at unconfigured slot)
OB85 "Update interrupt OB not loaded" Boot Cause E (PIP mis-bound to an OB that is not loaded)

If the diagnostic buffer is empty but QBAD = 1 persists, the failure is upstream of the module (wiring / driver / PIP) and not on the module itself.

8. Inline Redundancy Topology

The expected topology of a healthy redundant SM321 pair with channel driver blocks is shown below. The lower-address module is the "reference"; the higher-address module is the "partner" and does not appear as a CFC symbol.

SM321 Lower Addr 6ES7 321-1BL00-0AB0 SM321 Higher Addr 6ES7 321-1BL00-0AB0 redundancy pointer F-CH-DI (PV_IN) CFC Chart — channel driver PV_IN wired to lower addr only Higher addr has no CFC connection (no symbolic PV_IN)

9. Verification Checklist

  • Both SM321 modules report "OK" in HW Config (no SF/BF LEDs).
  • Diagnostic buffer shows no OB82 / OB122 entries referencing the redundant slots.
  • CFC online view: QBAD = 0, MODE = 16#80 on all CH_DI blocks of the pair.
  • Cross-reference: partner (higher) address has zero CFC connections.
  • Forcing one module to fault (pull and re-seat) causes the lower-address driver to continue updating PV_IN with the partner's value.
  • Module Information → Identification: identical MLFB and FW on both modules.
  • HW Config → Addresses: both modules are in the same process image partition.

10. Common Pitfalls and Field-Notes

  • QBAD persists after a download: The CFC chart may not have been recompiled after the driver regeneration. Recompile the entire S7 program and reload.
  • Intermittent QBAD only on warm restart: Check OB100 / OB101 / OB102 for explicit re-initialisation of the value-status bits. PCS7 V7.1 SP1 expects the driver generator to set them; manual init can clear them.
  • Mixing ET200M and central rack modules: Module redundancy across an IM153-2 is allowed only if both IM153-2 are configured as a redundant DP slave. Mixing one central module and one distributed module in a "redundant" pair is not supported and silently yields QBAD.
  • Address gaps larger than one slot: The driver generator expects the partner slot to be derivable. Leave the partner slot in the same rack/slave, ideally adjacent.
  • Renaming the symbol: If the symbolic name of the lower-address channel is renamed after driver generation, PV_IN remains pointing at the old symbol. Re-run "Generate Module Drivers" or update the wiring manually.
  • Firmware update on one module only: Always update both modules of the pair in the same maintenance window. Half-upgraded pairs read inconsistent value-status and trip QBAD on the next OB1 cycle.

11. Cross-Reference with Other Redundancy Types

If the digital output (DO) redundancy and the analog input (AI) redundancy on the same station are working, the underlying redundancy infrastructure (AS runtime, CFC driver generator, OB1 cycle) is healthy. The issue is therefore localised to the digital-input driver and to how HW Config signals the value-status bit for SM321 channels. Note that the term "redundancy module" can also refer to power-supply decoupling devices such as those described for power systems on Phoenix Contact redundancy modules and the Allen-Bradley 1606-XLBRED20 redundancy module datasheet; those are unrelated to PCS7 channel redundancy but share the same engineering vocabulary.

Aspect Working DO Redundancy Working AI Redundancy Failing DI Redundancy
HW Config redundancy tab Configured Configured Not configured / mismatched
PV_IN symbol Lower address Lower address Higher address / partner
Driver regeneration Run Run Skipped / stale
Process image partition Aligned Aligned Crossed / split
Module firmware Identical Identical May diverge after partial update

12. Verification Procedure (End-to-End)

  1. Online → HW Config → "Monitor/Modify". Force a fault on the higher-address SM321 by disconnecting the front connector.
  2. Observe CFC online: QBAD remains 0, MODE remains 16#80, and PV_IN continues to update with the partner's process value.
  3. Reconnect the front connector and force a fault on the lower-address module by setting it to STOP via the mode selector.
  4. After failover, verify the driver block switches source transparently and the QBAD flag does not transition to 1.
  5. Re-integrate the failed module and verify that the channel driver returns to normal dual-source operation without a transient QBAD = 1 cycle.
If step 4 shows QBAD = 1 during the failover window (one OB1 cycle), this is expected behaviour for module-redundant setups that use a single-channel watchdog. Channel-redundant configurations should mask the transition entirely. If the transition persists for more than two OB1 cycles, the redundancy wiring is not correct and the resolution steps above must be repeated.

13. Preventive Measures

  • Establish a CFC standard that prohibits hand-wiring of F-CH-DI blocks. Always invoke "Generate Module Drivers".
  • Add a hardware-conformance check to your change-management procedure: every HW Config delta must be followed by a driver-regeneration step and a CFC recompile.
  • Lock the partner (higher) address from symbol-table edits to prevent accidental CFC connections.
  • Tag both modules of every redundant pair in your CMMS so that firmware updates always reach both in the same window.
  • On every PCS7 service pack migration, validate the first redundant pair end-to-end before migrating the remaining station fleet.

14. Related Documentation and References

FAQ

What does QBAD = 1 on a PCS7 CH_DI block mean?

QBAD indicates the input value is not valid. Combined with MODE = 16#40 it points to a value-status / redundancy wiring issue rather than a hardware fault on the SM321 itself.

Which SM321 order number is supported in PCS7 V7.1 SP1 redundancy?

Use identical MLFB and firmware on both modules — for example 6ES7 321-1BL00-0AB0 paired with the same part. Mixing hardware revisions or firmware levels is unsupported.

Does the higher-address partner module need a CFC symbol?

No. The partner's higher address should not have a CFC reference connected to PV_IN. Only the lower-address symbol is wired to the channel driver block.

Why must "Generate Module Drivers" be re-run after HW Config changes?

The driver wizard re-emits F-CH-DI blocks with the correct value-status wiring for the new redundancy layout. Without it, the driver blocks retain the previous single-channel layout and report invalid.

Can ET200M SM321 modules be part of a redundant pair in PCS7 V7.1 SP1?

Yes, if both IM153-2 interfaces are configured as a redundant DP slave and the SM321 modules sit in identical slot positions of each ET200M. Mixing central and distributed modules in one redundant pair is not supported.

How do I differentiate a value-status failure from a real channel fault?

Open Module Information → Diagnostic Buffer for the slot. A value-status failure leaves the buffer empty and OB82 is not raised. A real channel fault produces an OB82 entry with channel fault code. Empty buffer plus QBAD = 1 confirms wiring / driver.

Back to blog