Filtering Time-Stamped Process Values from SICAM eRTU to WinCC

David Krause12 min read
SiemensTutorial / How-toWinCC
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: Substation Time-Tagged Telemetry to SCADA

Time-stamped process data is the backbone of modern substation automation. A breaker trip recorded at 14:32:07.412 in the field must arrive at the control center with the same millisecond resolution, not with the SCADA server's scan time. This article explains how to filter a process value and its time stamp from an incoming IEC 61850 / IEC 60870-5-104 telegram inside a SICAM eRTU built on a SIMATIC S7-400 CPU 416-3, place both into a STEP 7 data block using the INF2DB function block from the SICAM library, and then surface them as time-correct WinCC messages in SIMATIC WinCC Alarm Logging.

The architecture in scope is the standard Siemens Energy substation layout:

  • Bay Controllers / IEDs in the switchyard (SIPROTEC 4/5, 7SA86, 7UT85, etc.) transmit GOOSE and/or MMS reports carrying a UTC timestamp per the IEC 61850 data model.
  • The SICAM eRTU (central unit = S7-400 CPU 416-3, e.g. 6ES7416-3ES06-0AB0) ingests those reports, decodes them, and stores them in a process image.
  • WinCC V7.x or TIA WinCC Professional on the station computer polls the S7-400 over Industrial Ethernet / S7 Protocol and renders operator messages with the original time tag.
Engineering rule: Always separate the field time (when the event happened in the switchyard) from the system time (when WinCC received the frame). The goal is to push the field time into WinCC, not let the SCADA server assign its own.

Prerequisites

Component Version / Catalog Notes
SICAM eRTU Firmware ≥ V4.50 (V5.x current) Includes IEC 61850 Server / Client stack and SICAM S7-400 library
SIMATIC S7-400 CPU 6ES7416-3ES06-0AB0 (or 6ES7416-3XR05-0AB0) 16 MB work memory, MPI/DP/PN interfaces
STEP 7 V5.6 SP2 / V5.7 Classic STEP 7 for S7-400 program development
SICAM Toolbox V04.40 or higher Includes INF2DB, IFC, ICL blocks
WinCC V7.5 SP2 or TIA WinCC Professional V18 Alarm Logging runtime component
IED data model IEC 61850 ICD/CID file Provided by IED vendor (e.g. SIPROTEC 5 export)
Time synchronization SNTP / IRIG-B / DCF77 SICAM eRTU feeds the S7-400; WinCC station must join same NTP source

Confirm that the SICAM eRTU and the WinCC station are on the same time source. With GPS-based time, the typical end-to-end accuracy achievable on a properly engineered SICAM eRTU subnet is better than ±5 ms, and the IEEE paper "A Polyline-based Visualization Technique for Tagged Time-varying Data" discusses visualization strategies for time-tagged SCADA data that are directly applicable to WinCC trend and message views.

How Time Tags Arrive at the S7-400

An IEC 61850 data object of type Quality-MmsType / Timestamp carries an 8-byte UTC time field plus a 1-byte quality indicator inside every MV (measured value), SPS (single-point status), DPS, or INC structure. The S7-400 receives the report through the SICAM eRTU IEC 61850 stack, which translates it into the SICAM process image (PI).

For an MMS report, the stack populates two parallel fields per signal:

  • value – the Boolean, integer, or float process value.
  • t – an 8-byte TIME_AND_DATE / DATE_AND_TIME equivalent holding the 64-bit UTC timestamp from the IED.

Internally, SICAM stores the time as a DATE_AND_TIME (DT) data type: 8 bytes, byte 0 = year (BCD), byte 1 = month, byte 2 = day, byte 3 = hour, byte 4 = minute, byte 5 = second, bytes 6–7 = milliseconds (the high nibble of byte 6 is reserved). This format is what STEP 7 expects in its DATE_AND_TIME declaration and what WinCC Alarm Logging consumes when you bind the message to a tag of type Date/Time.

The INF2DB Block – Purpose and Interface

