Connecting SITRANS MAG8000 OPC Server to WinCC RT Professional

David Krause11 min read
OPC / OPC UASiemensTroubleshooting
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

Connecting SITRANS MAG8000 OPC Server to WinCC RT Professional V15.1

The SITRANS FM MAG 8000 is a battery-powered electromagnetic water meter that records consumption in water networks where mains power is unavailable. Each meter forwards daily totalizer and consumption reports through the IR or radio interface to a MAG8000 receiver, which then publishes the consolidated dataset through the MAG8000 OPC Server. When integrating a population of 50+ battery-operated flowmeters with WinCC RT Professional V15.1, connection failures and missing tags almost always result from OPC protocol mismatch, DCOM permission gaps, missing runtime services, or attempts to read SQLite/Excel files directly — not from physical-layer or wiring problems. This reference covers the supported OPC DA/HDA interfaces, the constraints of the WinCC RT runtime against the database file formats that the MAG8000 receiver writes, and the field-proven workarounds that engineers deploy to bring 52-meter installations online reliably.

System Overview

Each MAG 8000 meter runs on an internal lithium battery pack with a service life rated up to 6 years for typical district-metering profiles. The meter stores hourly, daily, and monthly logs internally and pushes a detailed consumption report once per day (configurable) when its IR or radio interface wakes up to contact the receiver. The MAG8000 receiver software aggregates the per-meter data into a local SQLite database and exports daily CSV/Excel files for downstream historian use. The MAG8000 OPC Server then bridges that database to the SCADA layer using Classic OPC interfaces.

For the product family, refer to the official SITRANS FM MAG 8000 product page. Detailed operating instructions for the battery-operated flowmeter, including wake-up interval selection and IR triggering, are in the Siemens Industry Online Support manuals under the MAG8000 series.

MAG8000 OPC Server Interfaces

The MAG8000 OPC Server implements only the Classic OPC profiles listed below. It does not expose OPC UA, OPC AE, or any REST/MQTT interface. Any WinCC RT Professional integration must use one of the supported Classic OPC profiles.

Table 1 — MAG8000 OPC Server Profile Support
Interface Supported Use Case
OPC DA 2.0 / 3.0 Yes Live instantaneous values (flow rate, totalizer, status)
OPC HDA 1.20 Yes Aggregated historical consumption records (daily/monthly)
OPC AE No Alarm and event subscription not implemented
OPC UA (any profile) No No UA endpoint — UA wrappers must be deployed separately

Why WinCC RT Professional V15.1 Cannot Read SQLite or Excel Directly

WinCC RT Professional is an HMI/SCADA runtime whose native data-source drivers in TIA Portal V15.1 include S7-1500/1200 symbolic, OPC DA, OPC HDA, OPC UA, Modbus TCP, and SIMATIC HMI HTTP. None of these drivers mount SQLite databases or parse .xlsx files. Two field-proven workarounds are common when the OPC DA/HDA path is blocked by network policy or when the team requires access to the raw daily archives:

  1. Use the MAG8000 OPC Server's OPC DA/HDA interface as the canonical data path. This is the supported integration model.
  2. Poll the daily CSV exports from the database folder using a WinCC VBS global script and write the parsed values to internal tags.
Important: Direct file I/O from a WinCC RT runtime script requires the script to run in the Global Script runtime context with file-system permissions granted to the runtime service account. Scripts in faceplates or screen-level events cannot reliably perform file I/O on local or mapped drives.

Root Cause Analysis — Connection Failure at Startup

The most common error reported on startup is "OPC Server cannot be reached" or "Cannot enumerate server address space" in the WinCC RT Professional diagnostics view. The table below isolates the typical causes against the observed symptom.

Table 2 — Startup Error Matrix
Symptom Likely Cause Verification
"OPC Server cannot be reached" at runtime start DCOM security ACLs on host machine Run dcomcnfg, verify COM Security tab ACLs
Browsing tree empty after start WinCC user not in OPC server access list Add WinCC RT service user to OPC access group
Tags show "###" quality bad OPC DA subscription timeout Increase UpdateRate / DeadBand in OPC channel
HMI starts but no historical data OPC HDA not enabled in channel Verify server supports HDA 1.20 and is enabled
Initial tags read OK, then go bad MAG8000 receiver goes to sleep Align UpdateRate with meter wake-up interval
Error on first browse only OPCEnum service not running Set OPCEnum to Automatic, start, restart MAG8000 server

DCOM Configuration Checklist

  1. On the MAG8000 OPC Server host, launch dcomcnfg.exe from an elevated command prompt.
  2. Navigate to Component Services → Computers → My Computer → COM Security.
  3. Under Access Permissions → Edit Limits, add ANONYMOUS LOGON, EVERYONE, and the WinCC RT runtime user with Allow Remote Access.
  4. Under Launch and Activation Permissions → Edit Limits, add the same accounts with Local Launch, Remote Launch, Local Activation, and Remote Activation.
  5. Back in Component Services, locate the MAG8000 OPC Server entry under DCOM Config. Right-click → Properties → Identity tab. Select "The Interactive User" or "This User" with the MAG8000 service account credentials.
  6. If Windows Firewall is enabled on the SCADA host, add exceptions for OpcEnum and the MAG8000 OPC Server executable.
  7. Restart the OPC Enum service and the WinCC RT runtime to apply.
