WinCC Tag Selection: Server Prefix and AS-OS Connection Explained

David Krause13 min read
HMI / SCADASiemensTechnical Reference
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

Overview: WinCC Tag Architecture in Step 7 Integrated Projects

When a WinCC project is embedded inside a STEP 7 / TIA Portal project as a WinCC Application (the classic "WinCC Appl." configuration), tag management becomes a hybrid of two worlds: the SIMATIC S7 program domain and the HMI/SCADA domain. Tags are not just local WinCC variables; they are projections of S7 symbols, shared-DB elements, or FB parameters that have been published for operator control and monitoring. The Graphics Designer tag-selection dialog therefore exposes multiple paths to the same underlying process value, and each path carries different consequences for naming, quality propagation, redundancy, and runtime behavior.

The two most common paths the engineer encounters in the tag-selection window are:

  1. Project_Name_OS(1)::Tag_Name – a qualified path that includes the server prefix and a redundant-tag index.
  2. Tag_Name (or S7_block_folder/DB_Name.Variable) – an unqualified path that addresses the tag directly from the AS-OS connection or STEP 7 symbol server.

Choosing the wrong path on a single I/O field will not stop compilation, but it will surface at runtime as a yellow quality warning on the faceplate, a frozen process value, or a misrouted tag in a redundant WinCC server pair. This reference covers what each prefix means, when each is required, how AS-OS connections are compiled, and how to diagnose and repair mismatched tag references.

Server Prefix Fundamentals: Project_Name_OS(1)::Tag_Name

The string Project_Name_OS(1)::Tag_Name is a fully qualified WinCC reference composed of three logical components:

Component Example Purpose
Server (package) name IntegracjaWinCC Identifies the WinCC server whose tag namespace the value belongs to.
OS instance index _OS(1) Identifies the redundant server instance. (1) is the master in a redundant pair, (2) is the standby.
Tag name Motor_Speed The actual tag as defined in WinCC Tag Management.

The server prefix exists because WinCC supports distributed, multi-server, and redundant topologies. A client picture may be served by Server A in plant area 1 and by Server B in plant area 2; the prefix tells the client runtime which server's tag namespace to query. If your project is a single, non-redundant WinCC Application with no remote clients, the prefix is not required for local I/O fields, and omitting it is the cleaner choice.

Rule of thumb: Use the prefixed form only when the picture is hosted on a WinCC client that subscribes to the tag from a remote (redundant) WinCC server. Use the unprefixed form when the picture runs on the same server that owns the tag, or when the tag is consumed directly through the STEP 7 symbol server / AS-OS connection.

Tag Selection Paths in the Graphics Designer

When you open the tag-selection dialog from an I/O field, the left-hand tree shows three entries (rectangles 1, 2, and 3 in the legacy dialog):

  1. Server prefix entry under "Internal tags" / "Process tags" – prefixed: shows tags as Project_Name_OS(1)::Tag_Name.
  2. Server prefix entry – direct selection: shows the same tag tree but allows the engineer to drop the prefix by selecting the leaf node.
  3. STEP 7 symbol server / AS-OS connection – unprefixed: shows symbols exactly as exposed by the OS compiler or the STEP 7 symbol server (for example S7 Program / Blocks / DB_Motor / Speed).

The visible string after a drag-and-drop operation depends on the source branch:

  • From path (1) or (2): the I/O field will display Project_Name_OS(1)::Tag_Name as its configured output value.
  • From path (3): the I/O field will display Tag_Name or the STEP 7-qualified name S7_block_folder/DB_Name.Variable, and the tag is auto-created in WinCC Tag Management if it does not yet exist.

Both paths ultimately reference the same process value at the S7 end. The difference is the resolution path that WinCC Runtime takes when updating the I/O field.

AS-OS Connection: Automatic Compilation vs Manual Creation

The AS-OS connection is the bridge between the S7 program (AS = AutomatisierungsStation / Automation Station) and the WinCC operator station (OS). It is generated by the STEP 7 / TIA Portal "OS compiler" and is exposed in WinCC Explorer under Tag Management > SIMATIC S7 PROTOCOL SUITE > [Connection name].

Step Mechanism Behavior When to use
Step 1 + Step 2 (Automatic) OS compiler reads shared DBs and FB parameters tagged with operator-control attributes (s7_m_c = true, s7_archive, s7_mess). Creates connection, tags, messages, and tag-logging archive entries automatically. Tags appear with their STEP 7-qualified path. Default for all PLC tags that need to be visible, controllable, archived, or alarmed in WinCC.
Step 3 (Manual) Engineer manually defines a connection and individual tags via WinCC Tag Management. Tag is registered in WinCC only; nothing in the S7 program is modified. Tag references an absolute address (e.g., DB111.DBW20) or a STEP 7 symbol. Supplementary tags for computed values, hand-written DBs outside the OS compiler scope, or third-party PLC connections.

The recommended path is the automatic OS compiler. The compiler is driven by the STEP 7 symbol table and by attributes stored on shared DBs / FB parameters, so the S7 program remains the single source of truth. If you bypass the compiler and create tags manually, every rename or address change in the S7 program must be replicated manually in WinCC.

