Into the early steps of Virtual Commissioning in Tecnomatix Plant Simulation using S7-PLCSIM Advanced and STEP 7 TIA Portal

The commissioning of new designs, technologies, production related changes and control codes and strategies has been always a risky milestone to overcome in manufacturing. It has been carried out, in many instances, in a (quasi) poka-yoke way often leading companies to incur extra costs affecting the overall efficiency of a given project. In this regard, the emergence of novel Virtual Commissioning tools and methods have become a great asset adding to the commissioning process the values of shorter times, flexibility and reduced risks. The present paper aims at giving an introductory insight into the early steps of “Virtual Commissioning” in the software Tecnomatix Plant Simulation in conjunction with other engineering tools like the S7-PLCSIM Advanced and STEP 7 TIA Portal. It generally explores some of the capabilities of the software, and boards the benefits of using it prior to the implementation/real commissioning. The paper further lists key steps related to the realization of this process and makes emphasis on the interconnection and functioning of all of these tools for Virtual Commissioning purposes. At the end, there is also a simple example that implements and illustrates some of the contents and knowledge addressed.


Introduction
Industry 4.0 has become a research area many authors have lately focused on. Most of them agrees, as the authors of this paper themselves, that it as a manufacturing paradigm or philosophy for a better structuring, planning and execution of production processes using modern IT and communication methods [1][2][3]. This whole philosophy and its success highly rely on a few key elements among which 3D simulations of manufacturing instances have been forced to reach new dimensions. These are not only to represent the exact geometries or movements of given objects but instead virtual factories and simulation models in general must now exactly represent the real production systems, what implies strictly respecting their logical behavior and control rules, which is the main premise for truly converting such simulations into what is already known "Digital Factory and/or Digital twin" what enables the possibility of doing Virtual Commissioning (VC).
According to [4] VC is rated as a suitable approach to shorten the physical plant start-up and to ensure the smooth transition into the serial production phase. Similarly, other authors like [5], also cited by the previous authors, stressed that it can be used for the testing of control logics of a simulation model connected to a virtual PLC.
Siemens itself has been clearly reflecting this in the VC capabilities developed within its Tecnomatix portfolio of Manufacturing Solutions. More recently, the company has also started to implement such VC capabilities into another of their key products, i.e.: Tecnomatix Plant Simulation (PS). This software now enables a virtual model of the plant to be directly linked to either a virtual (software) programmable logic controller (PLC) or actual (hardware) PLC from a real environment. This commissioning solution is flexible and open and is to be used in conjunction with "any" PLC [6]. These new VC capabilities in PS are mainly related to a recently-added object named PLCSIM_Advanced. It works as an interface between PS and the S7-PLCSIM Advanced software for the data exchange between PS models and virtual PLCs which are executed in the latter one. The Siemens STEP 7 TIA portal also plays a great role in this process.
Bearing in mind all the previous elements, the main aim of this paper is to give the interested audience a general introductory insight into the early stages of VC in Tecnomatix Plant Simulation using the S7-PLCSIM Advanced software and its PS interface PLCSIM_Advanced. It intends to do this by exploring some of the capabilities and challenges posed by the software, and by boarding the benefits of using it for the purposes of any kind of VC prior to the implementation into a given manufacturing instance. The paper also lists and describe key steps related to this process, as well as other related and necessary software and platform like the S7-PLCSIM Advanced and the STEP 7 TIA portal respectively.

A general take on Virtual Commissioning
Authors like [5,6] state that VC enables the full verification of a manufacturing system by performing a simulation involving a virtual plant and a real controller which requires a virtual plant model to be fully described at the level of sensors and actuators. Publications like [8] made a comprehensive review and analysis of already existing and emerging approaches for better conducting the VC of manufacturing systems. Back then this work outlined what they thought was necessary for advancing in the field. A few years later, joined by a few authors, the already [4] described, from a more updated perspective, the need for new approaches to evaluate and commission designs or changes in Logistics apart from the classical simulation models, thus seeing again VC as a vital step for manufacturing companies. In their work they also offered a series of VC-related advantages which the authors of this paper think clearly and further elaborate on its role.

