Virtual commissioning of automated manufacturing systems — Quality-handling station case study

The aim of the contribution is to create an event-controlled simulation of an automated production system using selected simulation software according to analyses and creation PLC control program compatible with human-machine control interface (HMI) visualization. The programmer can test the control program without the need for additional hardware on a virtual model of the machine. This method is called as a Virtual Commissioning method. The question is whether these new digital technologies are beneficial in the development process of new machines. The theoretical part of the contribution deals with the evaluation of the current state of knowledge in the field of virtual commissioning systems from the perspective of the Industry 4.0 concept and the use of principles taken from the technology of digital twins for analysing the possibilities of productive support of simulation, programming and visualization of control. For the Virtual Commissioning of the Quality-handling station from a flexible production system. It was chosen Tecnomatix Process simulating software for the developing of the Digital Twin of the station that is suitable for the connection of the logical behaviour inputs and outputs of the Digital Twin to the PLCSIM emulator. The main goal is to create a functional PLC program, so that in the second phase the process of virtual commissioning can be tested by the Software-the-Loop method. The preparation of the simulation model consists in a sample of the control station model of the production system, the process of creating kinematic bonds, behaviour model, creating control signals in the Tecnomatix Process Simulate program. Programming procedure and acquaintance with control means in the Simatic Manager program, selection of communication interface and creation of control visualization. In the final work, validation is performed and evaluation supports the objectives and the results confirmed the benefits of the Virtual Commissioning tool.


Introduction
Manufacturing companies are and will be forced to constantly respond to market requirements -customization with respect to current customer needs, which is related to reducing the risk of errors in the production process or increasing its safety. Therefore, one of the main variables that needs to be addressed in the field of innovation is time. Current solutions for production system design procedures may therefore encounter more areas within their limits and will not suffice for these increasing demands. Therefore, one of the emerging trends should be the full integration of the means of design and automation into unified units to create forms of digital version of devices, cells, lines, or even companies in the sense of the Industry 4.0 concept. The goal of the idea of digitizing the company is a comprehensive approach to all phases of the product life cycle from design, development, through commissioning, to the process of operation, maintenance, and, finally, data collection from these processes.
The process of virtualization of commissioning of systems (Virtual Commissioning) represents a simultaneous solution to the issues of automation and mechatronics in development and preproduction processes based on the creation of copies of production equipment, the so-called Digital Twin. Virtual Commissioning, as a simulation tool, is directly linked to the already known automation and simulation tools integrated in PLM (Product Life Cycle Management) software, which are constantly advancing, thanks to which their justification is growing. [1] In the individual parts of this paper, the justification of the use, properties and methodology of these tools in the basic theoretical knowledge resulting from the current state, as well as their implementation, for a specific device will be presented.

