# Virtual Reality and Digital Twins for Catastrophic Failure Prevention in Industry 4.0
## 3 Workflow  
For the purposes of this research, use was made of the DEUTZ F3L912W model, which is located on the premises of the School of Civil Mechanical Engineering of the Pontifical Catholic University of Valparaiso. The choice of this engine was made based on the industrial applications that this model had in its time; given its robustness and efficiency, it was widely used in various industries such as mining, construction and maritime, where it was used as an engine for heavy machinery, in pumping and as an electric generator, among other uses. In this context, [PERSON] et al. (2025) developed a real-time digital twin based on an engine, incorporating it into an immersive visualization environment in Unity 3D [23]. The 3D model of the engine was obtained by scanning it with Polycam to achieve high-fidelity imaging, thus enabling the faithful replication of the physical equipment located in the university laboratory [19]. This synchronized virtual environment allowed multiple students to interact simultaneously with the digital engine through VR viewers, observing its operational behavior in a safe and controlled space ([PERSON] et al., 2025 [23]). First, it was defined that it was necessary to incorporate an advanced sensing system to obtain accurate and complete measurements of the equipment. For this, specific sensors were selected according to key parameters for the experience:  
* Temperature: We decided to use multiple sensors to obtain detailed temperature data at different critical points of the engine, such as intake, exhaust and oil temperature. * Pressure: An analog pressure sensor was incorporated to evaluate the internal state of the compression chambers in the absence of combustion, providing valuable information on the internal behavior of the engine. These improvements significantly enriched the analytical capability of the experience by allowing a more accurate and representative capture of actual engine behavior. Then, for the effective capture and management of this sensorized data, a Siemens LOGO! 7 PLC was implemented. This PLC was chosen for its robustness and ease of integration. To manage the installed sensors, additional AM2 RTD-type analog modules (for temperature sensing) and standard AM2 analog modules (for 0-20 mA and 4-20 mA analog current signals) [23] were used. The PLC configuration involved converting and correctly scaling the analog signals received, an essential process because it normalizes the sensory readings, transforming them into easily interpretable values for later visualization and analysis in real time. Communication between the PLC and the digital environment was established through Node-RED, a platform that acts as technological middleware. Node-RED receives data from the PLC, processes it and, using protocols such as WebSocket, transmits this data in real time to a centralized server. For the remote visualization and management of this data, Blynk was selected as the IoT platform. Blynk stands out for its capacity for remote monitoring and centralized storage of data from the PLC, offering an interactive dashboard that facilitates immediate analysis and continuous monitoring of the measured parameters. Finally, the information stored and centralized in the Blynk server was integrated into a multi-user environment developed with Unity 3D. To create an accurate and detailed representation, the physical engine of the laboratory was scanned using the Polycam application, generating an accurate digital model of the equipment. Interactive interfaces were designed in Unity to clearly display the data, and readings came from the sensory system in real time, creating an immersive environment and substantially enriching the students' educational experience [23]. Although this environment was developed with a purely educational purpose, its operation allowed its use as a simulation tool, given that the infrastructure used was the same that was used at the time of proposing the methodology.