Resolving Missing F Shared DB in S7 Distributed Safety V5.4

David Krause14 min read
S7-300SiemensTroubleshooting
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

Resolving the "F Shared DB Does Not Exist" Error in S7 Distributed Safety V5.4 on S7-300F CPUs

This troubleshooting reference documents the root cause and resolution of a recurring commissioning fault on SIMATIC S7-300F / S7-300F-2DP controllers programmed with the optional package S7 Distributed Safety V5.4 + SP1. The failure mode is the absence of an F shared DB (F-DB) after the hardware configuration is saved and compiled, with the safety program editor reporting "The F shared DB does not exist in the safety program". The fix is a checkbox plus a level-3 password on the CPU Protection tab — a one-time configuration that the standard Configuring and Programming Manual does not emphasize strongly enough for first-time users.

1. Problem Description

Engineers commissioning their first SIMATIC S7 Distributed Safety project on a fail-safe CPU (for example, 315F-2DP, 317F-2DP, or 319F-3 PN/DP) encounter the following sequence:

  1. The hardware configuration is opened in SIMATIC Manager > HW Config.
  2. All digital and analog I/O modules that participate in the safety function are parametrized to Safety mode (PROFIsafe slot parameter F_Source_Add / F_Dest_Add set, F-monitoring time = 100 ms typical, F-I/O DB identifier = 0 default).
  3. The hardware configuration is saved and compiled (Station > Save and Compile, or Ctrl+S with the station open).
  4. The safety program editor (safety program view, F-Blocks) cannot be opened, or it opens with the diagnostic message:
    The F shared DB does not exist in the safety program
  5. The expected "initializing safety program" prompt does not appear in the SIMATIC Manager message line.
  6. No F-DB instances are generated under the S7 Program > Blocks container for the F-CPU.

The expected behavior of the toolchain is that S7 Distributed Safety V5.4 automatically generates the F shared DB (DB 1 by default, renamed by the F-parameter F-Shared-DB name) and one F-I/O DB per PROFIsafe slot when the safety program is initialized. The symptom above indicates the F-CPU has not been marked as a safety CPU inside HW Config, so the generator never runs.

2. Root Cause Analysis

The fail-safe behavior in S7-300F is not inferred from the F-CPU article number alone at the SIMATIC Manager level. HW Config must explicitly mark the CPU as the host of a safety program; otherwise the S7 Distributed Safety optional package has no trigger to:

  • Insert the safety program node under Blocks,
  • Generate the F shared DB containing the F-runtime group signature, the F-password hash, the PROFIsafe addresses, and the F-monitoring time constants,
  • Generate per-slot F-I/O DBs holding the F-I/O passivation status (Q_BAD), the substitute value behavior (PASSIVE_ON / ACTIVE_ON), and the CRC signature of the PROFIsafe telegram length.

The required marking is the "CPU contains safety program" checkbox on the Protection tab of the CPU properties dialog. The CPU protection level 3 (password-protected write access) must also be assigned because the safety program and its F-blocks are write-protected at the same level — without a level-3 password, the safety program editor refuses to write the F-blocks to the CPU and aborts F-DB generation.

Engineering rule: Every S7-300F / S7-400F / ET 200S F-CPU that runs S7 Distributed Safety V5.4 must have BOTH (a) the "CPU contains safety program" flag set and (b) CPU protection level 3 with a non-empty password. The two settings are independent in HW Config — setting the password alone is not sufficient, and setting the safety flag alone produces an F-CPU that the optional package cannot protect against unauthorized F-block changes.

3. Prerequisites and Software Environment

The minimum toolchain reproducing and resolving this issue is:

Component Version Notes
STEP 7 Professional V5.4 + SP4 or later Base engineering platform; SP4 is required for Windows XP SP3 / Windows 7 compatibility.
S7 Distributed Safety (optional package) V5.4 + SP1 minimum, V5.4 + SP5 recommended Provides the FBD/LAD safety editor, F-block library, and F-DB generator.
S7 F Configuration Pack V5.4 + SP1 Adds the F-capable module descriptions to the HW Catalog. Newer revisions are shipped in the S7 Distributed Safety DVD.
F-CPU firmware Match catalog 6ES7 315-6FFxx-0AB0, 6ES7 317-6FFxx-0AB0, 6ES7 318-3FLxx-0AB0 family.
License key Distributed Safety floating or single Required for F-block compilation; missing license blocks F-DB write to the offline program.

For new projects, the S7 Distributed Safety V5.4 + Service Pack 5 update is the latest available for the V5.4 line and ships with updated F-I/O GSD files and bug fixes for the F-DB generator. Reference: Siemens Support entry 37592670 — S7-Distributed Safety V5.4 + SP5.