Literature Review
Virtual commissioning is an activity aimed at obtaining input data of the system's behavior based on the visual observation of the output interactions of its digital twin with various automation means.
[2] We consider the connection of a digital model with a real device to be the basic idea of the VC method. In simple terms, it can be said that it is a matter of connecting the simulated model with a PLC or HMI interface, so that it is possible to work simultaneously during design or inspection. For example, the testing of a given PLC program can thus be verified already in the pre-production phase without a physical prototype being available. Or it is also possible to verify the general functional properties and the sequence of processes already in the preproduction phase and thus to make corrections to the structure or program without significantly restricting other simultaneously performed design activities. [3] One of the basic pillars is simulation, and this is becoming a very important element in the design of production and assembly systems through the growing trend of digitization technology and the increasing computing power of PCs. [4] The Industry 4.0 concept considers simulation as a virtual plant-wide virtual environment tool that works with realtime data and uses it to analyse productivity before making a change in the factory. This allows engineers to visualize operations and design in a much better way and then helps them identify problems and obstacles at an early stage. [5] One of the tools based on the Industry 4.0 concept is a digital enterprise and a virtual machine, which is used through simulation tools to support the individual phases of PLM. [6] Virtual commissioning is a key technology to increase the robustness and quality of production systems by enabling the identification and resolution of errors already in the preproduction stages and creating more testing options and thus improving processes in the system based on digital model, mock-up without real equipment and real controllers systems. [4] The process of production and revitalization of the production system (machines, cells, lines) takes place in 4 basic phases: concept, planning, construction, and assembly. The compilation and revitalization of the line represents the most time-relevant section of these phases. At present, the standard process is a procedure in which the synchronization between the individual engineering groups occurs horizontally in chronological order only during the assembly phase. The methodology of using virtual operation enables the synchronization of design activities at the vertical level of the design model before the assembly phase, which creates the mentioned time savings. This is also due to the fact that in a virtual environment it is possible to verify program components gradually on the basis of known principles of device operation without the need for a perfectly accurate model or production system directly at the implementation site. [7,8] The process of reviving the production system takes place on two levels of reality and consists of two basic elements. The real production equipment or its simulation model and the second is the control system or its virtual form. Combinations of these elements create configurations used to "revive" systems.
Four basic configurations [9]: a) real commissioning (real production system + real control system), b) mixed virtual commissioning (virtual assembly system + real control system), c) hybrid commissioning (real assembly system + virtual control system), d) constructive virtual commissioning (virtual assembly system + virtual control system). We will use the Software in the Loop method. This method is based on the simulation of a virtual device and a control controller. The programmer can test the control program without the need for additional hardware. The project thus becomes dependent only on the necessary software support and computing power. Thanks to this, the method is very accessible, undemanding, and very effective, despite the minimal deviations of accuracy. [10]

Motivation and Methodology
Currently, PLC programmers have two options. Either write a program and test it by manually entering inputs and generating outputs via various PLC emulators, resp. through various actually developed applications or prepare it offline and test on a real machine, which can take really more time, inaccuracies in the code, or errors, possibly damage to the devices. Another option is to use the Virtual Commissioning method.
Our assumption is that the Virtual Commissioning technology will make it possible to test the PLC control program on a virtual model. The question is how to proceed with the given technology in order to achieve relevant results and success in the connection between the PLC control program and the virtual model of the device. There are simple manuals and defined basic steps, but the correctness of the sequence of steps and evaluation of their success has not been verified. Our goal is to gradually verify the effectiveness of individual basic steps and qualitatively evaluate the behavior of the virtual model. Our task is to create a functional PLC program and test it on a virtual machine model using the Software-the-Loop method, where the functionality of the Virtual Commissiong tool will be verified using a validation test of individual steps.The aim of the paper is in the first phase to create a functional simulation of the production system using selected software and to create a functional PLC program, so that in the second phase the process of virtual recovery can be tested by the Software in the Loop method. One of the future visions is the creation of a teaching aid based on the tested procedures from this work for educational purposes, for the virtual revitalization of several models.

Analysis of the Virtual Commissioning implementation
At the beginning, we based on the analysis of the implementation of the virtual commissioning tool, where, according to the authors [11], the basic steps and relationships between them were mentioned. From the model for the process of designing virtual commissioning of systems, this process can be defined into three basic phases, Fig. 1: a) Analysis of the production process and system. b) Engineering in a digital environment. c) Virtual Commissioning. [11]

Case Study -Virtual Commissioning of the Quality Handling station
To verify the method, we chose to test the Virtual Commissiong tool in a case study, where we will follow the proposed sequence of steps mentioned above. The production system for which it is intended for virtual commissioning is the electro-pneumatically controlled iCIM QualityHandling station. The control station is designed to measure the internal diameters of manufactured components from a model production system, which is located on the university grounds in the laboratories of production equipment and systems, Fig. 2.
The control station consists of three basic components: a) Two-axis Cartesian manipulator. b) Conveyor belt system. c) Control measuring unit.