Tag Data Types and the WinCC V7.5 Reference

When a tag is created, either automatically by the OS compiler or manually in Tag Management, it must be assigned a data type. The WinCC V7.5 working manual lists the complete set:

WinCC data type Length (bits) Signed Typical S7 mapping
Binary tag 1 No BOOL
Signed 8-bit value 8 Yes CHAR / INT (when narrow)
Unsigned 8-bit value 8 No BYTE
Signed 16-bit value 16 Yes INT
Unsigned 16-bit value 16 No WORD
Signed 32-bit value 32 Yes DINT
Unsigned 32-bit value 32 No DWORD
Floating-point number 32-bit 32 Yes REAL
Floating-point number 64-bit 64 Yes LREAL
Text tag 8-bit / 16-bit 8 / 16 N/A CHAR / WCHAR (STRING)
Raw data tag n × 8 N/A BYTE array

The data type is locked when the tag is created by the OS compiler based on the S7 declaration; manually created tags can have any type but must match the byte layout at the PLC end or you will read garbage. Refer to the Siemens Knowledge Base – Tag Types in WinCC V7.5 for the full reference including display format conversion rules.

Quality Code Diagnostics: Why the I/O Field Shows a Yellow Triangle

The yellow warning indicator on a WinCC I/O field is the runtime's way of telling the engineer that the tag's OPC quality code is not 0xC0 (Good). The most common codes observed in single-server AS-OS configurations are:

Quality code (hex) Meaning Typical cause in a single-server WinCC Appl. Engineer action
0xC0 Good Normal operation None
0x40 / 0x41 / 0x42 Uncertain (substituted, sensor not accurate, last usable value) PLC connection briefly lost, substitute value active Check S7 online reachability, check connection timeout settings
0x00 / 0x04 / 0x08 / 0x0C Bad (configuration error, not connected, device failure, last known value) Wrong server prefix used, tag not present in target server's namespace, redundant partner missing Switch I/O field to unprefixed form or fix server prefix
0x20 / 0x24 Waiting for initial value, Wait for connection WinCC Runtime has not yet established the connection on startup Wait for connection; check startup order

When two I/O fields are configured on the same picture — one with IntegracjaWinCC_OS(1)::Tag_Name and one with Tag_Name — and only the prefixed one shows the yellow warning, the most common cause is that the prefix is being resolved against a server context that does not own the tag. In a single-server project that has no clients, the server context of the prefix resolves to a server that is not the one running the picture, so the tag is reported as not found. The unprefixed form resolves against the local server's AS-OS connection and returns the live value.

Troubleshooting Matrix: Mismatched Tag References

Observed symptom Likely root cause Verification step Fix
I/O field grayed out, yellow triangle, prefixed tag Server prefix references a different server instance than the one running the picture Open WinCC Explorer on the running server, expand Tag Management, confirm tag exists locally Replace the prefixed reference with the unprefixed tag name
I/O field grayed out, yellow triangle, unprefixed tag AS-OS connection is not compiled or is disconnected Right-click connection in WinCC Explorer, check "Connection Status" Re-run OS compiler in STEP 7; verify PLC rack/slot and rack number
Tag shows correct value on Server A but yellow warning on Server B Tag was created on Server A only (manual tag) and was not exported as a package to Server B In WinCC Explorer, check if tag is present under Tag Management on Server B Export server package from Server A and import on Server B; or duplicate the manual tag definition on Server B
Drag-and-drop from tag window creates I/O field that displays value, but same tag entered manually via the dialog shows yellow warning The drag-and-drop action uses the tag selected in the active branch (unprefixed, AS-OS); the manual dialog entry re-types the prefixed form by default Compare the configured output value string of the I/O field Edit the I/O field's output value to remove the Server_OS(1):: prefix
Tag value is correct but cannot be written back to PLC Acquisition mode is set to "On demand" or write authorization is missing Open tag properties in WinCC Tag Management, check "Acquisition cycle" and "Write authorization" Set acquisition mode to "Continuous", grant write authorization for the user area
Tag was working in WinCC V7 but is yellow after TIA Portal migration WinCC Professional (TIA) uses different internal namespace; old prefixed strings do not resolve Open Tag Management in TIA Portal, confirm tag exists with new TIA-qualified path Re-bind I/O fields using the TIA tag selector; remove legacy server prefixes

Multi-Server and Redundant Topologies

The prefix _OS(1) is essential when the architecture includes redundant servers or a client/server split:

  • Redundant pair: _OS(1) addresses the master, _OS(2) addresses the standby. WinCC Runtime automatically fails over to the standby if the master becomes unavailable.
  • Client with multiple servers: A client picture that needs to display a value from Server A's tag namespace uses ServerA_OS(1)::Tag_Name; a value from Server B's namespace uses ServerB_OS(1)::Tag_Name. Both prefixes may appear in the same picture.
  • Single-server, no client: The prefix is unnecessary. All I/O fields can reference tags directly. This is the simplest configuration and the one that most often produces the "prefixed tag does not work" symptom described in the original issue.

