# PLCSIM Advanced (Pro)

{% hint style="warning" %}
This Interface is only available in realvirtual.io Professional
{% endhint %}

### Introduction

PLCCSIM-Advanced is a virtual PLC from Siemens. PLCCSIM-Advanced can be used to simulate S7-1500 PLCs. If you use PLCSim-Advanced no real PLC is needed.

> PLCCSIM-Advanced will work in a multi-threaded mode by starting a parallel .exe command line programm. The PLCCSIM-Advanced interface will only work in Windows environments.

Please check the Siemens Website for more information about PLCCSIM-Advanced:\
<https://w3.siemens.com/mcms/automation-software/de/tia-portal-software/step7-tia-portal/simatic-step7-options/s7-plcsim-advanced/seiten/default.aspx>

Here is a short Youtube Tutorial showing you the interface in action:

{% embed url="<https://youtu.be/BZtHKd0lCiY>" %}

### Interface configuration <a href="#interface-configuration" id="interface-configuration"></a>

For using the PLCSim-Advanced Interface, you need to add an interface to your scene by selecting *Tools > realvirtual> Add Component > Interface > PLCSIMAdvanced* or you add the Script SharedMemoryInterface to an empty Gameobject.

{% hint style="danger" %}
For working in a Unity Build, this interface requires `Allow unsafe Code` to be turned on in Player Settings.

<img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-72f996aae52438f9e537d227442f5316277e4e7f%2Fplcsimadvanced-unsafecode.png?alt=media" alt="" data-size="original">
{% endhint %}

{% hint style="info" %}
**New in Version 6.0.7**: The PLCSim Advanced Interface now features an automated setup system that streamlines the configuration process. The entire setup now takes 40-70 seconds with real-time progress indicators and automatic detection of Siemens DLLs.
{% endhint %}

### Automated Setup Process

As a prerequisite, you need to have PLCSIM-Advanced installed on your computer. Starting with version 6.0.7, the setup process has been greatly simplified with a single-click automated setup system.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-9ee7dbb1e713a404851d002f432a88bdd0ba67b5%2Fplcsimadvanced-automated-setup.png?alt=media" alt="Automated setup interface showing dynamic status indicators and single-button setup"><figcaption><p>PLCSim Advanced automated setup interface with real-time progress indicators</p></figcaption></figure>

The automated setup performs three steps automatically:

1. **Auto-detect Siemens DLL**: The system automatically searches for the Siemens.Simatic.Simulation.Runtime.Api.x86.dll in four common installation paths. API 3.0 is checked first and preferred over API 2.0:
   * C:/Program Files (x86)/Common Files/Siemens/PLCSIMADV/API/3.0/ (checked first)
   * C:/Program Files (x86)/Common Files/Siemens/PLCSIMADV/API/2.0/
   * C:/Program Files/Common Files/Siemens/PLCSIMADV/API/3.0/
   * C:/Program Files/Common Files/Siemens/PLCSIMADV/API/2.0/
2. **Download PLCSimAdvancedCoupler.exe**: If not already present, the system automatically downloads the required coupler executable from the realvirtual repository.
3. **Copy DLL to StreamingAssets**: The Siemens DLL is automatically copied to the Unity StreamingAssets folder for runtime access.

The **InfoBox** at the top of the inspector provides real-time feedback during setup:

* **⚠ Warning**: Indicates setup is required or incomplete
* **ℹ Progress**: Shows current operation in progress with detailed status
* **✓ Complete**: Confirms setup is finished and ready to use

Simply click the **"Setup PLCSim Advanced Interface"** button to start the automated setup process. The system will display progress for each step, and the entire process typically completes in 40-70 seconds.

### Connection Configuration

After setup is complete, configure the connection parameters:

<div align="center"><figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-9b0595f0e319bfa2506d64fe6219c3fbdbccf34f%2Fplcsimadvanced.png?alt=media" alt=""><figcaption><p>PLCSIM Advanced Interface connection settings</p></figcaption></figure></div>

For connecting you need to define the PLCCSIM-Advanced *Instance Name* as well as the synchronization cycle in Ms under *Sync Cycle Ms*:

If you select *Pause With Unity*, PLCCSIM-Advanced will pause as long as Unity is paused.

*DebugMode* turns on a special debug mode, where all signals are also displayed in the command line prompt. This might take quite a time during the simulation start. Please turn this off for productive use.

*If HMIOnly* is turned on, only variables which are marked as HMI variables in the PLC project itself are imported.

You are now able to import the Signals of PLCSim-Advanced by selecting *Import Signals*. All PLCSignals will be created automatically as sub-objects under the interface.

After importing the Signals you can start the simulation. The signals will be exchanged between Unity and PLCCSIM-Advanced automatically.

{% hint style="info" %}
A separate .EXE file *PLCSimAdvancedCoupler.EXE* needs to be started for the PLCCSIM-Advanced Interface. This is due to the fact, that the Siemens DLLs can’t compile under Unity. For this the separate *PLCSimAdvancedCoupler.EXE* is creating a Shared Memory Interface to exchange the Signals between Unity and *PLCSimAdvancedCoupler.EXE*. The EXE itself is exchanging the values with PLCSim-Advanced. This is just for your information, as *PLCSimAdvancedCoupler.EXE* is part of the asset delivery and is copied automatically to the StreamingAssets folder and will be started automatically during Simulation startup or for the import of signals.
{% endhint %}

\
© 2025 realvirtual GmbH [https://realvirtual.io](https://realvirtual.io/) - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.
