Resolving Distributed Simulation Synchronization and Inter-VC Communication Faults in SIMIT 10.2

Resolving Distributed Simulation Synchronization and Inter-VC Communication Faults in SIMIT 10.2

In SIMIT 10.2 simulation environments utilizing Virtual Controllers (VC) distributed across multiple PCs, inter-controller communication failures (such as AG_SEND/AG_RECV faults) occurring over time are caused by clock drift, simulation time desynchronization, and network jitter between host computers. To resolve this, configure one SIMIT PC as the Distribution Master and the other as Distribution Slave with fixed simulation time slicing, synchronize host system clocks via Precision Time Protocol (PTP) or NTP, and ensure communication ports (TCP/UDP 50000–50100) are unblocked with dedicated gigabit simulation LAN connections.

Table of Contents

Executive Summary

In large-scale process plant virtual commissioning, complex automation architectures featuring multiple S7-400H or CPU 410-5H controllers cannot always be simulated on a single engineering workstation due to CPU and memory constraints. SIMIT Simulation Platform 10.2 facilitates distributed simulation, allowing Virtual Controllers (VC) and process model components to be partitioned across two or more networked host PCs.

While Virtual Controllers operating on the same physical host communicate reliably via local shared memory, distributing them across separate computers often leads to intermittent communication faults: inter-PLC communication blocks (such as AG_SEND / AG_RECV or BSEND / BRCV) operate normally for several minutes before dropping into permanent fault (STATUS = 16#80C4 or 16#80B0). This failure is caused by simulation time desynchronization and packet buffer overruns between the distributed SIMIT instances. This guide provides the architectural explanation and exact configuration steps required to establish deterministic synchronization and stable inter-VC communication.

Architecture and Fundamental Mechanics

The SIMIT distributed simulation engine coordinates cycle execution across physical hosts using synchronized time frames:

  1. Real-Time Execution vs Virtual Controller Slicing:
    - In a single-PC deployment, SIMIT executes all Virtual Controllers within a shared real-time kernel thread, advancing simulation time (Delta T) uniformly across all VC instances.
    - In distributed deployments, each PC hosts an independent SIMIT runtime instance executing its assigned Virtual Controllers.
    - Unless explicitly synchronized through SIMIT Distribution Master/Slave mechanisms, the internal simulation clocks drift due to slight variances in CPU hardware oscillators, Windows task scheduling latency, and virtual machine virtualization overhead.

  2. Inter-PLC Communication Mechanics (AG_SEND / AG_RECV):
    - Standard S7 communication blocks (AG_SEND / AG_RECV, FC5/FC6) rely on a handshake protocol: AG_SEND asserts REQ = 1 and waits for DONE or ERROR, while AG_RECV asserts EN_R = 1 and monitors the communication channel.
    - If PC A (hosting VC 1) executes faster than PC B (hosting VC 2), VC 1 transmits new telegrams before VC 2 has completed its scan cycle to read the previous buffer.
    - Over time, socket queues overflow, causing timeout exceptions (16#80C4: Temporary communication error, or 16#80B0: Sequence error), terminating the link.

  3. Master-Slave Synchronization and Network Requirements:
    - Deterministic multi-PC simulation requires configuring SIMIT Distribution mode:

    • Master PC: Dictates the simulation cycle clock and broadcasts the step sync pulse.
    • Slave PC: Pauses its calculation cycle until the step sync pulse is received from the Master.
    • Dedicated network interfaces with sub-millisecond latency (Gigabit Ethernet without routing delays) are required to transmit synchronization frames without jitter.

Step-by-Step Implementation Procedure

Follow these steps to configure distributed SIMIT 10.2 synchronization and stabilize inter-VC communication:

  1. Establish Dedicated Network Infrastructure:
    - Install a secondary Gigabit Ethernet network adapter on each simulation PC.
    - Connect both PCs directly via a high-speed industrial Ethernet switch (or point-to-point cross-over cable) on a dedicated private subnet (e.g., 192.168.100.x/24).
    - Do NOT route SIMIT distributed simulation traffic over the general corporate or plant office network.

  2. Configure Operating System Clock Synchronization:
    - Configure host operating systems to synchronize time using a high-precision local NTP or PTP time server.
    - In Windows Network Adapter Properties, disable 'Energy Efficient Ethernet' and set 'Interrupt Moderation' to disabled or low latency.
    - Open Windows Firewall and create inbound/outbound rules allowing TCP and UDP traffic on ports 50000 through 50100 for SIMIT binaries (SIMIT.exe, SimitRuntime.exe).

  3. Configure SIMIT Distribution Roles:
    - On PC 1 (Primary Workstation), open the master SIMIT project.
    - In the project navigation tree, double-click 'Distribution'.
    - Check the box 'Enable Distribution'.
    - Select PC 1 as 'Master' and specify its dedicated simulation IP address.
    - On PC 2 (Secondary Workstation), open the slave SIMIT project.
    - Under 'Distribution', set PC 2 as 'Slave' and enter the Master PC's IP address.

  4. Assign Virtual Controllers to Specific Hosts:
    - In the Master project, navigate to the Virtual Controller coupling editor.
    - In the station properties of VC 1, assign execution to 'Local Host' (Master).
    - In the station properties of VC 2, assign execution to 'Remote Host' (PC 2).

  5. Configure Fixed Time Slice (Delta T):
    - In SIMIT Simulation Settings, switch simulation timing from 'Free-running' to 'Fixed Time Slice'.
    - Set the calculation time slice to a value matching the controller cyclic interrupt (e.g., 100 ms for OB35, or 50 ms).
    - Configure the communication coupling cycle to synchronous mode.

  6. Initialize and Run Distributed Simulation:
    - Start the SIMIT Slave instance on PC 2 and place it into 'Wait for Master' state.
    - Start the SIMIT Master instance on PC 1 and click 'Run'.
    - Verify that both simulation engines start simultaneously and maintain lock-step cycle execution.

Verification

  1. In SIMIT Master and Slave status bars: verify that the simulation time indicators advance in exact synchronization without clock offset warnings.
  2. Open the CFC charts of VC 1 and VC 2 in SIMATIC Manager Test Mode.
  3. Monitor AG_SEND and AG_RECV blocks: verify that DONE pulses cyclically and output ERROR remains FALSE (16#0000).
  4. Run the simulation continuously for several hours: confirm that no communication dropouts or 16#80C4 errors occur.

Limitations and Operational Precautions

Distributed SIMIT simulation performance is constrained by network latency; latency exceeding 5 milliseconds will degrade simulation speed and force time-step dilation. Virtual Controllers running inside distributed VMs must have dedicated physical CPU core affinity assigned to prevent virtualization scheduling jitter. SIMIT simulation licenses and Virtual Controller instance packages should be verified through an authorized Siemens distributor or the Siemens Industry Mall.

Engineer FAQ

What causes distributed Virtual Controllers to lose communication over time?

Simulation clock drift and task scheduling jitter between the two host PCs, which causes socket queues for AG_SEND/AG_RECV to overrun.

Why does communication work fine when both VCs run on a single PC?

On a single PC, both VCs run within the same local real-time kernel and share synchronized memory buffers without network latency.

What network latency is required for SIMIT distributed simulation?

Network latency must be consistently under 1 to 2 milliseconds on a dedicated gigabit Ethernet segment.

What port range does SIMIT use for distributed communication?

SIMIT typically uses TCP/UDP ports in the range 50000 to 50100 for synchronization and data exchange.

Do Virtual Controllers require SIMIT VC runtime licenses?

Yes. Each concurrent Virtual Controller instance requires a valid SIMIT Virtual Controller license booked in Automation License Manager.

Technical References

Related Articles

Related Tags

  • SIMIT 10.2
  • Virtual Controller
  • Distributed Simulation
  • AG_SEND
  • Synchronization
  • PCS 7 Simulation
20 respuestas