If you find yourself adding a prefix in a single-server project, ask whether the project will ever be expanded to a client/server topology. If yes, accept the extra discipline of always using the prefix. If no, drop the prefix to keep tag references portable and easy to read.

STEP 7 Symbol Server vs AS-OS Connection

Two mechanisms can populate the WinCC tag namespace from STEP 7:

Mechanism Source of truth Tag naming convention When to use
OS Compiler (AS-OS connection) S7 program attributes (s7_m_c, s7_archive, s7_mess) on shared DBs and FB parameters S7 Program/Blocks/DB_Name/Variable Production code: HMI-relevant tags are flagged in the S7 source and surface automatically in WinCC
STEP 7 Symbol Server STEP 7 symbol table Symbolic name (e.g., Motor_Start) Quick prototyping, ad hoc engineering, when the symbol table already exists

The OS Compiler is the recommended mechanism for production. The STEP 7 symbol server is convenient during early commissioning but creates tags that are not linked to the S7 program's published attributes, so renaming or re-typing a symbol can silently break WinCC references.

Limits, Alarms, and Range Configuration (WinCC Unified)

For engineers transitioning to WinCC Unified in TIA Portal V20, tag limits are configured in the Inspector window under Properties > Properties > Range. The limits are evaluated by the HMI Runtime to drive color changes, alarm generation, and value substitution. Refer to the Siemens TIA Portal V20 documentation – Defining limits for a tag (WinCC Unified) for the exact workflow. The limits are stored as properties on the tag, not as separate entries in the tag database, so they are exported automatically with the tag when the project is migrated.

Verification Checklist After a Tag Selection Change

  1. Open the affected picture in Graphics Designer, double-click the I/O field, and confirm the output value string. It should be either the unprefixed tag name or the explicitly intended Server_OS(n)::Tag_Name — never both.
  2. Activate WinCC Runtime and observe the I/O field. A correct reference updates within the configured acquisition cycle and shows no quality-code indicator.
  3. Open WinCC Explorer > Tools > Status of Connections and confirm the AS-OS connection reports Connected with the correct rack/slot of the S7 CPU.
  4. In Tag Management, right-click the tag and select Find in Process Screen to verify every picture that references it. Replace any inconsistent references.
  5. If the project is a WinCC Application inside TIA Portal, run Compile > Software (rebuild) to regenerate the OS data.
  6. Check the WinCC Alarm Logging and Tag Logging runtime windows for any tags reported with quality code 0x00 (Bad – configuration error).

Best Practices

  • Let the OS compiler create your tags. Avoid manual tag creation against STEP 7 symbols except for genuinely ad hoc engineering values.
  • Decide your prefix policy once per project: either always prefixed (for distributed architectures) or always unprefixed (for single-server architectures). Mixing both within one picture is a frequent source of yellow warnings.
  • Use the drag-and-drop action from the tag tree to minimize typing errors. Drag-and-drop binds the exact tag selected, so the resulting reference matches the path you intended.
  • Document the prefix policy in the project's functional specification so that every future modification follows the same convention.
  • When commissioning, use the "Status of Connections" view in WinCC Explorer as your primary diagnostic tool before opening any faceplate.

What does Project_Name_OS(1)::Tag_Name actually mean in a WinCC tag reference?

It is a fully qualified WinCC tag reference composed of the server package name (Project_Name), the redundant server instance index (_OS(1) for master, _OS(2) for standby), and the tag name. The prefix tells WinCC Runtime which server's tag namespace to query. In a single-server project with no remote clients the prefix is unnecessary and can be omitted.

Why does my I/O field show a yellow warning triangle even though the same tag works elsewhere on the screen?

The most common cause is that the prefixed reference Project_Name_OS(1)::Tag_Name resolves against a server context that does not own the tag. Switch the I/O field's output value to the unprefixed tag name and verify it. If the unprefixed reference shows the live value, the prefix was wrong for the runtime context of that picture.

Should I let the OS compiler create tags automatically, or should I define them manually in Tag Management?

Use the OS compiler as the primary mechanism. It reads the operator-control and monitoring attributes (such as s7_m_c = true) on shared DBs and FB parameters and generates connection, tags, messages, and tag-logging archives automatically. Manual tag creation is reserved for supplementary values that are not part of the published S7 program.

How do I bind an I/O field to an S7 variable without typing the full qualified path?

Open the Graphics Designer, locate the tag in the tag-selection window under the STEP 7 symbol server or AS-OS connection branch, and drag-and-drop it onto the picture. WinCC will create the I/O field with the correct unprefixed reference and add the tag to WinCC Tag Management automatically if it does not yet exist.

What is the difference between _OS(1) and _OS(2) in a redundant WinCC server pair?

_OS(1) addresses the master (primary) server in a redundant pair, and _OS(2) addresses the standby server. WinCC Runtime fails over automatically if the master becomes unavailable. The prefix you select on a picture determines which server the client tries first; the redundant failover is transparent to the application code.

Back to blog