Fig. 2. Flexible production system iCIM (left) and QualityHandling station (right).
The task of the manipulator is to take over the pallet with the measured part from the central material flow. The gripping of the pallet is ensured by an electropneumatic controlled gripper -gripping jaws, which are a part of the movable handling unit, moving in the Z and Y axes. After lifting, the pallet is moved along the Y axis to the conveyor system between the handling and control unit. After placing the pallet on the conveyor belt, the sequence of the handling unit ends. After the conveyor belt, the pallet comes to the unit of measurement. The material flow along the conveyor is sensed by five proximity and two photoelectric sensors during this sequence. Based on the signalling, the pallet stops under the unit of measurement. The measuring unit consists of a measuring gripper that moves vertically along the Z axis. The measuring gripper includes an analogy sensor that reads the measured value and transfers it to the central MES system of the iCIM production system. The control station includes a Simatic S7-300 PLC control module with an I / O interface.

Simulation model -Virtual device
As part of the digital library of the Festo iCIM production system for educational purposes, a digital library of the Quality Handling station model was also delivered. For the simulation, it was necessary to divide the set of the digital model of the control station into simulated objects (Resources), to which kinematic parameters, properties, and logical signals were assigned in the simulation, Fig. 3. Currently, the market offers several software platforms from small and global manufacturers, which enable support for the virtual commissioning process. They differ mainly in the creation of virtual models, their subsequent interconnection, the creation of material flow, and the possibility of communication with control systems. As with the digital twin concept, a distinction is made between software support for production and logistics processes. We chose the Tecnomatix Process Simulate software package to create the simulation. It is a simulation tool containing a module for creating a virtual model and putting it into operation through the so-called cyclic events that can be connected to either internal PLCs or external via standardized interfaces. From the point of view of automation, SIEMENS solutions can be fully integrated into the above-mentioned simulation software support with the automation software of the TIA Portal control software with the PLCSim Advanced 2.0 subsystem.
The implementation proposal was solved in accordance with the procedure of digital engineering for virtual commissioning. Based on this, the implementation is divided into three subchapters. In the first part, the preparation of digital models for simulation purposes was performed. The second part is devoted to programming and creating logical operations. The first and second parts essentially run simultaneously and intersect each other after generating control input and output signals from the simulation.

Preparation of a digital model for the purposes of event-driven simulation
The device model was saved in static digital STEP format as an assembly. The model saved in this way has to be converted to JT (Jupiter Tessellation) format and saved in a fixed backup of the operating system or in another backup directory. In the backup, it is necessary to save the model in a directory with the suffix "COJT", which defines the system as a model with kinematic dependencies. The digital model of the iCIM QualityHandling Station assembly has to be uploaded to a new project in the process simulated using the Insert Component function, which is located in the Modelling tab. After uploading the assembly, it was divided into individual components of the assembly using the Entity Pick Level function.
Subsequently, the parts needed for the simulation were removed from the assembly components, and thus individual subassemblies were created.

Creation of kinematics
The prepared resources in the structure of objects for simulation represent static objects that need to create kinematic links. Kinematics was created for all objects defined as type "Device". Kinematic links were created with the Kinematics Editor (Modelling tab). In order to be able to edit sources, it is necessary to enable their modification in the Modelling → Set Modelling Scope tab. Subsequently, the kinematic character (rotational or prismatic) and the range of kinematic links that bear the working name "link" in the project were set in the Kinematics editor tool. The essence of the formation of kinematic bonds is the setting of the relationship between the static and moving part of the source. In FIG. 21 shows the formation of kinematic bonds for the gripper model. Link 1 represents the static base of the model and links 2 and 3 represent the gripper jaws. Bonds j1 and j2 are designations of the bonds formed. With this principle, links were created within the whole assembly according to the functions of the control station. Since the goal was to create an event-driven simulation, based on the created links, the positions / states in which the device and its resources move or occur within the simulation were created using the "Pose Editor" function in the "Modelling" tab. The positions were defined based on the range set in the individual bonds. The given positions were set for all sources (defined as type "Device") and their links.