Field-proven caveat: When WinCC RT Professional and the MAG8000 OPC Server run on different machines, both hosts must allow DCOM traffic on TCP 135 plus the dynamic port range. Restrict the dynamic range via netsh int ipv4 set dynamicport tcp and open only those ports in the firewall.

Prerequisites for OPC DA/HDA Integration in TIA Portal V15.1

Before configuring the channel in WinCC RT Professional, confirm the following build, OS, and dependency stack. The original failure mode reported in TIA Portal V15.1 has been traced to channels shipped without the OPC channel driver patches from Update 4.

Table 3 — Required Component Versions
Component Required Version Notes
TIA Portal V15.1 + Update 4 or later Earlier updates have known OPC channel driver bugs
WinCC RT Professional V15.1 + Update 4 Must match TIA Portal version exactly
MAG8000 OPC Server V2.0.2 or later Provides DA 3.0 / HDA 1.20
Windows Windows Server 2016 / Win 10 LTSC Required for OPC Enum service stability
.NET Framework 4.7.2 minimum OPC Core Components 3.0 dependency
OPC Core Components 3.0.105.1 or later Installs OPCEnum and proxy stubs
Field-proven caveat: TIA Portal V15.1 without any installed update fails to load the OPC DA channel driver on first runtime start. Always install Update 4 (released 2019-Q3) or later. The HMI SP is bundled with the portal update; do not mix V15 with V15.1 SPs on the same engineering station.

Configuring the OPC DA Channel in WinCC RT Professional

  1. Open the HMI device in TIA Portal V15.1 and switch to the Connections editor.
  2. Add a new connection of type OPC and select OPC DA as the access method.
  3. Browse to the MAG8000 server. The ProgID is typically Siemens.MAG8000.OPCServer — verify with the locally installed MAG8000 server documentation.
  4. Set UpdateRate to 1000 ms for the first commissioning pass; tighten to 2000 ms for steady-state operation on battery meters.
  5. Set DeadBand to 0% for totalizers (every increment must be reported) and 1% for instantaneous flow values.
  6. Confirm via the OPC Scout V10 utility that all 52 meter instances appear in the address space before loading the runtime project.
  7. Map each meter instance to an internal WinCC tag using the prefix Meter_<NN>_ so the tag namespace remains consistent across the project.

Runtime Services Verification

The failure mode where the runtime launches but no tags resolve is typically caused by missing Additional Tasks in the runtime configuration. Confirm the following:

  1. Open the HMI device → Runtime Settings → Services.
  2. Under Additional Tasks, ensure OPC DA Server and OPC HDA Server are enabled. OPC UA Server is not required and may remain disabled.
  3. Start the runtime once with these tasks disabled to capture the baseline error message, then re-enable and restart to confirm resolution.
  4. Open the WinCC RT diagnostics view and confirm Quality = Good for every Meter_NN_Flow and Meter_NN_Totalizer tag.

VBS Workaround — Reading Daily CSV Exports

When OPC DA cannot be deployed (e.g., a third-party firewall blocks DCOM traffic, or the customer mandates direct access to the raw daily archives), a VBScript scheduled in the Global Script runtime can poll the dated CSV from the MAG8000 database folder and write the parsed totalizer to internal tags. The implementation below assumes a filename pattern of Report_YYYYMMDD.csv with a header line and semicolon-separated values per meter.

' WinCC RT Professional V15.1 — VBS Global Script
' Polls the most recent MAG8000 daily CSV and writes parsed totals
' to internal tags. Schedule at the top of each hour.

Dim fso, ts, line, parts
Dim folder, latest, dt, dtNew
folder = "C:\MAG8000\Database"

Set fso = CreateObject("Scripting.FileSystemObject")
latest = ""
dtNew = CDate("1970-01-01")

For Each f In fso.GetFolder(folder).Files
    If LCase(f.Name) Like "report_*.csv" Then
        dt = CDate(Mid(f.Name, 8, 4) & "-" & Mid(f.Name, 12, 2) & "-" & Mid(f.Name, 14, 2))
        If dt > dtNew Then
            dtNew = dt
            latest = f.Path
        End If
    End If
Next

If latest = "" Then Exit Sub

Set ts = fso.OpenTextFile(latest, 1, False, -1)
ts.SkipLine ' header
Do While Not ts.AtEndOfStream
    line = ts.ReadLine
    parts = Split(line, ";")
    If UBound(parts) >= 3 Then
        SmartTags("Meter_" & parts(0) & "_Daily_m3") = CDbl(parts(2))
        SmartTags("Meter_" & parts(0) & "_Status")  = CLng(parts(3))
    End If
Loop
ts.Close

SmartTags("MAG8000_LastUpdate") = dtNew

Scheduling the Script

