InTouch TagCreator DB Prefixes iDB, rDB, dDB Reference

Karen Mitchell10 min read
HMI / SCADATechnical ReferenceWonderware
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

InTouch TagCreator DB Prefixes (iDB, rDB, dDB) for SimaticNet S7 Communication

Overview

Legacy InTouch HMI projects (Wonderware/AVEVA) commonly contain access names whose tag name items carry non-obvious prefixes such as iDB7.b34, rDB3.real345, dDB12.w20, DBX4.x1.0, and ddDB1.dd0. These prefixes are not native Siemens S7 mnemonics and are not generated by SimaticNet. They are produced by the InTouch TagCreator utility, a tag-import wizard shipped with older InTouch releases that converts raw PLC addresses into named InTouch tag database (DBD) entries using a configurable type-to-prefix map. The resulting tags are then served to InTouch WindowMaker/WindowViewer through OPCLink (the Wonderware OPC DA Server wrapper that bridges OPC 1.0/2.0 to the older DDE/Suitelink protocol). Understanding the prefix map is mandatory when upgrading, migrating, or troubleshooting any InTouch 7.x / 9.x / 10.x application that was authored on top of a SimaticNet OPC server.

This reference documents the prefix system, the underlying S7 addressing format, the scores7.txt resolution file, and the path to modernise the project on current AVEVA InTouch 2020 R2 / 2023 R2 with AVEVA InTouch and the AVEVA Customer Support knowledge base.

Why the Prefixes Exist

OPC DA 2.0 item identifiers are strings; they are not strongly typed. When InTouch reads a tag through OPCLink it must know whether to interpret the bytes returned by the OPC server as a signed 16-bit integer, a 32-bit IEEE-754 float, a single bit, or a BCD word. Rather than force the developer to set the data type for every imported tag manually, InTouchTagCreator applies a default prefix based on the guessed S7 data type at the source address. The prefix is then encoded into the InTouch tagname and the matching data type is assigned to the DBF record. The original raw address is preserved in the tag's Item field (or the access name's I/O address field) for the OPC server to resolve.

Because the prefix is only a labelling convention, the actual data type is bound to the tag database record in InTouch, not to the prefix string. A tag named iDB7.b34 is forced to Integer type by InTouchTagCreator, but if the developer later changes the tag's type in the DBF the OPC server will be asked to return whatever size the new type requires from the same DB offset, which usually produces a BAD quality or read of adjacent bytes.

Default Prefix to S7 Data Type Mapping

The default map installed by InTouchTagCreator matches S7 elementary data types used in data blocks (DB), inputs (I), outputs (Q), and merkers (M). The complete default map is shown below.

InTouchTagCreator Prefix S7 Data Type Size (bytes) OPC/PLC Value Type Range
DBX or x BOOL (X) 1 bit VT_BOOL 0 or 1
dDB or di DINT (32-bit signed) 4 VT_I4 -2,147,483,648 to 2,147,483,647
iDB or i INT (16-bit signed) 2 VT_I2 -32,768 to 32,767
rDB or r REAL (32-bit IEEE-754 float) 4 VT_R4 ±3.4E±38 (7-digit precision)
wDB or w WORD (16-bit unsigned / BCD) 2 VT_UI2 0 to 65,535
dwDB or dw DWORD (32-bit unsigned / BCD) 4 VT_UI4 0 to 4,294,967,295
bDB or b BYTE (8-bit hex) 1 VT_UI1 0 to 255 (0x00 to 0xFF)
sDB or s STRING (S7 short string) n + 2 VT_BSTR max 254 chars (2-byte header)
ddDB or dd UDT-derived discrete struct (custom) varies VT_DISPATCH / UDT defined by S7 UDT
Note: The dd prefix is a non-standard extension produced by some InTouchTagCreator builds when importing symbols mapped to an S7 UDT (User-Defined Data Type) that the wizard could not decompose into elementary types. Treat the dd string as a project-specific marker, not a guaranteed InTouch keyword, and verify each ddDBn reference in the original STEP 7 / TIA Portal symbol table before deleting or renaming it.

Decoding the Address String

After stripping the type prefix, the remainder of the tag name is the absolute byte address inside the referenced S7 area. The general form is

<prefix><Area><AreaNumber>.<DataType><ByteOffset>(.BIT)

Examples from the source project:

InTouch Tagname Prefix Area / Number Byte Offset Bit S7 STL Equivalent
iDB7.b34 i (INT) DB 7 34 — DB7.DBW 34
rDB3.real345 r (REAL) DB 3 345 — DB3.DBD 345
dDB12.w20 d (DINT) DB 12 20 — DB12.DBD 20
DBX4.x1.0 DBX (BOOL) DB 4 1 0 DB4.DBX 1.0
wDB5.w14 w (WORD) DB 5 14 — DB5.DBW 14
bDB9.b0 b (BYTE) DB 9 0 — DB9.DBB 0