Material flow
Multiple material generation, which is independent of time but is controlled by the logical structure of the simulation and the program, was created in Line Simulation mode. However, Parts are not available in Line Simulation Mode and are represented as "Appearances". The material flow in the system is defined via the Material Flow Viewer. The material flow is created to Generate Material Flow Links. Operations from the Operation Tree are inserted to Generate Material Flow. Therefore, model operations were created in the operation tree, in which the ways in which the material moves within the entire cycle of the control station were defined. Since the control cycle has a simple linear material flow, the material flow consists of only two points.

Signal generation, verification of digital model interactions
After creating the positions, the signals of the internal logic of the simulation were created. In the simulation for "Device" devices, the signals are assigned directly to the positions set in the Pose Editor on the basis of predefined rules. Signals were generated for each "Device" source. After marking a specific "Device" component in the project structure, the signals are generated via the Control → Connect Signal tab. For simulation purposes, the internal logic can be edited using Modelling → Edit Logic Resource. This function also provides an overview of the connected signals, inputs, outputs as well as the creation of actions based on standard logic operations according to the IEC 61131-3 standard.
The output of each source set in the simulation was the creation of control signals. Once created, each signal is saved in the "Signal Viewer" signal manager. It provides a detailed overview of signals, information about them and their parameters. The most important action performed in Signal Viewer was addressing. Signals, based on their nature, have been assigned an input or output address. The signal names are fully editable here, but the program itself creates the nomenclature automatically and relatively clearly according to the predefined rules and the internal logic of the simulation, the basics of which have already been set in the Pose Editor function. Signal Viewer provides a comprehensive overview of signals and also allows you to import signals from already created drivers, from other projects, or from external sources, using the Signal Mapping features. It is also possible to export signals to formats that can be processed in Microsoft Excel or XML formats. Signal Viewer presents elements of the internal architecture of the simulation. Whether the logical control signals work with respect to the graphical representation of the objects was verified via the Simulation Panel application, Fig. 5. According to their purpose, the signals were clearly categorized into groups for a smoother course of verification of interactions between the model and internal logic. All the functions of the digital model of the device were verified in successive steps. To be able to verify the signals, it is necessary to reactivate them by assigning a state, logical 1 or logical 0, to the forced and Forced Value functions. The simulation panel also provides a graphical overview of the state of the switched signals and based on this, the execution of commands in the digital model was assessed. The Simulation Panel therefore also provides a basic representation of control based on the HMI principle and is therefore an important tool for virtual recovery in the Tecnomatix Process Simulate program.

Control program creation algorithm and program structure
The control was programmed in the Simatic Manager v5.6 environments from SIEMENS. The program was chosen because of the interaction between SIEMENS programs, which the manufacturer has long emphasized. It is therefore possible to create a functional communication link between the programs, the main element of which is a virtual PLC module, represented by the PLCSIM software. The connection between the virtual PLC module together with the virtual digital model is a basic prerequisite for the virtual revitalization of the device using the Software-in-the--the-Loop method. The Simatic Manager program was also chosen based on the availability of the license and the experience already gained working in this program.
The list of variables, or also the I / O sheet, together with the operating cycle algorithm, is the basic source of information for the process of creating logical operations in the program. The I / O sheet was exported from the Signal Viewer data and contained signal information and typology. The program is loaded into the hardware configuration of the virtual PLC module. By default, and typically for SIMATIC Manager, the main block of a program that calls other blocks and functions is the organizational block marked OB1. According to the work cycle algorithm, its solution was proposed by seven FC functions in the structure under the central OB1, Fig. 6.

