Resolving CFC Compiler Error: DB Address Not in Symbol Table

David Krause12 min read
SiemensTIA PortalTroubleshooting
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

Problem Description

When compiling a Continuous Function Chart (CFC) in SIMATIC STEP 7 (Classic V5.x with the optional CFC package) or in TIA Portal (V15.0 and higher, with the CFC option installed), the compiler aborts with an error of the form:

DBx.DBB0 is not in the symbol table or not unique.

The error appears in the Inspector window under Info > Compile, attached to a specific sheet, block, or pin inside the CFC chart. The referenced data block is a multi-instance DB instantiated from a User-Defined Data Type (UDT), and the address is being written on a CFC pin in absolute notation (DBx.DBD0, DBx.DBB0, etc.).

The message is misleading: the absolute address does exist at runtime, the DB does exist in the S7 program, and the UDT does exist in the project. The actual problem is that the CFC compiler cannot bind the absolute address to a global symbol, and that binding is mandatory at compile time because CFC compiles into SCL/STL through the symbol table. The compiler refuses to add the symbol implicitly.

Symptom signature: the error highlights a single pin, but the same address is used elsewhere in the project without error. This is the diagnostic clue that the issue is symbol binding, not data validity.

Environment and Affected Versions

Component Versions Notes
SIMATIC STEP 7 V5.x (Classic) V5.5 SP4+ with CFC V9.0 SP3+ PCS 7 V8.x / V9.x ships the CFC option by default
TIA Portal V15.0 / V15.1 / V16.0 / V17.0 / V18.0 / V19.0 / V20.0 CFC option installed separately; available for S7-1500 from V15
Controllers S7-300, S7-400, S7-1500, ET 200SP CPU All CPU families supported by CFC; S7-1200 is not supported
Editor CFC Editor (optional package) Not part of the TIA Portal base; requires license

The error text, the underlying root cause, and the fix are identical across classic STEP 7 and TIA Portal. Only the navigation paths and the symbol-table terminology differ (Classic calls it the Symbol Table, TIA Portal calls it PLC tags).

Root Cause Analysis

CFC is a graphical, signal-flow oriented language. The chart itself stores no data; the editor generates SCL or STL source at compile time. The generated code must reference every input, output, and in/out by symbolic name because the runtime optimizer, the cross-reference tool, and the download all depend on the global symbol table to resolve where data lives in the process image, work memory, or load memory.

The compiler walks the chart in two distinct passes:

  1. Pass 1 — Symbol resolution: every address written on a pin is mapped to the global symbol table. If the absolute address is not present, or if it is present but is non-unique (two symbols pointing to one address, or one symbol pointing to two addresses), compilation aborts and the offending pin is highlighted in the error list.
  2. Pass 2 — Type checking: the data type on the source pin must be assignment-compatible with the data type on the destination pin. UDT members are compared structurally. A UDT in one chart and a UDT with the same name but a different version in another chart will fail Pass 2 even if Pass 1 succeeded.

When you instantiate a UDT inside a DB, the editor creates the instance with the correct absolute memory layout, but the global symbol table is updated only when you explicitly declare the DB symbol. The CFC compiler will not silently register a symbol based on absolute address syntax, even if the address is valid at runtime. This is by design: silent symbol creation would mask programming errors and corrupt the cross-reference list.

Why "not unique" can be misleading: the same error string is raised when a UDT-derived DB and a global tag share an absolute start address, or when a UDT has been renamed and the instance DB still carries the old offsets. Always inspect the symbol table for duplicates before assuming the symbol is missing.

How CFC Resolves Addresses

CFC interconnections can be expressed in three different ways. Each requires a different level of symbol-table support.

Notation Example Symbol required? Recommended use
Absolute DB100.DBD0 Yes — DB symbol must exist Quick interconnections during commissioning; discouraged in production
Symbolic (single tag) "Motor_Speed" Yes — single PLC tag Scalar I/O and process values
Symbolic (UDT member) "Recipe_DB".Heating.Setpoint Yes — both DB and member path Structured data, multi-chart access, recipes

When the chart is compiled, the editor replaces the string on the pin with the fully qualified name from the symbol table. If the entry cannot be resolved, the pin remains in an "unbound" state and the compiler reports it. The pin remains visible in the chart; only the compile process aborts.

Pin address(absolute or symbolic) Pass 1: Symbolresolution Pass 2: Typechecking SCL Symbol tableor PLC tags UDT definition+ instance DB Missing symbol entry in Pass 1 raises "not in symbol table"

Why UDT-Based Data Blocks Trigger the Error

