MP277 HMI Data Logging: USB and PC Path Configuration in WinCC

David Krause12 min read
HMI / SCADASiemensTutorial / How-to
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

MP277 HMI Data Logging: USB and PC Path Configuration in WinCC Flexible

The Siemens SIMATIC MP277 10" Touch (catalog number 6AV6 643-0CD01-1AX1, successor family to MP270) runs Windows CE 5.0 and is configured with WinCC Flexible 2008 (SP3 minimum for MP277, SP4/SP5 recommended). Operators routinely need to log process tags either to a removable USB flash drive for transport or to an engineering station's hard disk for archival and trending. The MP277 does not expose a generic "PC path" field; instead, the runtime interprets a target string in the Storage location / Path dialog of every Datalog and must be mapped to either an internal flash path, a USB mass-storage device, a configured network share, or an ODBC-compliant database. This reference documents the exact path syntax, ODBC DSN creation steps, file-system layout, and field-proven troubleshooting for the three common targets.

1. System Overview and Prerequisites

Required hardware and software matrix

Item Specification Notes
MP277 panel 10" Touch, 6AV6 643-0CD01-1AX1 800 × 480 TFT, 64 K colors, Windows CE 5.0
Firmware WinCC Flexible / Panel Image ≥ V11.0.1.0 Image update via ProSave
Engineering software WinCC Flexible 2008 SP3 / SP4 / SP5 SP5 needed for SP4 projects; ES must match panel image major version
USB port USB 2.0 Hi-Speed, type A One host port on rear; supplies 500 mA
CF slot Type I/II Recommended for permanent data logging, not removable mid-run
Ethernet 10/100 Mbit, RJ45 Used for ProSave transfer and SMB shares
Pen drive FAT16 / FAT32, ≤32 GB NTFS is not mounted by Win CE 5.0; exFAT not supported
PC (ODBC target) Windows XP SP3 / Windows 7 / Windows 10 MDAC 2.8 / .NET 2.0 for Access/Excel targets

Pre-flight checklist

  1. Confirm the MP277 boots to the transfer dialog and the panel image version (Start → Settings → OP → Properties).
  2. Reserve at least one Datalog object per tag group in the project tree. Each datalog becomes a CSV file at runtime.
  3. For PC logging, install the 32-bit ODBC Administrator (always 32-bit on x86 WinCC Flexible runtime).
  4. Disable any antivirus real-time scan on the destination share for the first commissioning; re-enable after tuning.

2. Path Reference Rules in WinCC Flexible

WinCC Flexible interprets every storage path relative to the MP277's Windows CE root. The path entered in the Storage location field of a Datalog must use one of the following tokens:

Path prefix Resolves to Typical use
\Storage Card\ CF card root (\Hard Disk\ on CE 5) Permanent local logging
\Storage Card USB\ First USB mass-storage device Pen drive / USB HDD
\USB\ or \USB Storage\ Alias for the active USB partition Alternate syntax, image-version dependent
\Network\<UNC> SMB / CIFS network share Requires network ID configured in Control Panel
(no prefix) → DSN ODBC source Defined by Name parameter, not path
Critical: Backslashes in WinCC Flexible are escaped as \\ inside the script language, but in the Datalog Storage location GUI they are single \. Mixing the two is the most common source of "file not created" errors.

3. Method 1 — Logging to a USB Pen Drive (Storage Card USB)

This is the simplest and most reliable method when no network is available. The MP277 mounts any FAT16/FAT32 USB mass-storage device as \Storage Card USB\ and exposes the top-level folder immediately after insertion.

3.1 Configuring the project

  1. In WinCC Flexible, expand Project tree → Datalogs, double-click the target log.
  2. Open the Properties dialog and set:
    • Storage location: \Storage Card USB\Logs\
    • Storage process: Sequential for one CSV per session, Round-robin to overwrite oldest when full
    • Maximum number of records: 500,000 max per file; segment when reached
  3. Click Select… next to Storage location; the runtime dialog permits browsing only at commissioning, not from the panel HMI.
  4. Compile → Transfer → Device (MPI/PROFIBUS or Ethernet).

