WinCC Flexible 2008: Save MP377 Reports to PC via PDF Printer

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

1. Overview

WinCC Flexible 2008 generates production reports directly on the connected HMI panel through the integrated report designer. On a SIMATIC MP377 (12" Touch, 15" Touch, or 15" Key variants), the report is normally spooled to a local or network printer attached to the panel. When no printer is wired to the MP377 — or when the operator wants an electronic copy for QA, MES, or e-mail workflows — the print job must be redirected to a file on a Windows PC reachable over Ethernet.

The technique most commonly deployed in the field is to treat the report like a normal print job, but route the output to a virtual PDF printer installed on a Windows host that shares a folder on the LAN. The MP377 pushes the formatted report to the share, the Windows host captures it as a PDF, and the file lands on disk where it can be archived, indexed, or forwarded. The same host can also pull historical tag log archives via FTP or a scheduled export from the panel.

This article documents the full configuration path for a daily production report on a MP377 running WinCC Flexible 2008 SP3 (the last SP for the V1 line of panels) and a Windows 10/11 PC connected to the panel over Ethernet. The same procedure works for MP277, MP370, and PC Runtime targets with minor adjustments.

Compatibility note: MP377 panels ship with two firmware generations — the 15" Comfort-style panels (PPI/MPI/Profibus models 6AV6 644-...) that target TIA Portal/WinCC Comfort, and the older MP377 models (6AV6 642-...) that target WinCC Flexible 2008. Verify the catalog number against the Siemens MP 377 Operating Instructions before applying this procedure; the WinCC Flexible 2008 print-job path described here is for the second family only.

2. Prerequisites

Item Specification Notes
Engineering station WinCC Flexible 2008 SP3 or SP5 Service Pack 5 (released 2010) is the last supported build; later SPs are bundled into TIA Portal
HMI runtime SIMATIC MP377, image version V1.x Check the Start Center > Settings > Device > Image Version
PC target Windows 10 / 11, SMBv1/v2 enabled, static IP Disable SMBv1 if the panel firmware is older than 2009 — see Section 8
PDF printer PDFCreator (pdfforge), Bullzip PDF Printer, or Microsoft Print to PDF Microsoft Print to PDF writes to a fixed dialog folder; PDFCreator supports autosave directories and is recommended for unattended operation
Network MP377 LAN1 (X1) ↔ PC NIC, 100 Mbit/s minimum Use a switch if the panel must also reach a PLC. Cross-over is not required on any modern NIC
User rights PC service account with read/write on the share; MP377 configured with matching credentials Use a dedicated account, e.g. hmireport; do not reuse a domain admin
Report license WinCC Flexible Reports option installed (count key on USB stick) Reports require the optional Logging / Report license; runtime raises event log "Report: License missing" otherwise

3. Network Architecture

The MP377 acts as a SMB/CIFS client. The PC acts as the server hosting the share. The default MP377 LAN1 address is 192.168.0.1 with a /24 mask; the engineering PC should be placed on the same subnet (e.g. 192.168.0.10) unless a router is present.

SIMATIC MP377 WinCC Flex 2008 Runtime 192.168.0.1/24 Report job → spooler \\\\PC377\\\hmi_reports Catalog: 6AV6 642-... Port: LAN1 (X1) Engineering PC Windows 10/11 192.168.0.10/24 PDFCreator autosave D:\HMI_Reports\ SMB share: hmi_reports Service user: hmireport Ethernet 100 Mbit/s TCP/UDP — SMB, NetBIOS, optional LPR (9100) Optional switch if PLC also on LAN

Two transport options exist for the report payload:

  1. SMB-direct print (recommended): WinCC Flexible sends the formatted report to a UNC path \\<PC>\<share> configured as a network printer on the panel. The PC's print spooler forwards the data to the PDF printer, which writes the file. The SMB session is opened with the service user.
  2. LPR/LPD (legacy): Some PDF printers expose a raw LPR port (default TCP 9100). On the panel, define an LPR printer pointing to 192.168.0.10:9100. This avoids SMB but loses the ability to authenticate per-user, so use only on isolated networks.

4. Method A — PDF Printer on the Windows PC

This is the canonical approach used in Siemens application notes and is robust on long-running installations.

4.1 Install and configure the PDF printer

  1. Download PDFCreator from pdfforge.org and install with the Server profile (free, open source). Avoid the sponsored bundle; uncheck the toolbar during install.
  2. Open PDFCreator > Profiles > Save and configure the Autosave profile:

Name:               hmi_daily
Output format:      PDF (PDF/A-1b for long-term archival)
Save location:      D:\HMI_Reports\%date% (folder must exist)
Filename pattern:   prod_%date%_%time%.pdf
Action after save:  Open file location (debug only); disable in production
Print after saving: Off
  1. Set the PDFCreator printer as the Windows default for the service user. Right-click the PDFCreator printer in Printers & Scanners → Manage → Printing Preferences → Profile = hmi_daily.
  2. Disable UAC prompts and any "Allow this app to make changes" dialogs by running the PDFCreator service as the hmireport user via Services > pdfcmon. Change the log-on account under the Log On tab.
Critical: PDFCreator's autosave only works when the spooling user is interactive. If the service is set to Local System, autosave will fail silently and the file will land in %TEMP%. Always configure the service with the same Windows account that owns the share permission.

4.2 Create the share

  1. Create the directory D:\HMI_Reports\ on the PC.
  2. Right-click → Properties → Sharing tab → Share... → add user hmireport with Read/Write. Share name: hmi_reports.
  3. On the Security tab, grant the same user Modify. Remove Users from the ACL to avoid anonymous writes from other PCs on the LAN.
  4. Confirm the share is reachable from a third PC with \\<PC>\hmi_reports in Explorer, logging in as hmireport.

4.3 Configure the panel-side UNC print queue

  1. On the MP377, open Start Center > Settings > Network > Logon and create an entry:

Domain/Workgroup:   WORKGROUP
User name:          hmireport
Password:           <matching PC password>
Confirm password:   <matching PC password>
  1. Open Start Center > Settings > Printer > Add. Set:
    • Printer name: PDF_on_PC
    • Type: Network printer using the SMB transport
    • Server: \\192.168.0.10\hmi_reports
    • Driver: Generic / Text Only (WinCC Flexible streams PCL/PS to the panel's print spooler; the PDF printer on the PC converts whatever is sent)
  2. Print a test page from the panel: Start Center > Settings > Printer > Test. A test.pdf file should appear in D:\HMI_Reports\ on the PC within a few seconds.

5. Method B — Direct Export to a Network Folder (no PDF)

Some teams prefer raw text or CSV over PDF for downstream processing. WinCC Flexible can write the report as plain text to a network path if the configured "printer" is a file share rather than a device. This is useful when the data will be ingested by a MES database.

  1. On the PC, create D:\HMI_Reports\Raw\ and share it as hmi_raw.
  2. On the MP377, add a second "printer" with the same UNC approach but use driver Generic / Text Only and configure the report layout to use the internal line-printer font (Courier 10 CPI).
  3. In the project, change the report's print target from the default Local printer to the Network printer alias \\192.168.0.10\hmi_raw.
  4. On the PC, run a PowerShell watcher:

$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = 'D:\HMI_Reports\Raw'
$watcher.Filter = '*.prn'
$watcher.EnableRaisingEvents = $true
Register-ObjectEvent $watcher 'Created' -Action {
    $src = $Event.SourceEventArgs.FullPath
    Get-Content $src | Where-Object { $_ -match '^\d' } |
        Export-Csv "$($src -replace '\.prn$','.csv')" -NoTypeInformation
    Remove-Item $src
}

6. WinCC Flexible Project Configuration

Open the project in WinCC Flexible 2008 and configure the report, the scheduler, and the data source.

6.1 Create the report layout

  1. In the project tree, right-click Reports → Add Report → name it Daily_Production.
  2. On the report layout, add:
    • Header: static text with date/time, plant line, shift code
    • Body — Table with these columns: Timestamp | OrderNo | Operator | GoodCount | RejectCount | CycleTime
    • Footer: sum row using tag TotalGood and TotalReject
  3. Wire each column to a tag from the project's Tag List (e.g. dbProd.GoodCount, dbProd.RejectCount).

6.2 Configure the print job and scheduler

  1. Open Project > Report > Daily_Production > Properties.
  2. Set the Printer field to the network printer alias added in Section 4.3 (e.g. PDF_on_PC).
  3. Open Project > Schedulers and add a new event:

Name:            DailyReport_2300
Trigger:         Once, every day
Time:            23:00:00
Function:        Report_Print("Daily_Production")
Optional tag:    ReportRunFlag (BOOL, used as handshake)
  1. Compile the project (Project → Compiler → Release). Transfer to the panel with WinCC Flexible's Transfer tool using ETHERNET mode and the panel's IP 192.168.0.1 with transfer password (default: 100).

6.3 Configure historical data export

The production report and the historical tag log are two separate artefacts. The report is a one-shot snapshot; the historical log is the continuous archive. To export the archive to the PC:

  1. Open Project > Historical Data > DailyLog (a tag log with segments configured for Daily segment change, 7-day retention).
  2. Right-click the log → Properties > Storage Location > Network. Specify:

Path:           \\192.168.0.10\hmi_reports\archive
User:           hmireport
Password:       <PC password>
Segment size:   1 day
Format:         RDB (runtime database) for lossless; CSV for MES ingest
  1. Add a second scheduler event to copy the closed segment at 23:05:
    • Function: Log_TagArchiveExport with parameters Source = DailyLog, Destination = \\192.168.0.10\hmi_reports\archive, Format = CSV
Common pitfall: If the panel time and the PC time differ by more than a few seconds, daily log segments will be mis-aligned. Enable Start Center > Settings > Date/Time > Synchronize with SNTP server on both devices, or manually align them at commissioning.

7. Verification & Commissioning

  1. Smoke test the share: from the MP377 Start Center, navigate to Settings > Network > Logon > Test. The panel should report Connection to \\192.168.0.10\hmi_reports established.
  2. Smoke test the printer: trigger a test page. A file should appear in D:\HMI_Reports\ within 5 s.
  3. Smoke test the report: in WinCC Flexible Runtime on the engineering PC, open the simulator (Start > Programs > WinCC Flexible 2008 > Runtime), force the scheduler to fire via Tools > Simulate Scheduler, and confirm a PDF is written.
  4. End-to-end on the panel: load the runtime project, set the panel clock to 22:59, wait 60 s. The daily report PDF and the daily CSV should both appear on the PC at 23:00:05 and 23:05:05 respectively.
  5. Stress test: temporarily set the scheduler to fire every 60 s for one hour. Inspect the share for missing files, locked files (~$prod_xxx.pdf), or duplicates.

8. Troubleshooting Matrix

Symptom Likely cause Diagnostic Remediation
No file appears; no error on panel PDFCreator service running as Local System, autosave target unwritable Check C:\Windows\Temp\PDFCreator on PC Change service log-on to hmireport; restart pdfcmon
Panel event log: 14001 - Printer not found UNC path unreachable; SMB version mismatch net view \\<PC> from a third machine Enable SMBv1 in Windows features, or upgrade panel firmware ≥ V1.5.4 which supports SMBv2
Panel event log: 14003 - Access denied Wrong password, account locked, or share permission missing Test-Connection 192.168.0.10 and Get-SmbShare Reset hmireport password; re-enter on the panel under Network > Logon
PDF is empty / contains only header Generic Text driver is dropping graphics/tables Open the PDF; check file size < 4 KB Install PCL5e or PostScript driver on the PC and re-add the network printer using that driver
File names collide, older files overwritten PDFCreator filename pattern lacks unique time Inspect the autosave pattern Set pattern to prod_%date%_%time%_%counter%.pdf; enable Allow overwrite = Off
Daily log missing one segment at month-end Segment rollover triggers during scheduler event Compare Start time vs. 23:00:00 Offset the scheduler by 5 minutes; align SNTP
PDFCreator dialog appears on the operator screen UAC elevation under interactive session Check Event Viewer > Application > pdfcmon Run PDFCreator as a service; disable all UI prompts under Profile > Show popup
Runtime message: Report: License missing Reports option not licensed Start Center > Settings > License Transfer the Report license key (USB stick or License Key Toolkit) to the panel

9. Operational Notes

  • Disk retention: configure a scheduled forfiles task on the PC to delete PDFs older than the agreed retention (e.g. 365 days). Example: forfiles /p D:\HMI_Reports /m *.pdf /d -365 /c "cmd /c del @path".
  • Encryption at rest: on regulated sites, enable BitLocker on D:\ or store PDFs on a network share backed by a Windows Storage Space with encryption.
  • Time zone: when the report is reviewed across plants, set the panel and the PC to UTC for the filename timestamp, and convert to local in the consuming application.
  • Migration path: if the site is moving to TIA Portal, the same procedure applies via the WinCC Comfort/Advanced report designer, with the addition of Logs > DataLogs > Backup > Network parameters in the panel's project properties.
  • Audit trail: to detect gaps, compare the number of files in \archive\2024\ on the PC to the count of panel scheduler fired events in the runtime log; missing days indicate either an outage or a credential expiry.

10. Reference Documents

Cross-check the parameters used in this procedure against the manufacturer documentation:

Can WinCC Flexible 2008 print directly to a PDF file without a Windows PC?

No. The WinCC Flexible 2008 runtime on MP377 has no built-in PDF rendering. It must send PCL/PS or text to a network-attached printer or shared folder; conversion to PDF is performed by a virtual printer on a Windows host (PDFCreator, Bullzip, or Microsoft Print to PDF). On TIA Portal WinCC Comfort, the same constraint applies to the older MP377 image; only PC-based HMI runtimes can render PDF directly.

Why does the panel show "Printer not found" when the share opens from Explorer?

The MP377 panel's network stack uses the SMBv1/CIFS dialect by default. If the Windows 10/11 PC has SMBv1 disabled (the default since the WannaCry/NotPetya mitigations), the share is invisible to the panel. Either re-enable SMBv1 on the PC, or upgrade the panel firmware to image V1.5.4 or later, which adds SMBv2 client support. The share, the share permissions, and the IP route can all be correct while the dialect mismatch still produces error 14001.

How do I trigger a report immediately without waiting for 23:00?

Add a function button on the panel screen bound to the system function Report_Print("Daily_Production"). For test purposes the engineering PC can fire the same function via the WinCC Flexible Runtime simulator. To make the test reproducible, drive the function from a one-shot scheduler that fires on a tag edge rather than a time-of-day event.

What is the difference between the daily report PDF and the historical CSV export?

The report is a formatted, human-readable snapshot triggered at a point in time (typically end of shift) and includes totals, layouts, and labels. The historical data export is the raw, time-stamped log of every tag change in the same period and is intended for MES or database ingestion. The two are complementary — the PDF for QA, the CSV for analytics — and should be configured as separate schedulers with separate destination paths.

Can I email the report automatically once it is generated?

Yes, but not from the panel. Configure a PowerShell or Python watcher on the Windows PC that fires on FileSystemWatcher.Created for D:\HMI_Reports\*.pdf, attaches the file, and sends it via SMTP (Send-MailMessage in PowerShell, or smtplib in Python). Make sure the firewall on the PC allows outbound TCP 25/587 and that the relay server accepts the service account's credentials. The MP377 itself cannot send SMTP in WinCC Flexible 2008.

Back to blog