Comparing S7 Controller Code and CFC Charts Across Identical Production Lines in PCS 7
In SIMATIC PCS 7, comparing automation software across identical production lines (such as multiple processing vessels controlled by separate S7-400 PLCs) cannot be performed using standard STEP 7 binary block comparison (Options -> Compare Blocks). Because the Continuous Function Chart (CFC) compiler dynamically generates instance data blocks, organizational FCs, and internal pointer offsets, binary comparisons yield hundreds of false differences. Instead, engineers must utilize the SIMATIC PCS 7 Version Cross Manager (VXM) tool. VXM conducts a technological comparison at the graphical CFC, SFC, and hardware configuration level, precisely pinpointing parameter, interconnection, and structural divergences without false positives.
Table of Contents
- Why Standard STEP 7 Block Compare Fails in PCS 7 Environments
- SIMATIC Version Cross Manager (VXM) Architectural Role
- Comparison Methodologies: Binary Compare vs. VXM vs. Version Trail
- Step-by-Step Procedure to Compare Multi-Line Controller Programs
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Why Standard STEP 7 Block Compare Fails in PCS 7 Environments
In traditional PLC programming (LAD, FBD, or STL), software logic is encapsulated in discrete Function Blocks (FBs) with fixed DB numbers. In such environments, the standard STEP 7 utility Options -> Compare Blocks compares the compiled MC7 machine code byte-by-byte between two block folders or between online CPU memory and offline files.
In SIMATIC PCS 7, automation programs are authored graphically using CFC and SFC. When CFC charts are compiled, the compiler dynamically assigns block numbers, generates internal communication FCs (such as FC2936), builds cross-OB dispatchers, and allocates instance DB numbers arbitrarily based on compilation order. Consequently, two completely identical technological charts across two separate CPUs will compile into entirely different DB numbers and internal memory offsets. Running a binary block comparison flags virtually every block in the project as 'different', making validation of identical production vessels impossible.
SIMATIC Version Cross Manager (VXM) Architectural Role
To provide meaningful technological change detection, Siemens developed the SIMATIC Version Cross Manager (VXM) optional engineering package (6ES7658-1CX58-0YA5). VXM operates directly at the engineering database layer rather than the binary machine code layer.
VXM parses and compares:
-
CFC Technological Structure: Compares chart hierarchies, technological blocks, block versions, and parameter values.
-
Signal Interconnections: Detects cross-chart links, global tag connections, and inverted logic inputs.
-
SFC State Machines: Compares sequential steps, transition conditions, action statements, and timer configurations.
-
Hardware Configuration: Validates distributed I/O racks, module parameters, measuring ranges, and network addresses.
-
Graphic Comparison Output: Displays differences in an intuitive color-coded tree view and generates formal change reports suitable for validation and regulatory compliance (e.g., FDA 21 CFR Part 11).
Comparison Methodologies: Binary Compare vs. VXM vs. Version Trail
The following table compares code validation methods in SIMATIC PCS 7:
Step-by-Step Procedure to Compare Multi-Line Controller Programs
To accurately compare PLC software across identical production lines in PCS 7:
-
Perform Chart Read-Back (Optional but Recommended):
- If operators or process engineers have tuned PID parameters or alarm limits online in the controllers, open CFC for each line.
- Select Chart -> Read Back to transfer current online runtime parameters into the offline CFC charts.
- This ensures you compare actual operational states rather than initial commissioning presets. -
Launch Version Cross Manager (VXM):
- In SIMATIC Manager, select the first S7 Program (e.g.,Line_1_AS\S7 Program).
- Select Options -> Version Cross Manager -> Start (or launch VXM from the Siemens start menu).
- In the VXM window, assign the first program as Object 1 (Source).
- For Object 2 (Target), browse to the second S7 Program (e.g.,Line_2_AS\S7 Programor a project archive). -
Configure Comparison Filters:
- Select the comparison scope: Check CFC/SFC Charts, Block Types, and Hardware Configuration.
- In the filter settings, configure tolerances (e.g., ignoring trivial floating-point rounding differences if desired).
- Click Compare. -
Analyze Differences and Export Validation Report:
- Review the color-coded comparison tree: Green indicates identical objects, yellow indicates parameter discrepancies, and red indicates missing or added blocks/links.
- Click any highlighted block to inspect the exact input/output parameter differences side-by-side.
- Select File -> Export / Print Report to generate a documented PDF or CSV audit report.
Verification
Verify cross-line software consistency:
1. Confirm that VXM reports zero structural differences between the core batch phase SFCs of Vessel 1 and Vessel 2.
2. Verify that any identified differences correspond strictly to line-specific parameters (e.g., unique vessel tag names, hardware I/O addresses, or IP assignments).
3. Inspect safety-critical interlocks in both charts; confirm identical logic gates and trip setpoints.
4. Archive the VXM comparison report in the plant engineering management system as commissioning proof.
Limitations and Operational Precautions
- VXM License Requirement: Version Cross Manager requires a dedicated engineering floating license (
6ES7658-1CX58-0YA5). Running without this license disables technological comparison. - Binary Block Compare Hazard: Never attempt to overwrite blocks between controllers based on a binary block compare, as this will mismatch dynamic instance DB numbers and crash the CPU.
- Hardware Address Normalization: Identical production lines typically feature different I/O addresses and Profibus/Profinet station numbers; use VXM filters to exclude hardware addresses from technological logic comparisons.
Engineer FAQ
Why can't I use STEP 7 'Compare Blocks' to compare PCS 7 PLCs?
CFC assigns instance DB numbers and compiler FCs dynamically. Identical technological logic compiles into different DB numbers, producing massive false-positive differences.
What is the difference between Version Cross Manager (VXM) and Version Trail (VT)?
Version Trail is an archiving utility that manages automatic version snapshots of multiprojects. Version Cross Manager is the graphical comparison engine that inspects differences between versions.
Can VXM compare an online running CPU directly to an offline project?
VXM compares offline project databases. To compare online controller states, perform a 'Chart Read-Back' to capture online parameters into an offline copy before running VXM.
Does VXM compare WinCC OS graphics and faceplates?
No. VXM focuses on S7 hardware, CFC charts, SFC state machines, and technological parameters. WinCC graphics must be compared using WinCC project documentation tools.
Technical References
- SIMATIC Version Cross Manager (VXM) User Manual (A5E39144865-AB)
- SIMATIC PCS 7 Engineering System Compendium Part A (A5E39144865-AB)
- Siemens Industry Online Support: Comparing Projects and Charts with VXM (Entry ID: 109780813)
Related Articles
- Troubleshooting Non-Specific Full Compilation Errors and SCL Crashes in PCS 7 CFC
- Best Practices for Archiving SIMATIC PCS 7 Multiprojects Without Database Corruption
- Mandatory Conditions for 'Entire Program' Compilation and Download in PCS 7 CFC
Related Tags
- VXM
- Version Cross Manager
- Code Compare
- CFC
- SFC
- Multi-Line Validation