3.2 Behavior at runtime

  • When the user plugs in a compatible pen drive, the panel auto-mounts it within 2–4 s.
  • Each log creates <LogName>.csv with header row Date;Time;Millisec;Tag1;Tag2;…. Separator is locale-dependent (; in German, , in US).
  • If the pen drive is removed while a log is open, the runtime buffers up to 8 MB in internal flash and flushes on next mount.
  • Removal during a flush produces an event 14001 — Log file write error in the alarm log.
Pen drive compatibility: Use name-brand USB 2.0 sticks ≤ 16 GB formatted FAT32. No-name 64 GB / exFAT sticks are recognized as Unknown device and rejected silently by the CE 5.0 USB stack.

4. Method 2 — Logging to a Network Share (SMB)

Useful when the engineering station has a shared folder and the panel can reach it over Ethernet. Configure the network credentials on the panel itself first.

4.1 Configure network ID on the MP277

  1. On the panel: Start → Settings → Control Panel → Network and Dial-up Connections → LAN1.
  2. Set IP address, subnet mask, gateway, and DNS. Apply.
  3. Open Control Panel → Network ID (only present once CE 5.0 networking is enabled in the panel image).
  4. Enter:
    • User name: archive (a domain or local account with write rights to the share)
    • Password: stored encrypted in the registry; cannot be exported
    • Domain: leave blank for local accounts, or YOURDOMAIN for AD
  5. Click OK and restart the panel (cold start).

4.2 Configure Datalog path

In the Datalog properties, set the Storage location to:

\\PLCSV01\Archive$\MP277\Logs\

Note the four leading backslashes: two for the WinCC string escape and two for the UNC root. The runtime resolves \\<server>\<share> and appends the CSV name automatically.

4.3 Path resolution and failure modes

Symptom Likely cause Fix
Log file never appears, no error Wrong escape; runtime silently writes to local flash Use \\\\ in source view, single \ at runtime
Event 14002 — Access denied Share ACL or password mismatch Re-enter Network ID on panel, verify ACL grants Modify
Log opens then immediately closes Network latency > 2000 ms per write Switch to local CF with scheduled copy script
File truncated at 4 KB SMB signing required by server Disable SMB signing on share or use FTP transfer instead

5. Method 3 — Logging to PC Hard Disk via ODBC

Use this method when the data must land in a relational database (Access, SQL Server, MySQL via ODBC-ANSI driver, or Excel) for live trending in the WinCC Flexible RT archive viewer.

5.1 Create a 32-bit ODBC DSN on the engineering PC

  1. Open C:\Windows\SysWOW64\odbcad32.exe (32-bit, mandatory even on 64-bit Windows).
  2. Select the System DSN tab → Add…
  3. Choose the appropriate driver:
    • Microsoft Access Driver (*.mdb) for Access 2003 (.mdb) files
    • Microsoft Excel Driver (*.xls) for Excel 97-2003 workbooks — note that each Datalog becomes one sheet
    • SQL Server for SQL Server 2008 R2 / 2012 / 2014 native client
    • MySQL ODBC 5.3 ANSI Driver for MySQL/MariaDB
  4. Click Finish, give the DSN a name (e.g. MP277_Archive) and point it to a writable file or server.
  5. Test the connection with the Test Data Source button before saving.

5.2 Wire the DSN to the project

  1. In WinCC Flexible, double-click Datalogs → <LogName> → Properties.
  2. Set Storage location: leave the path field empty when using ODBC; instead set:
    • Storage process: Sequential
    • Storage medium: Database (radio button in WinCC Flexible 2008 SP3+)
    • Database field: enter the DSN name MP277_Archive
    • Table name: T_Datalog1 — will be auto-created if missing and the DSN user has CREATE rights
  3. The Path entry in older SP2 dialogs must contain the DSN string instead:
    DSN=MP277_Archive;DBQ=C:\Archive\mp277.mdb;UID=admin;PWD=secret
    Do not confuse the Path field with a filesystem path. ODBC ignores any leading \ tokens and parses key=value pairs.
  4. Compile and transfer. The PC service WinCC Flexible Runtime must be running on the host machine that owns the DSN; the panel pushes records via Ethernet to the RT database handler.

