Auditing CFC Chart and Data Block Modifications - Tracking Timestamp Changes and Downloads in SIMATIC PCS 7

Auditing CFC Chart and Data Block Modifications - Tracking Timestamp Changes and Downloads in SIMATIC PCS 7

In SIMATIC PCS 7, tracking when a CFC chart, block, or Data Block (DB) was modified or downloaded is performed by auditing internal block time stamps, reviewing the CFC Change Log, and using SIMATIC Version Trail or Version Cross Manager (VXM). When an engineer modifies CFC logic, the ES updates the block 'Interface' and 'Code' time stamps; even if the logic is subsequently reverted, the time stamp retains the modification moment. Furthermore, controller download events are logged in the offline project history and the AS Change Log, providing an immutable audit trail of who made changes and when the download occurred.

Table of Contents

PCS 7 Timestamp Mechanisms - Interface vs Code Timestamps

SIMATIC STEP 7 and CFC maintain strict internal cryptographic time stamps on all program blocks (FBs, FCs, and DBs). These stamps determine whether an online CPU program matches the offline project:
* Interface Time Stamp: Updated whenever inputs, outputs, or static parameters of a block or chart interface are added, deleted, or re-typed. An interface mismatch forces an Entire AS Download in STOP mode.
* Code Time Stamp: Updated whenever internal algorithm logic, CFC interconnection, or block parameter values are modified.
* Reversion Phenomenon: If an engineer introduces changes, compiles, downloads, and then manually edits the chart back to its original state and re-downloads, the time stamps do NOT revert to the past! They record the exact timestamp of the second edit and download.

Auditing Download History via the CFC Change Log

To prove conclusively that a download occurred and identify when it took place:
1. ES Change Log (Change Log in SIMATIC Manager):
* In SIMATIC Manager, select the Multiproject -> Right-click -> Select Object Properties.
* Navigate to the Change Log tab (requires SIMATIC Version Trail / SIMATIC Logon license).
* The Change Log records: Date/Time, User Name, Workstation Name, Action (e.g. Download AS Changes), and Target CPU.
2. CFC Log Files on Disk:
* Whenever a compile or download is executed, CFC generates text logs stored inside the project folder structure: <Project_Dir>\Logs\ and <Project_Dir>\S7Proj\wscripts\.
* Files such as cLog.txt, dLog.txt, and bLog.txt record compilation and download history with second-level timestamps.

Block Comparison and Online-to-Offline Inspection

To verify changes against a known baseline:
* SIMATIC Version Cross Manager (VXM): Compares two project versions or the offline project against an exported CPU image, highlighting exact parameter, interconnection, and chart geometry changes.
* STEP 7 Compare Blocks:
* Open SIMATIC Manager -> Select the Blocks folder.
* Select: Options -> Compare Blocks....
* Select Online vs Offline.
* If the logic was modified and reverted, the comparison may report identical code (Identical), but the Time Stamps (Interface time stamp / Code time stamp) will clearly show that the online block was compiled and downloaded at a later time than the original baseline archive!

CFC Audit and Tracking Capabilities Comparison

Compare the auditing tools available within the SIMATIC PCS 7 engineering environment:

Audit Tool / MechanismDetection ScopeTimestamp PrecisionLicense / PrerequisiteCFC Object PropertiesLast compilation and download timestamp of specific chartSeconds (DD.MM.YYYY HH:MM:SS)Standard PCS 7 Engineering StationBlock Time Stamps (FBs/DBs)Code and Interface compile timestamps in CPU memoryMillisecondsStandard STEP 7 Block PropertiesPCS 7 Change LogUser ID, terminal name, action type, download scopeSecondsSIMATIC Logon / Version Trail packageVersion Cross Manager (VXM)Graphical and topological differences across chartsFull visual diffSIMATIC Version Cross Manager licenseCFC System Logs (cLog.txt)AS compile and delta download execution recordsMillisecondsStandard CFC installation folder

Verification

To confirm the exact time of the last CFC or DB modification:
1. In SIMATIC Manager, open the AS S7 Program Charts folder.
2. Right-click the affected CFC chart -> select Object Properties; observe the Last modified and Last compiled timestamps.
3. Open the Blocks folder, right-click the generated instance DB; select Object Properties -> Time Stamps tab; compare the Last code change timestamp against the known baseline date.
4. Open the file <Project_Dir>\Logs\dLog.txt; verify the exact system timestamp of the last executed Download to PLC command.

Limitations and Operational Precautions

Standard STEP 7 block comparison only inspects binary logic parity; if an engineer modifies logic and reverts it back identically, binary comparison returns 'Identical'. Rely strictly on the internal Code Timestamp and the Change Log to detect unapproved download cycles. Always enforce SIMATIC Logon user authentication on Engineering Stations to prevent untracked anonymous modifications.

Engineer FAQ

Can an engineer alter the CFC timestamp manually?

No. Time stamps are generated automatically by the STEP 7 compiler using the Engineering Station system clock and cannot be edited via the user interface.

Why did 'Compare Blocks' report identical when I know a download happened?

'Compare Blocks' checks if the executable machine code matches. If logic was reverted to the original state, the code matches, but the block header time stamps will differ.

Where are the CFC compilation logs saved on the hard drive?

They are located in the multiproject folder under <Multiproject>\<Project_Name>\Logs\cLog.txt and dLog.txt.

What is the difference between SIMATIC Version Trail and Version Cross Manager?

Version Trail automates project archiving, tracking versions with SIMATIC Logon user credentials. Version Cross Manager (VXM) performs graphical side-by-side logic diffs between versions.

Technical References

Related Articles

Related Tags

  • CFC Audit
  • Time Stamps
  • Change Log
  • Version Cross Manager
  • Download Tracking
6 respuestas