Schedule the action in WinCC RT Professional → Scheduled Tasks → New Task. Use a 60-minute period if the daily file lands within that window; reduce to 5 minutes if multiple updates per day are expected. The script must run under the Global Script runtime context, not a faceplate or screen-level event, to retain the file-system permission set.

Important: Use a UNC path such as \\MAG8000-SRV\Database\ rather than a mapped drive letter. Mapped drives are not consistently resolved under the runtime service account, and "Path not found" errors appear intermittently on restart.

Performance Tuning for 52-Meter Deployments

Loading 52 meters through OPC DA on a single WinCC RT Professional runtime is well within capability but requires tuned subscription parameters to avoid CPU saturation on the SCADA host. Battery-operated meters cannot deliver fresh data faster than their wake-up interval, so aggressive polling provides no benefit.

Table 4 — Recommended Tuning for 52-Meter Deployment
Parameter Value Rationale
UpdateRate 2000 ms Battery meters refresh hourly; faster polling wastes CPU
DeadBand (flow) 0.5% Suppresses ADC noise on low-flow meters
DeadBand (totalizer) 0% Totalizer must report every increment
HDA aggregation Daily average + min + max Reduces archive size vs. raw samples
Archive segments Single segment per meter Simplifies backup and restore of 52 archives
Runtime RAM 4 GB minimum 52 simultaneous subscriptions
CPU cores 2 dedicated OPC DA callback processing

Migration Path to OPC UA

Because the MAG8000 OPC Server is Classic OPC only, deployments that mandate OPC UA must insert a wrapper. Common choices in the field include:

  • OPC UA Wrapper from a third-party vendor that reads OPC DA and re-publishes as UA.
  • Siemens SIMATIC S7-1500 as a UA server gateway that polls the MAG8000 DA tags and exposes them as UA nodes.
  • Custom Python or .NET service that polls the SQLite database directly and exposes OPC UA server endpoints.

For new water-metering installations, evaluate the SITRANS FM MAG 8000 product family via the official Siemens product page for the latest firmware revisions and confirm UA capability before specifying.

Verification Steps

  1. Launch WinCC RT Professional. Confirm the runtime status indicator turns green within 30 s of the start command.
  2. Open the tag diagnostics view. Every Meter_NN_Flow and Meter_NN_Totalizer tag should show Quality = Good (0xC0).
  3. Force a manual meter wake-up using the magnet or IR trigger per the MAG8000 manual. The totalizer should update within one UpdateRate period.
  4. Open the SQL-backed tag log. HDA records should appear with the configured aggregation.
  5. If the VBS CSV workaround is used, set a tag to the MAG8000_LastUpdate value and confirm it updates within the scheduled period.
  6. Stop the MAG8000 OPC Server service. All tags should switch to Quality = Bad within 2× UpdateRate. Restart the service and confirm recovery to Quality = Good without restarting the WinCC RT runtime.

Troubleshooting Matrix

Table 5 — Field-Error Reference
Error Message Cause Action
"The RPC server is unavailable" OPC Enum service stopped Set OPCEnum to Automatic, start, restart MAG8000 server
"Access denied" on OPC browse DCOM ACL missing WinCC user Re-apply COM Security ACLs (see DCOM section)
"Item not found in server address space" Meter not yet discovered by receiver Wait one wake-up cycle, then refresh browse tree
"Bad quality" intermittent Network drops or meter sleep Enable keep-alive; align UpdateRate with wake-up interval
VBS error "Path not found" Mapped drive dropped Switch to UNC path
VBS error "Permission denied" Script running outside Global Script context Move action to Global Script scheduled task
Runtime starts but no tags resolve OPC DA Server task disabled Enable under Runtime Settings → Services → Additional Tasks

FAQ

Does the MAG8000 OPC Server support OPC UA?

No. The MAG8000 OPC Server exposes only OPC DA 2.0/3.0 and OPC HDA 1.20 (Classic OPC). For OPC UA access, deploy a third-party UA wrapper or migrate to a UA-capable Siemens flowmeter family.

Can WinCC RT Professional V15.1 read SQLite or Excel files directly?

No native driver exists. Use the OPC DA/HDA interface for live and historical tags, or implement a VBS global script that polls the CSV exports from the database folder.

Which TIA Portal V15.1 update is required for stable OPC DA operation?

TIA Portal V15.1 Update 4 or later. Earlier updates ship with bugs in the OPC DA channel driver that cause silent subscription failures and empty browsing trees on first runtime start.

How many SITRANS MAG8000 meters can one OPC Server handle?

A single MAG8000 OPC Server routinely handles 50 to 200 meters on a single SCADA host, depending on UpdateRate and PC resources. For 52 meters at a 2 s update, plan 4 GB RAM and 2 CPU cores dedicated to the SCADA VM.

What is the recommended update interval for battery-powered meters?

Match the SCADA UpdateRate to the meter's wake-up interval (typically 15 s, 30 s, 1 min, 5 min, 15 min, or 1 hour). Faster polling provides no benefit because the meter cannot return fresh data between wake-ups and only wastes CPU on the SCADA host.

Back to blog