How to Configure and Simulate AS-to-AS Communication in S7-PLCSIM
To simulate cross-controller (AS-to-AS) communication between two Automation Systems within a SIMATIC PCS 7 multiproject using S7-PLCSIM, you must modify the connection type in NetPro from a redundant 'S7 Fault-Tolerant Connection' to a standard single 'S7 Connection'. Standard S7-PLCSIM does not emulate the multi-channel synchronization required by fault-tolerant H-connections, causing NetPro download faults and connection dropouts. You do not need to alter your physical hardware configuration from redundant H-CPUs to single CPUs; changing only the connection entity in NetPro enables standard data blocks and CFC cross-AS interconnections to transfer data between simulated instances, though fail-safe (F-System) safety communication remains unsupported without SIMIT Virtual Controller.
Table of Contents
- Architecture: S7-PLCSIM Communication Boundaries
- Why S7 Fault-Tolerant (H) Connections Fail in PLCSIM
- Safety Communication Limitations: F_SEND and F_RCV
- Method: Step-by-Step Configuration in NetPro and PLCSIM
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architecture: S7-PLCSIM Communication Boundaries
In a live PCS 7 plant, controllers exchange continuous process data, interlock signals, and unit state handshakes across Industrial Ethernet:
* Real Plant Architecture: High-availability controllers (S7-400H or AS 410-5H) use S7 Fault-Tolerant Connections spanning redundant communications processors (such as CP 443-1 pairs) or integrated PROFINET ports.
* S7-PLCSIM Emulation Scope: S7-PLCSIM (V5.4) emulates the memory model, execution organization blocks, and instruction set of a single SIMATIC S7 CPU inside a Windows process memory space.
* The Emulation Barrier: S7-PLCSIM does not simulate physical Ethernet hardware MAC controllers, redundant media ring switches, or fault-tolerant link redundancy protocols. Attempting to download a compiled NetPro connection table containing active S7 Fault-Tolerant connections to PLCSIM results in error code 0x8004 (Connection endpoint cannot be established).
Why S7 Fault-Tolerant (H) Connections Fail in PLCSIM
S7 Fault-Tolerant connections require continuous four-way path monitoring: Subnet A/Rack 0, Subnet B/Rack 0, Subnet A/Rack 1, and Subnet B/Rack 1. The microcode managing these redundant paths operates inside physical CPU firmware and CP modules.
Because PLCSIM does not emulate redundant rack switching, the simulated operating system flags the redundant communication path as permanently severed. By changing the configured connection in NetPro to a standard S7 Connection (which binds a single endpoint between Rack 0 of AS 1 and Rack 0 of AS 2), communication functions (BSEND/BRCV, USEND/URCV, and CFC chart cross-AS interconnections) operate normally over PLCSIM's internal virtual bus.
Safety Communication Limitations: F_SEND and F_RCV
A critical engineering limitation arises when attempting to simulate fail-safe Automation Systems (S7 F-Systems):
* F-Communication Failure: Safety-instrumented blocks (F_SEND_S7/F_RCV_S7 or F_SENDDP/F_RCVDP) execute strict PROFIsafe protocols. PROFIsafe embeds CRC checksums, consecutive sequence numbers, and real-time millisecond watchdog telegram timers.
* Watchdog Timeouts: Because S7-PLCSIM shares CPU execution cycles with the Windows operating system and other simulated instances, execution jitter exceeds safety timeout limits (F_WD_TIME). The safety blocks detect timing deviations and immediately enter the passivated (safe) state, setting communication error flags and halting fail-safe signal transfer.
* Solution for F-Systems: To simulate fail-safe cross-controller communication, engineers must deploy SIMIT Simulation Platform with SIMIT Virtual Controller (VC) or hardware-in-the-loop simulators.
Method: Step-by-Step Configuration in NetPro and PLCSIM
Follow this procedure to configure and simulate AS-to-AS communication between two controllers in a multiproject:
- Adjust Connection Type in NetPro:
- In SIMATIC Manager, open NetPro.
- Select the CPU of the first Automation System (AS 1).
- In the lower connection table, locate the cross-AS connection to the second Automation System (AS 2).
- If the type is configured as S7 Fault-tolerant connection, right-click and select Object Properties.
- Change the connection type to standard S7 Connection.
- Ensure the local and partner endpoints are assigned to Rack 0, Slot 3 (or the primary CPU slot).
- Click Network > Save and Compile (select Compile and check all). - Launch First PLCSIM Instance (AS 1):
- Open S7-PLCSIM. Select the interface mode (e.g.,PLCSIM(MPI)orPLCSIM(TCP/IP)).
- In SIMATIC Manager, select the Hardware configuration of AS 1 and download to PLCSIM.
- Download the CFC charts and connections for AS 1.
- Switch PLCSIM instance 1 to RUN-P. - Launch Second PLCSIM Instance (AS 2):
- Launch a second instance of S7-PLCSIM. In the dialog, verify that it assigns instance number 2.
- Download the Hardware configuration, CFC charts, and NetPro connections for AS 2 to PLCSIM instance 2.
- Switch PLCSIM instance 2 to RUN-P. - Download NetPro Connections:
- In NetPro, select CPU 1 and click Download to Current Project > Connections and Gateways.
- Select CPU 2 and download connections and gateways.
Verification
To verify that cross-AS communication is functioning between the simulated controllers:
- In SIMATIC Manager, open the CFC chart in AS 1 containing the sending block (or cross-AS output pin).
- Open the CFC chart in AS 2 containing the receiving block (or cross-AS input pin).
- Switch both CFC charts to Test > Test Mode.
- In AS 1, change the value of an exported variable (e.g., toggle a boolean switch or enter an analog test value of
45.5). - Inspect the corresponding receiving pin in AS 2:
- Confirm that the value updates to45.5within 1 to 2 CPU cycles.
- Confirm that signal status bytes (ST) report good quality (16#80). - In NetPro, select PLC > Module Information > Diagnostic Buffer for both CPUs; verify the absence of connection abort events.
Limitations and Operational Precautions
- Revert Before Commissioning: Never download the modified NetPro configuration to real plant hardware. Before commissioning on physical S7-400H or AS 410 systems, revert the connection type in NetPro back to S7 Fault-Tolerant Connection to ensure physical cable redundancy.
- PLCSIM Instance Limit: Standard S7-PLCSIM supports a maximum of two concurrent simulated CPU instances on a single engineering workstation.
- Virtual Ethernet Routing: If simulating via
PLCSIM(TCP/IP), ensure third-party packet loopback utilities (such as NetToPLCSim) do not conflict with active SIMATIC WinCC runtime network bindings.
Engineer FAQ
Do I have to change my CPU type from S7-400H to S7-400 in HW Config for PLCSIM?
No. You can leave the redundant H-CPU hardware configuration completely intact. You only need to change the connection entity in NetPro from Fault-tolerant to standard S7 Connection.
Can CFC cross-chart interconnections between different AS projects work in PLCSIM?
Yes. Once the underlying S7 connection is compiled in NetPro, PCS 7 automatically maps cross-AS interconnections using internal communication blocks (IK_SEND, IK_RCV) that execute cleanly in PLCSIM.
Why does SIMIT Virtual Controller succeed where S7-PLCSIM fails with safety blocks?
SIMIT Virtual Controller fully emulates S7-400H firmware and microsecond clock synchronization, allowing PROFIsafe telegrams and watchdog timers to process without timing violations.
Technical References
- Siemens Industry Online Support Entry ID 109742323: SIMATIC S7-PLCSIM V5.4 User Manual
- S7-PLCSIM User Manual (Document No. 6ES7841-0CC05-8BA0)
- Siemens Industry Online Support Entry ID 109780003: Cross-AS Interconnections in SIMATIC PCS 7
Related Articles
- https://industrialautomation.net/search?query=plcsim+simulate+as+to+as+communication
- https://industrialautomation.net/search?query=netpro+convert+fault+tolerant+to+s7+connection
- https://industrialautomation.net/search?query=pcs7+cross+chart+interconnection+simulation
Related Tags
- https://industrialautomation.net/search?query=s7-plcsim
- https://industrialautomation.net/search?query=simatic-pcs7
- https://industrialautomation.net/search?query=netpro
- https://industrialautomation.net/search?query=communication