Troubleshooting
Why WinCC Professional rejects DB_ANY in HMI tag sync
Short answer
A DB_ANY variable holds only a 16-bit data block number, but WinCC Professional's HMI tag table has no type mapping for DB_ANY and aborts the compile; a Comfort Panel target compiles the same project. Mirror the block number into a UInt tag, or convert the reference to a VARIANT with DB_ANY_TO_VARIANT, and exclude the DB_ANY member from tag synchronization.

On this page
The compile fails because DB_ANY is not in the HMI tag table's type map. A DB_ANY variable carries nothing but a data block number — a 16-bit unsigned value from 0 to 65535, two bytes, the same payload as a UInt — yet the WinCC Professional tag synchronizer has no DB_ANY-to-HMI mapping, so it aborts the whole HMI compile instead of skipping the member. The identical project compiles when its target is a Comfort Panel. The fix: keep the DB_ANY member PLC-side and either mirror its number into a UInt tag or convert the reference to a VARIANT upstream with DB_ANY_TO_VARIANT, excluding the DB_ANY row from tag synchronization either way.
What DB_ANY actually stores #
DB_ANY exists on the S7-1200 and S7-1500 to identify any data block: the value is the block's number and nothing else. Two bytes, so 65,536 possible values, 0 to 65535 — identical in width and range to UInt. It carries no symbolic information about the block's contents, which is why an HMI cannot bind a screen element to "whatever block this points at." Typical uses are indirect block access where the number is only known at runtime, generic data-handling FBs, and, on S7-1500(T) motion controllers, passing technology objects into Motion Control FBs. Siemens documents the data type in support entry 109747178 ("Using the DB_ANY data type") and the technology-object use in application note 109822593.
Where the compile stops #
The HMI tag synchronizer walks every member of the source structure and maps each PLC type to an HMI type: Bool, Int, DInt, Real, Word, String and the other standard types all have entries. DB_ANY has none. The compiler treats the unmapped member as fatal, aborts before screens and connections are built, and reports the structure member as an invalid type for the HMI device. The failure is specific to the WinCC Professional PC station: a minimal test project with a DB_ANY member inside a synchronized structure compiles against a Comfort Panel target and fails against the PC station, so the PLC tag itself is legal and the rejection sits in WinCC Professional's tag conversion path. A legal PLC tag being refused at the HMI tag-table boundary shows up in other forms too, as in Fixing Invalid Bit Address Errors When Adding HMI Tags, and unmapped structure members failing at HMI import are not unique to this platform — the same class of problem on an NJ target is covered in why structure tags are missing from HMI tag import on an NJ.
Fix 1: mirror the block number as a UInt tag #
This is the lowest-risk fix when the HMI only needs to display or log which block is selected:
- Open the source data block and add a sibling member, for example
Recipe_DB_Noof type UInt, next to the DB_ANY member. - In the user program, copy the block number into that mirror whenever the DB_ANY value changes — both members must move together, or the HMI shows a stale number. If you also edit the data block by hand, check first how manual PLC data block edits interact with HMI writes.
- In the HMI tag table, synchronize the structure again but clear the DB_ANY row so it is not imported.
- Recompile the HMI. The error clears, because UInt has a documented mapping and the compiler now sees only mapped types.
The mirror tag can be read or written from the HMI: a screen field can show the block number, and an operator entry can send a new number back for the PLC to use.
Fix 2: convert to VARIANT upstream #
When the HMI must read fields inside the referenced block — a recipe name, a setpoint — convert the reference at the PLC boundary instead. The DB_ANY_TO_VARIANT instruction, grouped with the other Variant instructions in TIA Portal, takes the DB_ANY reference and returns it as a VARIANT; a called FB then reads individual elements by symbol and exposes them as ordinary scalar tags of type String, Int or Real. Those scalars have type mappings, so they import and compile. Two rules apply: the DB_ANY member still never enters the HMI tag table, and the instruction's CPU firmware and TIA Portal version prerequisites are listed with the instruction itself in your version's help — confirm them for your CPU before building the adapter FB.
Worked example #
Take a recipe manager whose data block RecipeData contains hRecipeDB of type DB_ANY plus the mirror Recipe_DB_No of type UInt. The operator selects the block named "Recipe_042", and the program sets both members to 42. Check the numbers: 16 bits give 2^16 = 65,536 distinct values, so the legal range is 0 to 65535, and 42 sits comfortably inside it. The HMI tag table imports Recipe_DB_No as a UInt and the screen shows 42. If the screen also needs the recipe name, the PLC uses an indexed DB access on block 42 to read the name string into a RecipeName member of type String, and the HMI reads that string instead. Nothing touches the DB_ANY row, and the HMI compile passes.
The decision #
- You only display or log the selected block number: mirror it as a UInt sibling member and clear the DB_ANY row from the synchronization — done in one tag.
- You need fields from inside the referenced block: convert with DB_ANY_TO_VARIANT upstream and expose the scalar results to the HMI.
- Your target is a Comfort Panel rather than a WinCC Professional PC station: the project compiles as-is, so leave the DB_ANY member synchronized.
- You are on WinCC Professional: never leave a DB_ANY member in the tag sync — the compiler stops on it every time, no matter how the rest of the project is built.
Questions asked
Can I just change the HMI tag's data type to UInt instead?
No. The synchronizer rejects the DB_ANY member during the type-mapping pass, before any HMI-side type edit exists to change, so retyping is not offered in the tag table. Clear the DB_ANY row from the synchronization and add a UInt mirror member in the DB that carries the block number; that mirror imports and compiles normally.
My structure has several DB_ANY members — does the fix change?
No. Every DB_ANY member is rejected the same way, so clear each one from the synchronization and give each a UInt mirror of its own, named for the block it tracks. Several mirror members can live in the same structure alongside the DB_ANY members without retriggering the compile error.
Does the DB_ANY member need to be deleted from the PLC data block?
No. The member stays in the data block and keeps working for PLC-side indirect access and FB calls; only its row in the HMI tag table must go. Deleting it would break the program logic that depends on it, which is exactly what the UInt mirror avoids.