Results and Discussion
Our task was to create a functional PLC program and test on a virtual machine model using the Software-the-Loop method, where the assumption of the functionality of the Virtual Commissioning tool was confirmed and the following steps describe the evaluation of the system's behavior. Since the aim of the work was to create a simulation controlled by a sequence of events, several conditions had to be met before testing it. The basic condition for verifying the virtual commissioning is the creation of a functional communication link between the simulation and the control program. The task was to create an emulator of a virtual programmable logic controller that will process the recorded program and based on it will control the processes during the simulation of the digital model in the Tecnomatix Process Simulate environment. A connection variant typical of the SIMATIC Manager program was selected, of which S7-PLCSim is an integral part. For the needs of the proposed virtual recovery, the PLC → PLCSIM option in the Tecnomatix Process Simulate environment was chosen.
After starting the simulation, the interaction with the control program was tested. First, the start sequence of the program was verified, which put the device into RUN mode, which allows the device to be initialized and the work cycle to run. After verifying the start sequence and STOP mode, the function of initializing the device to its basic determining position was simulated. This means that the device is ready to start the work cycle. Based on the program, the digital model of the device defines its current state and performs the necessary operations to set it to the initialization position. Initialization was the most frequently repeated operation within the debugging of the program and its course was simulated without errors, Fig. 7. The digital model expects to start the work cycle by putting it into initialization. In the automatic mode of the device, it is conditioned by the arrival of the pallet from the central material flow of the entire production system. The duty cycle sequences are contiguously linked to each other under the condition of terminating the output processes of the passing sequence. The second sequence started by the end of the first begins with the transport of material on the conveyor. The conveyor is a separately programmed element of the control station and only receives stimuli from other program functions. The simulation obtains information about the state of the material flow on the conveyor from the created proximity and photoelectric sensors. Their function was tested by simulation and, after debugging the detection bands of proximity sensors, also verified several times. The substantial speed of the response of sending the input signals of the sensors from the simulation of the digital model to the virtual PLC was sufficient for the needs of the simulation.
An important requirement for creating an event-driven functional simulation is the ability to repeat the cycle continuously. This is only possible by achieving a stable, uniform state after each of its processes. This condition was met by resetting the output variables after the end of each sequence, which gave the duty cycle the stepwise nature of its solution. An important feature of the created simulation is that it can be entered and controlled within the scope of the control program, and thus monitor the state of the digital model in a wider spectrum than the time-controlled simulation, which has a clear and fixed beginning and end as defined on its timeline. The whole simulation was tested several times to monitor the processing of variables by the Software-in-the--the-Loop method, Fig. 8. As part of the design of the entire virtual commissioning process, several consultations were carried out, which led to the final design. These consultations occurred simultaneously on one project, so that the simulation design was simultaneously edited with the control program, which partially tested one of the main advantages of the Virtual Commissioning tool. Virtual commissioning of systems is a productive activity within the design of production systems. Its team character allows you to increase the speed and quality of the design, thanks to the ability to quickly detect errors at multiple levels of the project. This was confirmed during the design of the virtual revival of the FESTO QualityHandling Station. This concept allows programmers and designers to provide quick feedback, and much of the work that is commonly done on site (worksite) can be done in the early stages of design in designers' offices.

Conclusion
Engineering tools in the digital environment, which include virtual engineering, simulation (whether on the basis of time sequence or logical sequence) and virtual commissioning of systems, are currently still in rapid evolution, which is directly related to the development of the Industry 4.0 concept. Their potential is currently only used to a certain extent, which is largely due to the fact that there is a significant lack of more standardized procedures verified by practice and these tools are still only in the field of recognizing and finding their limits. This is evidenced by the significant disparity in the use of simulation options by event-driven simulation, as opposed to the much more frequently used time-controlled simulation. Nevertheless, the technical means used by all these tools are already at such an advanced stage of development that they are an indisputable contribution to the design of production systems.
We can evaluate that the set of our individual steps according to the authors turned out to be correct, even though they were defined as very simple and we had to adapt them to our needs. Very often we had to verify the functionality of the logical model of behavior multiple times. A reasonable step would be to create a test of the functionality of the logical behavior model together with the virtual model in the future. In the future, we would like to verify and quantitatively evaluate the relationships between the individual steps and define their relevance, or simplify certain steps, as most of the work is in creating a virtual machine model. From a technical point of view, the work confirmed the benefits of the Virtual Commissioning tool. The biggest benefit can be considered the time saving in the programming of control logic operations, which could be tested at any time with the graphical representation of the digital model in the Tecnomatix Process, Simulate programming