6. Configuring Datalogs, Tags, and Triggering

A Datalog is a structured record container. Each log holds one or more tags and writes one row per trigger. Trigger options:

Trigger mode Use case Typical interval
Cyclic Process monitoring 1 s, 5 s, 60 s, user-defined
On change Discrete states, alarms —
Command via script / PLC Event-triggered batches Set bit in PLC area, e.g. DB100.DBX0.0

Tag entry example (PowerTag in the project tree):

Tag:  TankLevel_PV        Type: Real     Acquisition: 1 s
Tag:  PumpRun_FB         Type: Bool     Acquisition: 100 ms
Log:  TankTrend           Tags: [TankLevel_PV, PumpRun_FB]
      Trigger: Cyclic 1 s
      Storage: \\Storage Card USB\Tank\

To start or stop the log from the PLC, expose a control bit and a function in WinCC Flexible:

// WinCC Flexible VBScript in a scheduled task
If SmartTags("PLC_LogStart") = True Then
    SmartTags("TankTrend_Active") = 1   ' starts the datalog
Else
    SmartTags("TankTrend_Active") = 0   ' flushes and closes the CSV
End If

7. File Format, Naming, and Segment Behavior

WinCC Flexible writes each Datalog as a CSV with a fixed header row and four timestamp columns:

Date;Time;Millisec;TankLevel_PV;PumpRun_FB
13.03.2024;09:14:22;187;47.32;1
13.03.2024;09:14:23;202;47.38;1
…

Naming conventions

  • Sequential: <LogName>.csv — appended indefinitely until manually cleared.
  • Round-robin: <LogName>_001.csv, _002.csv, … _NNN.csv — panel rotates files when the configured byte limit is reached.
  • Segment size default: 1 MB; configurable up to 32 MB per file in Properties → Segment size.

Decimal separator matches the panel regional settings: comma in most European locales, period in US. To import into Excel without ambiguity, replace the separator with ; using the Excel Text Import Wizard.

8. Retentive Limits and Storage Capacity

The MP277 internal flash is rated for roughly 100,000 write cycles per sector. Because CSV files are buffered and appended, plan retention carefully:

Target Typical sustained throughput Practical retention
Internal flash (\Storage Card\) 50 records/s ~3 days @ 1 s cycle, 5 tags
CF card (SanDisk Industrial) 200 records/s ~3 months @ 1 s cycle, 5 tags
USB 2.0 pen drive 500 records/s burst, 80 sustained Set by pen size
ODBC to local Access 30 records/s 2 GB file limit, 32 GB set in newer ACE
ODBC to SQL Server 1,000+ records/s Unbounded (table growth)
Wear-out warning: Logging to \Storage Card\ continuously at <1 Hz for more than 12 months risks internal flash exhaustion. Always redirect long-term retention to USB, CF, or ODBC.

9. Transfer, Commissioning, and Verification

  1. Open Project → Transfer → Transfer… in WinCC Flexible.
  2. Select Ethernet mode, enter the panel IP, click Transfer. The MP277 must be in Transfer mode (white selection on the loader screen).
  3. After transfer, panel restarts. Insert the pen drive (or mount the share) and trigger a log start from the operator screen.
  4. Verify with a Test record: open the project, click Online → Test → Write tag value, force TankTrend_Active = 1 for 10 s.
  5. Pull the USB and open the CSV in Notepad. Confirm header and at least ten data rows are present.
  6. For ODBC, open the destination .mdb / SQL table and verify rows landed with correct timestamps.

10. Troubleshooting Matrix