INF2DB is a SICAM library function block whose task is to copy an information entry (the IED point's value, time, and quality) from the SICAM process image into a STEP 7 data block that the SCADA system can read. The block lives in the SICAM S7-400 library and is typically called in OB1 or OB35 (cyclic 100 ms or 1 s) depending on refresh requirements.

Standard instance interface (FB type, varies slightly by SICAM Toolbox version):

Parameter I/O Type Meaning
INF_NO IN INT Internal SICAM information number (maps to IED data object)
DB_NO IN INT Number of the target data block
DB_OFFSET IN INT Byte offset inside the target DB where the record is written
EN_MSG IN BOOL Enable message generation flag
MODE IN BYTE 0 = write on change, 1 = cyclic overwrite, 2 = event-driven
VALID OUT BOOL 1 = block has updated the DB record successfully
ERR OUT WORD 0 = OK; non-zero see error table below

One call to INF2DB writes a single INF record into the destination DB. A standard INF record occupies 24 bytes:

  • Bytes 0–1: value (BOOL/INT/FLOAT depending on the configured data type)
  • Bytes 2–9: DATE_AND_TIME (8 bytes)
  • Bytes 10–11: quality flags + validity
  • Bytes 12–23: SICAM internal status / spare / next-link pointer

For a typical SPS (single-point status with quality), the value area is 2 bytes; for a MV measured value with engineering range, it expands to 4 or 8 bytes depending on whether you expose the float or the scaled integer. Plan the DB size accordingly: nSignals * 24 rounded up to the next even boundary.

Step-by-Step Configuration

Step 1 – Build the IED Topology in SICAM TOOLBOX II

  1. Open the SICAM TOOLBOX II project that defines the substation.
  2. Import the ICD/CID file of the bay IED (SIPROTEC 5 export, REF615, etc.) using File → Import → IEC 61850 IED Description.
  3. In the Process Image view, mark every data object you need to forward to WinCC and note its internal information number. This is the value that goes into INF_NO on INF2DB.
  4. Verify in the Communication Diagnostics window that reports are arriving and the Time Stamp column shows valid UTC time (not 1980-01-01 which indicates time sync loss).

Step 2 – Create a STEP 7 DB for INF Records

In the STEP 7 project for the S7-400, add a new shared data block (DB), e.g. DB200 – "WinCC_MSG_DB". Declare a custom structure that mirrors the INF record layout, or use a simple array of bytes:

DATA_BLOCK DB200
TITLE = 'WinCC Message Database'
AUTHOR : Siemens
VERSION : 0.1
  STRUCT
    INF : ARRAY [1..64] OF // up to 64 INF records
      STRUCT
        Value    : REAL;   // 4 bytes – MV float
        Time     : DATE_AND_TIME; // 8 bytes
        Quality  : BYTE;   // IEC 61850 quality summary
        Spare    : ARRAY[1..11] OF BYTE;
      END_STRUCT;
  END_STRUCT;
END_DATA_BLOCK

Note: 64 records × 24 bytes = 1536 bytes, which fits well inside the work memory of a 416-3. The DB_OFFSET for the i-th record is (i-1) * 24. If you are using the byte-array layout, pre-compute the offsets in a table for quick reference.

Step 3 – Call INF2DB for Each Signal

In OB1 (or OB35 for a 100 ms cyclic refresh), call INF2DB for every information number you want to forward. Example for breaker position point 1001:

      CALL FB 100, DB1000  // FB100 = INF2DB, instance DB1000
       INF_NO   := 1001
       DB_NO    := 200
       DB_OFFSET := 0      // first record in DB200
       EN_MSG   := TRUE
       MODE     := B#16#0  // write on change
       VALID    := M10.0
       ERR      := MW12

Repeat for the next signal with DB_OFFSET := 24, then 48, 72, and so on. Use a small ladder/ST sequence in OB1 to populate the offsets, or assign them manually in a watch table while commissioning.

Step 4 – Configure WinCC Tag Connection

  1. In WinCC Explorer open Tag Management → SIMATIC S7 PROTOCOL SUITE → TCP/IP. Add a new connection with the S7-400 CP443-1 IP address (default station address = rack/slot 0/2 for CPU 416-3 PN).
  2. Add tags pointing into DB200:
    • Breaker1_Pos_Value – DB200.DBX0.0 / WORD at offset 0, data type Unsigned 16 (for SPS) or Float (for MV).
    • Breaker1_Pos_Time – DB200.DBX2.0 with data type Date/Time, length 8 bytes.
    • Breaker1_Pos_Quality – DB200.DBX10.0, type Unsigned 8.
  3. Enable the Date/Time tag format and verify in the tag simulation that the value updates.

Step 5 – Build the WinCC Message

  1. Open Alarm Logging.
  2. Create a new single message, e.g. "Breaker Position Change" with number 100001.
  3. Set the trigger tag to the value field (Breaker1_Pos_Value). For a 0→1 and 1→0 transition, add two messages or configure the bit mask under Trigger.
  4. In the message text, reference Time stamp from tag – select Breaker1_Pos_Time as the Tag for Time Stamp. This is the critical link: WinCC will use the field time, not the SCADA receive time.
  5. Optionally add the Quality tag to the message text using a dynamic text list (Good=0, Substituted=1, Failure=2, etc. per IEC 61850 quality bits).
  6. Compile Alarm Logging and download to the runtime.

Step 6 – Runtime Verification

Trigger a forced status change from the bay IED (SICAM IEDScout, DIGSI 5, or REF615 setting tool) and watch the WinCC message window. The displayed time must match the time stamp shown in the SICAM process image (drift < 1 s due to refresh jitter; ideally identical).

INF2DB Error Code Reference

ERR (hex) Meaning Remediation
0000 OK –
8001 Invalid INF_NO Re-import the IED; the information number is not in the process image
8002 DB_NO not loaded Download DB200 to the CPU; check S7 online
8003 DB_OFFSET out of range Reduce number of records or extend DB
8004 Time stamp invalid (year = 1980/2050) Check SNTP/IRIG-B source; the SICAM eRTU lost time sync
8005 Quality = Bad, value suppressed Check IEC 61850 report integrity; the IED flagged the signal invalid
80FF Library version mismatch Update SICAM Toolbox to match eRTU firmware

Verification Checklist

# Check Expected
1 Trigger a known event at the IED at HH:MM:SS.mmm WinCC message shows the same HH:MM:SS.mmm ±1 ms
2 Read DB200.DBB 10 in STEP 7 online Quality byte = 0x00 (Good)
3 Disconnect the SNTP source for 60 s WinCC still receives old timestamps; no 1980/2050 leak
4 Stop the S7-400; restart it INF2DB re-initializes and re-fills DB200 from PI within 2 s
5 Compare Alarm Logging archive to IEC 61850 buffered report Sequence event ordering is preserved (ordered by field time)

Troubleshooting Matrix

Symptom Root Cause Action
WinCC shows current time instead of field time The "Time Stamp" tag on the message is empty or not assigned to the DATE_AND_TIME field Open Alarm Logging → message → "Tag for Time Stamp" → bind to the 8-byte DB offset (byte 2 of the INF record), not the value offset
All timestamps show 1993-01-01 DB200 was zeroed on startup and the records were never populated Confirm INF2DB is being called (use STATUS bits / cross-reference); check VALID output
Some signals time-stamped, others not Mixed SPS/MV types share the same DB; offsets miscalculated Use a typed structure per signal; the SPS record is 12 bytes, MV record is 16 bytes; never interleave without a layout map
Timestamps drift by 1 s per hour Time sync only on the S7-400, WinCC has its own unsynced clock Point WinCC station to the same NTP server as the SICAM eRTU
High CPU load on 416-3 INF2DB called in OB1 with large array; refresh on every scan Move to OB35 (100 ms) and switch MODE to event-driven (0x02)
Messages show 1970-01-01 The 8-byte field was interpreted as Unix epoch, not BCD DATE_AND_TIME Check WinCC tag type is "Date/Time" with BCD format (legacy 8-byte), not "Date/Time (Linux)"

Performance and Sizing Notes

The 416-3 has roughly 0.045 ms execution time for the INF2DB call in typical SICAM firmware. Calling it 200 times in OB35 means 9 ms CPU load per cycle, well under the 100 ms cycle budget. A more aggressive approach with 1000 signals in OB1 will consume ~45 ms and may interfere with bus communication – move to OB35 or a dedicated OB (e.g. OB32 at 500 ms) in that case.

DB200 at 1.5 KB for 64 records fits within the S7-400's 16 MB work memory with a negligible impact. If you need to expose more than 200 signals, split them into multiple DBs (DB200, DB201, …) and ensure each INF2DB call references the correct DB_NO.

Compatibility and Firmware Notes

  • SICAM eRTU V5.x and CPU 416-3 (6ES7416-3ES06) is the current Siemens Energy validated combination. Earlier eRTU versions (V3.x) used the older 416-2 CPU and a slightly different block interface – if you migrate, check the SICAM Toolbox release notes.
  • WinCC V7.5 SP2 and TIA WinCC Professional V18 are supported; V8.0 (TIA) requires the S7-400 to be imported as a "legacy device" since S7-400 is not a native TIA target.
  • STEP 7 V5.7 is required to download to a 416-3 with firmware V6.0.4 or later; STEP 7 V5.5 cannot program those newer firmware versions.

Frequently Asked Questions

Why does WinCC show the current PC time instead of the IEC 61850 field time?

The "Tag for Time Stamp" on the WinCC Alarm Logging message must be bound to the 8-byte DATE_AND_TIME field (offset +2 from the start of the INF record), not the value field. If left empty, Alarm Logging defaults to the local WinCC receive time.

How large should the target data block be for INF2DB?

Each INF record occupies 24 bytes. A DB for n signals needs at least 24 × n bytes. For a 64-signal bay, allocate 1536 bytes and round up to the next even address. The 416-3 has 16 MB of work memory, so a few KB is negligible.

Can I use INF2DB with a CPU 416-3 in TIA Portal instead of STEP 7 V5?

No. The SICAM library blocks (INF2DB, IFC, ICL) are shipped for STEP 7 V5.7 only. The 416-3 can be added to a TIA project as a "legacy device" for tag exposure, but the program itself must be developed and downloaded with STEP 7 V5.7.

What happens to the timestamp if the S7-400 loses time synchronization?

SICAM eRTU stamps the value when the IEC 61850 report is received. If the CPU clock drifts, the stamp will reflect the drifted time. INF2DB will write ERR = 8004 when the time falls outside the valid BCD range (year 1990–2049), which is your indicator to fix the SNTP/IRIG-B source.

Do I have to use a separate DB tag for value and time, or can I pass them as one tag?

WinCC needs them as separate tags because the value drives the message trigger and the DATE_AND_TIME field is bound to the message's time-stamp source. You can declare a 24-byte raw tag and split it with WinCC script, but a structured DB with named fields is far easier to maintain.

How do I confirm the IEC 61850 report contains a valid timestamp before troubleshooting WinCC?

Open SICAM TOOLBOX II → Process Image → right-click the information number → "Online View". The Time column must show the current UTC. If it shows 1980-01-01, time sync is broken upstream and WinCC will mirror that value.

Back to blog