Transferring TP700 HMI SD Card Datalog Files to a Remote PC over Ethernet
This reference covers three production-proven methods to move CSV datalog files generated by a Siemens SIMATIC TP700 Comfort Panel onto a remote Windows PC without physically removing the SD card. The procedures apply to any SIMATIC HMI Comfort Panel (TP700, TP900, TP1200, KP700, KP900, KP1200, TP1500, TP1900, TP2200) running WinCC Comfort/Advanced V13 SP1 or later in TIA Portal. The original SIOS entry that anchors the workflow is documented under Siemens ID 13336639.
1. Problem Definition and Engineering Goals
A TP700 is configured with a datalog that writes one CSV file per log cycle to a removable SD card. The end user requirement is to:
- Capture 4–5 batches per day into a single rolling CSV file (append mode).
- End-of-shift, pull the data for only that shift, identified by date and time range.
- Transfer the CSV to a remote Windows 7 PC on the same LAN without operator intervention at the panel (no card swap, no USB stick).
- Avoid dedicated software on the PC where possible (use only Windows Explorer or a browser).
The customer can accept any of three solutions provided the SD card is not handled manually: direct network logging, the built-in MiniWeb server, or a VBScript scheduled copy job that runs on the panel and writes to a network share.
2. Prerequisites
| Item | Specification |
|---|---|
| HMI model | SIMATIC TP700 Comfort (6AV2 124-1GC01-0AX0) or any Comfort/Comfort Plus panel |
| Firmware / Image | WinCC Comfort V13 SP1 Update 4 or later (image V13.0.1.0+); V14 SP1 (V14.0.1.0), V15, V15.1, V16, V17 supported |
| Storage | Siemens SIMATIC SD card (6AV2 181-2AA10-0AA0) up to 32 GB, or industrial-grade SDHC/SDXC |
| Network | 100 Mbit/s Ethernet, PROFINET port X1, panel IP in same subnet as PC |
| PC OS | Windows 7 SP1 (32/64-bit) Professional/Ultimate, SMB1 enabled, or Windows 10 with SMB1 client |
| PC share | NTFS share with read/write permission for a dedicated service account |
| Engineering tool | TIA Portal with WinCC Comfort/Advanced installed |
| User rights on panel | User group "Administrators" or a custom group with Web access rights |
HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\DependOnService entries. Windows 7 is unaffected.3. Architecture and Data Flow
Three independent data paths exist from the TP700 to the remote PC. Each has a different reliability profile and operator footprint.
| Method | Data path | Operator skill | Date filter |
|---|---|---|---|
| A. Direct network datalog | PLC/Tag → Panel datalog → \\PC\share\*.csv | None after setup | File name + filesystem timestamp |
| B. MiniWeb server | SD card CSV → internal web server → browser | Low (download only) | Manual via HTML list |
| C. VBScript scheduled copy | SD card CSV → VBScript job → \\PC\share\[Date]\[*.csv | None after setup | Built into script via FileDateTime
|
4. Method A — Direct Network Datalog (preferred)
This is the cleanest solution and is documented as a Siemens FAQ under ID 13336639: the datalog is written directly to a UNC path on the PC, eliminating the SD card from the equation entirely.
- In the TIA Portal project, open HMI → Logs, select the datalog and open its properties.
- In Storage location choose Network path instead of SD card.
- Enter the UNC path, for example
\\PC-NAME\Logs$\Line01\. The trailing backslash is required. - Set the User name, Password, and Domain fields to the service account that has write permission on the share. The panel encrypts the credentials in the runtime file.
- Compile and download to the TP700. Reboot the panel so the new runtime settings are applied.
The panel opens an SMB session to the share and writes CSV rows in append mode. Each row is timestamped using the panel's local RTC; the filename pattern is fixed by the datalog name (e.g. Datalog_0001.csv) and is rotated when Segmented mode is selected.
5. Method B — MiniWeb Server (manual operator download)
The Comfort Panel firmware ships with a built-in HTTP server. When activated, it exposes the SD card file system as a browsable directory listing from any computer on the LAN.
5.1 Enable MiniWeb
- In TIA Portal, open the panel's Runtime settings.
- Navigate to Services → Web Server (MiniWeb).
- Tick Activate MiniWeb server.
- Tick Allow HTML pages so the directory list of the storage media is rendered.
- Open Internet settings → SMTP / Web and define a strong password for the user group that has web access rights (default: Administrators).
- Download the project. MiniWeb starts automatically after the next panel reboot.
5.2 Browse and download
From the PC, open Internet Explorer (the only browser guaranteed to render the MiniWeb pages; the server serves XHTML 1.0 with limited JavaScript) and navigate to:
http://<TP700_IP>/
Authenticate with the configured password. The home page lists the storage media. Click Storage Card SD to drill into the datalog folder. Right-click a CSV and save to the local disk. The page does not provide a date-range filter, so a downstream PowerShell or batch script must perform the filtering once the file is on the PC.
For shift-based filtering use the following PowerShell snippet on the PC:
Get-ChildItem '\\TP700\Storage Card SD\*.csv' |
Where-Object { $_.LastWriteTime -ge '08:00' -and $_.LastWriteTime -lt '16:00' } |
Copy-Item -Destination 'D:\Shift_A\'
6. Method C — VBScript Scheduled Copy with Date Filter
When the customer insists on keeping the SD card as the primary log destination, a VBScript running on the TP700 can copy the CSV to a network share at the end of each batch, into a folder whose name is the panel RTC timestamp. This is the method used in the source script and is the most flexible for 4–5 batch/day operations.
6.1 Required Runtime Settings
- In TIA Portal, Runtime settings → Services → VBScript: enable Allow VBScript execution and Allow file system access (the latter is required for
FileCtl.Filesystem). - Under User administration, set the runtime user that runs the scheduler to a group with file-system rights.
- Compile, download, and reboot the panel.
6.2 Schedule a Script
Open HMI → Schedules, create a new task named Copy_Datalog_To_PC, and trigger it at the end of each batch (use a tag from the PLC, e.g. Batch_Done, on a rising edge). The action of the task is Run script selecting the VBScript below.
6.3 Production VBScript
The following script is derived from the original, hardened with explicit error handling, a configurable look-back window, and an age filter so only the last N hours of data are copied.
'
' CopyDatalogToShare.vbs
' Triggered at end-of-batch from a TP700 Comfort schedule.
' Copies CSV files newer than iHoursBack from the SD card to a
' timestamped folder on a Windows share.
'
Const SrcPath = "\Storage Card SD\Logs\"
Const DefFile = "*.csv"
Const DstBase = "\\PC-NAME\Logs$\Line01\"
Const iHoursBack = 12 ' age window in hours
Dim hso, fs, f, strTemp, strDname
Dim strDate, strTime
Dim dCutoff
Set hso = CreateObject("FileCtl.Filesystem")
Set fs = CreateObject("FileCtl.FileSystem")
On Error Resume Next
' Build the cut-off timestamp in the panel RTC
dCutoff = DateAdd("h", -iHoursBack, Now)
' Build a unique destination folder: Bckp_yymmdd_hhnnss
strDate = Right(DatePart("yyyy", Now), 2) & _
Right("0" & DatePart("m", Now), 2) & _
Right("0" & DatePart("d", Now), 2)
strTime = Right("0" & DatePart("h", Now), 2) & _
Right("0" & DatePart("n", Now), 2) & _
Right("0" & DatePart("s", Now), 2)
strDname = "Bckp_" & strDate & "_" & strTime
If Not fs.FolderExists(DstBase) Then
ShowSystemAlarm "Destination share not reachable: " & DstBase
Exit Sub
End If
fs.mkDir DstBase & strDname
strTemp = hso.Dir(SrcPath & DefFile, 0)
Do While Len(strTemp) > 0
' FileDateTime is supported on Comfort panels
If CDate(hso.FileDateTime(SrcPath & strTemp)) >= dCutoff Then
hso.FileCopy SrcPath & strTemp, DstBase & strDname & "\" & strTemp
End If
If Err.Number <> 0 Then
ShowSystemAlarm "Error#" & Err.Number & " " & Err.Description
Err.Clear
Exit Sub
End If
strTemp = hso.Dir()
Loop
Set hso = Nothing
Set fs = Nothing
6.4 Path Constants Reference (TP700 Comfort)
| Path constant | Resolves to |
|---|---|
\flash\ |
Internal flash (~ 30 MB free, persistent) |
\Storage Card SD\ |
Removable SD card slot X50 |
\Storage Card USB\ |
USB stick on port X60 (front) |
\Network\ |
Mounted network share (used by Method A only) |
6.5 FileCtl Object — Methods Used
| Method | Purpose |
|---|---|
Dir(mask, 0) |
Enumerate files; pass empty for next entry |
FileCopy(src, dst) |
Byte copy; destination is full UNC path |
FileDateTime(path) |
Returns Date value of last write |
FolderExists(path) |
Boolean, used to validate share reachability |
mkDir(path) |
Create a directory on the share |
FileLen(path) |
Bytes; useful for a size threshold filter |
7. Windows 7 Network Share Configuration
- Create a local user
panel_svcwith a non-expiring password of at least 16 characters. - Create a folder
D:\Logs\Line01. Right-click → Properties → Sharing → Advanced Sharing and tick Share this folder. Name the shareLogs$(the$hides it from casual browsing). - Click Permissions. Add
panel_svcwith Full Control for the administrator setup; tighten to Change for production. - On the NTFS tab, grant
panel_svcModify (write + read + delete). - Disable password-protected sharing: Network and Sharing Center → All network → Turn off password protected sharing if you want the share to accept the panel's local credentials without prompting. Otherwise leave it on and supply the same
panel_svcaccount in TIA Portal. - Open the Windows Firewall with Advanced Security. Create an inbound rule for File and Printer Sharing (SMB-In) restricted to the panel's IP address.
- From the TP700 command line (Maintenance mode, Start → Run → cmd) test the share with
net use \\PC-NAME\Logs$ /user:panel_svc <password>. A successful The command completed successfully confirms the panel can resolve the host and authenticate.
8. Date and Time Filtering for a Single Rolling File
When the datalog is configured with Segmented = No and Mode = Circular/Append, the same file is appended for the whole day. To extract one shift:
- Open the file on the PC in Excel as a Data → From Text/CSV source. The delimiter is the semicolon by default for WinCC logs.
- Use Data → Filter on the first column (the timestamp) with values between the shift start and end.
- Save the filtered view as
Shift_<date>.csv.
For an automated solution on the PC, use the following PowerShell job scheduled in Windows Task Scheduler:
$src = '\\PC-NAME\Logs$\Line01\Datalog_0001.csv'
$dst = 'D:\Shift_Reports\Shift_' + (Get-Date -Format 'yyyyMMdd') + '.csv'
$start = (Get-Date '08:00:00')
$end = (Get-Date '16:00:00')
Import-Csv -Path $src -Delimiter ';' |
Where-Object { [datetime]$_.Timestamp -ge $start -and [datetime]$_.Timestamp -lt $end } |
Export-Csv -Path $dst -Delimiter ';' -NoTypeInformation
9. Verification Procedure
- On the TP700, force one batch end. Watch the system event log: Control Panel → System Properties → System Events. A line Schedule "Copy_Datalog_To_PC" executed must appear with status OK.
- Check the share on the PC. The new folder
Bckp_yymmdd_hhnnssmust exist with at least one CSV. - Open the CSV and confirm the first and last timestamps bracket the expected batch window.
- If using Method A, the share should also contain a single file with continuously appended rows; verify the file size grows by N bytes per row.
- If using Method B (MiniWeb), open
http://<panel_ip>/Storage Card SD/Logs/in a browser; the listing should reflect the files present. - Run a 24-hour soak test with five batch cycles. Confirm five folders (Method C) or five appends (Method A) and no ShowSystemAlarm entries in the panel alarm buffer.
10. Troubleshooting Matrix
| Symptom | Method | Likely cause | Fix |
|---|---|---|---|
| "Network path not found" alarm | A / C | DNS or NetBIOS resolution failure; PC firewall | Use IP literal (e.g. \\192.168.1.50\Logs$); allow SMB 445/TCP inbound |
| MiniWeb login loop | B | Password not set in WinCC Internet settings | Define a password for the user group; transfer to panel |
| Directory listing is empty in MiniWeb | B | "Allow HTML pages" not enabled | Tick the option in Runtime settings → Services |
| ShowSystemAlarm "Error#53 File not found" | C | Path uses single backslash \Storage Card SD
|
Use the path constant with trailing slash, or double-backslash escape in VBScript |
| Files copied but timestamp wrong | C | Panel RTC not synchronised | Enable NTP under Runtime settings → Time & Date or use the PLC time via area pointer |
| CSV rows truncated on PC | A | Buffer not flushed | Force a log close on batch end using the LogTag in the datalog function set |
| Share accessible from Windows but not from panel | A / C | SMB signing mismatch | Disable Digitally sign communications (always) in local security policy on Windows 7 |
| Copy job runs twice per batch | C | Schedule triggered on both edges of Batch_Done
|
Configure the schedule to trigger on rising edge only |
11. Specifications Quick-Reference
| Parameter | Value |
|---|---|
| CSV separator (WinCC default) | Semicolon ;; configurable per datalog |
| CSV decimal | Comma , in en-US locale; period in de-DE |
| Timestamp format | ISO 8601 with locale offset, e.g. 2024-05-14 08:01:23.456
|
| Max file size for browser download (MiniWeb) | ~ 200 MB; larger files may time out |
| SMB client on TP700 | SMB 1.0 / CIFS only; NTLMv2 from V13.0.1.0 |
| Concurrent network shares per panel | 1 active datalog path; multiple VBScript FileCopy targets allowed |
| MiniWeb port | 80/TCP (HTTP only) |
| MiniWeb auth | HTTP Basic, base64 (no TLS) |
| Schedule resolution | 1 minute; triggered events have no minimum gap |
12. Recommended Production Topology
For a customer running 4–5 batches per day with shift-level reporting, the recommended layout is:
- TP700 writes to a "fast" segmented datalog on internal flash, rotated every 6 hours, to keep writes deterministic and avoid SD wear.
- A scheduled VBScript on the panel copies each rotation to
\\PC-NAME\Logs$\Line01\Bckp_<timestamp>\immediately after rotation. - MiniWeb is left enabled for ad-hoc service access, but the password is restricted to a service account only.
- A PowerShell job on the PC aggregates the daily folders into a per-shift report at the end of each shift.
This combination gives deterministic, traceable copies per batch, no manual card handling, and a clean recovery path via the rolling flash logs if the network is briefly unavailable.
Can the TP700 write the datalog directly to a Windows 7 share without the SD card?
Yes. Set the datalog storage location to Network path in TIA Portal, enter a UNC path such as \\PC-NAME\Logs$\, and provide a service account. See Siemens FAQ 13336639 for the official procedure.
How do I enable the MiniWeb server on a TP700?
Open Runtime settings → Services, enable the MiniWeb server, tick Allow HTML pages, and define a password in Internet settings → Web. Download the project and reboot. Access via http://<panel_ip>/ from a browser.
Which VBScript object gives access to the SD card from the panel?
The FileCtl.Filesystem COM object, instantiated with CreateObject("FileCtl.Filesystem"). It exposes Dir, FileCopy, FileDateTime, FolderExists, and mkDir. The file system access right must be enabled in Runtime settings.
How can I filter a single rolling CSV file by shift time on the PC?
Import the CSV in Excel or PowerShell and filter the timestamp column to the shift window, for example 08:00–16:00. A scheduled PowerShell job with Where-Object { [datetime]$_.Timestamp -ge $start -and [datetime]$_.Timestamp -lt $end } automates this end of shift.
Why does the panel's VBScript get error 53 "file not found"?
Either the source path is missing the trailing backslash, the SD card is not present, or the share is unreachable. Verify with hso.FolderExists before calling FileCopy, and use the documented path constants \Storage Card SD\ or \Storage Card USB\.