Event / symptom Root cause Diagnostic Remedy
Event 14001 — Log file write error USB removed mid-write Check panel alarms log Use CF or SMB; re-insert USB only between logs
Event 14002 — Access denied (ODBC) DSN credentials wrong odbcad32 → Configure → Test Grant the DSN user write + create on target folder
Event 14003 — Storage medium full Pen drive saturated Check free space via Control Panel Switch to round-robin or larger USB
No CSV appears, no event logged Path typo, wrong escape Inspect compiled project source Re-enter path with proper \\
CSV has only header Tag values never update Online → Monitor tag Verify PLC area polling, area pointer
CSV timestamps freeze PLC connection lost System diagnostics Restore PROFINET/PROFIBUS link, check MPI address
ODBC writes succeed but Excel shows #N/A Sheet has merged cells Open .xls with no macros Re-create sheet without merges
SMB share disconnects after 10 min idle Windows auto-disconnect Server event 3019 Set AutoDisconnect = -1 on share

11. Best Practices and Field-Proven Notes

  • Always test the storage path before commissioning. Use Online → Test → Write tag and a 10-second datalog burst before relying on it for production data.
  • Keep one Datalog per logical grouping. Splitting by function (alarm, batch, trend) avoids single huge files and simplifies external analysis.
  • Prefer CF over USB for permanent installs. USB connectors on shop-floor panels often loosen after 12-18 months of weekly insertion cycles.
  • Lock the pen drive format. Use a small utility (e.g. SD Formatter) to FAT32-format all field pen drives identically. Mixed FAT16/FAT32 sticks confuse the CE USB stack.
  • Time-sync the panel before long logs. Use Control Panel → Date/Time or enable time-of-day synchronization via the PLC area pointer to avoid drift in CSV timestamps.
  • Schedule CSV retrieval. Implement a VBScript scheduled task that copies the day's logs to a network share at midnight, then closes the local file.
  • Avoid NTFS and exFAT. Neither is supported by the Windows CE 5.0 driver stack on the MP277.
  • Document the DSN password outside the project. The password is stored encrypted in the project binary; keep a separate vault record for long-term maintenance.

What path string should I enter in WinCC Flexible to log to a USB pen drive on the MP277?

Use \Storage Card USB\<folder>\ as the Storage location in the Datalog properties (for example \Storage Card USB\Logs\). The MP277 auto-mounts any FAT16/FAT32 USB mass-storage device under that token within 2–4 seconds of insertion. NTFS and exFAT are not recognized by the Windows CE 5.0 stack.

Why does WinCC Flexible reject my ODBC connection string with a path error?

For ODBC targets the Path field is not a filesystem path; it is a DSN key=value string such as DSN=MP277_Archive;DBQ=C:\Archive\mp277.mdb;UID=admin;PWD=secret. Configure the DSN with the 32-bit ODBC Administrator at C:\Windows\SysWOW64\odbcad32.exe before referencing it in the project, and verify with the Test Data Source button.

How do I log from the MP277 directly to a shared folder on my engineering PC?

Configure the panel's Network ID (Control Panel → Network ID) with a user that has modify rights on the share, then set the Datalog storage location to a UNC path written with escaped backslashes, for example \\PLCSV01\Archive$\MP277\Logs\. The runtime resolves the UNC, but you must cold-start the panel after entering the network credentials.

What is the maximum file size and record count per datalog?

WinCC Flexible supports up to 500,000 records per CSV segment with a default segment size of 1 MB, configurable up to 32 MB per file. Round-robin mode will rotate through _001.csv … _NNN.csv automatically when the segment is closed. For long retention, switch to SQL Server ODBC to avoid the 2 GB limit of MS Access.

How can I start and stop a datalog from the PLC rather than from the panel screen?

Expose a control bit in the PLC (for example DB100.DBX0.0) as a WinCC Flexible tag, then assign that tag to the Datalog's Active property or toggle it from a scheduled VBScript: SmartTags("TankTrend_Active") = SmartTags("PLC_LogStart"). The runtime opens or closes the CSV accordingly and flushes on transition to 0.

Back to blog