OPCLink and SimaticNet accept the dotted-byte form, but the canonical S7 syntax preferred by the SimaticNet OPC server is the DB<n>.DBX<byte>.<bit> form for BOOL, DB<n>.DBB<byte> for BYTE, DB<n>.DBW<byte> for WORD/INT, and DB<n>.DBD<byte> for DWORD/DINT/REAL. The starting byte offset in a Siemens data block is zero-based; offsets in some STEP 7 watch tables are one-based, which is a common source of off-by-N read errors when migrating.

The scores7.txt Resolution File

The original InTouchTagCreator emits a text-based resolution file named scores7.txt that maps each InTouch tagname to the SimaticNet OPC item path. The file is written to the InTouch project directory and to a global cache under

C:\Program Files\SIEMENS\SIMATIC.NET\opc2\binS7\scores7.txt

(the path \Program Files\SIEMENS\SIMATIC.NET\opc2\binS7 is the default install location for the SimaticNet OPC Scout / OPC server binaries on Windows; on 64-bit Windows 7/10 the path becomes C:\Program Files (x86)\SIEMENS\SIMATIC.NET\opc2\binS7 when the 32-bit-only SIMATIC NET 2008 or earlier is installed side by side with newer software).

Inspect the file with a plain text editor; entries follow the pattern

TagName=iDB7.b34   Item=S7:[S7_Connection_1]DB7,INT34
TagName=rDB3.real345 Item=S7:[S7_Connection_1]DB3,REAL345
TagName=DBX4.x1.0  Item=S7:[S7_Connection_1]DB4,BOOL1.0

The Item= value is the exact string handed to the SimaticNet OPC server; the comma-separated data type token (INT, REAL, BOOL, BYTE, WORD, DINT, DWORD, STRING) is what selects the OPC canonical data type. If you change a tag's type in InTouch without updating scores7.txt, OPCLink will still request the original canonical type and InTouch will perform an incorrect cast on the returned bytes.

Tip: When upgrading SimaticNet from V8.x to V15/V16 (or to the SIMATIC NET PC-Software for Industrial Ethernet), regenerate scores7.txt by re-running InTouchTagCreator against the new OPC server. The S7 connection name in the S7:[S7_Connection_1] bracket is created in the SIMATIC NET Configuration Console and must exist under that exact name or the OPC browse will return OPC_E_INVALIDITEMID (0xC0040004).

OPCLink Configuration Prerequisites

  1. Install the SIMATIC NET PC-Software version that matches the target Windows OS. For S7-300/400 S7-300/400 Ethernet, version 12 SP2 or later; for S7-1200/1500, version 14 SP1 or later with the TIA Portal add-on.
  2. Open the Configuration Console (Start → SIMATIC → SIMATIC NET → Configuration Console). Add a new S7 Station with a logical Access Point named identically to the [S7_Connection_1] token in scores7.txt. Select the correct Ethernet interface, set the PC station's IP and the PLC's IP/TSAP or rack/slot.
  3. Verify connectivity with OPC Scout V10 (or OPC Scout V20 on newer SIMATIC NET): add a new DA group, insert an item such as S7:[S7_Connection_1]DB1,INT0, and confirm a Good quality read.
  4. Install OPCLink as part of the Wonderware System Platform / InTouch installation. Configure the OPCLink topic to point at the SimaticNet OPC server (ProgID OPC.SimaticNET) and select SuiteLink as the protocol to the InTouch application.
  5. Re-run InTouchTagCreator against the configured OPCLink topic to regenerate the DBD with the correct prefix-to-type mapping.

Common Failure Modes

Symptom in InTouch Typical Cause Diagnostic Remedy
All iDB* tags display ??? (Bad Quality) SimaticNet OPC service stopped or S7 connection offline Open OPC Scout, read S7:[S7_Connection_1]DB7,INT34 Restart SIMATIC NET Configuration service, verify PLC IP / TSAP, check Ethernet link
rDB* tags show garbage values; iDB* tags from same DB are correct Byte-swap between SimaticNet and PLC firmware Compare with STEP 7 VAT monitor on same address Set SimaticNet connection property Optimized block access = false, or enable byte-order conversion in OPCLink
Tag value flickers between correct and 0 OPCLink polling rate exceeds PLC scan time Check Update Interval on access name Raise interval to 250–1000 ms for non-critical values
ddDB* references throw OPC_E_INVALIDITEMID (0xC0040004) UDT not exported from STEP 7 or symbol name mismatch Browse SimaticNet with OPC Scout; check STEP 7 symbol table Re-export symbols from STEP 7 via OPC Symbol Export; rebuild scores7.txt
Tags read correctly in WindowMaker preview, fail in Viewer runtime OPCLink DSN or topic not declared in win.ini / registry Inspect Microsoft ODBC Administrator for OPCLink DSN Re-create OPCLink DSN with 32-bit ODBC administrator; required for 64-bit Windows
Quality = GoodNoData on STRING tags Length mismatch between S7 STRING[254] and InTouch string buffer Compare max length in DBF record to S7 declaration Set tag's max length equal to S7 STRING max + 2 header bytes

