# Siemens Simit Interface (Pro)

{% hint style="warning" %}
Please note that this interface is only included in realvirtual Professional
{% endhint %}

{% hint style="info" %}
**New in Version 6.0.4:** This documentation includes new features and improvements coming in realvirtual 6.0.4, including one-click compiler define setup and enhanced SIMIT Unity Coupling V4.0.2 support.
{% endhint %}

## Overview

The Siemens Simit Unity Coupling Interface provides time-synchronized communication between realvirtual and Siemens SIMIT simulation platform. This interface enables precise coupling of Unity-based virtual commissioning with SIMIT plant models and PLC simulation environments including PLCSIMAdvanced.

**Key Features:**

* Time-synchronized communication with SIMIT
* Automatic signal mapping between realvirtual and SIMIT
* Support for Binary, Analog, and Integer signal types
* One-click compiler define setup *(New in 6.0.4)*
* Enhanced SignalType enum handling *(New in 6.0.4)*
* Compatible with PLCSIMAdvanced integration
* Real-time bidirectional data exchange

## When to Use This Interface

Use the Siemens SIMIT Interface when you need:

* **Precise timing synchronization** between Unity and SIMIT simulations
* **Coupled simulation** where Unity waits for SIMIT calculation steps
* **PLCSIMAdvanced integration** through SIMIT coupling
* **Advanced co-simulation** scenarios requiring deterministic timing

For standard applications without timing requirements, consider the [SIMIT Shared Memory Interface](https://doc.realvirtual.io/components-and-scripts/interfaces/simit-shared-memory) as a lighter alternative.

Additional information on the Siemens Simit Interface can be found at this page:

{% embed url="<https://support.industry.siemens.com/cs/document/109769816/simit-%E2%80%93-unity-kopplung?dti=0&lc=de-DE>" %}
Siemens Simit Coupling - Documentation
{% endembed %}

## Requirements

**Software Requirements:**

* Unity 2022.3 LTS or later (Unity 6 recommended)
* Siemens SIMIT V11.2 or later
* SIMIT Unity Coupling Package V4.0.2 or later
* realvirtual Professional license

**Hardware Requirements:**

* Windows 10/11 (64-bit)
* Minimum 8GB RAM (16GB recommended)
* DirectX 11 compatible graphics card

## Installation

### Step 1: Obtain SIMIT Unity Coupling Package

Download the SIMIT Unity Coupling package from Siemens:

* Visit: <https://support.industry.siemens.com/cs/document/109769816>
* Download the latest SIMIT Unity Coupling package
* Follow Siemens installation instructions in the manual

### Step 2: Install SIMIT Unity Package

1. Extract the SIMIT Unity package to a local directory
2. In Unity, open **Window → Package Manager**
3. Click **+ → Add package from disk**
4. Navigate to the extracted SIMIT package and select `package.json`
5. Wait for Unity to import the package

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-43e07403c9b21adacc304e20d33569210d38bde5%2FSiemensSimitRuntime.png?alt=media" alt=""><figcaption><p>Siemens Simit Interface</p></figcaption></figure>

### Step 3: Setup Compiler Define Symbol

The interface requires the compiler define `REALVIRTUAL_SIEMENSSIMIT` to be set. realvirtual 6.0.4 provides an automated setup:

1. Add a **SiemensSimitInterface** component to a GameObject in your scene
2. In the Inspector, click **"Add REALVIRTUAL\_SIEMENSSIMIT Define"** button
3. Unity will automatically add the define and recompile scripts

{% hint style="success" %}
**New in 6.0.4:** The one-click compiler define setup eliminates manual configuration errors and streamlines the SIMIT interface setup process.
{% endhint %}

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-ea33d547e0092fde86deb230de10c62f05912d85%2Fsiemens-simit-interface-setup.png?alt=media" alt=""><figcaption><p>One-click compiler define setup</p></figcaption></figure>

{% hint style="info" %}
The setup button automatically disappears once the define is properly configured, preventing accidental duplicate defines.
{% endhint %}

**Alternative Manual Setup:** If needed, you can manually add the define in **Project Settings → Player → Scripting Define Symbols**:

* Add: `REALVIRTUAL_SIEMENSSIMIT`

## Configuration

### Adding the Interface to Your Scene

1. **Create Interface GameObject:**
   * Add an empty GameObject to your scene
   * Add **SiemensSimitInterface** component
   * The **realvirtualCoupler** component is added automatically
2. **Add SIMIT Connection:**
   * Drag the **SimitConnection** prefab from the SIMIT Unity package into your scene
   * Reference it in the **Simit Connection** field of the SiemensSimitInterface

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-1ad9520370cfa18fe5f5b265fdaa17f6a3a33c56%2Fsiemens-simit-interface-updated.png?alt=media" alt=""><figcaption><p>Complete SIMIT interface setup in Unity</p></figcaption></figure>

### Signal Configuration

**Step 1: Add realvirtual Signals**

1. Add all realvirtual signal components as children of the SiemensSimitInterface GameObject
2. Supported signal types:
   * **PLCInputBool/PLCOutputBool** → SIMIT Binary signals
   * **PLCInputFloat/PLCOutputFloat** → SIMIT Analog signals
   * **PLCInputInt/PLCOutputInt** → SIMIT Integer signals

**Step 2: Update Signal Mapping**

1. Click **"Update Simit Signals"** button in the SiemensSimitInterface component
2. This automatically maps all child signals for SIMIT coupling
3. The interface handles signal type conversion automatically

**Step 3: Import Signals in SIMIT**

1. In your SIMIT project, use **Unity Coupling → Update Signals**
2. All signals appear in SIMIT with the naming convention:

   ```
   [SimitInterfaceName].realvirtualCoupler.[SignalName]
   ```

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-734d8a75bbd830acc28e090778e3f4ebe9efc400%2Fimage.png?alt=media" alt=""><figcaption><p>Scene with SIMIT interface and signals</p></figcaption></figure>

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-5a089a49c9b31947a18b6595389fc7663e063c29%2FSimitEdit.png?alt=media" alt=""><figcaption><p>Signals imported in SIMIT</p></figcaption></figure>

## Properties

**Siemens Simit Interface (Script)**

* **Active** (Always/Never) - Interface activation mode
* **Simit Connection** (GameObject) - Reference to SimitConnection prefab
* **Debug Mode** (boolean) - Enable debug logging

**Realvirtual Coupler (Script)**

* **Signals** (Signal\[]) - Auto-populated array of mapped signals (read-only)

## Troubleshooting

**Common Issues:**

1. **"SIMIT types not found" compilation errors**
   * Ensure SIMIT Unity package is properly installed
   * Verify `REALVIRTUAL_SIEMENSSIMIT` define is set
   * Use the automated setup button in the interface
2. **No signals appear in SIMIT**
   * Check that signals are children of SiemensSimitInterface
   * Click "Update Simit Signals" button
   * Verify SimitConnection is referenced and active
3. **Interface not connecting**
   * Ensure SimitConnection prefab is in the scene
   * Check SIMIT Unity Coupling settings in SIMIT
   * Verify network connectivity if using remote SIMIT

{% hint style="warning" %}
Always ensure the SIMIT Unity Coupling package is properly installed before using this interface. Missing SIMIT components will cause compilation errors.
{% endhint %}
