## 4 Digital Twin and Control System Design
### Connection via Standardized Interfaces and Simulation Control  
The digital model of the assembly system can be connected to a PLC or a robotic control system to enable virtual commissioning. To test PLC programs on a simulated device, it is essential to establish a connection between the simulation system and the PLC control system. Currently, there are three different connection methods for integrating a virtual commissioning simulation system. A direct connection to the physical PLC hardware is established via an OPC DA server (Figure 15). While OPC is widely supported, it does not simulate hardware configurations, meaning the timing behaviour of the bus system is not  
Figure 14: Table of generated signals for controlling the feeding mechanism. The signals are paired based on their signal names rather than addresses, ensuring proper communication and synchronization within the simulation environment. Figure 13: Insertion of the sensor model as a light sensor for detecting yellow-coloured objects within the feeding mechanism. The sensor is integrated into a virtual model to enable object detection and interaction within the simulation environment. considered. In systems with a high number of networked devices, bus communication delays may occur, affecting system behaviour and requiring mapping within the simulation. Another critical limitation is the lack of support for secure communication, such as safety signals (e.g., emergency stop or safety door contacts). Many systems transmit both standard and safety signals over the bus network, using protocols such as PROFISAFE (PROFIBUS/PROFINET) or INTERBUS-Safety. However, due to the absence of a bus system in OPC communication, safety signals cannot be simulated, as OPC DA does not provide direct access to these signals. To execute virtual commissioning with an OPC DA connection, PLC program modifications are necessary to enable operation without the safety logic. Due to these limitations, direct OPC DA connections are suitable only for simple simulation models where safety communication is not required and bus system timing can be neglected. Another approach for connecting the simulation tool to a PLC is direct bus communication. In this setup, the simulation computer is equipped with a bus interface card, allowing it to function as a slave device on the real bus network. Data exchange between the bus card and the simulation tool is handled via a driver interface. This connection method is currently supported by software such as WinMOD, whereas DELMIA Automation and Process Simulate Commissioning currently lack direct bus interface support. A third connection method is bus emulation, where a dedicated hardware setup is connected via the same bus system used by the PLC and emulates bus components. Bus emulation is available for commonly used industrial networks, including Siemens SIMBA PROFIBUS, Siemens SIMBA PNIO (PROFINET), Mewes & Partner Interbus Emulator, and Siemens PLCSIM Emulator. To integrate a Process Simulate model with a PLC control system, the simulation mode must be switched from Time-Based Simulation to Line Simulation (event-based simulation). The connection settings are configured in the Options-PLC tab. The system supports virtual commissioning through several methods: Internal Cycle-Event Simulation (CEE) and PLC emulator connection via SIMIT, PLCSI, or external connection, where the data update rate can be configured (default: 200 ms). Multiple connection protocols are available, including OPC DA, OPC UA, direct simulation device interfaces, and the PLCSIM Advanced emulator from Siemens. For system setup, communication verification, and signal testing, the initial step is selecting an emulator, such as PLCSIM, which enables signal transfer from the virtual control system to the simulation model when using a Siemens PLC. For non-Siemens PLCs, communication has to be configured via OPC DA from the start. In this study, the DELTALOGIC OPC server was used for PLC integration.