Verification Checklist

  1. Open InTouch WindowMaker; load the project; choose Special → Tagname Dictionary and filter by access name. Verify that every iDB*, rDB*, dDB*, wDB*, bDB*, DBX*, ddDB* tag shows a Good quality with a plausible value.
  2. Cross-check at least one tag of each prefix family against the same address in STEP 7 (online → Monitor/Modify) or in TIA Portal (online → Watch table) to confirm the byte offset is correct, especially the zero- vs. one-based convention.
  3. Confirm OPC Scout can browse and read every S7 connection listed in scores7.txt. A successful OPC Scout read is a prerequisite for any InTouch visibility problem to be a configuration issue rather than a transport issue.
  4. Inspect scores7.txt; the Item= strings must match the access point name, S7 connection name, and data type exactly.
  5. Switch InTouch to WindowViewer runtime; toggle a single discrete tag (DBX4.x1.0) and confirm the corresponding bit in the STEP 7 VAT toggles. This round-trip proves both read and write paths.
  6. Capture the OPCLink diagnostic log (SLLOGGER) and the SimaticNet trace (S7Trace.exe or SIMATIC NET Trace); ensure no 0xC0040004 / 0x80004005 errors are reported at the configured polling rate.

Migration Notes for Current AVEVA Releases

Projects using the legacy iDB*/rDB* prefix convention are still supported by AVEVA InTouch 2020 R2 and 2023 R2, but the recommended path forward replaces OPCLink + SimaticNet with the AVEVA Communication Drivers (formerly the Wonderware ArchestrA DAServer for SIMATIC Suite, now packaged as AVEVA Communication Driver for SIMATIC S7 MPI/TCP with ProgID KEPServerEX or the modern SIMATIC Suite driver). When migrating:

  • Re-import the STEP 7 / TIA Portal symbol table directly into the ArchestrA or Industrial Graphic environment; the iDB/rDB prefix is dropped in favour of canonical DB<n>.BYTE<offset> addressing.
  • Validate the migration with the InTouch Tag Comparison tool to detect orphan tags, type mismatches, and stale quality codes.
  • Retire the 32-bit-only OPCLink DSN by moving the tag dictionary to a 64-bit ArchestrA Galaxy. The 32-bit ODBC dependency on Windows 10/11 causes intermittent hangs that look like a tag prefix issue but are actually a driver mismatch.
Safety warning: When touching live tag imports, place the InTouch runtime in Offline mode or place the controller in Stop / Run-Remote with read-only before re-running InTouchTagCreator. The wizard opens a write-enabled OPC group by default and any difference between the imported symbol offsets and the existing DBF entries can overwrite live values during a rebuild.

FAQ

What does the iDB prefix mean in an InTouch tagname?

The iDB prefix is the InTouchTagCreator default for a 16-bit signed integer (INT, S7 type WORD length 2). The remainder of the string, e.g. iDB7.b34, is the byte offset 34 in DB 7; the corresponding SimaticNet OPC item is S7:[S7_Connection_1]DB7,INT34.

Is rDB the same as REAL in S7?

Yes. The rDB prefix marks a 32-bit IEEE-754 floating-point value. The address rDB3.real345 corresponds to DB3.DBD 345 in STEP 7 STL and to the OPC item S7:[S7_Connection_1]DB3,REAL345 in SimaticNet.

What is the ddDB prefix and is it a standard InTouch keyword?

dd is a non-standard extension emitted by some InTouchTagCreator builds when a tag is mapped to a Siemens S7 UDT (User-Defined Data Type) that the wizard could not break down into elementary types. Treat ddDB* references as project-specific; verify each against the original STEP 7 / TIA Portal symbol table before deleting or renaming.

Where is the scores7.txt file located?

By default it is written to C:\Program Files\SIEMENS\SIMATIC.NET\opc2\binS7\scores7.txt on 32-bit Windows and to C:\Program Files (x86)\SIEMENS\SIMATIC.NET\opc2\binS7\scores7.txt on 64-bit Windows when the 32-bit SIMATIC NET 2008 SP2 or earlier is installed. A local copy is also written to the InTouch application directory.

Why are my InTouch tags showing Bad Quality after upgrading SimaticNet?

The most common cause is a renamed or missing S7 connection. The bracketed token in scores7.txt (e.g. [S7_Connection_1]) must match the logical connection name in the SIMATIC NET Configuration Console. Confirm with OPC Scout V10/V20 that the same item string returns a Good value, then re-run InTouchTagCreator to regenerate the resolution file.

Back to blog