Siemens STEP 7: Recovering Symbol Table Entries for Function Blocks and Data Blocks
Engineers working with SIMATIC STEP 7 V5.x frequently open a long-running project and discover that their function block (FB) calls in OB1 have lost their yellow symbolic tool-tips, and the block appears to "stop working" inside S7-PLCSIM. The PLC still downloads, the FB still compiles, the instance data block (DB) is intact, but the output never goes TRUE and the engineer concludes the logic is broken. In nine out of ten cases the logic is fine and the fault lives in the project symbol table. This article walks through the root cause, the symbol-table architecture, the FB/DB/OB1 interaction model, and a step-by-step recovery procedure with PLCSIM verification.
Problem Description
The typical symptom pattern reported in the field:
- The yellow text beside FB input/output pins in OB1 (for example "I0.0 Start Button", "Q4.0 Contactor") is no longer shown. The editor displays only the bare absolute address without the human-readable comment.
- PLCSIM starts, the simulated CPU goes RUN, and the OB1 cycle executes without errors, but Q4.0 (or whatever output the FB drives) never goes TRUE.
- The FB interface declaration, the code body, and the instance DB all open normally and show no obvious damage.
- Forcing the start input TRUE in the PLCSIM I view does not latch the motor output, even though the latching branch in the FB looks correct.
None of these symptoms point at a logic error. They point at the symbol table or at the LAD/FBD display options being toggled off.
Root Cause Analysis
The yellow text shown on an FB pin in the LAD/FBD view is the symbolic address comment pulled from the project's Symbol Table (S7-Program > Symbols in SIMATIC Manager, or the PLC tags table in TIA Portal). When one or more rows in the symbol table are removed, STEP 7 cannot display the comment and falls back to the bare absolute address. The program still compiles, the wire is still present in the compiled code, but two things change that confuse the visual inspection:
- FB inputs default to their type-default value. In STEP 7 V5.x an unwired or unresolved FB input initializes to FALSE (BOOL), 0 (INT/DINT), 0.0 (REAL), T#0ms (TIME), or '' (STRING). The motor-start FB is waiting for a TRUE on its Start input; the input never receives one; the output never latches.
- The editor no longer offers the engineer a recognizable pin label. Without the comment, the engineer cannot tell which pin is Start and which is Stop, may inadvertently believe the wire is missing, and re-wires the call - often in a way that does not match the FB interface.
Three common ways the symbol table loses entries in a working project:
- Manual row deletion in the Symbol Editor.
- Symbol Editor filter applied (e.g., a filter showing only outputs), the engineer mistakes a filtered view for the full table, and deletes a row.
- Project import or re-integration from another tool that does not carry the symbol table forward (e.g., a TIA Portal export/import with a STEP 7 V5.x project, or a CSV round-trip that overwrites the table).
A secondary cause, easily missed, is the view options on the LAD/FBD editor:
-
View > Display > Symbolic Representation toggles between symbolic (
Start_Button) and absolute (I0.0) addressing. If the engineer toggles this off, the symbolic name disappears even when the symbol table is intact. - View > Display > Comment toggles the yellow tool-tip text. If the engineer toggles this off, the comments disappear even when the symbol table rows are present.
Both of these are editor display settings, not data changes. They affect what the user sees, not what the CPU executes. Verify both before assuming the symbol table itself is damaged.
STEP 7 Symbol Table Architecture
The Symbol Editor in SIMATIC Manager is a single project-wide file. Each row stores four fields:
| Field | Data Type | Example | Notes |
|---|---|---|---|
| Symbol | STRING | Start_Button | Symbolic name. Max 24 alphanumeric characters and underscore in STEP 7 V5.x. |
| Address | IEC / Mnemonic | I 0.0 | Absolute address. Format is <area><space><byte>.<bit> (for bit addresses). Must be unique project-wide. |
| Data Type | IEC type | BOOL | BOOL, BYTE, WORD, DWORD, INT, DINT, REAL, S5TIME, TIME, STRING, etc. Drives the data type used by the symbol. |
| Comment | STRING | Motor 1 Start PB | Shown as the yellow text on the LAD/FBD pin and as the tool-tip in the Symbol Editor itself. Max 80 characters. |
The symbol table is not downloaded to the CPU. It is a SIMATIC Manager editor convenience only. STEP 7 resolves all symbolic references to absolute addresses at compile time, and the binary stored in the S7-300 / S7-400 CPU contains absolute addresses only. The CPU executes against absolute addresses regardless of whether the symbol table exists on the engineering station. This is the key reason the loss of symbolic comments does not break execution - it just makes the editor harder to read.
For TIA Portal projects on S7-1200 / S7-1500, the equivalent object is the PLC tag table (PLC_x > PLC tags > Default tag table, plus any user-defined tag tables). TIA Portal downloads the tag table to the PLC so that the web server and HMI can resolve symbolic names, but the compiled SCL / LAD / FBD code itself still uses absolute addresses after compile.
Function Block, Instance DB, and OB1 Interaction
An FB differs from an FC (function) in one critical way: it owns a chunk of memory, which lives in an instance data block. The instance DB holds the values of the FB's STAT (static) and IN_OUT variables between scans. TEMP variables are re-initialized on every call. The instance DB is what makes the FB stateful - the latch bit that holds a motor in RUN state lives in the DB, not in the FB code.
| Block | Owns Memory? | Multi-Instance? | Typical Use |
|---|---|---|---|
| OB (e.g., OB1, OB35, OB100) | No | No | Cyclic, cyclic-interrupt, startup, time-of-day, error execution. |
| FC (Function) | No | No | Pure function. Parameters passed by value. No memory between scans. |
| FB (Function Block) | Yes (instance DB) | Yes (multi-instance inside parent FB) | Stateful logic - motor controls, valves, drives, PID. |
| Global DB | Yes (shared) | N/A | Shared data, recipes, look-up tables, HMI mirroring. |
| Instance DB | Yes (for one FB type) | No | Memory for one specific FB call. |
Sample FB interface declaration in STEP 7 STL / Source view:
FUNCTION_BLOCK FB_Motor
VAR_INPUT
Start : BOOL; // I0.0 Start Button
Stop : BOOL; // I0.1 Stop Button
Overload : BOOL; // I0.2 Thermal trip (NC contact)
END_VAR
VAR_OUTPUT
Run : BOOL; // Q4.0 Contactor
END_VAR
VAR
Run_Latch : BOOL; // Static latch bit - lives in instance DB
END_VAR
BEGIN
IF Overload THEN
Run_Latch := FALSE;
ELSIF Stop THEN
Run_Latch := FALSE;
ELSIF Start THEN
Run_Latch := TRUE;
END_IF;
Run := Run_Latch AND NOT Overload;
END_FUNCTION_BLOCK
OB1 call in FBD view, with all four symbols present in the symbol table:
+---------------------------------------+
| FB_Motor |
| DB1 (instance) |
| |
I0.0 -| Start Run |- Q4.0
I0.1 -| Stop |
I0.2 -| Overload |
+---------------------------------------+
When the symbol table rows for I0.0, I0.1, I0.2, and Q4.0 are present, the editor shows the four yellow comments on each pin. When the symbol table rows are removed, the editor displays I0.0, I0.1, I0.2, and Q4.0 with no comment, and the engineer's first reaction is that the wiring is missing.
Why the Block "Stops Working" in PLCSIM
An FB in STEP 7 V5.x uses default value initialization for formal parameters that are not connected or that cannot be resolved. The default depends on the data type:
| Data Type | Default Value | Effect on Unwired Input |
|---|---|---|
| BOOL | FALSE | Input reads 0 in the FB |
| BYTE / WORD / DWORD | 0 | Input reads 0 |
| INT / DINT | 0 | Input reads 0 |
| REAL / LREAL | 0.0 | Input reads 0.0 |
| TIME / S5TIME | T#0ms | Timer never expires |
| STRING | '' (empty) | Empty string passed |
| DATE_AND_TIME | DT#1990-01-01-00:00:00 | Default timestamp |
For the example motor FB, if Start, Stop, and Overload are not driven by a real process signal, all three read FALSE. The latching branch ELSIF Start THEN Run_Latch := TRUE never fires, so Run stays FALSE. The engineer opens PLCSIM, opens DB1 in monitor mode, sees DB1.DBX0.0 (Start), DB1.DBX0.1 (Stop), DB1.DBX0.2 (Overload), and the static latch DB1.DBX2.0 (Run_Latch) all at 0, and concludes the FB "does not work." The FB is working correctly; the process conditions are not met. The PLCSIM I view has not been used to drive I0.0 TRUE.
Step-by-Step Recovery Procedure
Procedure for a STEP 7 V5.5 project that compiles but does not function in PLCSIM. Estimated time: 5-10 minutes.
-
Open the Symbol Editor. In SIMATIC Manager, expand the S7 Program in the project tree, then double-click
Symbols. The Symbol Editor opens with the full project symbol table. - Check the view options on OB1. Open OB1 in LAD/FBD. Verify View > Display > Symbolic Representation is checked (or unchecked intentionally) and View > Display > Comment is checked. If both are on and the yellow text is still missing, proceed with step 3.
-
Filter for the affected addresses. In the Symbol Editor, use the Ctrl+F search or View > Filter. Search for each of
I0.0,I0.1,I0.2, andQ4.0in turn. Note which addresses return 0 rows. -
Restore the missing rows. For each missing address, click into the symbol table at the bottom (the empty row) and type a new entry. The address must be entered with a space between the area and the byte:
I 0.0, notI0.0. STEP 7 will reject the entry if the format is wrong.
| Symbol | Address | Data Type | Comment |
|---|---|---|---|
| Start_Button | I 0.0 | BOOL | Motor 1 Start PB |
| Stop_Button | I 0.1 | BOOL | Motor 1 Stop PB |
| Overload_OK | I 0.2 | BOOL | Thermal Overload NC |
| Contactor_K1 | Q 4.0 | BOOL | Motor 1 Contactor |
- Save the symbol table. Press Ctrl+S. STEP 7 will re-symbolize the FB calls on the next open. To force a refresh, right-click the S7 Program in the project tree and choose Compile (or simply close and re-open OB1).
- Verify the yellow comments are back. Open OB1 in LAD/FBD view. The FB call pins should now show "Start_Button", "Stop_Button", "Overload_OK", and "Contactor_K1" as yellow tool-tips on the appropriate pins.
- Re-download to PLCSIM. Open S7-PLCSIM, power on the simulated CPU, and download the entire S7 program (blocks + system data). Confirm the FB instance DB (DB1) is present in the online view of the S7 program.
-
Force the start input in PLCSIM. Use the PLCSIM I view or the VAT/Monitor/Modify dialog to force
IB0to0000 0001(I0.0 TRUE). The latching branch should driveQ4.0TRUE, and the staticRun_Latchin DB1 should latch. -
Verify the FB instance DB online. Open DB1 in online monitor mode. Confirm the static
Run_Latchbit at the address declared forRun_Latchin the FB interface (in the example,DB1.DBX2.0) goes TRUE when Start is pulsed and stays TRUE after Start returns to FALSE.
Start_Button = I 0.0 and someone added Start_Button = I 1.0 by accident, the editor will warn at save time and reject the duplicate. The recovery procedure is the same: search, identify the wrong row, correct the address, save.PLCSIM-Specific Verification
S7-PLCSIM V5.4 (the classic simulator bundled with STEP 7 V5.5) supports S7-300, S7-400, ET200S, and a subset of WinAC. The simulator runs on the same PC as STEP 7 and uses the MPI / TCP / PROFIBUS interface to communicate with the editor. Relevant behavior to understand for this troubleshooting case:
- Symbolic comments are not visible in the PLCSIM standalone monitor view. PLCSIM shows absolute addresses only. To see symbolic names online, use the STEP 7 VAT (Variable Table) or the program editor's Monitor function (the glasses icon) - both still see the symbol table and display the symbolic names.
- Forcing of I, Q, M, DB, and PI/PQ is permitted. Force values persist across scans until changed. This is the only practical way to drive I0.0 in PLCSIM because no real process signals exist.
- The scan cycle is governed by OB1 properties. Default minimum cycle time and OB1 priority are honored. Use PLCSIM > Execute > Run for normal cyclic execution, or PLCSIM > Execute > Single Scan to step one OB1 pass at a time for debugging.
- The diagnostic buffer mirrors a real CPU. Stop events, OB loading errors, and time errors are recorded. If the FB instance DB is missing or has a length mismatch, the simulated CPU goes STOP with a diagnostic buffer entry of "DB not loaded" or "Length error when reading." Open the diagnostic buffer with PLC > Diagnostic/Setting > Diagnostic Buffer in SIMATIC Manager.
- PLCSIM does not support all FB library types. Some FBs from the SIMATIC library (for example, PID control blocks, communication FBs for PROFIBUS-DP, or blocks that require a CP module) will not simulate fully. For these, the FB executes but the underlying hardware-dependent calls return an error code in the instance DB. Verify the specific FB type's documentation if the simulation behavior is unexpected.
For TIA Portal projects, PLCSIM is integrated in the TIA Portal tree as SIMATIC PLCSIM. Symbolic monitoring is supported in the watch tables and in the program editor's online view, and the entire S7-1200 / S7-1500 functional scope is simulated (with documented limitations for technology objects and high-speed counters).
TIA Portal Equivalent Workflow
If the same fault appears in a TIA Portal project (S7-1200 / S7-1500), the recovery flow is the same in spirit, but the menus are different. Use the following sequence:
- Open the device view of the PLC.
- Open PLC tags > Default tag table (or the project's user-defined tag table).
- Add or restore rows for I0.0, I0.1, I0.2, Q4.0 with the correct data type and comment. Address format is
%I0.0for input bits and%Q4.0for output bits; the symbolic name is a free-form string up to 125 characters in TIA Portal. - Recompile the software (project tree > right-click PLC > Compile > Software).
- Download to PLCSIM or to the real CPU.
- Open a watch table, enable monitoring, and force the relevant tags. The watch table shows symbolic names because it reads from the tag table.
- Verify the FB instance DB is generated and that the static variables are populated correctly.
Symbolic comments in TIA Portal are stored both in the project comments and in the compiled tag table. If the comments disappear in the LAD/FBD view, the cause is one of three: the tag row was deleted, the comment field was blanked, or the View > Comments display option is toggled off. Check the display options first; they are local to the editor and do not change the project data.
Preventive Best Practices
To avoid the same fault on a future project, apply the following practices from the start:
-
Use unique, descriptive symbol names. Avoid generic names like
START,STOP,RUNthat collide across motors. UseM1_START,M1_STOP,M1_CONTfor motor 1;M2_START,M2_STOP,M2_CONTfor motor 2; and so on. STEP 7 V5.x disallows duplicate symbol names project-wide, so the prefix scheme is enforced. - Document symbol comments at the time of creation. Adding comments later, or relying on a colleague to add them, leads to empty tool-tips in the editor. The comment is the engineer's documentation, not an afterthought.
- Enable compiler warnings for unconnected operands (TIA Portal). Under PLC > Properties > Compile > General > Warnings, enable "Warning for unconnected operands." This catches unwired FB inputs at compile time and prevents the "FB does not work in PLCSIM" symptom at the bench.
- Lock the symbol table against accidental edits. SIMATIC Manager does not have a built-in lock, but using a project version control system (or a read-only archive of the project) detects accidental deletions via diff. TIA Portal has a similar facility under Project > Versioning.
- Verify the symbol table before every download to PLCSIM. A 30-second check of the symbol table before running a simulation catches the issue at the bench rather than during factory acceptance testing.
- Always declare FB instance DBs explicitly. When you call an FB, let STEP 7 auto-generate the instance DB (right-click the FB in OB1 > Generate Instance DB). Do not point the call at a pre-existing DB of the wrong length; this creates a length error in the diagnostic buffer at the first scan.
- Use multi-instance FBs for repeated logic. If you have five motors of the same type, put the motor FB inside a parent FB (e.g., FB_MotorBank) and use multi-instances (DB1.DB_Motor1, DB1.DB_Motor2, etc.) to avoid creating five separate instance DBs. Multi-instances also keep the data in one place for HMI mirroring.
- Do not edit the symbol table during a live online session. Save the project, close the online connection, edit the symbol table, recompile, then reconnect. Editing the symbol table online can produce inconsistencies between the editor view and the online project.
Troubleshooting Matrix
| Symptom | Likely Cause | Verification Step | Corrective Action |
|---|---|---|---|
| Yellow comments missing on FB inputs in OB1 | Symbol table rows deleted | Open Symbols, search for each absolute address | Re-enter symbol, address, type, comment; recompile |
| Yellow comments missing in OB1 only, symbol table intact | View > Display > Comment is toggled off | Open OB1 > View > Display > Comment - check it | Toggle Comment on; verify tooltips appear |
| Symbolic names appear as bare absolute addresses (I0.0 instead of Start_Button) | View > Display > Symbolic Representation is off | Open OB1 > View > Display > Symbolic Representation - check it | Toggle Symbolic Representation on |
| PLCSIM runs, output never goes TRUE despite correct logic | FB inputs defaulting to 0 because process conditions not met | Monitor/force IB0 in VAT or PLCSIM I view; verify latch | Force the start input TRUE; verify latching behavior |
| FB call in OB1 has no pin labels at all | FB interface declaration corrupted or block re-imported incorrectly | Open FB in Source view, check VAR_INPUT / VAR_OUTPUT / VAR | Recompile the FB and re-call from OB1 |
| "DB not loaded" or CPU in STOP after download | Instance DB missing or wrong length | Check S7 Program > Blocks > System Data; check diagnostic buffer | Delete the instance DB and let STEP 7 re-create it |
| Symbolic names missing in online monitor | Project not compiled, or wrong CPU selected in PG/PC interface | Right-click block > Download to Target System; check Set PG/PC Interface | Recompile, re-download, verify CPU selection |
| Forcing in PLCSIM has no effect | Force job not active, or input is in process image update cycle | PLCSIM I view shows the forced value | Toggle the force, then read back; verify force job accepted |
| FB executes but STAT values reset every scan | Wrong instance DB assigned (different FB type or wrong length) | Open instance DB online; compare to FB declaration | Delete and regenerate the instance DB; re-download |
| Symbol table accepts a row but editor does not show it | Symbol Editor filter is active and hiding the row | View > Filter - clear or adjust filter | Clear filter, verify all rows are visible |
Related Siemens Resources
Engineers who need deeper reference material on the topics in this article can consult the following official Siemens documentation:
- Siemens Industry Online Support - main portal for SIMATIC manuals, FAQs, and firmware downloads.
- STEP 7 V5.5 Programming with STL / LAD / FBD reference manual - covers FB, FC, DB, OB, and symbol editor in detail.
- S7-300 CPU 31x Technical Specifications - covers process image update, scan cycle, and OB1 priority.
- S7-PLCSIM V5.4 manual - covers supported block types, forcing behavior, and diagnostic buffer mirroring.
Frequently Asked Questions
Why did the FB inputs show as unwired in LAD/FBD after I edited the symbol table?
STEP 7 redraws the FB call when the project is compiled. If the symbol table row for the absolute address is missing, the editor has no symbolic information to display and shows the bare address. The wire is still present in the compiled code; only the visual label is gone. Re-add the symbol table row, save, and recompile to restore the yellow tool-tips.
Does the symbol table download to the S7-300 / S7-400 CPU?
No. The symbol table is a SIMATIC Manager editor convenience only. STEP 7 resolves all symbolic references to absolute addresses at compile time. The binary on the CPU contains absolute addresses only. The symbol table is regenerated locally from the project file when the project is opened. TIA Portal on S7-1200 / S7-1500 is different: the tag table is downloaded so that the web server and HMI can resolve symbolic names, but the program code itself uses absolute addresses after compile.
My FB does nothing in PLCSIM even though the program compiled cleanly. What is the first thing to check?
Open a VAT (Variable Table) and force the start input TRUE. Then monitor the static latch bit in the instance DB. If the latch still does not set, the FB code has a logic issue. If the latch does set, the FB works; the apparent "no operation" was caused by un-driven inputs defaulting to 0. As a second check, confirm the instance DB is the correct length by comparing the FB interface declaration to the DB structure view.
Can I have multiple instances of the same FB type with different instance DBs?
Yes. STEP 7 supports multi-instance FBs. You can call FB_Motor five times in OB1, each with its own instance DB (DB1, DB2, DB3, DB4, DB5), or you can create a parent FB and put the five motor FBs as multi-instances inside it. The multi-instance approach uses a single parent instance DB and is preferred for tidiness and for keeping the data in one place for HMI mirroring.
How do I enable compiler warnings for unconnected FB inputs in TIA Portal?
Open the device view of the PLC, select the CPU, open Properties > Compile > General > Warnings, and enable "Warning for unconnected operands." Recompile the software; the warnings appear in the Info tab of the Inspector window. This option is available for S7-1200 / S7-1500 in TIA Portal and is not present in STEP 7 V5.x for S7-300 / S7-400.
The yellow comments are present in the Symbol Editor but still do not show on the FB pins in OB1. What now?
Verify View > Display > Comment is checked in the LAD/FBD editor. This display toggle is independent of the symbol table. If the comments are still missing with the toggle on, close OB1, re-open it, and force a recompile of the S7 program (right-click the S7 Program > Compile). The LAD/FBD cache may be stale after symbol table edits; closing and re-opening OB1 forces a fresh draw.