1. Introduction
Digital twins are virtual representations of physical objects or systems that faithfully mirror their state and behaviour in real time via a continuous stream of data. Initially introduced for remote spacecraft monitoring, the technology has now become a significant pillar of Industry 4.0. The current digital twin (DT) research is wide; nevertheless, it is mostly focused on applications at the unit level of manufacturing. The study by [
1] developed the DT-Manufacturing Application Taxonomy to classify digital twin applications. Based on an analysis of 140 implementations, the authors found that most current applications focused on machine-level monitoring and control using “white-box” models. Böttjer et al. [
2] performed a systematic review on DT focused on digital twin applications for single machines or robots. Moreover, the authors identified a lack of a clear definition of DT in industry and semantic interoperability across a wide variety of domains. Onaji et al. [
3] proposed a conceptual framework for integrated product-process digital twins to support flexibility and collaboration in Industry 4.0. The framework’s utility was demonstrated through several case studies. Nevertheless, it is necessary to note that broader adoption of DT is constrained by further challenges, such as the absence of global standards and high costs [
4], and a dependency on organisational maturity in governance and infrastructure [
5]. Further trends of DT research indicate a focus on multimodal information fusion [
6] and on the evolution across basic technology, application development, specific implementation, and auxiliary technology [
7].
Implementing a digital twin requires an integrated system of hardware, network infrastructure, and software that enables a continuous data flow between the physical and virtual objects. In industrial applications, programmable logic controllers (PLCs) are used for controlling physical systems, while OPC UA serves as the underlying standardised protocol for secure, platform-independent data exchange. This communication ensures two-way synchronisation of data from sensors, actuators, and simulations in real time, which is necessary for DT technology. The current scientific literature addresses these aspects. For instance, Dihan et al. [
8] examined the architecture of digital twins, focusing on data exploration techniques for industrial applications. The study presented frameworks for real-time data synchronisation between virtual and real objects. The research [
9] proposed an OPC UA-based information model for a digital twin smoke alarm calibration workshop. It maps physical elements—smoke boxes—to virtual models for real-time monitoring. The paper [
10] discussed physics-based DTs in extended reality for industrial applications. The authors presented the SEEROB framework, which simulated a physics-based digital twin of the cobotic workstation and computed a large panel of criteria used for safety and ergonomics. Hlayel et al. [
11] compared WebSocket/S7, MQTT, Modbus, and OPC UA for real-time DT-PLC communication. Authors by [
12] proposed an OPC UA-based architecture combining digital twins and VR. The integrated technical solution is based on pedagogical requirements from an engineering school, training both manufacturing and computer science engineers. Latsou et al. [
13] presented a unified, reusable, and scalable framework for DT development, which harmonises existing DT frameworks by standardising concepts and processes. Caiza & Sanz [
14] developed an immersive digital twin for manufacturing lines with PLC integration. The experimental results showed that the architecture enables interoperability between different platforms and control subsystems. High-fidelity simulations and AR/VR environments can improve the accuracy and efficiency of manufacturing by enabling more detailed process analyses.
DT technology is entering both the industrial and educational sectors. By introducing DT technology into education, theory and practice are effectively connected, thus preparing a qualified workforce for future technological requirements. Recent advances in educational technologies also address these challenges. A systematic review of applications, methodologies, and challenges in the integration of DT and Virtual Learning Environment (VLE) to enhance experiential learning was presented in [
15]. The study [
16] provided the technical implementation—specifically using synchronised digital twins—to make complex Industry 4.0 processes tangible and manageable for learners. Likely, the research [
17] aimed to systematically analyse and evaluate the current state of European learning factories in the context of digital transformation to assess their effectiveness in developing Industry 4.0-relevant competencies. Real-world case studies and empirical findings demonstrate that students using DT-VLE systems score up to 20% higher on problem-solving assessments and report an 83% increase in confidence in manufacturing concepts. Similarly, the paper [
18] presents a digital twin-based learning tool for production simulation, resulting in a 38% improvement in students’ task execution time. In particular, the persistent discrepancy between real industrial production and practical teaching, as well as maintaining student motivation when exposed to abstract technical projects, poses challenges. In this context, for example, research studies [
19,
20] reveal that students using DTs integrated with Virtual Learning Environment (VLE) have higher involvement, higher conceptual understanding, and higher motivation compared to their peers learning through more traditional means. The authors [
21] analyse the role of digital twins in developing future skills, emphasising their contribution to personalised learning in STEM (Science, Technology, Engineering, and Math) fields and online environments.
In fields like industrial robotics, DTs create high-fidelity simulation platforms that bridge the gap between classroom theory and industry practice. This method provides students with greater fault tolerance and safety while deepening school-enterprise collaboration [
22]. However, the efficiency of such technology-driven platforms depends on student engagement. To this end, methodologies like Design Thinking, a student-centric, project-based learning approach, directly addresses student disengagement by fostering creativity and improving motivation and academic outcomes [
23]. While digital twins represent a technology-driven solution and Design Thinking a process-driven one, their convergence reveals a unified strategy: both address the challenge of abstraction by making complex processes tangible to better prepare students for the demands of Industry 4.0. Applying model-based DTs rather than real systems allows students to safely simulate complex processes and experiment without risking damage. Several studies created digital twin frameworks that tightly link virtual models with real machines and sensors. For example, Balla et al. [
24] presented case studies for creating “real” digital twins of an assembly line and a warehouse stacker using Unity and the Game4Automation framework. Dai & Brell-Çokcan [
25] introduced a digital twin framework powered by Unreal Engine and the MQTT protocol to enhance online construction education by synchronising cyber-physical data flows. The study [
26] proposed a methodology using Unity and the Robot Operating System to create low-cost digital twins of smart warehouse operations for secondary school students. The author of [
27] presented novel virtual and augmented reality modules, including a virtual tunnel boring machine and an excavator digital twin, to support remote construction education. Educational digital twin (DT) platforms function as virtual replicas of physical infrastructure, such as laboratories, libraries, and smart campuses [
28]. These tools allow students to engage with complex systems—ranging from virtual laboratories and smart campuses to intricate industrial machinery—within a risk-free, cost-effective digital space. For instance, project Digital Twin Academy exemplifies this by offering a flexible learning platform that provides multi-stage training adapted to various knowledge levels [
29]. Technical platforms like Robotont further enhance accessibility by providing open-source hardware integrated with dual digital twins: a lightweight visualisation tool and a high-fidelity, physics-based Gazebo simulation [
30]. DT software platforms focused on production technology, including the design and operation of manufacturing processes, are Tecnomatix Plant Simulation and Process Simulation by Siemens [
31].
Although digital twin technology is well established in industrial applications, there is a methodological and architectural gap between industrial DT implementations and their structured application in engineering education. The reasons are various: no standardised educational methodology exists yet [
15], and DT requires interdisciplinary collaboration between engineers, software developers, and data scientists which is hard to implement in education [
32]. There is also a mismatch between industrial DT architecture, which is complex and based on real-time systems, and educational DTs are experimental and conceptual [
33]. Finally, industrial DTs are built using tools that are too expensive for educational institutions [
21]. Therefore, current trends involve moving toward cloud-based DT solutions, the use of modular open-source tools, and hybrid infrastructures to increase the accessibility and scalability of digital education [
15,
21].
This study presents the design, development, and experimental verification of a digital twin of a laboratory material-handling system. The study describes in detail the creation of physical and virtual objects and connections between them. Special attention is paid to the correct configuration of tags, potential connectivity issues between physical and virtual systems, and synchronisation failures.
2. Materials and Methods
2.1. Research Problem Definition
A digital twin for educational purposes is a virtual replica of a physical system used to support learning and teaching. By integrating real-time data, simulations, and an interactive model, a digital twin enables students to understand complex systems better. It is possible to experiment with different scenarios and observe the consequences of their decisions without the risks or costs associated with real-world experimentation.
The objective of the presented research is to design and experimentally verify a functional digital twin of a material handling system based on a physical construction-kit model. The research focuses on creating and verifying two-way communication between physical and virtual systems and achieving their functional equivalence. The digital twin is also designed as a didactic tool, allowing students to analyse logistics processes, warehouse strategies (e.g., FIFO), sensor integration, and control logic in laboratory conditions.
Students can modify control logic in the simulation model or PLC and observe its impact on system throughput and storage efficiency. The platform also supports sensor integration and diagnostics, allowing students to work with real industrial sensors (e.g., capacitive, optical, and colour sensors), perform signal validation and troubleshoot communication issues. In terms of control logic design, students can modify the PLC programme in TIA Portal or simulation logic in Tecnomatix Plant Simulation to implement advanced behaviours such as error handling or automated decision-making. Furthermore, the system facilitates human–machine interaction tasks, where students can design and test control scenarios using the HMI interface and evaluate usability aspects of industrial systems. Overall, these exercises support experiential learning and help bridge the gap between theoretical knowledge and practical implementation in Industry 4.0 environments.
2.2. Design and Technical Specification of the Physical Material Handling System Model
The basic element of our physical model is the material handling system, built from the Merkur construction kit (Police nad Metuji in Czech Republic), as shown in
Figure 1. Merkur is a traditional metal construction kit first introduced in 1920, especially popular in the mid-20th century. At that time, it was widely used in schools, households and hobbies, particularly in Central Europe. Nowadays, the Merkur construction kit can be compared to LEGO Technic by LEGO Group, Denmark. The choice of Merkur as the experimental platform was made due to its high modularity and scalability, which enable the flexible assembly of a wide range of models, from simple ones to complex Industry 4.0-inspired systems. Additionally, Merkur represents a cost-effective and accessible solution for educational institutions.
The material handling system consists of an input belt conveyor, an output belt conveyor, a gantry loader equipped with a vacuum suction gripper, and a storage platform containing twelve predefined storage positions arranged in a matrix layout. The conveyors ensure horizontal transportation of material units (cubes) between system modules. The manipulator performs vertical and horizontal motion using electromechanical drives and transfers cubes from the input conveyor to assigned storage locations and subsequently to the output conveyor. The suction-based gripping mechanism enables secure handling of lightweight cubic material units made of plastic, available in two colour variants (white and black), which represent individual logistic entities within the system. The storage platform functions as a miniature automated warehouse, where cubes are positioned according to the FIFO principle or user-defined selection criteria. The entire system operates as a compact laboratory-scale representation of an automated material flow process integrating these operations: transport, identification, storage and selection.
Other electro-mechanical parts of the construction kit represent three main physical components: a Siemens PLC SIMATIC S7-1200 (by Siemens, Amberg, Germany), a Siemens SIMATIC HMI touch panel (Amberg, Germany), and electro-mechanical components. These electro-mechanical parts include, for example, a capacitive colour sensor, a capacitive sensor at the end of the input conveyor, a capacitive sensor at the end of the output conveyor, an optical colour sensor, contact limit sensors for the end positions of the vertical and horizontal movement of the suction cup, and a vacuum sensor. At the same time, the sensors serve as inputs for controlling the PLC programme, while the programme start and selection functions are triggered via the HMI touchscreen.
Material handling process: After the programme starts, the input conveyor begins operating, and a white or black cube must be manually placed on it. The mentioned sensors detect the colour of the cube, and the arm subsequently transfers it to one of the twelve specified positions. The selection of the appropriate position operates on the FIFO principle (a method of processing items in the exact order in which they arrive). Using the HMI panel, it is possible to enter a request for cube selection. At this step, there are three options available:
Selection of any cube based on the FIFO principle;
Selection of a cube of a specific colour;
Selection of a cube from a specific position.
Afterwards, the cube is moved by the arm onto the output conveyor. A sensor detects the cube at the end of the conveyor and stops its movement.
2.3. DT Methodology Description
The methodology for creating a digital twin of a material handling system is illustrated in
Figure 2. To enable the implementation of the digital twin and ensure the required communication infrastructure, the physical model is extended by incorporating an unmanaged Siemens SCALANCE XB005 network switch (Nuremberg, Germany).
Figure 2 presents a scheme of the essential components, arranged according to functional phases (input, processing, output) and domain levels (cyber, digital, and physical), within the Industry 4.0 concept. The scheme further displays the corresponding information flows among the individual components. The icon above the respective component indicates whether a given element is required solely for implementing the digital twin or for operation independent of the digital twin architecture.
The implementation of this communication protocol is provided by KEPServerEX software developed by Kepware Technologies. A more recent version, also available under the name Kepware Server, extends the traditional KEPServerEX (version 6.18) architecture toward a more scalable modern framework for OPC connectivity.
The acquired real-time data are subsequently transmitted to a virtual model developed in Tecnomatix Plant Simulation (version 2404). In this environment, the simulation runs, and the monitored data are visualised on an output device, typically a computer monitor. Tecnomatix Plant Simulation is a discrete-event simulation software application for modelling, analysing, and optimising production and logistics systems, enabling the creation of digital models of production lines, warehouses, and transport systems to test various scenarios without disrupting real operations.
To enhance the accuracy and realism of visualisation, the simulation model developed in Tecnomatix Plant Simulation environment is further supplemented by an external three-dimensional model developed in Autodesk Inventor (version 2026).
2.4. Simulation Model Creation
In Tecnomatix Plant Simulation, a simulation model based on the physical model from the Merkur construction kit is developed. At this stage of model development, the aim is to ensure the simulation model operates autonomously without any connection to the physical system.
Figure 3 illustrates the model in its initial phase.
During the early development stage, it is necessary to verify the fundamental mechanical behaviour of the system, including the movement of cubes on the conveyors, their transfer to specified positions, and their selection for transfer to the output conveyor. As shown in the figure, the model’s visual representation remains relatively simple at this stage; what is significant is its functionality.
2.5. Simulation Model Visualisation
After verifying the fundamental functionalities, the model’s visual representation was developed. The aim was to achieve a more realistic graphical depiction of the input and output conveyors, as well as the cube-handling manipulator arm equipped with a suction cup (
Figure 4).
An advantage of Tecnomatix Plant Simulation is its ability not only to generate custom geometries using its built-in graphical interface, but also to integrate externally developed objects and shapes created in other graphical software environments. This feature is utilised in the present study to demonstrate an extended approach to digital twin development for educational purposes.
2.6. Simulation Model Testing
Upon completion of the graphical components and their integration into the Tecnomatix Plant Simulation environment, a software replica is obtained that is visually identical to the physical model of the system. (
Figure 5).
To ensure proper operation of the implemented graphical objects and to verify their functionality, the overall model is first tested in offline mode. Offline operation requires the design and implementation of several elements that correspond to functions typically defined in the PLC programme and accessible via the HMI panel or executed physically during start-up and shutdown. Selected examples of these elements are listed in
Table 1.
In the Tecnomatix Plant Simulation environment, these elements are usually implemented as interactive buttons that trigger predefined actions when activated. Usually, each button is assigned a separate method. In most cases, pressing a button triggers the execution of a custom-developed method written in the SimTalk programming language (
Figure 6).
SimTalk is the programming and scripting language of Tecnomatix Plant Simulation. It is used to control and customise simulation models, including defining object behaviour, managing material flows, collecting statistical data, implementing user interactions, and integrating with external systems such as databases, PLCs, and other software applications.
In addition to the buttons and methods required to ensure proper model operation in offline simulation mode, additional elements are incorporated, including variables, data tables, dialogue windows, and graphical outputs.
Figure 7 presents an excerpt from a table containing the individual cube placement positions. During the simulation, the values in the “Status” column dynamically update to reflect the occupancy state of the corresponding positions.
After incorporating all required elements and verifying them in offline mode, the model is prepared for online communication via the OPC UA protocol. At this stage, the model is structured into four principal components (
Figure 8):
In order to create a digital twin, the next step is to correctly configure block No. 4, which focuses on the connections and communication between the individual layers of the Industry 4.0 concept.
3. Connections and Communication Between the Physical and Virtual Model
In order to ensure reliable data exchange between the PLC and the simulation model (
Figure 9), it is first necessary to identify and correctly prepare the tags (variables) in the PLC programme in the TIA Portal—ideally in one clear symbol table, where they have clear names, correct data types (e.g., BOOL, INT, REAL) and are accessible for communication (for DB databases, it is necessary to use optimised block access according to the selected strategy).
Subsequently, the same tags are created in KEPServerEX (S7 device, channel, and OPC UA server) either manually or via import. At the same time, their addresses are set according to the PLC (e.g., MB53, I0.2, I0.4–I0.5) and, in particular, the same naming is maintained. In the third step, OPC UA variables are created in Tecnomatix Plant Simulation (in the OPC UA client table/interface) and assigned to the server nodes from KEPServerEX.
To ensure robust communication and data integrity, strict nomenclatural consistency must be maintained throughout the entire data chain. Ideally, identical Tag Names should be utilised within the TIA Portal, mirrored as the Item ID/Tag Name in KEPServerEX, and replicated as the corresponding variable names in Tecnomatix Plant Simulation. Any discrepancy in naming—such as variations in case sensitivity (upper/lower case), the inclusion of diacritics, the use of spaces, or inconsistent prefixing—will prevent the OPC UA client in Plant Simulation from successfully resolving and mapping the correct server node. Consequently, this synchronisation failure results in stagnant data, with variable values remaining unupdated.
In industrial practice, it is therefore imperative to establish and strictly adhere to a uniform naming convention (e.g., HMI_insert, HMI_select_white, HMI_select_black). Adopting a standardised syntax across all three software environments minimises configuration errors and ensures seamless interoperability of the communication interface.
4. Results
The implementation results confirmed the successful establishment of stable two-way communication among the PLC programme, the KEPServerEX server and the simulation model developed in the Tecnomatix Plant Simulation environment. In the previous section, during the creation of the connection, the individual tags were mentioned with unknown values, and a connection quality was assessed as “Bad.” The objective was to achieve the state illustrated in
Figure 11, where the individual tag values are already displayed, and their connection quality status is “Good.” The terms “Bad” and “Good” do not refer to signal strength but to the communication status of OPC UA variables. A “Bad” status indicates that the OPC UA client is unable to correctly read or map the variable from the server, which typically results from incorrect tag configuration, addressing errors, or missing connection parameters. In this state, the variable value is unknown or not updated. In contrast, a “Good” status indicates that the communication between the PLC, OPC UA server, and simulation environment is successfully established, the variable is correctly mapped, and its value is continuously updated in real time. Therefore, the transition from “Bad” to “Good” represents the successful configuration and activation of reliable data exchange within the digital twin system.
At the same time, it is advisable to enable, in the PLC properties within the “Communication mechanism” tab, the option to permit access via PUT/GET communication from a remote partner. PUT/GET communication is a method of data exchange between Siemens devices (e.g., S7-1200, S7-1500), in which one device can read data from the memory of another PLC (GET) or write data to the memory of another PLC (PUT). PUT/GET allows an external partner—such as KEPServerEX—to access the internal memory directly, the I/Q (inputs/outputs) areas, and data blocks without the need to create a dedicated communication block within the PLC programme.
Upon successful configuration of the communication channel, bidirectional real-time data synchronisation was achieved between the Siemens S7-1200 device and the corresponding tags. This setup ensured that transitions in the PLC input/output (I/O) states were immediately reflected within the model in Tecnomatix Plant Simulation. A critical prerequisite for this functional interface involved activating the ‘Anonymous Login’ parameter under the ‘Client Session’ settings of the KEPServerEX OPC UA server configuration. This configuration was used because both the OPC UA server and the OPC UA client were running on the same computer; therefore, enhanced connection security was not required.
A critical aspect of the configuration was the exact definition of the server IP address within the OPC UA client interface. Any inaccuracy in the network identification or the presence of an outdated local address resulted in the failure of the OPC UA object connectivity in the Tecnomatix Plant Simulation environment (
Figure 12).
After validating the network parameters and activating anonymous access (Anonymous Login), stable and continuous communication was established. Verification of the connection’s integrity was performed by monitoring dynamic changes in variables in the OPC UA table and observing their immediate response in the digital model. Communication quality is assessed using the status codes “Good”, “Bad”, or “Uncertain”, which reflect the validity and reliability of data exchange. Quantitative network performance metrics such as latency or jitter are not directly provided within this architecture. Therefore, the evaluation of real-time synchronisation in this study is based on the observed consistency and immediate propagation of state changes between the physical and virtual systems. This process confirmed the full functionality of the proposed digital twin in controlled laboratory conditions (
Figure 13).
5. Conclusions
This study addressed the existing methodological and architectural gap between the implementation of digital twins (DTs) in industry and their use and deployment in engineering education. The design, development and experimental verification of a DT laboratory system for a handling device were presented. Experimental verification of the connection between the physical and virtual models confirmed functional synchronisation: signals at the PLC inputs and outputs were immediately reflected in the simulation environment and vice versa. The experiment confirmed stable connectivity, accurate tag configuration and reliable interoperability between system components.
The key contribution of this research lies not only in the technical realisation and implementation of the DT but also in the systematic, detailed methodology for designing and creating the DT and verifying the functional equivalence between the physical and digital systems
From a scalability perspective, the proposed architecture is based on OPC UA communication, which enables the integration of multiple devices and systems within a unified framework. The use of KEPServerEX further supports extensibility, allowing additional devices—such as robotic systems (e.g., WLKATA Mirobot)—to be incorporated into the digital twin environment without fundamental architectural changes. However, increasing system scale also introduces higher system complexity, particularly in terms of tag management, communication configuration, and data consistency. As demonstrated in this study, even minor inconsistencies in naming conventions, addressing, or data types can lead to communication failures. Integration challenges are mainly related to interoperability between heterogeneous systems, the correct OPC UA configuration, and network settings such as IP addressing and access permissions (e.g., PUT/GET communication). These challenges highlight the importance of standardised design approaches and careful system configuration when implementing scalable digital twin solutions.
From an educational perspective, the presented digital twin goes beyond the framework of static visualisation or isolated simulation. It provides an interactive digital–physical educational platform that allows students to analyse logistics strategies, sensor integration, PLC logic and warehouse management principles in real time. Students can experiment with operational scenarios without the risks associated with a real industrial system. The developed platform provides students with a safe environment that effectively prepares them for the practical requirements of Industry 4.0.
Future research could focus on extending the DT system to include immersive technologies such as AR/VR interfaces and implementing it in laboratory settings for education. Also, pedagogical studies on the measurable outcomes of implementing synchronised DT platforms in education would provide valuable insight into their impact on engineering education.
In conclusion, the presented study demonstrates that a digital twin developed in a laboratory environment using industry standards and experimentally validated is an effective tool for modern engineering education.