UDTs are most often used as the basis for interface DBs — recipe DBs, process-value DBs, unit-parameter DBs. Two distinct bugs lead to the same error message:

  1. The instance DB itself is missing from the symbol table. You created DB100 by dragging a UDT onto the program-blocks folder, but you did not open the PLC tag table and add a row with Name = Recipe_DB and Address = DB100. Without that row the absolute address DB100.DBD0 is unknown to the compiler, even though the DB and the data are present at runtime.
  2. The DB is in the symbol table, but the CFC pin is typed as a sub-element address that conflicts with a tag. For example, you wrote DB100.DBB0 on the pin, but the symbol "Recipe_DB" points to DB200, or a different PLC tag already maps to DB100.DBB0. The compiler refuses the ambiguous binding and reports the address as "not unique".

A third, less common variant: the UDT was renamed or recompiled with new offsets, but the instance DB has not been recompiled. The runtime memory layout is now stale, and the compiler raises the same error because the offset of the UDT member no longer matches the offset the chart expects.

Solution 1 — Declare the Data Block in the Symbol Table

This is the canonical fix. Add the DB as a global symbol and recompile.

STEP 7 V5.x

  1. Open S7 Program > Symbols.
  2. Append a new row: Symbol = Recipe_DB, Address = DB 100, Data type = DB 100, Comment = optional.
  3. Save and close the symbol table (Table > Save).
  4. Open the CFC chart, right-click and choose Chart > Compile > Charts as program.
  5. Inspect Info > Compile; the previous error must no longer appear.

TIA Portal V16 / V17 / V18 / V19 / V20

  1. Open the project tree and expand the target PLC.
  2. Select PLC tags > Show all tags (or open the Default tag table).
  3. Append a row: Name = Recipe_DB, Data type = DB, point the row at the existing instance DB (the dialog offers the block name and number).
    Alternative: drag the instance DB from Program blocks directly into the tag table; the editor creates the row automatically.
  4. Open the CFC chart, right-click and choose Compile > Charts as program.
  5. Open the Inspector window > Info > Compile and confirm the error is gone.
TIA Portal V20 introduced an inline symbol suggestion in the CFC pin editor. If the suggestion list is greyed out, the address does not resolve against the PLC tag table. The official workflow for resolving such errors is documented at Correcting compilation errors — TIA Portal V20; double-clicking an error line in Info > Compile jumps to the offending pin.

Solution 2 — Use Symbolic Addressing in the CFC

Avoid absolute notation entirely. Open the chart, double-click the pin, and use the Browse button to select "Recipe_DB".Heating.Setpoint. The compiler binds the path to the UDT element directly. The DB must still be in the symbol table, but the chart no longer carries the absolute address on the pin.

Symbolic addressing is preferred in new projects because:

  • Renumbering the DB does not break the chart.
  • The compiler performs full type checking on UDT member access.
  • Cross-chart references are easier to maintain and document.
  • The cross-reference list shows every chart that uses the UDT member, which is essential for impact analysis.

Solution 3 — Expose the UDT Through an FB Parameter

The most maintainable pattern for shared UDT instances is to keep the UDT as the type contract of an FB, and to pass the UDT instance in/out as a single structured pin. The CFC chart then operates on the whole UDT through that pin, and the compiler does not descend into individual UDT members on the sheet.

  1. Declare a UDT (e.g. UDT_Heating) containing all structured data:
    TYPE UDT_Heating
    STRUCT
      Setpoint : REAL;
      ActualValue : REAL;
      Enable : BOOL;
    END_STRUCT
    END_TYPE
  2. Declare a multi-instance DB (DB_Heating_Instance) of UDT_Heating. Declare its symbol in the PLC tag table (Heating_DB).
  3. Add an FB (e.g. FB_Heating) with an in/out parameter of type UDT_Heating:
    VAR_IN_OUT
      io_Data : UDT_Heating;
    END_VAR
  4. Call FB_Heating in CFC and connect Heating_DB to the structured pin io_Data.
CFC sheetpin: io_Data FB_HeatingVAR_IN_OUT io_Data Heating_DB(UDT_Heating) FB-UDT structured-pin pattern Compiler binds a single symbol; UDT members stay encapsulated

This pattern eliminates the "not in symbol table" failure mode for member access, because the chart carries only the UDT instance, not its individual members. The FB owns the type contract and can be reused across multiple charts. Re-compilation after a UDT change is a single click on the instance DB.