The STEP 7 Safety Advanced V13 SP1 / TIA Portal successor toolchain reuses the same logic — a S7-300F migrated to STEP 7 Safety Advanced carries the "CPU contains safety program" attribute forward, but the F-CPU is re-typed as a F-CPU in the TIA Portal device view, and the safety program is generated as part of the F-runtime group. Reference: Migrating projects from S7-Distributed Safety V5.4 SP5 to STEP 7 Safety Advanced.

4. Step-by-Step Resolution Procedure

Apply the following procedure in the order listed. The two edits are non-destructive — they only add attributes to the offline HW Config database — and can be performed in a live project without recompiling user logic.

Step 4.1 — Open the CPU Properties

  1. Launch SIMATIC Manager and open the offline S7 project.
  2. Expand the S7-300 station node and double-click Hardware to launch HW Config.
  3. In the station window, double-click the F-CPU (slot 2 for S7-300) to open the Properties — CPU 31xF dialog.

Step 4.2 — Activate the Safety Program Flag on the Protection Tab

  1. Select the Protection tab.
  2. Set Protection level to 3: Write-/Read-protection without password for F-CPU failure (no operation possible without password). For F-CPUs the level-3 selection is mandatory because the F-blocks are write-protected through the F-password hash stored in the F shared DB.
  3. Enter a password in the Password field (8 characters minimum, alphanumeric). The same password is used by S7 Distributed Safety to lock the safety program against unauthorized F-block modification.
  4. Check the box labeled "This CPU contains a safety program" (German: Diese CPU enthält ein Sicherheitsprogramm). The checkbox sits at the bottom of the Protection tab on the V5.4 build; on some SP revisions the label reads "CPU contains safety program / F-program".
  5. Click OK to close the dialog. The CPU object in the station now shows a yellow safety stripe on the icon.

Step 4.3 — Save and Compile HW Config

  1. From the HW Config menu, choose Station > Save and Compile (Ctrl+S).
  2. Watch the message line at the bottom of HW Config. The expected message is "Initializing safety program" followed by "F-shared DB generated" and a list of "F-I/O DB generated for slot n" lines for every PROFIsafe module that was parametrized as safety.
  3. If the message "Initializing safety program" does not appear, re-open the CPU Protection tab and verify the checkbox state and the password fields — both are required, and an empty password disables F-DB generation silently on some SP levels.

Step 4.4 — Verify F-DB Existence

  1. Switch back to SIMATIC Manager.
  2. Open the Blocks container of the F-CPU's S7 Program.
  3. Confirm the presence of:
    • DB 1 (or the F-Shared-DB name defined under CPU properties > Safety tab): the F shared DB generated by S7 Distributed Safety.
    • One F-I/O DB per PROFIsafe slot: default names DB 100, DB 101, ... following the I/O slot order. Each holds the variables Q_BAD (BOOL, passivation state), ACK_REQ (BOOL, acknowledgement request), SUBS_ON / SUBS_OFF (BOOL, substitute value behavior), DIAG (BYTE, diagnostic byte), and QBAD_I_xx / QBAD_O_xx process image mirror.
    • FB 215 (F_RTG, F-runtime group) and the system FBs F_CYC_CO, F_PSBS from the S7 Distributed Safety library — these are added by the compiler as referenced blocks.
  4. Open the safety program editor (right-click the safety program > Open) and confirm the editor loads without the "F shared DB does not exist" message.

5. Verification Checklist

After the four-step procedure, run the following matrix to confirm a healthy F-runtime group. Any row that fails points to a secondary issue outside the scope of this article.

Check Expected Result Where to Look Pass Criterion
F shared DB generated DB present, name = F-Shared-DB SIMATIC Manager > Blocks DB1 or custom name visible
F-I/O DB count One DB per PROFIsafe slot Blocks > DB1xx series DB count = # of F-I/O modules
CPU Protection level Level 3 HW Config > CPU > Protection Radio button = level 3
F-password configured Non-empty HW Config > CPU > Protection Password field populated
Safety program flag Set HW Config > CPU > Protection Checkbox ticked
Safety program editor opens Yes, no error Right-click safety program > Open No F-shared DB warning
PROFIsafe addresses unique F_Source_Add / F_Dest_Add unique per slot Module > Properties > PROFIsafe No duplicate addresses
F-monitoring time 100–250 ms typical Module > Properties > PROFIsafe > 2× bus cycle time
License key Valid Distributed Safety license STEP 7 License Management No "missing license" warning
Compile safety program 0 errors, 0 warnings Safety program > Compile Clean compile

6. F-DB Architecture Reference