Tecnomatix Plant Simulation and its Virtual Commissioning capabilities
As mentioned somehow in the introduction of the paper, Tecnomatix is a Siemens portfolio of manufacturing solutions that includes a few software related to different fields of manufacturing. It covers areas like Ergonomics, Process Design, Process and Plant Simulation, Robotics, Warehouse and Logistics to just cite some of them. Many of these software packages offer a certain level of compatibility and thus designs and ideas from one may be well complemented or completed using another. They also share many details starting with the graphics, file formats, working environments, hierarchical structure of the elements inside the models and of course, this also extends to process of installation and online support and sharing platforms.
Plant Simulation is a Discreet Event Simulation software that offers an extensive range of analytic tools that allow to evaluate different manufacturing scenarios and provide information for making fast, reliable and less empirical decisions in the early stages of production planning. The own PS programming language "SIMTALK" gives the user a huge flexibility in terms of what is to/can be achieved and simulated. This is something not so powerfully developed in other of the PS´ siblings, e.g. Process Simulate. The software also counts on good 3D capabilities, and models can switch from 2D to 3D and vice versa at any given time. Other important elements of the visual environment are all clearly explained in [9].
In terms of VC, not long ago most of Siemens efforts had been put on the Process Simulate software converting it in a more polished tool for these purposes. As for PS itself, it is been just more recently that the software has started to be complemented with several objects enabling a more mature VC of given simulation models or parts of these. The main and most recent of such capabilities is the PLCSIM_Advanced object, which acts as an interface to the S7-PLCSIM Advanced software and allows to exchange data between PS simulation models and virtual PLCs which are executed in the latter one. As described in the own PS documents, PLC Out signals are copied to the variables and attributes of the objects in PS. On the other hand, PS sends PLC In signals to the PLC program running in S7-PLCSIM Advanced, which are then used there. The time progression is synchronized between S7-PLCSIM Advanced and PS. Besides the PS PLCSIM interface supports real time mode as well as time scaling with factors between 0.01 and 100.

The S7-PLCSIM Advanced and the step 7 TIA portal
According to [10][11][12], the S7-PLCSIM Advanced is a simulation software able to emulate the behavior of SIMATIC 1500 and ET 200SP series PLCs to test their correct functioning. The software offers 2 main communication interfaces, i.e.: PLCSIM (Local) and PLCSIM Virtual Ethernet Adapter. The Local communication is further divided in: Local communication via Softbus and Local communication via TCP/IP. However, in both cases local communication presupposes that the PLCSIM Advanced instance is on the same PC or on the same virtualization platform (VMware) as STEP 7 or another communication partner (PS for the purposes of this paper). Using the Softbus is, for security reasons, the default configuration when doing local communication. On the other hand, Local communication via TCP/IP is performed via the PLCSIM Virtual Ethernet Adapter, which happens to be a virtual network interface that behaves like a real network interface. This form of communication refers to the case of running PS on one computer and the S7-PLCSIM Advanced on a different one for which a distributed communication via TCP/IP is to be used. A distributed communication (multi-computer) via TCP/IP means that the S7-PLCSIM Advanced instances communicate with the other devices via a Virtual Switch. The communication can be set and executed with real or simulated CPUs, real or simulated HMIs. However, the S7-PLCSIM Advanced Virtual Switch must be activated on the S7-PLCSIM Advanced Virtual Ethernet Adapter for instances on the network to be visible.
On the other hand, the STEP 7 TIA portal is an engineering tool for the configuration and programming of all SIMATIC controllers. The incorporation of functions like drag & drop, copy & paste and AutoCompletion makes working with it a much quicker and easier process, and even beginners can create simple programs without significant background knowledge or efforts. Programs created in STEP 7 TIA portal can be then downloaded into the virtual controller and run starting the simulation. Source: [12].


Open S7-PLCSIM Advanced Control Panel  Open the "Start Virtual S7-1500 PLC" options  Enter a name for an instance (unique name if the intention is having a new instance)  Select CPU type  Create an instance using the "Start" button Downloading the program from the STEP 7 TIA Portal to the S7-PLCSIM Advanced software Subsequently, presupposing the program has been created a priori, the process proceeds with its download to the already set-up virtual controller as indicated next:  Scan for devices (also possible through the download to device option)  Select the PC/PG interface in the Extended download to device window  Download the program to the virtual controller  Switch the controller to RUN to start the simulation  Perform diagnostics. After the first download, the S7-PLCSIM Advanced instance displays the CPU type. One important thing not to forget is to Enable simulation support in the "Protection" tab in the properties of the project in STEP 7, and this by selecting the check box "Support simulation during block compilation". Similarly, it is also necessary to make sure the CPU hardware is configured in the STEP 7 TIA Portal software.

Creating the connection between the S7-PLCSIM Advanced software and Plant Simulation
First, it is necessary to insert the PLCSIM_Advanced object into PS and then the name of the Virtual PLC previously defined in S7-PLCSIM Advanced is to be inserted into the text box "name" making sure the Active option is checked. The Import Items…button generates a table that contains all the signals and tags in the PLC program. Most of these signals can be then connected to attributes and methods in PS, and this by adding their path to the "Simulation Model Attribute" field at the respective row.

A simple example
This section shows a simple example consisting of a simulation model in PS that communicates to an instance in S7-PLCSIM advanced (Virtual PLC), which at the same time is also connected to the STEP T TIA Portal, where a simple PLC program has been created. The program simply represents the start/stop of a conveyor in PS.

Fig. 2.
Elements of the simple simulation model: Self-elaboration.
In this case it was necessary converting the In-signal into a variable as it is shown in part of the method´s content appearing below: param GreenLight : boolean line.stopped := GreenLight Fig. 3. A brief take on the program in TIA Portal (left-hand side) and the active PLC instance running on S7-PLCSIM Advanced (right-hand side): Self-elaboration.