Configuring CFC AS-Wide Interconnections Between S7-400 Stations

David Krause11 min read
HMI ProgrammingSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

Continuous Function Chart (CFC) on SIMATIC S7 normally confines interconnections to blocks that live inside the same CPU. When two or more Automation Stations (AS, i.e. S7-400 CPUs) belong to the same STEP 7 project or multiproject, CFC supports an AS-wide interconnection: a chart output on Station A can drive a chart input on Station B as if both blocks were installed in the same CPU. The runtime system of each AS keeps the value flow synchronized through the configured S7 connection.

AS-wide interconnections are not a replacement for high-performance peer-to-peer communication. They are an engineering convenience for distributing complex control strategies across multiple CPUs while keeping the chart topology readable. Siemens imposes a strict envelope on this feature: only S7-400 CPUs are supported, the cycle time of the underlying cyclic interrupt OB must be at least 100 ms, no fail-safe blocks may participate, and only elementary data types are allowed on the wire. Understanding and respecting these limits is the difference between a chart that compiles and downloads cleanly and a project that refuses to go online.

This reference documents every official prerequisite, walks through a working configuration, and provides a troubleshooting matrix for the failures most often observed when interconnecting two CFC charts across two S7-400 stations.

Hardware and Software Prerequisites

Before opening a CFC chart, verify that the project satisfies every condition in the table below. The CFC editor enforces most of these rules at compile time, but the failure messages are easier to interpret when the underlying constraint is known. See the CFC for SIMATIC S7 Function Manual for the canonical list.

Item Required value Notes
STEP 7 version V5.4 SP5 or later Required by CFC 7.x; CFC 8.0/8.2 runs on STEP 7 V5.5 and V5.6.
CFC version V7.0 or later (V8.2 recommended) Older CFC 6.x does not support the runtime OB parameters needed for AS-wide links.
CPU family S7-400 only S7-300, ET 200S CPU, WinAC and S7-1200/1500 are explicitly not supported.
Project type Single STEP 7 project or multiproject Stations in two unrelated projects cannot exchange AS-wide links.
Network configuration Configured in NetPro An S7 connection between the two AS objects must be compiled and downloaded.
Firmware CPU firmware compatible with STEP 7 version Older firmware (e.g. V4.x) may refuse AS-wide runtime group definitions.
Fail-safe blocks None on the AS-wide path F-runtime groups, F-blocks and F-shared DBs cannot participate.
H-CPU Standalone S7-400 H station cannot interconnect to a non-H S7-400 AS-wide links between an H station and a standard S7-400 are rejected by the compiler.
Critical: If any of the items above is not met, the CFC editor will either refuse to draw the interconnection, drop it silently during compilation, or fail during download with an obscure system data error. Resolve the prerequisite first, then rebuild the chart.

Project and Network Configuration Requirements

An AS-wide interconnection rides on top of an S7 connection between the two station objects in NetPro. Without that connection the runtime system has no path to exchange the value at the end of each cycle.

  1. Insert both S7-400 stations into the same STEP 7 project (or into stations that are part of the same multiproject).
  2. Open NetPro and right-click the first CPU. Select Insert New Connection > S7 Connection, then choose the partner CPU. NetPro writes the connection resources on both sides automatically.
  3. Confirm that the connection type shown is S7 connection, not ISO-on-TCP-only or TCP-only. AS-wide interconnections require the full S7 protocol stack.
  4. Compile and download the NetPro configuration to both CPUs. The download writes the connection DBs and the connection table to each station's system data.
  5. Verify the connection using PLC > Diagnostics/Set > Check Connection Status in NetPro. A green status indicates the S7 connection is established.

If you skip NetPro and try to draw the AS-wide link directly in CFC, the editor will offer to create the connection for you. Accepting this prompt is acceptable, but it is safer to verify the connection works in isolation before introducing CFC complexity.

Runtime Group and OB Cycle Timing

Every CFC chart is executed inside a runtime group, which is bound to a cyclic interrupt OB (OB30 through OB38). For AS-wide interconnections, the runtime group on both stations must satisfy two rules:

  1. The cycle time of the OB must be at least 100 ms. The fastest legal cycle is therefore 100 ms; anything shorter is rejected.
  2. The priority of the OB must be consistent with its cycle time: the faster the cycle, the higher the priority. Mismatched priorities cause sporadic connection timeouts because the slower-priority OB on one side never gets a guaranteed time slice to send the update.

Recommended OBs for AS-wide interconnections:

