Configuring Automated Cyclic Tag Logging Report Printing Every 12 Hours in WinCC

Configuring Automated Cyclic Tag Logging Report Printing Every 12 Hours in WinCC

Configuring automated 12-hour cyclic printing of WinCC Tag Logging process reports in SIMATIC PCS 7 V8.2 cannot be selected via a single dropdown because standard WinCC Print Jobs only provide Daily, Weekly, or Hourly recurrence options. The simplest standard engineering method creates two identical Print Jobs assigned to the same Report Layout, with both set to Daily recurrence—one scheduled for 00:00 (midnight) and the second scheduled for 12:00 (noon). Alternatively, a Global Script C-action evaluating a PLC trigger bit or scheduled internal tag can execute RPTJobPrint(), while enterprise architectures deploy SIMATIC Information Server for automated PDF and Excel report generation.

Table of Contents

WinCC Report Designer and Print Job Triggering Modes

In SIMATIC PCS 7 OS (WinCC), the Report Designer subsystem manages the layout and generation of operational shift reports, alarm logs, and trend records. A configured report consists of two entities:

  1. Page Layout (*.rpl): Defines the visual template, company header, table columns, and tag trend objects.
  2. Print Job: Controls output routing (physical printer, PDF printer, or EMF file) and the execution schedule.

Under standard print job properties, recurrence options are restricted to: Standard cycle (e.g., every 5 minutes), Hourly, Daily, Weekly, and Monthly. A direct 'every 12 hours' setting is absent from the recurrence list.

The table below compares the available architectures for automated 12-hour report execution in SIMATIC PCS 7:

Reporting StrategyTrigger MechanismEngineering ComplexityMaintenance Overhead & RecommendationsDual Daily Print JobsNative WinCC Time SchedulerLow (Zero scripting)Recommended for local OS: Stable across compilations; uses 00:00 and 12:00 schedules.C-Script Tag TriggerPLC trigger bit / internal tagModerate (C-action)Useful for event-driven shift changes; requires proper tag edge resetting.SIMATIC Information ServerWeb-based automated schedulerEnterprise-gradeRecommended for plants: Zero WinCC load, automated PDF/Excel emailing to managers.

Method 1: Dual Daily Scheduled Print Jobs (No-Code)

The most robust, standard engineering solution requires zero scripting and survives OS project compilations:

  1. In WinCC Explorer, expand Report Designer -> open Print Jobs.
  2. Right-click the configured Print Job (e.g., ShiftReport) -> select Duplicate, naming the second job ShiftReport_Noon.
  3. In the properties of ShiftReport:
    - Under the Time tab, select Daily.
    - Set the start time to 00:00:00 (Midnight).
  4. In the properties of ShiftReport_Noon:
    - Under the Time tab, select Daily.
    - Set the start time to 12:00:00 (Noon).
  5. Both jobs link to the identical ShiftReport.rpl layout. The operating system triggers report generation precisely at shift handover.

Method 2: Programmatic Triggering via Global Script C-Action

When report generation must be synchronized with a PLC shift counter bit or triggered dynamically:

  1. Create an S7 binary tag (e.g., Shift_Print_Req) pulsing high when a shift concludes in CFC.
  2. In WinCC Explorer, open Global Script -> C-Editor -> create a new Action:
#include "apdefap.h"
int gscAction(void) {
    #define TriggerTag "Shift_Print_Req"
    #define JobName    "Shift_Report_Job"

    // Check if trigger tag is asserted
    if (GetTagBitWait(TriggerTag)) {
        printf("Executing Scheduled Shift Print Job: %s\r\n", JobName);
        if (!RPTJobPrint(JobName)) {
            printf("ERROR: Print job execution failed!\r\n");
        } else {
            // Reset trigger bit after successful dispatch
            SetTagBitWait(TriggerTag, 0);
        }
    }
    return 0;
}
  1. Assign a Tag Trigger to the C-action evaluating Shift_Print_Req on change (0 to 1).

Enterprise Reporting via SIMATIC Information Server

For modern facilities, manual WinCC print jobs are increasingly replaced by SIMATIC Information Server (IS) paired with Process Historian (PH):

  • Web-Based Scheduling: Configure automated email distribution of PDF and Microsoft Excel reports at custom intervals (every 12 hours, shift ends, batch completion).
  • Zero Scripting: Shift supervisors build customized report templates using standard Excel formulas and web wizards without automation engineering intervention.
  • Paperless Operation: Automatic archiving to corporate SharePoint or network storage eliminates control room paper waste.

Verification

To verify that automated report printing triggers properly:

  1. Configure the Print Job output to a virtual PDF printer (e.g., Microsoft Print to PDF) directed to a test directory.
  2. In WinCC Explorer, right-click the Print Job -> select Print the print job: verify that the PDF document compiles and saves successfully.
  3. For the Dual Daily schedule: temporarily configure test times 2 minutes in the future (e.g., 14:02 and 14:04).
  4. Confirm that WinCC Report Designer triggers the PDF generation automatically at the designated timestamps.
  5. Open the generated report: verify that tag logging curves and tabular values reflect complete 12-hour process intervals.

Limitations and Operational Precautions

Operational boundaries for WinCC report printing:

  • Report Designer Startup: Ensure the Report Runtime component is checked under WinCC Computer Properties -> Startup tab; otherwise, scheduled print jobs will not execute.
  • Tag Trigger Edge Evaluation: In C-script actions, always reset the trigger tag to 0 following execution to prevent infinite printing loops.
  • Spooler Buffer Freezes: If a physical printer runs out of paper or disconnects, the Windows Print Spooler can lock background threads in CCJobPrint.exe; configure PDF archiving as the primary output target.

Engineer FAQ

Can I select 'Every 12 hours' directly in a WinCC Print Job?

No. WinCC Print Jobs only provide Standard Cycle, Hourly, Daily, Weekly, and Monthly schedules. Creating two Daily jobs (one at 00:00 and one at 12:00) is the standard method.

Why didn't my scheduled print job run at the configured time?

Verify that 'Report Runtime' is enabled in WinCC Computer Properties -> Startup tab, and confirm that the Windows time zone and daylight saving settings match local time.

What C-script function triggers a WinCC Print Job programmatically?

The function RPTJobPrint("Job_Name") dispatches the print job to the Windows spooler.

Can WinCC automatically save reports as PDF files instead of physical paper?

Yes. In the Print Job properties, select a software PDF printer (e.g., PDFCreator or Microsoft Print to PDF) and configure an automated file naming pattern.

Technical References

Related Articles

Related Tags

  • WinCC-Reporting
  • Report-Designer
  • Print-Jobs
  • Tag-Logging
  • C-Script
  • Information-Server
8 respuestas