Resolving 'Block Type is Different in Source and Target' When Copying SFC Instances in CFC

Resolving 'Block Type is Different in Source and Target' When Copying SFC Instances in CFC

In SIMATIC PCS 7, the error 'The block type is different in the source and the target' encountered when copying a CFC chart containing an SFC Instance between projects occurs because the underlying SFC Type definition in the target project's Master Data Library has an inconsistent interface signature, parameter list, or timestamp compared to the source project. In PCS 7, an SFC Instance is an instantiation of an SFC Type; when copying, CFC enforces strict type conformity. To resolve the error, engineers must copy the authoritative SFC Type from the source project into the target project's Master Data Library, execute 'Options -> Charts -> Update Block Types' across the target AS, recompile the SFC Type, and then execute the CFC chart copy.

Table of Contents

Object-Oriented Relationship: SFC Types vs SFC Instances

In SIMATIC PCS 7, sequential control logic is structured using Sequential Function Charts (SFC). To support modular and reusable ISA-88 batch engineering, Siemens distinguishes between two fundamental SFC representations:

  1. SFC Type (Class Definition): A reusable state machine template stored in the Master Data Library or project chart folder. It defines the technological interface (Control Strategies, Setpoints, Process Values, Step topologies, and Phase logic).
  2. SFC Instance (Object Instantiation): Placed as a block call directly onto a Continuous Function Chart (CFC). It connects the abstract phase logic to physical actuators (MotL, VlvL) and controller I/O.

Because an SFC Instance is an exact child instance of its parent SFC Type, copying an instance into a project that possesses a divergent or non-existent SFC Type triggers immediate database validation blocks.

Why CFC Enforces Strict Interface Timestamp Conformity

When an engineer copies a CFC chart containing an SFC instance and attempts to paste it into another AS station or multiproject, the CFC engineering engine evaluates the interface headers:

Validation DimensionSource Project StateTarget Project StateCompiler AssessmentSFC Type NameEPH_DosingEPH_DosingNames match; prompts parameter comparisonInterface Signature12 Setpoints, Revision 310 Setpoints, Revision 1Fatal Mismatch: Block Type is DifferentInterface TimestampCompiled 2018-03-01Compiled 2017-08-15Fatal Mismatch: Type Version CollisionMaster Library LinkBound to Source MDLMissing in Target MDLRejection: Parent type not synchronized

Even minor modifications—such as renaming an internal parameter, adding a step, or compiling the SFC Type with a different CFC version—modifies the internal GUID and timestamp of the type. CFC rejects pasting the instance to prevent silent data block corruption and controller memory address offsets.

Step-by-Step Procedure to Synchronize SFC Types Across Multiprojects

To resolve the version collision and paste the CFC chart cleanly into the target project, execute the following technical workflow:

  1. Locate Authoritative SFC Type in Source Project: In the source Multiproject, open Component View. Navigate to Master Data Library -> Charts (or AS -> Charts). Locate the specific SFC Type object (marked with the orange SFC icon).

  2. Copy SFC Type to Target Master Data Library:
    - Copy the SFC Type from the source project.
    - In the target Multiproject, open the Master Data Library chart folder and select Paste.
    - Overwrite any older version existing in the library.

  3. Update Block Types in Target Project:
    - In SIMATIC Manager Component View of the target project, highlight the Master Data Library chart folder.
    - Select Options -> Charts -> Update Block Types....
    - In the synchronization wizard, select the target AS automation stations and confirm the update. This aligns the internal symbol tables and instance DB definitions across the entire target multiproject.

  4. Compile SFC Type in Target AS:
    - In the target AS chart folder, double-click the newly updated SFC Type.
    - Select SFC -> Compile. Ensure compilation finishes with 0 Errors.

  5. Execute CFC Chart Copy: Return to the source project. Copy the CFC chart containing the SFC instance. Paste it into the target AS project's Plant View or Component View. The instance binds cleanly to the synchronized SFC Type without errors.

Verification

Verify SFC type synchronization and compilation integrity through these diagnostic steps:

  1. Chart Paste Verification: Confirm that the target CFC chart pastes cleanly into the technological hierarchy without error dialogs.
  2. CFC Program Compilation: In the target AS, select Chart -> Compile -> Chart as Program -> Scope: Changes Only. Verify that compilation succeeds with 0 Errors.
  3. SFC Instance Online Monitoring: Download changes to S7-PLCSIM or the AS controller. Open the SFC instance in CFC. Switch to Test Mode and verify that step sequences and state transitions execute deterministically.

Limitations and Operational Precautions

When synchronizing SFC Types across multi-station environments, observe these operational precautions:

  • SFC Type Interface Changes in RUN (CiR): Modifying the interface of an active SFC Type (adding/deleting setpoints or characteristics) changes the structure of its instance DBs. This cannot be downloaded in RUN; downloading interface changes forces the CPU into STOP mode. Plan interface updates during planned shutdowns.
  • Software Version Uniformity: Ensure both Engineering Stations possess identical updates for CFC and SFC for SIMATIC S7 (e.g. CFC V8.2 Upd 1). Version discrepancies in the SFC compiler generate differing type hashes.
  • Technological View Precedence: When using Plant Automation Accelerator (PAA) or Plant View, always synchronize types at the Master Data Library level before manipulating charts in Plant View.

Engineer FAQ

Why did copying the SFC Type into the AS chart folder alone not work?

If the project utilizes a Master Data Library, the library has precedence. When updating, CFC cross-checks the Master Data Library. If the library still holds the old type, the AS chart folder is reverted during the next type update.

Can I convert an SFC Chart into an SFC Type?

No. An SFC Chart is a static sequential program. Converting logic into an SFC Type requires creating a new SFC Type in the library and recreating the step actions and characteristics.

Does updating an SFC Type delete existing instance parameters in CFC?

No. Updating an SFC Type preserves all existing instance parameter values and interconnections, provided the corresponding parameter names were not deleted from the type interface.

Technical References

Related Articles

Related Tags

  • SFC Type
  • SFC Instance
  • Update Block Types
  • Master Data Library
  • CFC Copy Error
  • Interface Mismatch
6 respuestas