S7-PDIag Exclusion and Termination Addresses in STEP 7 V5.4 SP1

David Krause9 min read
HMI ProgrammingSiemensTechnical Reference
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 of S7-PDIag Address Parameters

S7-PDIag (Process Diagnostics) is a Siemens runtime diagnostic package that extends the standard fault-detection capability of SIMATIC S7-300 and S7-400 CPUs. Within the PDiag configuration model, two address-list parameters appear on every monitoring FB instance and on global diagnostic data blocks: exclusion addresses and termination addresses. Both are evaluated by the PDiag runtime during criteria analysis, the engine that propagates a detected criterion through the user program until a defined motion or process fault becomes visible at the operator interface.

The two parameters are NOT programming-language constructs; they are database entries owned by the PDiag editor. They become visible inside an FB as IN/OUT parameters of the implicitly generated PDiag instance DB only when the project has been compiled with the PDiag > Generate Instance DB command, and only when STEP 7 V5.4 or higher (SP1 qualifies) is installed with a licensed PDiag option package. STEP 7 V5.4 SP1 is the most widely deployed revision for PDiag projects on S7-300/400 CPUs, distributed both as a stand-alone upgrade CD and bundled with the STEP 7 Professional Edition 2006 media kit (see Service Pack 1 for STEP 7 V5.4 and STEP 7 Professional Edition 2006).

Prerequisites

  • STEP 7 V5.4 + SP1 installed (minimum) or STEP 7 Professional Edition 2006 SRx with a PDiag license (order number 6ES7 840-2CC01-0YA0 region-dependent).
  • S7-PDIag option package installed and registered (component of STEP 7 Professional, or as add-on 6ES7 840-2CC01-0YA0).
  • S7-300 or S7-400 target CPU with firmware supporting the PDiag runtime (CPU 31x and CPU 41x families; the S7-300 CPU 31xC-2 DP, CPU 319-3 PN/DP, and the entire S7-400 family are typical targets).
  • S7-PDIag documentation: S7-PDIAG for S7-300 and S7-400 - Configuring Process Diagnostic, sections 7.8 and 7.9 are the authoritative reference for termination and exclusion addresses.
  • ProAgent V5.0 or higher if you intend to use the hide-on-zero behaviour of exclusion addresses in the operator faceplate.

What Is a Termination Address?

A termination address is a symbolic or absolute operand (I, Q, M, DB bit/byte/word/dword) that, when reached during criteria analysis, causes the PDiag runtime to abort the propagation of auxiliary networks immediately. Criteria analysis walks forward through the program from the monitoring point and accumulates "auxiliary networks" – intermediate logic segments that contribute to the criterion. The termination address acts as a hard stop, so criteria beyond it are not reported as the root cause of the fault, even if the logic chain continues.

Termination addresses are typically used to:

  • Bound the depth of analysis at a stable process boundary, e.g. the final command tag of a valve or motor.
  • Exclude inherently cyclic signals (clock memory bytes, heartbeat bits) that would otherwise confuse the criterion chain.
  • Force the diagnostic to localize to a single station, station section, or unit when multiple identical FM/FC patterns exist in the program.

Per the S7-PDIag manual, two editor paths exist for declaring a termination address:

  1. S7-PDIag editor path: Open the unit overview, select the desired monitoring FB, and use the right-mouse context menu PDiag > Properties > Addresses > Termination Addresses. Symbols entered here apply globally to that monitoring instance.
  2. LAD/STL/FBD editor path: Highlight an operand in the network view of LAD/FBD/STL and select PDiag > Define as Termination Address. This binds the symbol to the network in which it appears, allowing per-network granularity.

What Is an Exclusion Address?

An exclusion address is a symbolic or absolute operand that, when it carries a logical "0" at the moment criteria analysis is performed, causes the PDiag runtime to hide the affected address and any auxiliary networks that depend on it from the operator view. The hidden elements remain in the program and continue to execute, but ProAgent faceplates will not show them as possible root causes, and the step-by-step navigation skips them.

Critical: The hide-on-zero semantics of an exclusion address are active only in conjunction with ProAgent V5.0 or higher. Earlier ProAgent releases evaluate exclusion addresses differently (see compatibility matrix below), so always verify the ProAgent revision on the HMI station when designing the diagnostic flow.

