Resolving CFC Error Multiple Instance Block Cannot Be Imported During Modbus RTU Slave Configuration in PCS 7

Resolving CFC Error Multiple Instance Block Cannot Be Imported During Modbus RTU Slave Configuration in PCS 7

In SIMATIC PCS 7 (across versions V7.1, V8.1, and V9.0), when importing the Modbus RTU Slave block FB80 (MODB_341) for communication processor CP 341 into a CFC chart fails with the error 'The multiple instance block FB80 cannot be imported because the corresponding block FB7 was modified', the failure is caused by an interface timestamp or checksum mismatch between the multi-instance parent block FB80 and the underlying communication blocks FB7 (P_RCV_RK) and FB8 (P_SND_RK). This conflict occurs when the project block folder contains newer or older versions of FB7/FB8 imported from standard libraries that do not match the exact compiled interface embedded within FB80. To resolve the error, copy matching versions of FB80, FB7, and FB8 together from the official CP 341 Modbus Slave library into the Master Data Library and project block folder, update block types in CFC, and recompile.

Table of Contents

Executive Summary

Interfacing third-party field devices, remote telemetry units (RTUs), or auxiliary package units via Modbus RTU serial links is standard practice in industrial automation. When deploying CP 341 serial communication processors in SIMATIC PCS 7, engineers utilize official Siemens Modbus function blocks. However, adding the slave multi-instance block FB80 to a CFC chart frequently triggers an immediate import abort. Because FB80 encapsulates low-level send and receive system function blocks (FB7 and FB8), any discrepancy between the block interface timestamps stored in the project repository and the internal declaration table of FB80 forces the CFC type manager to reject the block. Synchronizing the library source blocks eliminates this multi-instance interface conflict.

Architecture and Fundamental Mechanics

The compilation and multi-instance inheritance architecture in STEP 7 / PCS 7 CFC operates through strict interface signatures:

  1. The Multi-Instance Parent-Child Architecture:
    * FB80 (MODB_341) is designed as a composite function block that encapsulates serial protocol execution.
    * To manage asynchronous serial transmission across the CP 341 backplane, FB80 internally declares instances of:
    • FB7 (P_RCV_RK - Receive Block for RK 512 / Modbus).
    • FB8 (P_SND_RK - Send Block for RK 512 / Modbus).
    • These child blocks are multi-instances sharing the parent block's instance data block (DB).
  2. The Cause of Interface Collision:
    * When FB80 was compiled by Siemens, the compiler embedded the exact interface signature (checksum and timestamp) of FB7 and FB8 into the binary header of FB80.
    * If a project block folder already contains a different version of FB7 (for example, imported from the standard STEP 7 Communication Blocks library, CP PtP library, or an older PCS 7 Basis Library update), its interface dates diverge from what FB80 expects.
    * When the engineer drags FB80 into a CFC chart, the CFC type management engine checks the local project block folder.
    * Detecting that the offline FB7 has an interface modification date different from the signature embedded inside FB80, the compiler aborts with: 'The multiple instance block FB80 cannot be imported because the corresponding block FB7 was modified', protecting against runtime pointer corruption.

Step-by-Step Implementation Procedure

Follow these procedures to resolve the block version collision and successfully import FB80 into CFC:

  1. Inspect Existing Blocks in SIMATIC Manager:
    * In SIMATIC Manager Component View, navigate to your S7 Program's Blocks folder.
    * Locate FB7, FB8, and FB80.
    * Switch to Details View (View > Details) and note the Version, Author, and Last Modified timestamps for each block.
  2. Open the Official Modbus Slave Library:
    * Select File > Open > Libraries.
    * Locate and open the official Modbus Slave CP341 library (or the installation source path for the CP 341 Modbus RTU driver package).
    * Open the library's Blocks folder.
    * Verify that FB80, FB7, and FB8 in this library share matching version numbers and authors.
  3. Reconcile Blocks in the Master Data Library (MDL):
    * Open your Multiproject's Master Data Library.
    * Copy FB80, FB7, and FB8 simultaneously from the official Modbus library into the Master Data Library Blocks folder.
    * When prompted to overwrite existing blocks, click Yes to All.
  4. Copy Synchronized Blocks into the AS Project:
    * Copy the synchronized FB80, FB7, and FB8 from the Master Data Library into the Blocks folder of your target S7 Program.
    * Confirm overwriting existing instances.
  5. Update Block Types in CFC Editor:
    * Open any CFC chart in the project.
    * In the top menu, select Options > Block Types....
    * In the Block Types dialog, select FB80 (and FB7, FB8).
    * Click New Version (or select all and click Clean Up).
    * The CFC type manager synchronizes the internal chart database with the newly reconciled block signatures.
  6. Instantiate FB80 and Recompile:
    * Drag FB80 from the block catalog into the target CFC chart.
    * Confirm that the block places cleanly on the sheet without raising import warnings.
    * Execute Chart > Compile > Scope: Changes only.

Verification

In CFC editor, verify that FB80 appears on the chart sheet with all input and output pins cleanly exposed. Double-click the block to open its parameter properties; verify that input parameters (CP_ADDR, MODBUS_PARAM) can be edited. Compile the CFC chart; verify that the compiler completes with 0 errors and 0 warnings.

Limitations and Operational Precautions

Ensure that replacing FB7 and FB8 does not disrupt other serial communication blocks (e.g., custom ASCII serial drivers) that may rely on different versions. Always execute an archive (File > Archive) of the multiproject before updating core communication blocks.

Engineer FAQ

Why did CFC report FB7 was modified when I never edited it?

The error occurs because the version of FB7 residing in your project block folder has a different interface timestamp than the one embedded inside FB80 when Siemens compiled the Modbus library.

Where can I find the matching FB7 and FB8 blocks?

They are located in the official Siemens CP 341 Modbus RTU Slave library installation directory.

Does FB80 require a separate hardware dongle on the CP 341?

Yes. Running Modbus RTU protocol on CP 341 requires inserting a physical hardware license dongle (hardware sub-module) into the back of the CP 341 card.

Can Modbus RTU be simulated in S7-PLCSIM?

Standard S7-PLCSIM does not emulate the physical CP 341 serial hardware chip; testing Modbus RTU requires physical CP hardware or virtual serial redirectors.

Technical References

Related Articles

Related Tags

  • CP 341
  • Modbus RTU Slave
  • FB80
  • FB7 P_RCV_RK
  • CFC Block Types
20 respuestas