OB Default cycle Default priority Recommended for
OB30 Configurable, ≥100 ms 7 Slow process values, background exchange
OB33 Configurable, ≥100 ms 8 Default choice for most AS-wide links
OB35 100 ms 9 Acceptable, but at the absolute minimum cycle
OB38 10 ms (rejected) 9 Not usable — below 100 ms minimum

The relationship between cycle time T and priority P can be expressed as:

T_station_A <= T_station_B ⇒ P_station_A >= P_station_B

In other words, the station with the faster cycle must run at higher OB priority, otherwise the slower station will not be scheduled often enough to keep its side of the link updated. If station A runs in OB35 (100 ms, priority 9) and station B runs in OB33 (200 ms, priority 8), the configuration is valid. If the priorities are reversed the link will compile but fail intermittently online.

Field-proven caveat: OB35 at its default 100 ms is borderline. The cyclic interrupt jitter on heavily loaded CPUs can push the effective cycle below 100 ms, after which the runtime system deactivates the AS-wide link. Use OB33 with a configured 100 ms cycle and an explicit priority assignment to remove the ambiguity.

Supported Data Types and Chart Constraints

Not every data type can ride an AS-wide interconnection. The runtime system serializes the value into the S7 connection, and certain compound or variable-length types cannot be packed into the fixed-length telegram expected by the partner.

Data type Allowed on AS-wide link Workaround
BOOL Yes
INT, DINT, WORD, DWORD, BYTE Yes
REAL Yes
TIME, S5TIME, DATE, TIME_OF_DAY Yes
CHAR Yes Single character only
STRING No Convert to ARRAY OF CHAR or split at the chart boundary
ANY No Pass the underlying elementary type instead
POINTER No Pass the referenced value, not the pointer
DATE_AND_TIME No Use TIME_OF_DAY and a date register
User-defined UDTs (STRUCT) No Explode into elementary members and link each separately

Additional chart-level restrictions:

  • The I/Os of nested CFC charts cannot be interconnected AS-wide. Only the I/Os of blocks (FB, FC, multi-instance blocks, library blocks) at the top level of the chart may participate.
  • The interconnection cannot point at a runtime group itself; it must target a block I/O pin.
  • The interconnection cannot point at an absolute address (e.g. DB100.DBD0) on the partner station. The target must be a named chart I/O.
  • Connectors (signal flags) on the partner chart are also forbidden. Only chart block I/Os are valid endpoints.

System Capacity and Topology Limits

Two hard numerical limits cap the use of AS-wide interconnections at the project and CPU level:

Limit Value Consequence when exceeded
AS-wide interconnections per CPU 200 Compile error; runtime would also drop links above the limit
Partner ASs per AS 15 Additional partner stations are not accepted by the runtime
Charts per runtime group Limited by CFC, not AS-wide Standard CFC chart count limits apply
Connected blocks per chart Limited by CFC Standard CFC block count limits apply

For projects that need to exceed 200 AS-wide links on a single CPU, the recommended pattern is to introduce an interface chart: one CFC chart on each CPU acts as a broker, aggregating multiple partner values into a single block whose output is then fanned out to local charts. This keeps the visible link count under the 200-element ceiling while preserving the overall topology.

Step-by-Step Configuration Procedure

The following procedure connects one output of a CFC chart on Station A (an S7-400 CPU) to one input of a CFC chart on Station B (a second S7-400 CPU) in the same project.

  1. Confirm the prerequisites. Both stations must be S7-400 CPUs in the same STEP 7 project, NetPro must show an S7 connection between them, and the chart targets must be top-level blocks with elementary data type I/Os.
  2. Open Station A's CFC chart that contains the source block. Identify the output pin you intend to expose.
  3. Open Station B's CFC chart that contains the destination block. Identify the input pin that should receive the value.
  4. Right-click the source output on Station A and choose Insert Interconnection. The cursor changes to a connector symbol.
  5. Click the destination input on Station B. CFC inspects the partner AS, verifies the rules above, and either accepts the link or displays a dialog explaining why it cannot be created.
  6. Set the runtime group on both charts. Open Chart > Runtime Properties, then assign each chart to OB33 (or another OB30–OB38 with cycle ≥ 100 ms and consistent priority).
  7. Compile both charts. Use Chart > Compile > Charts As Program on each station separately. The compiler writes a system data block describing the AS-wide links on each side.
  8. Download both programs. The download order does not matter; the runtime system establishes the link after both sides are present.
  9. Go online on Station A, open the chart, and watch the source output. Force a value change and observe whether the value arrives at the destination input on Station B.
  10. Check the partner station's diagnostic buffer (Station B > PLC > Diagnostics/Set > Diagnostic Buffer). Look for events of type S7 connection established/lost or AS-wide link failure.