Exclusion addresses are typically used to:

  • Mask out interlock conditions that are intentionally bypassed in a particular operating mode (e.g. manual jog, commissioning, or maintenance override).
  • Suppress auxiliary networks that represent physically disconnected sensors or actuators during plant hand-over phases.
  • Conditionally hide alarm chains in redundant or backup paths, so the operator is guided to the primary cause rather than a symptom.

Like termination addresses, exclusion addresses can be assigned through two editor paths:

  1. S7-PDIag editor path: PDiag > Properties > Addresses > Exclusion Addresses on the unit or monitoring object.
  2. LAD/STL/FBD editor path: Select an operand in the network and choose PDiag > Define as Exclusion Address.

Where These Addresses Appear in an FB Variable

After the S7-PDIag configuration is compiled and the instance DB is generated, two additional columns appear in the FB / instance-DB declaration table:

Symbol Type Direction Meaning
PDIAG_EXCL_ADR BOOL/INT/WORD array (project-dependent) IN Bit/element set to 0 by the user program to hide the address from the criteria chain.
PDIAG_TERM_ADR BOOL/INT/WORD array (project-dependent) IN Bit/element set to 0 to mark the operand as a hard boundary for criteria analysis.

The actual naming and data type are decided by the PDiag generator at compile time. If no exclusion or termination addresses are configured for a given FB, the parameters are absent – they are not zero-length stubs. Inspect the instance DB in STEP 7 with View > Data View after the PDiag > Generate Instance DB step to confirm the parameters were emitted. The presence of these tags in the FB is the single clearest indicator that the FB has been enrolled in a PDiag unit.

Criteria-Analysis Walk-Through

When the monitoring instance trips, PDiag performs the following sequence:

  1. The criterion state propagates backward from the tripped monitoring point into the user program.
  2. Each network encountered is collected as an auxiliary network.
  3. If a network contains a termination address, the walk stops at that network; everything downstream is excluded from the chain.
  4. If a network contains an exclusion address whose current value is "0", the network is removed from the criteria chain and hidden in the operator view (ProAgent V5.0+).
  5. The remaining auxiliary networks form the displayed fault path that the operator can navigate step-by-step.

Configuring Termination and Exclusion Addresses in LAD/FBD

The following procedure assumes an existing PDiag unit with at least one monitoring FB:

  1. Open the SIMATIC Manager project, navigate to the S7 program, and double-click the PDiag unit overview.
  2. Right-click the monitoring FB and choose PDiag > Properties. Switch to the Addresses tab.
  3. Click Add... in the Termination Addresses list. Enter the symbolic name (preferred) or absolute address. Repeat for every address that should bound the criterion chain.
  4. Switch to the Exclusion Addresses list and click Add... for each operand that should be conditionally hidden.
  5. Click Apply and OK. The PDiag configuration is stored in the unit DB under the project tree.
  6. Regenerate the PDiag instance DB: right-click the FB and choose PDiag > Generate Instance DB.
  7. Compile and download the S7 program. Cold restart the CPU if prompted by the PDiag consistency check.

For the editor-bound variant, place the cursor on the desired operand inside a network of the monitoring FB and invoke PDiag > Define as Termination Address (or Exclusion Address). The PDiag unit overview reflects the new entry automatically.

Compatibility with STEP 7 V5.4 SP1 and S7-PLCSIM V5.4 SP1

STEP 7 V5.4 SP1 was the first widely deployed service pack to fix multiple PDiag editor issues, including symbol-table re-import bugs that corrupted the exclusion/termination address lists. The SP1 release notes list improved symbol re-import handling and enhanced diagnostic-block consistency checks.

For offline simulation, S7-PLCSIM V5.4 SP1 adds Windows Vista compatibility, Ethernet CPU access-node selection, and the ONLINE view in HW Config – all useful when validating the PDiag chain against simulated I/O. PDiag criteria analysis itself runs identically in PLCSIM; the termination/exclusion semantics are CPU-runtime, not simulator-runtime.

ProAgent Compatibility Matrix