Verification Procedure

  1. Open Info > Compile. Confirm the original error is no longer listed.
  2. Open the cross-reference list (Go to > Cross-reference in Classic, Project tree > Cross-references in TIA Portal). Filter for the DB. The CFC chart entries should appear with status compiled rather than unbound.
  3. Download the program to the CPU or to PLCSIM. Place a watchpoint on DB100.DBD0 and on the CFC pin. Both should update identically in online mode.
  4. Force a chart recompile: Chart > Compile > Charts as program (regenerate). Some installations suppress the "Charts as program" step if the source has not changed; force it once to confirm the binding holds after a clean rebuild.
  5. If the chart is part of a CFC library or a master data library, repeat the verification after re-importing the library to confirm the symbol binding survives library updates.

Prevention and Best Practices

  • Declare every instance DB in the symbol table immediately after creation. A naming convention (e.g. iDB_Heating for instance DBs, gDB_AlarmLog for global DBs) makes missing entries visible during project review.
  • Avoid absolute addresses in CFC pins. Use the UDT member path or the structured FB parameter instead. Absolute addresses are acceptable during commissioning but should be migrated to symbolic form before project release.
  • One UDT, one source of truth. If a UDT is modified, propagate the change to all instance DBs before recompiling CFC. Stale UDT versions can also produce "not unique" errors when the offset layout diverges from what the chart expects.
  • Compile charts in the correct order. In STEP 7 V5.x, the chart compilation order is determined by the chart-folder priority. In TIA Portal, the order is top-down in the project tree. Wrong order can produce cascading errors that mask the root cause.
  • Use the cross-reference list before deleting or renumbering any DB referenced in a CFC. The chart does not warn before breaking; only the next compile reveals the damage.
  • Reserve a separate PLC tag table for CFC signal names (e.g. CFC_Signals) to keep them isolated from the I/O tag table. This prevents accidental address overlap with peripheral I/O and makes the symbol-table review easier.
  • Run a project-wide consistency check (Project > Compile > All in TIA Portal, or PLC > Compile and Download Objects in Classic) after any DB or UDT modification. A clean compile of every block before chart regeneration eliminates the cascading-error problem.

Related Errors and Edge Cases

Compiler message Typical cause Resolution
DBx.DBB0 is not in the symbol table DB symbol missing from PLC tag table / symbol table Add the DB to the tag table and recompile
Symbol ... is not unique Two symbols point to one address, or one symbol points to two addresses Remove the duplicate from the tag table; re-check the UDT offsets
Type conflict on pin ... UDT version mismatch between chart and instance DB Recompile the UDT and re-instantiate the DB; re-bind the pin
DB ... is not a UDT instance Pin written as a UDT member but the DB is a shared/global DB Convert the DB to a UDT instance or use a member of a global DB
Interconnection to read-only pin An input is connected to a constant or to a write-protected output Disconnect the constant; use an in/out pin for bidirectional signals
Address ... overlaps with ... Two UDTs allocated to overlapping memory regions Re-instantiate one DB; check the UDT base offsets

Frequently Asked Questions

Does every UDT-instantiated DB need a symbol-table entry for CFC?

Yes. CFC compiles through the symbol table, so every instance DB referenced from a chart must have a global symbol. Without the entry the compiler reports the address as "not in the symbol table" even though the data is present at runtime.

Why does the same address work in a DB but not in CFC?

LAD/FBD/STL blocks can use absolute addresses directly without any symbol binding. CFC is symbol-based; the compiler cannot infer the DB's symbolic name from the absolute address written on a pin, so it raises the error.

Can I use a global DB instead of an instance DB?

Yes, as long as the global DB is declared in the symbol table. The error refers to the symbol-table binding, not the DB type. A global DB is acceptable for shared data, but an instance DB of a UDT is preferred for type-safe structured data.

Does the fix differ between STEP 7 V5.x and TIA Portal V20?

The fix is identical — add the DB to the symbol table (Classic) or to the PLC tag table (TIA Portal). Only the navigation path differs. The TIA Portal V20 compilation-error correction guide documents the click path: open Info > Compile, double-click the error, correct the highlighted pin.

Will renaming a UDT break existing CFC charts?

Yes. Charts that reference UDT members by symbolic path will fail to compile after a UDT rename because the path is no longer resolvable. Update the UDT, recompile every instance DB, then refresh the cross-reference list and re-bind the affected CFC pins.

Is the S7-1200 affected by this error?

The CFC option does not support S7-1200 in any TIA Portal version. The error is specific to S7-300, S7-400, S7-1500, and ET 200SP CPUs with the CFC option installed. S7-1200 programs use LAD/FBD/SCL directly and do not compile through the CFC symbol-binding path.

Back to blog