The F-DBs generated by S7 Distributed Safety V5.4 are not ordinary DBs — they are the persistence layer for the safety runtime. Understanding their layout helps when porting or migrating.

6.1 F Shared DB Layout (DB 1 by default)

Offset (Byte) Symbol Type Meaning
0..1 F_DB_SIGNATURE WORD Magic value 0xC0C0 — used to detect a valid F shared DB at startup.
2..5 F_PWD_HASH DWORD Hashed F-password (read by FB 215 to authenticate the operator password).
6 F_PROFISAFE_VERSION BYTE Profile version expected by the F-runtime group.
7 F_CRC_SEED BYTE Seed for the cyclic CRC over the safety program.
8..11 F_MONITOR_TIME TIME Default F-monitoring time in ms (typically 100 ms).
12..n F_IO_LIST[] ARRAY of DWORD Pointer table referencing each F-I/O DB.

If the F shared DB is corrupt, the F-CPU goes to STOP with diagnostic buffer entry "F-runtime group: F-shared DB signature invalid". Re-running Station > Save and Compile with the safety flag enabled regenerates the F shared DB and clears the fault.

6.2 F-I/O DB Layout (one per PROFIsafe slot)

Symbol Type Function
Q_BAD BOOL 1 = slot is passivated (substitute values active).
ACK_REQ BOOL 1 = user must acknowledge the F-I/O to reintegrate.
SUBS_ON BOOL 1 = substitute value "1" is applied to the process image on passivation.
SUBS_OFF BOOL 1 = substitute value "0" is applied.
DIAG BYTE Bit-coded channel diagnostic.
QBAD_I / QBAD_O BOOL array Per-channel passivation status mirrored from process image.

7. Common Configuration Pitfalls

Beyond the missing safety-program flag, several configuration errors silently prevent F-DB generation or leave the safety program in an inconsistent state.

7.1 I/O Module Not in Safety Mode

If an SM 326F / ET 200S F-module is inserted with the default "Standard" parametrization, S7 Distributed Safety skips the slot in the F-DB generator. Right-click the module > Properties > Safety tab > Operating mode = Safety mode (PROFIsafe). The slot's F_Source_Add and F_Dest_Add must also be entered; range 1..65534 with the destination address unique project-wide.

7.2 Duplicate PROFIsafe Addresses

S7 Distributed Safety V5.4 enforces a unique PROFIsafe destination address per slot. If two modules share F_Dest_Add = 1, the compiler reports "F0020 PROFIsafe address already used" and the F shared DB is not written to the offline program. The fix is to renumber the conflicting module and re-save HW Config.

7.3 CPU Protection Level Lower Than 3

Selecting protection level 1 (no password) or level 2 (read-only) on an F-CPU is technically allowed by HW Config but S7 Distributed Safety rejects it with the message "F-CPU must be configured with protection level 3 to host a safety program". The protection level must be raised to 3 before the safety program flag is acknowledged.

7.4 S7 F Configuration Pack Missing

The F Configuration Pack contributes the F-module descriptions to the HW Catalog. Without it, the F-modules appear in the catalog but their Properties > Safety tab is grayed out, and the "CPU contains safety program" checkbox has no effect because the optional package has no module descriptors to attach the F-I/O DBs to. Install S7 F Configuration Pack V5.4 + SP1 or higher to populate the catalog.

7.5 S7 Distributed Safety License Not Authored

If the Distributed Safety license is missing or transferred to another PC, the safety program editor opens in read-only mode and Save and Compile of HW Config silently writes no F-DBs. Open STEP 7 License Management, transfer the license back, and re-run Save and Compile.

8. Upgrading to V5.4 SP5 and Migration to STEP 7 Safety Advanced

For ongoing projects still on V5.4 + SP1/SP2/SP3, Siemens recommends moving to S7 Distributed Safety V5.4 + Service Pack 5. SP5 delivers the following corrections relevant to F-DB generation and safety program stability:

  • Corrected F-DB initialization for S7-300F CPUs with firmware version > V3.3 (entries 6ES7 315-6FF04, 6ES7 317-6FF04).
  • Fixed the silent skip of the "initializing safety program" message on localized STEP 7 installations (non-German MUI builds).
  • Updated F-I/O GSD container for ET 200S F-modules with PROFINET interface.
  • F-runtime group FB 215 build for compliance with PROFIsafe profile V2.6.1.

Reference: Siemens Support — S7-Distributed Safety V5.4 + Service Pack 5 (entry 37592670). The SP5 installer is a drop-in update for V5.4 installations; offline projects do not need conversion.

