Diagnosing AS Cycle Time Overruns and Communication Latency in SIMATIC PCS 7 Multi-Controller Systems

Diagnosing AS Cycle Time Overruns and Communication Latency in SIMATIC PCS 7 Multi-Controller Systems

In SIMATIC PCS 7 multi-controller architectures (such as interconnected DCS and ESD S7-400H systems), a sudden surge in controller cycle time (e.g., jumping from milliseconds to tens of seconds) following a network configuration download is typically caused by unthrottled S7 communication blocks (BSEND/BRCV or PUT/GET) executing inside high-frequency cyclic interrupt Organization Blocks (such as OB34 or OB35) without handshake interlocks, combined with an unconfigured communication load percentage in CPU properties. When controllers attempt to service high-volume synchronous communication jobs, the CPU communication buffer saturates, exhausting cycle execution slices. To resolve this, engineers must tune the CPU 'Cycle load due to communication' setting, migrate communication calls to state-driven execution, and segregate cross-AS data transfers.

Table of Contents

Mechanism of S7-400 CPU Cycle Execution and Communication Slices

In SIMATIC S7-400 and CPU 410-5H controllers, the operating system manages CPU execution time by dividing processing bandwidth between user logic and system tasks:
- Free Cycle (OB1): Executes continuously in the background when no higher-priority interrupt OB is pending.
- Cyclic Interrupts (OB30 to OB38): Execute deterministically at fixed time intervals (e.g., OB35 = 100 ms, OB34 = 200 ms, OB32 = 1.0 s).
- Communication Processing: Communication jobs (servicing OS tag polling, NetPro S7 connections, and engineering access) are processed either between cycles or in time slices allocated during the cycle.

In HW Config under CPU Properties > Cycle/Clock Memory, the parameter 'Scan cycle load due to communication [%]' (default 20%) defines the maximum percentage of cycle time the CPU may spend servicing communications. If high-frequency communication blocks continuously request data transfers without completion handshakes, the CPU communication processor consumes all allowable time slices, stretching OB1 cycle times exponentially.

Root Causes of Cycle Time Overruns in Multi-AS Architectures

When NetPro network configurations are downloaded and cross-AS communication is activated:

  1. Unthrottled Communication in Fast Cyclic OBs: Placing communication function blocks (BSEND/BRCV, USEND/URCV, or PUT/GET) in OB34 (200 ms) or OB35 (100 ms) triggered on every single cycle without checking the DONE or BUSY status bit. The CPU floods its internal communication queue, causing job pileup.
  2. Missing Interconnection Handshakes: When AS 1 (DCS) writes data to AS 2 (ESD), if the transmission is not paced, both controllers become backlogged waiting for packet acknowledgments across Industrial Ethernet.
  3. Communication Load Misconfiguration: If the communication load parameter is set to a low value (e.g., 10%) while data throughput is massive, or set to 50%+ during continuous polling, cyclic program execution suffers severe starvation.
  4. Broadcast Storms on Shared System Bus: If the plant bus interconnecting the DCS and ESD racks is overwhelmed by broadcast packets or experiencing physical cable reflections, TCP retransmissions consume CPU communication processing cycles.

Optimizing CPU Hardware Settings in HW Config

To configure CPU properties for balanced execution:

Step 1: Adjust Communication Load Parameter

  1. In SIMATIC Manager, open HW Config for the affected S7-400 CPU.
  2. Double-click the CPU module to open Properties.
  3. Switch to the Cycle/Clock Memory tab.
  4. Locate Scan cycle load due to communication [%]:
    - For standard PCS 7 systems, maintain 20% to 30%.
    - Setting this above 50% can cause OB1 cycle overruns; setting it below 10% can cause WinCC OS communication timeouts.

Step 2: Configure Maximum Cycle Time and OB80 Handling

  1. Under Scan Cycle Monitoring Time, verify the watchdog limit (default is typically 6000 ms; in PCS 7, ensure it is set between 3000 ms and 6000 ms).
  2. Ensure Organization Block OB80 (Cycle Time Fault) is present in the S7 Program offline block folder to prevent the CPU from entering STOP mode if a transient cycle overrun occurs.

