Rules and Workarounds for Copying and Moving SFC Accesses Across CFC Charts

Rules and Workarounds for Copying and Moving SFC Accesses Across CFC Charts

In SIMATIC PCS 7 CFC and SFC, dragging an SFC access pin to another CFC chart moves the SFC access connection to the new target pin rather than copying it. In the CFC Editor, direct copy-pasting of an SFC access cross-reference is not supported because an SFC step action is a unique single-assignment instruction in the underlying SFC database. To target multiple CFC inputs from the same SFC step, you must duplicate the assignment line directly within the SFC Editor step actions, or route the SFC access to an intermediate CFC distributor block (such as a standard BOOL or REAL junction) and branch it to multiple destination charts.

Table of Contents

Executive Summary

During plant automation programming in SIMATIC PCS 7, engineers frequently need to coordinate sequential control steps with multiple technological blocks across separate CFC charts (e.g., asserting a reset or interlock command from an SFC step to multiple motor blocks). When dragging an existing SFC access connection in the CFC Editor, the software moves the pointer to the new input, severing the original connection. Attempting to copy-paste the SFC connection line is disallowed by CFC topology validation. This technical guide explains the underlying database constraints governing SFC-CFC interconnectivity and provides standard engineering workflows to duplicate SFC accesses effectively.

Architecture and Fundamental Mechanics

The relationship between SFC sequential logic and CFC block interfaces is governed by the PCS 7 Engineering System database:
1. SFC Access Architecture:
An SFC access represents a write or read assignment declared within an SFC Step or Transition action (e.g., Chart1\MotL1.Reset = 1). In the SFC chart database, each assignment maps a single source expression to exactly one target technological address.
2. CFC Graphical Representation:
In the CFC Editor, SFC accesses appear as green cross-reference margins on block pins. When an engineer clicks and drags an SFC margin to another block pin, the CFC Editor issues an address modification command to the SFC database, updating the target operand of the existing step action from Chart1\BlockA.Pin to Chart2\BlockB.Pin (a Move operation).
3. Why 'Copy' Fails in CFC:
The CFC Editor does not possess authorization to instantiate new assignment records inside an SFC chart. Because copying an access implies creating a second, independent assignment record in the SFC step database, the operation must originate inside the SFC Editor itself or be resolved using an intermediate CFC distribution signal.

Step-by-Step Implementation Procedure

  1. Workaround Method 1: Duplicating the Action Inside the SFC Editor (Recommended for Clean SFC Code):
    a. Double-click the SFC access margin in CFC to open the referenced SFC chart and step.
    b. In the SFC Editor, select the active step and open 'Object Properties -> Actions'.
    c. Under the 'Actions' tab, locate the original assignment line (e.g., MotL1.Reset = 1).
    d. Insert a new line directly below it.
    e. Enter the target path of the second CFC chart block pin (e.g., Chart2\MotL2.Reset = 1).
    f. Save and compile the SFC chart. Both CFC blocks will now display valid SFC accesses on their respective pins.

  2. Workaround Method 2: CFC Distributor Block (Recommended for Scalable Multi-Drop Connections):
    a. In the primary CFC chart, insert a standard boolean repeater block (e.g., Or04 or an APL logic block Or08 with one input used, or an internal flag).
    b. Route the single SFC access to the input of this distribution block (e.g., Or04.In1).
    c. In CFC, connect Or04.Out to the Reset pin of MotL1.
    d. Drag additional connections from Or04.Out to the Reset pins of MotL2, MotL3, and other target blocks across charts.
    e. This method requires only one SFC access while safely distributing the command across multiple CFC instances.

  3. Moving an Existing SFC Access:
    a. To relocate an access entirely, click and drag the green SFC margin box from the current CFC pin directly onto the new block input pin.
    b. Confirm the prompt to relocate the cross-reference.

  4. Recompiling the Program:
    a. Execute Chart -> Compile -> Chart as Program....
    b. Choose 'Changes only' to ensure changes are downloaded bumplessly to the AS controller.

Verification

  1. In CFC Editor, verify that the green SFC access margin appears correctly on the designated block input pins.
  2. Double-click each SFC margin: confirm that both navigate to the intended SFC step action.
  3. Open the SFC chart in test mode and advance the sequence to the active step.
  4. In CFC test mode, confirm that all target block inputs transition to TRUE simultaneously when the SFC step executes.

Limitations and Operational Precautions

Creating excessive individual SFC step write assignments to distributed CFC blocks increases SFC compiled code size and communication overhead during AS-OS compilation. Using CFC intermediate distribution blocks (Method 2) is preferred when broadcasting a single step command to more than three target blocks.

Engineer FAQ

Why does dragging an SFC access move it instead of copying it in CFC?

An SFC access corresponds to a specific assignment statement in an SFC step. Dragging it simply edits the target operand of that statement; it cannot create a new statement in the SFC database.

Can I copy an SFC access across different CPU programs?

No. SFC accesses can only reference blocks located within the same S7 program and AS controller hierarchy.

What happens to an SFC access if I delete the target CFC block?

The SFC step action retains the obsolete path as an unresolved textual address, causing an error during SFC chart compilation.

Is there a limit to the number of actions within a single SFC step?

In PCS 7 SFC, each step can contain up to 50 action lines. For large broadcasting requirements, intermediate CFC distributor blocks are strongly recommended.

Does moving an SFC access require an AS STOP download?

No. Modifying an SFC access operand in CFC or SFC is fully supported via online delta download ('Download changes') in RUN mode.

Technical References

Related Articles

Related Tags

  • SFC
  • CFC
  • SFC Access
  • Sequential Control
  • Engineering System
  • Cross-Reference
20 respuestas