For new developments or major retrofits, the recommended path is migration to STEP 7 Safety Advanced in the TIA Portal. The migration is fully supported for projects created with S7 Distributed Safety V5.4 SP5; projects on older SP levels must first be upgraded to SP5 to be migratable. Reference: Migrating projects from S7-Distributed Safety V5.4 SP5 to STEP 7 Safety Advanced.

9. Diagnostic Buffer and Error Code Reference

When the F shared DB is missing or corrupt, the CPU diagnostic buffer records one of the following events. Use the table to triage similar F-DB issues at site.

Diagnostic Text (English) Cause Remediation
F-shared DB does not exist in the safety program Safety program flag not set or F-DB never generated Apply Section 4 procedure; re-save HW Config.
F-runtime group: F-shared DB signature invalid DB 1 corrupted or replaced with user DB Delete the user DB at slot 1, regenerate via Save and Compile.
F-CPU protection level 3 required Protection level < 3 Set Protection to level 3 and assign a password.
PROFIsafe address already used Duplicate F_Dest_Add Renumber the duplicate slot, re-save HW Config.
Safety program editor: F block compilation aborted License missing or invalid Re-author the Distributed Safety license, re-compile.
F-monitoring time overrun on slot n PROFIsafe watchdog tripped Raise F-monitoring time to > 2 × bus cycle; check PROFIBUS/PROFINET cable.
F-runtime group: signature CRC mismatch Safety program changed but F-shared DB not regenerated Re-run Save and Compile of HW Config and re-download the project.

10. Commissioning Procedure (Project-Complete Walkthrough)

Use this end-to-end procedure to commission a new S7-300F station from a clean project. It assumes a single 315F-2DP CPU with two SM 326F digital input modules on PROFIBUS DP.

  1. Create a new S7-300 station in SIMATIC Manager with the F-CPU 315F-2DP at slot 2.
  2. Insert the SM 326F modules in HW Config and assign them PROFIsafe addresses 1 and 2.
  3. Parametrize each SM 326F to Safety mode, F-monitoring time 100 ms.
  4. Open CPU properties > Protection: set level 3, enter password, check "This CPU contains safety program".
  5. Save and Compile HW Config. Confirm the "initializing safety program" message and the per-slot F-I/O DB lines in the message line.
  6. Open the safety program editor; insert a simple F-runtime group containing an ESTOP1 block driving the F-shared outputs.
  7. Compile the safety program (0 errors, 0 warnings expected).
  8. Download HW Config and the safety program to the F-CPU.
  9. Switch the CPU to RUN. The diagnostic buffer should show "F-runtime group: started" within 2 seconds.
  10. Toggle each safety input and verify the corresponding Q_BAD clears and the F-output drives correctly.

If any step produces a different result, re-read the corresponding section of this article and cross-check the diagnostic buffer entry against the table in Section 9.

Why does the safety program editor say "F shared DB does not exist" even though HW Config compiled without errors?

The HW Config compiler does not raise an error when the F-CPU is missing the "CPU contains safety program" flag — it simply skips F-DB generation. Open CPU properties > Protection, tick "This CPU contains safety program", set protection level 3 with a password, and re-save HW Config. The message line will then show "initializing safety program" and the F shared DB will be generated automatically.

What is the minimum S7 Distributed Safety version for S7-300F commissioning?

S7 Distributed Safety V5.4 + SP1 is the minimum supported configuration together with STEP 7 Professional V5.4. For new work or for migration to TIA Portal Safety Advanced, upgrade to V5.4 + Service Pack 5 (Siemens entry ID 37592670).

Do I need to enter a CPU password to generate the F shared DB?

Yes. Protection level 3 is mandatory for any F-CPU hosting a safety program, and the password field must be populated. HW Config does not generate the F-DBs if the password is empty even when the safety-program checkbox is set, because the F-shared DB stores the password hash and a zero-length hash fails the F-CPU signature check at startup.

How do I migrate a V5.4 SP5 safety program to STEP 7 Safety Advanced in TIA Portal?

Open the TIA Portal migration tool, point it at the V5.4 SP5 project, and the optional package re-imports the safety program as a STEP 7 Safety Advanced F-runtime group. The "CPU contains safety program" attribute is preserved, and the F-CPU is re-typed as an F-CPU in the TIA Portal device view. Reference the Siemens migration guide for the supported S7-300F CPU article numbers.

How many F-I/O DBs are generated per PROFIsafe slot, and can I rename them?

Exactly one F-I/O DB per PROFIsafe slot is generated, with default names DB 100, DB 101, ... in slot order. The names can be reassigned in CPU properties > Safety > F-Shared-DB and per-slot F-I/O DB names, but the F_CYC_CO runtime expects contiguous naming — keep them in the 100–199 range to avoid linkage errors at compile.

Back to blog