PLCSIM Advanced

Connecting virtual Siemens PLCs with

This Interface is only available in Professional


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.

Last updated