Resolving 'CPU Could Not Be Linked Online' in SIMATIC CFC: S7-PLCSIM Simulation Workflow

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

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:

  1. 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.

  2. The PG/PC Interface Handshake:
    * For the CFC editor and SIMATIC Manager to communicate with S7-PLCSIM, the Set PG/PC Interface access point S7ONLINE (STEP 7) must point to the virtual PLCSIM driver (e.g. PLCSIM.TCPIP.1 or PLCSIM.MPI.1).
    * When PLCSIM is launched directly from SIMATIC Manager, it automatically remaps the access point.

  3. 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

  1. In SIMATIC Manager, click the Simulation On/Off icon in the main toolbar (adjacent to the NetPro icon).
  2. The S7-PLCSIM window opens.
  3. In the CPU subwindow, set the operating mode switch to RUN-P (Run with Program read/write capability).

2. Verify PG/PC Interface Assignment

  1. In SIMATIC Manager, select Options > Set PG/PC Interface....
  2. Confirm the Access Point of the Application S7ONLINE (STEP 7) is set to:
    * PLCSIM(MPI) or PLCSIM(TCP/IP).
  3. Click OK.

3. Download Hardware and Program to PLCSIM

  1. In SIMATIC Manager, select the target AS station object.
  2. Select PLC > Download to Current Module.
  3. Download the Hardware Configuration (accepting module prompts).
  4. Select the Charts folder, then choose PLC > Compile and Download Objects.
  5. Select Charts, configure Scope: Entire program, and execute download.
  6. Verify S7-PLCSIM displays active cyclic execution (CPU LEDs show RUN solid green).

4. Activate CFC Online Test Mode

  1. Open the target CFC chart in the CFC editor.
  2. Click the Test Mode icon (glasses).
  3. 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

Target SimulationRequired S7-PLCSIM SettingPG/PC Interface Access PointOS Compile ProtocolCFC / SFC Test Mode OnlyMode switch in RUN-PPLCSIM.MPI.1 or PLCSIM.TCPIP.1N/A (AS only)CFC + WinCC OS Single StationMode switch in RUN-PPLCSIM.TCPIP.1TCP/IP or Industrial EthernetPhysical Controller HardwareCPU mode switch in RUN-PPhysical NIC (TCP/IP -> Intel NIC)Named Connection (S7-REDCONNECT)Fail-Safe S7 F-SystemsPLCSIM V5.4 SP5+PLCSIM.TCPIP.1Standard TCP/IP

Verification

  1. In S7-PLCSIM, confirm the mode selector is in RUN-P and the RUN LED is green.
  2. Open a CFC chart containing an analog input block (Pcs7AnIn).
  3. Click the Test Mode glasses icon; confirm the window transitions to online mode without error dialogs.
  4. In S7-PLCSIM, open a vertical slider control mapped to the input address (e.g. PIW 512).
  5. Adjust the slider value; confirm that Pcs7AnIn.PV_In updates 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

Related Articles

Related Tags

  • S7-PLCSIM
  • CFC Test Mode
  • Simulation
  • Named Connections
  • PG/PC Interface
  • PCS 7 V8.1
6 respuestas