realvirtual.io
  • Building Digital Twins with Unity and realvirtual.io
  • Basics
    • Installation
    • Demo Model
      • Old Demo Model
    • Editor User Interface
      • Hierarchy Window
      • 3D Views
      • Quick Edit
      • Move Pivot Points (Pro)
      • Selection Window (Pro)
      • Material Window (Pro)
      • Measurement (Pro)
      • Kinematic Tool (Pro)
      • Model Checker
    • Runtime UI
      • Group Manager
      • Debug Console
      • Responsiveness
      • Runtime Persistence
    • Importing and exporting
    • Folder structure
    • Tutorial
    • Physics
    • CAD import (Pro)
      • CADLink (Pro)
      • CAD Checker (Pro)
      • CAD Updater (Pro)
    • Reusable Components (Prefabs)
    • Cadenas parts4cad
    • Publishing the Digital Twin
    • Revision management
  • News
  • Login & Download Updates (Pro)
  • Components & Scripts
    • Realvirtual
      • Environment Controller
    • MU, Source and Sink
      • Source
      • Sink
    • Motion and Kinematic
      • Drive
      • Kinematic
      • Group
      • Joint
      • CAM
      • TransportSurface
      • Guided Transport
      • Drive behavior
      • Chain
      • Chain element
      • Motion for developers
    • Sensors
      • Sensor
      • Measure
      • MeasureRaycast
    • Picking and Placing MUs
      • Grip
      • Gripper
      • Fixer
      • Pattern
    • Changing MUs
      • MaterialChanger
      • PartChanger
      • Cutter
    • Scene Interaction
      • 3D Buttons
      • Screen Overlay Buttons
      • Scene Selectables
      • Lamp
      • Interact3D
      • UI components
      • HMI components (Pro)
        • Start your own HMI
        • HMI Tab
        • HMI DropDown
        • HMI Puschbutton
        • HMI Switch
        • HMI Value
        • HMI Text
        • HMI Slider
        • HMI Message
        • HMI Marker
      • ModelZoo (Pro)
    • Interfaces
      • Interface Tools
        • Signal Manager
        • Signal Importer Exporter
        • Signal Catcher
        • OnValueChangedReconnect
      • Signal Importer / Exporter
      • ABB RobotStudio (Pro)
      • Denso Robotics (Pro)
      • EthernetIP (Pro)
      • Fanuc (Pro)
      • FMI
      • Igus Rebel
      • MQTT (Pro)
      • Modbus (Pro)
      • OPCUA (Pro)
      • PLCSIM Advanced (Pro)
      • RoboDK (Pro)
      • RFSuite (Pro)
      • SEW SimInterface (Pro)
      • Siemens Simit Interface (Pro)
      • Simit Shared Memory (Pro)
      • Simulink (Pro)
      • S7 TCP
      • TwinCAT (Pro)
      • TwinCAT HMI (Pro)
      • UDP (Pro)
      • Universal Robots (Pro)
      • Wandelbots Nova (Pro)
      • Websocket (Pro)
      • Windmod Y200 (Pro)
      • Custom Interfaces
    • Performance Tools
      • Combine Meshes (Pro)
      • Create Prefab (Pro)
      • Hierarchy Cleanup (Pro)
      • Mesh Optimizer (Pro)
      • Performance Optimizer (Pro)
    • Defining Logic
      • Unity Scripting
      • Behavior Graph
      • Logicsteps
      • Unity Visual Scripting
      • Recorder
    • Robot Inverse Kinematics (Pro)
    • Volume Tracking (Pro)
  • Multiplayer (Pro)
  • Extensions
    • ModelZoo
      • Beckhoff TwinCAT
      • Siemens S7
      • Denso Cobotta 1300
      • Wandelbots Nova Fanuc CRX
      • Universal Robots UR10
      • Fanuc Roboguide
    • realvirtual.io AIBuilder
      • realvirtual.io AI Builder Overview
      • Generate AI Training Data
      • AI Training
      • Testing AI in a Digital Twin
      • Deploying the AI
    • realvirtual.io Simulation
      • Conveyor Library
      • Path System
        • Path finding
        • Line
        • Curve
        • Workstation
        • Catcher
        • Pathmover
    • realvirtual.io Industrial Metaverse
      • Setup Guide
      • VR Modules
      • AR Modules
      • Multiuser
    • AGX Physics
    • VR Builder
    • CMC ViewR
  • Advanced Topics
    • Render Pipelines
    • Mixed Reality with Meta Quest3
    • Upgrade Guide
      • Upgrade to 2022
    • Open Digital Twin Interface
    • Usefull Addons
    • Improving Performance
    • Supported Platforms
    • Compiler Defines
    • For Developers
      • Important Classes and Interfaces
      • Assembly Definitions
      • Starting your development
      • Class documentation
      • realvirtual Init Sequence
      • realvirtualBehavior Lifetime Methods
      • Testing
    • Newtonsoft JSON
    • Troubleshooting
  • Release Notes
  • AI Digital Twin Assistant (GPT4)
  • License Conditions
Powered by GitBook
On this page
  • Introduction
  • Interface configuration
Edit on GitHub
  1. Components & Scripts
  2. Interfaces

PLCSIM Advanced (Pro)

Connecting virtual Siemens PLCs with realvirtual.io

PreviousOPCUA (Pro)NextRoboDK (Pro)

Last updated 18 days ago

This Interface is only available in realvirtual.io Professional

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:

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

Interface configuration

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.

For working in a Unity Build, this interface requires Allow unsafe Code to be turned on in Player Settings.

As a prerequisite you need to have PLCSIM-Advanced installed on your computer. Additionally Unity needs to copy a DLL of PLCCSIM-Advanced into the streaming assets folder. This will be done automatically. You will need to provide the path to this DLL under Siemens DLL. Usually the path is C:/Program Files (x86)/Common Files/Siemens/PLCSIMADV/API/2.0/Siemens.Simatic.Simulation.Runtime.Api.x86.dll

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.

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.

© 2022 in2Sight GmbH - 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.

https://realvirtual.io
https://w3.siemens.com/mcms/automation-software/de/tia-portal-software/step7-tia-portal/simatic-step7-options/s7-plcsim-advanced/seiten/default.aspx
PLCSIM Advanced Interface