Resolving Greyed-Out DB Variables in TIA Portal V15 UDT/FB Source

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

In SIMATIC TIA Portal V15, an engineer opens a Data Block (DB) expecting to rename a tag, change a data type, or add a new variable. The DB editor opens, the row grid is visible, but the entire data view is rendered with a greyed-out background. No text fields are editable, no context menu items are active for "Rename", and any attempt to type is ignored. The engineer is locked out of the most basic structural edit on what appears to be a "normal" block.

This symptom is not a TIA Portal bug. It is the integrated development environment's deliberate behaviour for Data Blocks whose structural definition is owned by a parent object in the project. Once a DB has been derived from a User-Defined Type (called UDT in STEP 7 classic, and re-named PLC data type in TIA Portal) or from a Function Block (FB) static interface, the instance DB is no longer the "source of truth". The greyed-out appearance is a visual cue that the structure must be edited at its origin and then re-propagated.

Engineers familiar with STEP 7 V5.x will recognise the same lock-down behaviour: an instance DB that you "right-click → Open" in the S7-1500 CPU's program editor reveals the same greyed-out structural view, because the FB or UDT is the master and the DB is the slave.

Field note: The user-visible DB "name" (block title) and the block number (e.g., DB100) can still be changed in the project tree properties. The grey-out applies only to the internal structure of the DB - the rows for variable names, data types, and offsets. This distinction is the source of most user confusion.

Root Cause: Structure Ownership

Every DB in a SIMATIC S7-1200 / S7-1500 program can be created in one of three ways, and only one of those three allows the DB body itself to be edited as a free-form table:

DB Creation Method Structure Editable Inside DB? Where the Edit Must Be Made
Manual global DB (no type, no FB) Yes - white background, full edit access Inside the DB itself
DB derived from a PLC data type (UDT) No - greyed-out, read-only structure In the source PLC data type
Instance DB of an FB (single / multi-instance) No - greyed-out, read-only structure In the FB's Static / Input / Output / InOut / Temp interface

The grey background is rendered by the TIA Portal editor when the block property "Assignment of the data block to a user-defined type" (in V15 and earlier: "Assignment of the data block to a data type") is set, or when the block property "Instance of the function block" is filled with the name of an FB. TIA Portal enforces a single-master rule: the UDT or FB owns the structure; every DB that references it inherits it.

This is a safety and consistency feature for S7-1500 controllers. It guarantees that a UDT-driven tag list (for example, a SCADA-communication struct) is identical in every instance, and that modifying an FB interface automatically updates every instance DB without manual copy-paste. The downside is that engineers who are not aware of the rule waste time trying to type into a disabled grid.

Identifying the Source Type

Before editing anything, identify which of the three creation methods was used. There are three reliable diagnostics, in order of speed:

Diagnostic 1: Block Properties

  1. In the project tree, right-click the greyed DB and select Properties.
  2. Switch to the Information / General section.
  3. Look for either of the two fields below.
    Property Field Meaning Edit Origin
    Assignment to a PLC data type (V15+) or Assignment of the data block to a user-defined data type (V15 and earlier) DB is a UDT instance PLC data type (UDT) under PLC data types in the project tree
    Instance of the function block DB is an FB instance (single or multi) The referenced FB's static / input / output / in-out / temp interface

If both fields are empty, the DB is a free-form global DB - and the greyed-out behaviour means a different problem (typically the DB has its "Accessible from HMI / OPC UA" attribute mixed with "Block is know-how protected", or the project is open read-only from a network share).

Diagnostic 2: "Go to → Definition"

  1. Open the greyed DB and place the cursor on the first variable row.
  2. Right-click and select Go to → Definition (or press Ctrl+Shift+B in some TIA Portal versions).
  3. TIA Portal jumps directly to the source: either the parent PLC data type editor or the parent FB's static / interface section.

This is the fastest path. It works for both UDT and FB-instance scenarios and bypasses any uncertainty about the block property mapping.

Diagnostic 3: Cross-Reference

  1. Right-click the DB in the project tree and select Cross-reference (or Show usage).
  2. TIA Portal lists all callers, the parent type, and every read / write access. A UDT-derived DB shows the parent PLC data type in the "Used by" column; an FB-instance DB shows the calling FB and the static-variable name it instantiates.

For engineers working under FW lock-down, this view is also the easiest way to confirm that no code or HMI tag will be orphaned by the upcoming rename.

Solution A: Editing a UDT-Derived DB