Engineering tip: If CFC refuses to draw the link between two valid pins, close both charts, reopen them, and redraw. The editor occasionally loses track of open charts across stations and silently disables cross-station drag.

Verification and Diagnostics

After download, perform the following checks in order:

  1. Online view of both charts. In CFC online mode, every AS-wide interconnection shows a small icon overlay. Hover the cursor over the link to display the partner station name, the partner block, and the partner I/O. A red exclamation mark indicates that the runtime system cannot deliver the value.
  2. SFC visual instance for the S7 connection. In NetPro online, right-click the S7 connection and select Connection Status. The connection must show Established at both ends.
  3. Diagnostic buffer. Look for W#16##8x5 entries on both CPUs. Event ID 0x8x54 typically indicates that an AS-wide link could not be activated because the partner connection is down; W#16#4301 indicates an S7 connection establishment failure.
  4. Force and observe. Force the source value to a known value on Station A, then read the destination input on Station B. If the values do not match, the runtime group on at least one side is not running, or the cycle/priority mismatch described above is in effect.
  5. Check OB1 scan time. A saturated OB1 can starve the cyclic interrupt OB. Verify that OB1 completion time stays below the configured OB30–OB38 period, otherwise the cyclic interrupt is delayed past its scheduled slot.

Troubleshooting Matrix

Symptom Likely cause Resolution
Editor refuses to draw the AS-wide link Partner is an S7-300, ET 200 CPU, or S7-1200/1500 Move the chart onto an S7-400 CPU; the feature is unsupported on smaller families.
Link disappears after compile Source or target I/O uses STRING, ANY, POINTER, DATE_AND_TIME or a UDT Replace with an elementary type at the chart boundary.
Compile error "AS-wide interconnection to address not possible" Endpoint is an absolute address or a runtime group instead of a block I/O Point at a named block I/O on the partner chart.
Link active in offline view, red icon online S7 connection not downloaded or partner station in STOP Re-download NetPro and confirm both CPUs are in RUN.
Value updates intermittently, then freezes OB cycle on one station < 100 ms or priority mismatch Set both OBs to ≥ 100 ms with consistent priority. Prefer OB33 over OB35.
Connection established but link not active F-block or F-runtime group on the path Remove F-blocks from the AS-wide signal path; AS-wide links cannot traverse F-runtime.
Only one H-station partner accepted, the S7-400 standard station rejected AS-wide between H station and non-H S7-400 is forbidden Add a non-H S7-400 broker station or keep H-station signals local.
More than 200 AS-wide links on one CPU Capacity ceiling reached Aggregate links through an interface chart; fan out locally.
More than 15 partner ASs Runtime ceiling reached Restructure topology; introduce gateway stations or merge charts.
Chart I/O on a nested chart used as target Nested chart I/Os are not allowed endpoints Bring the signal up to the top-level chart or expose it via a dedicated block.

Can S7-300 CPUs participate in CFC AS-wide interconnections?

No. Siemens restricts AS-wide interconnections to S7-400 CPUs only. S7-300, ET 200S CPU, WinAC and S7-1200/1500 stations are explicitly unsupported, and the CFC compiler will reject the link or drop it during the chart check.

What is the minimum cycle time for an OB that hosts an AS-wide link?

100 ms. OB30 through OB38 are all legal, but their configured cycle must be at least 100 ms. OB33 with a 100 ms cycle is the recommended choice because OB35 sits exactly at the limit and is sensitive to jitter on heavily loaded CPUs.

Why does my STRING signal fail to cross an AS-wide interconnection?

STRING, ANY, POINTER and DATE_AND_TIME are not supported on AS-wide links. Convert the value to an ARRAY OF CHAR or to a fixed-length buffer, or pass individual elementary components across separate links.

Can I connect a CFC chart on an H-station to a chart on a standard S7-400?

No. AS-wide interconnections between an H station and a non-H S7-400 station are forbidden. Add a non-H S7-400 broker CPU or keep H-station signals inside the H runtime.

How many AS-wide interconnections can one CPU carry?

Up to 200 AS-wide interconnections per CPU, with a maximum of 15 partner ASs per AS. For larger topologies, aggregate signals through interface charts so that the per-CPU limit is not exceeded.

Back to blog