ProAgent Version Termination Address Behaviour Exclusion Address Behaviour
< V5.0 Aborts criteria walk at address; chain stops. Address is ignored – no hide effect.
V5.0 – V5.2 Aborts criteria walk at address; chain stops. Hidden when value = 0; faceplate reflects hide.
> V5.2 (e.g. ProAgent for WinCC flexible 2008) Aborts criteria walk at address; chain stops; ProAgent visualizes boundary in step view. Hidden when value = 0; full operator navigation respects hide state.

Verification and Commissioning Checks

After downloading the PDiag configuration, run the following checks before handing the system over to operations:

  1. In STEP 7, open PLC > Monitor/Modify on the monitoring FB instance DB and confirm that the PDIAG_EXCL_ADR and PDIAG_TERM_ADR tags exist and are the expected data type.
  2. Force the criterion trigger (e.g. set the monitored tag to the trip value) and observe the operator faceplate. Verify that the chain stops at the first termination address and that excluded networks (value = 0) are hidden.
  3. Toggle an exclusion address to 1; the corresponding auxiliary network should reappear in the chain immediately.
  4. In S7-PLCSIM, repeat the trigger using the same program; the PDiag chain should behave identically. Any divergence indicates a CPU-firmware version mismatch, not a configuration error.
  5. Use PDiag > Consistency Check in the unit overview to detect orphan addresses that point to deleted symbols or tags.

Common Pitfalls and Field Notes

  • Mixing absolute and symbolic addresses inside the same PDiag unit: STEP 7 V5.4 SP1 tolerates it, but the PDiag generator will re-resolve symbolic entries to absolute on regeneration, which can produce duplicates. Prefer one notation per unit.
  • Termination addresses placed inside FC calls (not FBs) are ignored by the criteria walk because PDiag only traverses FB-contained networks by default.
  • Exclusion addresses referencing clock memory bytes (MB0–MB255 in the system clock) toggle at the cycle rate, which can cause the chain to flicker in the operator view. Add the clock byte as a termination address instead.
  • When copying PDiag units between projects, manually re-bind the symbol table entries; the PDiag configuration does not auto-rebind cross-project.
  • STEP 7 V5.4 without SP1 may silently lose exclusion addresses after a symbol-table re-import; install SP1 to avoid this defect.

Diagnostic Flow Diagram

Monitor trips Criteria analysis starts Network: exclusion addr = 0 ? Walk next network Yes → hide No → keep Hidden chain Termination addr? STOP — display

FAQ

Why don't I see PDIAG_EXCL_ADR or PDIAG_TERM_ADR in my FB after installing PDiag?

These tags are generated only when at least one exclusion or termination address has been assigned to the FB, and only after the command PDiag > Generate Instance DB has been executed in STEP 7 V5.4 SP1. If neither address list is populated, the parameters do not exist in the instance DB.

What is the difference between a termination address and an exclusion address?

A termination address is a hard stop: when criteria analysis reaches that operand, the diagnostic walk ends immediately. An exclusion address is a soft mask: the walk continues past the operand, but if the operand currently holds a logical 0 (and ProAgent V5.0+ is in use), the network is hidden from the operator view.

Can I configure both addresses from the LAD/STL/FBD editor and the PDiag unit overview?

Yes. The S7-PDIag documentation (sections 7.8 and 7.9) explicitly allows both methods. PDiag merges the two lists at compile time, so per-network granularity from the LAD/FBD/STL editor coexists with global lists from the unit overview.

Does STEP 7 V5.4 SP1 require a separate PDiag option license?

Yes. PDiag is not bundled with the base STEP 7 V5.4 SP1 installer; it ships with STEP 7 Professional Edition 2006 SRx or as the add-on 6ES7 840-2CC01-0YA0. The license key is checked at editor start and at download.

Can S7-PLCSIM V5.4 SP1 validate the PDiag chain end-to-end?

Yes. S7-PLCSIM V5.4 SP1 runs the PDiag runtime identically to a real CPU, so criteria analysis with termination and exclusion addresses can be exercised against simulated I/O. This is the recommended way to commission PDiag before plant hand-over.

Back to blog