Once you have confirmed the DB is derived from a PLC data type (UDT), the fix is a four-step upstream edit:

  1. In the project tree, expand PLC_x > PLC data types (or in older views: PLC_x > Program blocks > System blocks > PLC data types).
  2. Double-click the source PLC data type - for example UDT_SCADA_COMM in the source case.
  3. In the opened PLC data type editor, perform the rename, type change, or row addition. The editor is fully white / editable, exactly like a free-form global DB.
  4. Compile the project (Project tree → right-click PLC → Compile → Software (rebuild all blocks)). TIA Portal will propagate the UDT change to every DB that references it and to every HMI / OPC UA tag that consumes it.

After the compile, reopen the greyed DB. The structure now reflects the new names, types, and offsets. The grey background remains - that is correct; the structure is still owned by the UDT.

Watch out for the "Name as initial value" switch. When a UDT contains a STRING, WSTRING, or STRUCT member, the rename can collide with the instance-only initial value. If the compile produces warnings of the form "Initial value cannot be assigned", open the UDT, switch off "Setpoint in IDB" for the affected row, and recompile.

Solution B: Editing an FB-Instance DB

If the DB is a single- or multi-instance of an FB, the structural edit must occur in the FB interface itself:

  1. Locate the parent FB in the project tree. The DB's Properties → Information field "Instance of the function block" gives the FB's name (e.g., FB_MotorAxis).
  2. Open the FB. Switch the lower editor pane to the Interface section (the section tabs are: Input, Output, InOut, Static, Temp, Constant).
  3. For a pure name change, edit the Static section. For a type change of a tag that is wired out of the FB, edit Output or InOut as well.
  4. Save and compile. TIA Portal will show a "Structural change after instance creation" warning under Tools → Project history in the Inspector window. Acknowledge the warning, then download the new FB and the refreshed instance DB to the CPU. The CPU goes into STOP if the FB header signature changes; for S7-1500 this STOP / RUN transition is unavoidable for structural changes that touch retentive tags.

