Resolving 'CPU Could Not Be Linked Online' in SIMATIC CFC: S7-PLCSIM Simulation Workflow
In SIMATIC PCS 7, 'CPU could not be linked online' occurs when entering CFC Test Mode without downloading the compiled program to an active physical controller or running S7-PLCSIM instance. To simulate charts without hardware, launch S7-PLCSIM in RUN-P, set the PG/PC interface to PLCSIM, execute a full hardware and chart download from SIMATIC Manager, and compile the WinCC OS using TCP/IP or Industrial Ethernet.
Table of Contents
- Diagnostic Overview and Connection Prerequisites
- The S7-PLCSIM Simulation Architecture in SIMATIC PCS 7
- Step-by-Step S7-PLCSIM Setup and Download Workflow
- Simulation Interface and Protocol Selection Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Diagnostic Overview and Connection Prerequisites
During early project engineering or classroom training in SIMATIC PCS 7, engineers author CFC and SFC charts before physical controllers (S7-400 or CPU 410-5H) are delivered to the site.
When attempting to debug and monitor logic by clicking the Test Mode icon (glasses) in the CFC editor:
* The editor attempts to establish a diagnostic link to the automation station.
* A communication error dialog appears: CPU could not be linked online or Target system not reachable.
* Test mode fails to open, leaving the engineer unable to verify logic transitions or test mathematical formulas.
This failure occurs because configuring and compiling charts in SIMATIC Manager creates compiled machine code strictly on the engineering station hard disk. CFC Test Mode is an online monitoring tool: it does not interpret logic locally inside the editor; it queries an executing CPU via S7 Communication. Without a physical controller or an active, program-loaded S7-PLCSIM simulator instance, online monitoring is impossible.
The S7-PLCSIM Simulation Architecture in SIMATIC PCS 7
Operating without physical automation hardware requires deploying S7-PLCSIM:
-
Virtual Controller Emulation:
* S7-PLCSIM creates a fully virtualized S7-400 CPU instance in workstation RAM, including work memory, timers, counters, process image partitions (PIP), and cyclic interrupt organization blocks (OB30 to OB38).
* It executes the identical compiled machine code that would run on physical silicon. -
The PG/PC Interface Handshake:
* For the CFC editor and SIMATIC Manager to communicate with S7-PLCSIM, the Set PG/PC Interface access pointS7ONLINE (STEP 7)must point to the virtual PLCSIM driver (e.g.PLCSIM.TCPIP.1orPLCSIM.MPI.1).
* When PLCSIM is launched directly from SIMATIC Manager, it automatically remaps the access point. -
WinCC OS Simulation Constraint (Named Connections):
* Production PCS 7 Operator Stations communicate with S7-400 controllers using Named S7 Connections (via SIMATIC NET and NetPro).
* S7-PLCSIM Classic (V5.4) does NOT support Named Connections.
* To test the WinCC OS against S7-PLCSIM, the OS compilation must be configured to communicate via standard TCP/IP or Industrial Ethernet rather than Named Connections.
Step-by-Step S7-PLCSIM Setup and Download Workflow
1. Launch S7-PLCSIM
- In SIMATIC Manager, click the Simulation On/Off icon in the main toolbar (adjacent to the NetPro icon).
- The S7-PLCSIM window opens.
- In the CPU subwindow, set the operating mode switch to RUN-P (Run with Program read/write capability).
2. Verify PG/PC Interface Assignment
- In SIMATIC Manager, select Options > Set PG/PC Interface....
- Confirm the Access Point of the Application
S7ONLINE (STEP 7)is set to:
*PLCSIM(MPI)orPLCSIM(TCP/IP). - Click OK.
3. Download Hardware and Program to PLCSIM
- In SIMATIC Manager, select the target AS station object.
- Select PLC > Download to Current Module.
- Download the Hardware Configuration (accepting module prompts).
- Select the Charts folder, then choose PLC > Compile and Download Objects.
- Select Charts, configure Scope: Entire program, and execute download.
- Verify S7-PLCSIM displays active cyclic execution (CPU LEDs show
RUNsolid green).
4. Activate CFC Online Test Mode
- Open the target CFC chart in the CFC editor.
- Click the Test Mode icon (glasses).
- The chart connects online; block inputs and outputs illuminate with live blue/yellow values.
5. (Optional) Simulating with WinCC OS
If testing WinCC faceplates against S7-PLCSIM:
1. In SIMATIC Manager, select the OS station and choose PLC > Compile and Download Objects.
2. In the OS Compile wizard (screen 2), click the Connections... button.
3. Select TCP/IP (or Industrial Ethernet) instead of Named Connection.
4. Compile the OS and launch WinCC Runtime; graphic faceplates will read live simulated tags from PLCSIM.
Simulation Interface and Protocol Selection Matrix
RUN-PPLCSIM.MPI.1 or PLCSIM.TCPIP.1RUN-PPLCSIM.TCPIP.1RUN-PTCP/IP -> Intel NIC)PLCSIM.TCPIP.1Verification
- In S7-PLCSIM, confirm the mode selector is in
RUN-Pand theRUNLED is green. - Open a CFC chart containing an analog input block (
Pcs7AnIn). - Click the Test Mode glasses icon; confirm the window transitions to online mode without error dialogs.
- In S7-PLCSIM, open a vertical slider control mapped to the input address (e.g.
PIW 512). - Adjust the slider value; confirm that
Pcs7AnIn.PV_Inupdates dynamically in real time on the CFC canvas.
Limitations and Operational Precautions
- Revert OS Connections Before Site Commissioning: Before downloading WinCC to physical production servers, remember to recompile the OS using Named Connections. Running TCP/IP protocol on physical OS servers bypasses fault-tolerant redundant connection management.
- CiR (Configuration in RUN) Restrictions: S7-PLCSIM does not support hardware Configuration in RUN (CiR) simulation; hardware changes require stopping and restarting the simulated CPU.
- S7-PLCSIM Licensing: S7-PLCSIM requires a valid engineering license key (
SIMATIC S7-PLCSIM) installed in Automation License Manager.
Engineer FAQ
Can I simulate an S7-400H redundant pair in S7-PLCSIM Classic?
No. S7-PLCSIM Classic simulates only a single CPU instance. It cannot simulate fiber-optic synchronization links or redundant CPU switchover. Redundant simulation requires SIMIT Simulation Platform.
Why did PLCSIM reject my hardware download?
Ensure you opened S7-PLCSIM before initiating the download and verify the PG/PC interface matches the communication subnet configured in HW Config.
Can I save the simulated memory state in PLCSIM for future testing?
Yes, in S7-PLCSIM you can use 'File > Save PLC Layout As...' to store all simulated I/O states, data block values, and slider configurations.
Technical References
- SIMATIC Process Control System PCS 7 S7-PLCSIM Operating Instructions (V5.4)
- SIMATIC Process Control System PCS 7 Engineering System Compendium Part A
- Siemens Industry Online Support: Using S7-PLCSIM in SIMATIC PCS 7 (SIOS Entry ID 109780813)
- SIMATIC STEP 7 V5.5 Communication and Simulation Guidelines
Related Articles
- Resolving Disabled Control Buttons and Freezes in SIMATIC PCS 7 SFC Test Mode
- Configuring Fault-Tolerant S7 Connections on S7-400H Controllers
- Understanding 'Generate Module Drivers' in SIMATIC PCS 7
Related Tags
- S7-PLCSIM
- CFC Test Mode
- Simulation
- Named Connections
- PG/PC Interface
- PCS 7 V8.1