Step-by-Step Procedure: Remediating Cross-AS Communication Logic

Refactor CFC communication blocks to eliminate cycle drag:

Step 1: Implement Paced Handshake Execution

  1. Open the CFC chart in OB34/OB35 executing the communication blocks (SFB12 BSEND / SFB13 BRCV or APL blocks).
  2. Never wire a static TRUE or inverted BUSY directly to the REQ trigger pin.
  3. Use a state-machine or clock pulse (e.g., 1 Hz pulse) combined with the DONE bit:
    pascal // Example SCL trigger pacing IF TriggerPulse AND NOT SendBusy THEN SendReq := TRUE; ELSIF SendDone OR SendError THEN SendReq := FALSE; END_IF;

Step 2: Shift Non-Critical Cross-AS Jobs to Slower OBs

  1. Move cross-AS telemetry that does not require sub-second reaction (e.g., tank levels, temperatures, totalizers) from OB34 (200 ms) or OB35 (100 ms) to OB32 (1.0 s) or OB31 (2.0 s).
  2. In the CFC Runtime Editor (Ctrl+Alt+R), drag the runtime group containing the communication blocks into OB32.

Step 3: Compile and Download Changes in RUN

  1. Compile the CFC charts (Compile > Changes only).
  2. Download changes to the controller in RUN mode.

Comparative Parameter Matrix: Cyclic Interrupt OBs in PCS 7

The table below outlines default execution intervals and recommended usages in SIMATIC PCS 7:

Organization BlockDefault Execution CyclePriority ClassTypical Automation ContentSuitability for Cross-AS CommsOB35100 ms12Fast PID control, motor drives, interlockingOnly for time-critical safety handshakesOB34200 ms11Standard analog monitoring, pressure loopsAcceptable with throttled handshakeOB33500 ms10Temperature loops, slow process controlRecommended for standard cross-ASOB321000 ms (1.0 s)9Totalizers, hourly averages, diagnosticsIdeal for plant monitoring dataOB1Free Cycle1Background calculations, diagnostic bufferBackground tasks only

Verification

To confirm that cycle time stability has been restored:
1. Module Information Cycle Time Check: In SIMATIC Manager, select the CPU and press Ctrl+D; switch to the Cycle Time tab. Verify that the current and maximum scan cycle times have returned to nominal values (< 50 ms).
2. Diagnostic Buffer Inspection: Verify that no OB80 cycle time warning events appear in the CPU diagnostic buffer.
3. Cross-AS Data Freshness: Confirm that process tags transferred between the DCS and ESD systems update reliably on WinCC faceplates without lagging or freezing.

Limitations and Operational Precautions

Observe the following engineering constraints:
- Safety-critical interlocks between ESD and DCS must utilize fail-safe communication profiles (such as Safety Integrated F-Systems with F_SENDBO / F_RCVBO) rather than standard unprotected PUT/GET calls.
- Never set the CPU watchdog monitoring time to an excessively large value (e.g., > 10000 ms) to mask cycle time issues, as this severely compromises controller determinism.
- Always validate final license quantities and MLFBs against the applicable Siemens catalog and authorized distributor quotation when procuring communication processors or CPUs.

Engineer FAQ

Why did the cycle time increase only after downloading NetPro?

Before NetPro was downloaded, configured S7 connection endpoints were dormant. Once downloaded, the CPU firmware actively attempted to open TCP connections and execute communication buffer polling, triggering the bottleneck.

Can I use PUT and GET for cross-AS communication in PCS 7?

While functional, PUT/GET blocks are uncoordinated (one-sided) and do not guarantee data consistency. PCS 7 best practice mandates using BSEND/BRCV (SFB12/SFB13) which provide two-sided confirmed data consistency.

What happens if OB80 is missing when cycle time exceeds the maximum limit?

If the scan cycle monitoring time is exceeded and OB80 is not loaded in the CPU offline block folder, the S7-400 CPU operating system immediately enters STOP mode to protect the process.

Technical References

Related Articles

Related Tags

  • Cycle Time
  • OB34
  • OB35
  • S7 Communication
  • S7-400H
6 respuestas