Multi-instance DBs (an FB instantiated inside another FB's static section) follow the same rules but require the parent FB to be reloaded too, because the instance lives in the parent's static memory.

Converting a UDT/FB DB into a Free-Form DB (Last Resort)

There are limited scenarios where the engineer genuinely wants the DB to be a free-form block, not a slave of a parent type - for example, when inheriting legacy code where the UDT was deleted by mistake. The conversion is irreversible in TIA Portal V15 and is best avoided.

  1. Open the DB, right-click, Properties → General.
  2. Clear the "Assignment to a PLC data type" field (or the older "Assignment of the data block to a user-defined data type" field). If the field is greyed, the DB was created with the "based on UDT" wizard and cannot be unlinked in V15 - the workaround is to create a new free-form global DB and manually copy / paste the rows.
  3. For an instance DB, the conversion path is: delete the instance DB, open the parent FB, and remove the multi-instance declaration; or change the call site from DB_Motor to a fresh FB_Motor instance.

After conversion, any code that referenced the old symbolic tag names will break, because the new free-form DB has different symbol names from the UDT. Mass re-wiring is usually required via "Rename" on the FB or UDT symbol.

Working Example: SCADA Communication DB

The original report uses a tag named UDT_SCADA_COMM in row 1 of the DB, followed by a STRUCT member. Concretely:

UDT_SCADA_COMM
STRUCT
   s_TagName  : STRING[32];r>   i_Value    : INT;
   r_Scale    : REAL;
   b_Active   : BOOL;
END_STRUCT;

To rename i_Value to i_ProcessValue:

  1. Project tree → PLC_1 > PLC data types > UDT_SCADA_COMM. Open it.
  2. Change the row name. The data type (INT) and the offset are unchanged.
  3. Compile. TIA Portal updates the dependent DB, every HMI tag bound to "DB_SCADA".i_Value, and every OPC UA node mapped to that symbol.
  4. Download the software to the CPU. The new symbol is active on the next scan.

If any HMI tag still references the old i_Value, TIA Portal raises an unresolved-symbol warning in the compile log under Info → Compile. The HMI must be recompiled and downloaded separately.

Step-by-Step Verification

After the upstream edit and compile, run the following verification sequence to confirm the change has propagated correctly:

  1. Reopen the DB. Confirm the variable name now matches the new PLC data type or FB static section.
  2. Open an Online → Go online session against the S7-1500 CPU. Force the value of the renamed tag via the watch table. The value must change in the live block. If the symbol still shows as undefined, the program has not been reloaded to the target - repeat the download.
  3. Cross-reference the old symbol across the project. Right-click the project root → Cross-reference of project. The old name should produce zero hits; the new name should match the expected number of references.
  4. Rebuild the HMI / SCADA project. In TIA Portal V15 this is Devices & Networks → HMI_1 → Compile → Software (rebuild all). The HMI tags should now resolve to the new symbol name without warnings.
  5. For an OPC UA server, open the S7-1500 OPC UA configuration and verify the node set shows the new symbol path. Re-publish the server endpoint if it exposes the namespace to third-party clients.

Common Pitfalls and Field Notes

Pitfall Symptom Fix
DB created "based on a UDT" wizard, then UDT deleted DB still grey, cannot be unlinked in V15 Re-create the UDT with the same name; or migrate to a new free-form DB and rewire symbols
Renaming a STATIC tag inside an FB CPU goes to STOP on download; "Instance data block is inconsistent" error Acknowledge the structural change warning, perform an STOP→RUN download; for S7-1500 this is normal for header-signature changes
Know-how-protected FB DB still grey, source FB cannot be edited Author the source from the know-how-protected source STL/SCL, or request the unprotected version from the block author
Optimised block attribute on S7-1500 Symbolic-only access; no absolute address to type into Open the DB in symbolic view; the row offsets are hidden by design
Project opened from a read-only network share or a checked-in TIA Portal Teamcenter gateway All DBs appear greyed out Check the project out / copy locally before editing; verify file system write permissions on the project directory
DB and UDT name collide after rename Compile error "Duplicate name" Rename the DB or the UDT to remove the ambiguity; UDTs and DBs share a global symbol namespace in S7-1500

TIA Portal Version Compatibility

The greyed-out UDT / FB instance behaviour is consistent across the major TIA Portal releases that share the V15 codebase family:

TIA Portal Version Status of UDT-Derived DBs Notes
V14 SP1 Greyed out, edit PLC data type First TIA version to use the term "PLC data type" for what STEP 7 V5.x called UDT
V15 / V15.1 Greyed out, edit PLC data type Property field still says "Assignment of the data block to a user-defined data type"
V16 / V17 Greyed out, edit PLC data type Property field relabelled to "Assignment to a PLC data type"
V18 / V19 Greyed out, edit PLC data type Same behaviour; "Go to → Definition" still the fastest path

For S7-1200 controllers the same rules apply from firmware V4.2 onward. For S7-300 / S7-400 controllers using the legacy STEP 7 V5.x editor, the UDT and instance-DB behaviour is identical in principle but the menu paths differ.

Useful Diagnostic Shortcuts

Action Shortcut / Path
Open PLC data type from DB Right-click row 1 → Go to → Definition
Open parent FB from instance DB Right-click row 1 → Go to → Definition
Show full cross-reference for a block Project tree → right-click block → Cross-reference
Compile only changed software blocks Project tree → right-click PLC → Compile → Software
Rebuild all software (heavy, but reliable) Project tree → right-click PLC → Compile → Software (rebuild all blocks)
Find unresolved references after a rename Inspector window → Info → Compile

Why are all rows in my Siemens TIA Portal V15 DB shown with a grey background?

The DB is either derived from a PLC data type (UDT) or is an instance of a Function Block. TIA Portal deliberately disables the in-DB structural editor and forces the change to be made at the parent object. Use Go to → Definition on row 1 of the DB to jump to the source.

How do I rename a variable in a UDT-driven DB without breaking the project?

Open the source PLC data type under PLC_1 → PLC data types, rename the row there, and recompile the project. TIA Portal propagates the rename to the DB, to every HMI tag, and to the OPC UA namespace. Acknowledge the structural-change warning and download the software to the CPU.

Can I unlink a DB from its UDT in TIA Portal V15?

Only if the DB was originally created as a free-form global DB and the UDT association was added later. For DBs created through the "based on a UDT" wizard the link cannot be removed in V15. The reliable workaround is to create a new free-form global DB, copy / paste the rows, and rewire the consuming code.

Does the CPU go to STOP when I rename a Static variable in an FB?

Yes, on S7-1500. A change in the FB's interface changes the instance-DB header signature, which TIA Portal surfaces as a "structural change after instance creation" warning. You must acknowledge the warning, download the FB and the instance DB together, and bring the CPU back to RUN. On S7-1200 the same rule applies for F-series safety CPUs.

What is the difference between a PLC data type and a UDT in TIA Portal?

None functionally - they are the same object. STEP 7 V5.x called it UDT (User-Defined Data Type); TIA Portal V14 SP1 and later re-named it PLC data type to align with the IEC 61131-3 terminology. The greyed-DB behaviour, the instance-DB inheritance, and the cross-reference semantics are identical.

Back to blog