Keywords

1 Introduction

Currently in the industries, significant improvements are being made for the automation of the production and operation areas of the companies with the aim of improving economic efficiency, using the integration of applications that replace manual processes, accelerating the execution time of the tasks and eliminating human mistakes that can be made [1].

Industrial automation is defined as a set of technologies that result in machine and industrial system operations without significant human intervention and achieve superior performance over manual operation [2]. Automation marks a new era worldwide, which will probably force industries to invest and innovate in new technologies that allow them to develop products in shorter times, without losing sight of the inspection and verification of the production line for control. quality of finished products.

In the context of automation, inspection and verification of finished products for quality control is of great importance in production processes, this process was carried out by people with prior knowledge to find such defects, where they spent a large amount of time, energy and money checking products manually. However, traditional inspection can be replaced, especially if it is done in an automated way in most manufacturing industries to ensure that poor quality or defective products do not reach the end consumer [3].

Increasing demands for product quality and efficiency make the introduction of automated inspection systems necessary. These systems employ image processing techniques and can quantitatively characterize complex sizes, shapes, color, and textural properties of products [4], in an industry it is essential to establish a safe and reliable work environment, to efficiently execute each of the stages of industrial processes, currently there are training systems for the inspection and verification stage for quality control, these systems provide user experience, gives them confidence and improves their skills for optimal performance [5], very few industries have these technological training systems due to the high economic cost required for the acquisition and implementation of these equipment in an industrial plant.

Virtual reality (VR) is a commonly computer-generated or assisted three-dimensional simulation of some aspect of the real or fictional world, in which the user has the sensation of belonging to or interacting with that synthetic environment. Currently in the scientific community there are investigations with virtual reality oriented to automation, these virtual environments generate learning environments that will allow the development of skills and competencies in the user’s professional field [6,7,8,9,10].

Considering the high cost and difficult access to a physical training system, and the difficulty to carry out quality tests in plants in continuous operation, due to the economic loss that it would generate; The present work describes the development of a virtual environment of a beverage bottling plant developed in Unity 3D software, where the operator can interact and have an immersion with the different processes of the plant and in conjunction with an artificial vision camera (hardware) that allows to emulate the inspection and verification of the bottles packaged as a final product for the respective quality control. Next, in Fig. 1 the structure of the system is presented.

Fig. 1.
figure 1

The structure of the system.

2 Development

The virtual environment of a beverage bottling plant is developed through CAD design techniques, and the Unity 3D software to digitize the terrain and develop the operating animations of the elements of the industrial process, for the creation of the industrial environment is considered the basic process of packaging water bottles, considering the stages of filling, sealing and labeling of bottles. For the design, an instrumentation piping diagram (PI&D) was generated, according to the verification of the operation of the industrial process in question, the following figure shows the P&ID diagram of the bottle packaging process.

For the creation of the virtual environment, the realism and interaction of all the elements that make up the system are important, where several design stages are considered, based mainly on the virtualization of its elements through specialized programs in the characterization of 3D objects and all the Data corresponding to the industrial variables of the virtual plant are managed through the Modbus TCP/IP protocol. Figure 4 shows the diagram that describes the implementation process of the virtual reality training system (Figs. 2 and 3).

Fig. 2.
figure 2

P&ID diagram of a bottle filling machine.

Fig. 3.
figure 3

Flow chart for creating the virtual training system.

2.1 CAD Design

At this stage, the SolidWorks Software develops the 3D CAD design that corresponds to each of the three stages: filling, sealing and labeling, creating individual elements that are incorporated into the virtual environment of the plant as shown in Fig. 4, and using the 3dsMax program, a file with the Flimbox format (*. fbx) is obtained that is compatible with the Unity graphics engine, as shown in Fig. 5.

Fig. 4.
figure 4

CAD design made in SolidWorks.

Fig. 5.
figure 5

CAD design exported to 3dsMax.

2.2 Unity 3D Environment

The file (*. Fbx) is imported to the Unity3D software where the assembly and assignment of materials of all the components is carried out to develop the virtual environment, an important aspect to generate a high level of realism, and therefore of interactive immersion with the user, adding their details, lighting, shadows, etc. to the environment. These details do not affect the functionality of the process, but provide greater user comfort and realism for the industrial environment, as show in Fig. 6 and Fig. 7.

Fig. 6.
figure 6

Virtual environment developed in Unity 3D.

Fig. 7.
figure 7

Stages of filling, stamping and labeling virtualized in Unity 3D.

2.3 Virtualized Bottled Bottle

In the packaged bottle is where the inspection and verification analysis of the quality in production is carried out, for this reason the 3D development of said final product obtained from the production line is essential, two specific elements are developed for each process, detailing among them an item in good condition that corresponds to a product accepted in the production batch without any failure and another item in poor condition that corresponds to a rejected product in the production batch with any failure respectively, where three characteristics were designed that were taken in counts as failures to classify the final product.

The production error 1 designed in Unity3D is the detection of the liquid fill level, in Fig. 8 (a) the state corresponding to a bottle without any failure is shown and in Fig. 8 (b) the bottle is shown with an excess liquid error.

Fig. 8.
figure 8

Design of production error 1 in Unity3D.

Production error 2 designed in Unity3D is the misplacing of the bottle cap, in Fig. 9 (a) the state corresponding to a bottle without the production error is shown and in Fig. 9 (b) it is shown presents the bottle with a cap placement error.

Fig. 9.
figure 9

Design of production error 2 in Unity3D.

Production error 3 designed in Unity3D is the erroneous printing of the QR code on the bottle label, in Fig. 10 (a) the status corresponding to a bottle without the production error is shown and in Fig. 10 (b) the bottle with the QR code printing failure is presented.

Fig. 10.
figure 10

Design of production error 3 in Unity3D.

Table 1 shows the specifications of each production error, for this programming scripts are developed that allow the random generation of bottles with errors corresponding to their design.

Table 1. Errors in the output of the final product - water bottle.

2.4 Avatar Design

It is essential to be able to mobilize within the virtual environment to visualize the process in detail, for this a player or character is created which is the basis for user interaction with movement within the 3D environment, for the creation of this character all were designed the characteristics of the avatar and its animations in Adobe Fuse see Fig. 11, and thus to be able to integrate it to Unity3D, the avatar has an appearance according to the environment to carry out control and visualization tasks of the bottling plant.

Fig. 11.
figure 11

Avatar designed in Adobe Fuse.

Once the character and its animations have been imported into Unity, an animation controller called “Animator Controller” is created in the folder tree of our project, creating a movement diagram that allows the character to walk forward, walk backward, turn, jump, etc., in addition, a vision tool is added, which is available in Unity3D in the project manager as “Camera”, the camera options were configured in the third person to be able to add it to the avatar through a programming script, it is observed in Fig. 12 the creation of the vision tool within Unity 3D.

Fig. 12.
figure 12

3D object from Unity3Ds “Camera” vision tool.

The avatar allows the interaction of the menu with the virtual process, where the options are created to select the total batch of products that need to be generated, selecting among them how many good and bad products need to be generated for the respective process, a total counter is created of all the final products that come out in that production line, in addition to implementing the navigation buttons as shown in Fig. 13.

Fig. 13.
figure 13

Interaction of the avatar with the main menu.

2.5 Animation of the 3D Virtual Environment

The virtual environment was integrated with programming scripts that are made in Visual Studio C++ language, which allowed simulations of the environment, each script developed was linked to an object in the environment to perform a certain function, for example, move the bottle by the conveyor belt to a certain position as shown in Fig. 14, the bottle disappear, stop an object for a moment and then move it again, etc., in the same way the sensors and actuators are linked to their script of operation, in virtual presence sensors the action of determining the absence or presence of an object is determined by the Raycast tool, and for actuators a script is used whose function is determined by moving an object or activating an indicator.

Fig. 14.
figure 14

Movement of the bottle on the conveyor belt.

2.6 MODBUS TCP/IP Communication Protocol

To establish bidirectional communication between the controller (Arduino UNO) and the Unity 3D development tool, the industrial communication protocol Modbus TCP/IP is used within an Ethernet network as shown in Fig. 15, for Modbus communication is They create programming scripts used in data management, both in the IDE of the controller and Visual Studio of Unity 3D, in addition the transfer areas are defined by registers for their identification, in Fig. 16 the data sent and received is shown Unity 3D platform using Modbus TCP/IP.

Fig. 15.
figure 15

Structure of the Ethernet network.

Fig. 16.
figure 16

Data transfer by Modbus TCP/IP.

2.7 OMNI BANNER PRESENCE PLUS P4 Camera

For the inspection and verification analysis of the packaged bottle in the final production line, the OMNI BANNER PRESENCE PLUS P4 artificial vision camera was used, which by means of a standard image and with its respective training allows to approve or reject the packaged bottle. For this training it is necessary to carry out various configurations which will allow detecting objects, position, reading QR codes or barcodes, among other applications depending on the user’s need, in Fig. 17, the use of the “detection” tool is observed. of objects”.

Fig. 17.
figure 17

Omni Banner camera settings.

Finally, by using a first-person camera within the simulation and the Wired XDisplay tool we can have the same Unity3D process on a Tablet as shown in Fig. 18, the final stage of the process will be read by the OMNI camera Banner PresencePLUS, since this stage is the one that corresponds to the inspection and verification of the products that the camera reads.

Fig. 18.
figure 18

Tablet as a display device for the finished product.

3 Results

The virtual training system developed focuses on the generation of a batch of bottles packed in perfect condition and another batch of bottles with random production errors, so that the user can carry out the automation of inspection and verification of the bottles in the environment, by configuring the OMNI Banner PresencePLUS camera. In addition, to be able to verify if your configuration work was correct through the HMI of the camera software and LabVIEW.

To demonstrate the correct operation of the training system, experiments are presented that consist of changing the values of the total production batch and the number of erroneous bottles that is desired in said batch, the values to start the process are presented in the Fig. 19 with a total of 20 bottled bottles, 12 bottles in good condition and 8 bottles with production errors.

Fig. 19.
figure 19

Process start menu.

To start the simulation, it is necessary to perform the configuration in the PresencePLUS camera software, so that it can detect the correct level of liquid inside the bottle, the correct location of the cap and the correct labeling of it, this procedure is performed with a reference image in the main menu of “Analysis with the camera” presented in Fig. 20 (a), the reference image is transferred to a Tablet so that the camera performs the corresponding focus as shown in Fig. 20 (b), and all the configuration so that the camera can start the inspection is observed in Fig. 20 (c).

Fig. 20.
figure 20

Inspection and verification setup for the bottle.

Once the chamber is configured according to the user’s requirement, the bottling process begins, the process has the simulation of the three stages described above, at the beginning of the simulation the empty bottle goes through the first stage “Liquid filling” later it approaches to the second stage “Placing the cap” and finally it goes through the “Labeling” stage, giving rise to a packaged bottle finished in production, as shown in Fig. 21.

Fig. 21.
figure 21

Stage of packaging the bottle in the virtual environment.

The production errors arise from the three random error events programmed according to the user has determined the number of bottles in bad condition that he needed in his batch of products, Fig. 22 shows a bottle generated with error 1 and 2 in the simulation of process.

Fig. 22.
figure 22

Bottle packed with production error 1 and 2.

Each bottled bottle, passing through the three production stages, enters the inspection process by the OMNI Banner PresencePLUS P4 camera, for this the camera captures the image shown by the Tablet to carry out the analysis, this process is triggered by a signal sent from the simulation to the camera by a virtualized presence sensor, obtaining the following results:

1.- For a bottle without production errors, the simulated industrial process (image of the bottle) is shown in Fig. 23 (a), in Fig. 23 (b) the correct inspection of the bottle is observed by of the chamber and Fig. 23 (c) shows the acceptance of the bottle packed by the training system displayed on the HMI (LabVIEW).

Fig. 23.
figure 23

Result of the inspection and verification of a bottle without errors.

2.- For a bottle with production errors, the simulated industrial process (image of the bottle) is presented in Fig. 24 (a), in Fig. 24 (b) the inspection of the bottle error by the camera and Fig. 23 (c) shows the rejection of the bottle packed by the training system displayed on the HMI (LabVIEW).

Fig. 24.
figure 24

Result of inspection and verification of a bottle with errors.

To verify if the user has completed a good training in product inspection and verification, the values obtained in the visual interface of the camera and the values obtained in the HMI designed in LabVIEW are analyzed, making a comparison with the values entered at the beginning of the test. simulation, Fig. 25 shows the comparative results of the simulation, the inspection camera, and the LabVIEW HMI.

4 Conclusions

A training system of an immersive virtual environment was implemented, for the training of operators and students in the inspection and verification of the production line for the quality control of the finished products. The immersion that the system provides to users is achieved by the high level of detail in the design of the 3D objects implemented.

The virtual environment developed presents an adequate operation, and generates a high level of realism since the artificial vision camera detects all the designed details, and allows the analysis to be carried out as if it were a real process.

The operation of the training system was validated by subjecting it to several experimental tests and verifying that the final result of the advanced visual inspection camera and the main process menu respectively show the same amount of data from the virtualized processes.

Finally, the training system can help develop the skills of field operators and engineering students in quality control issues in automated production lines by providing useful and lasting knowledge over time.

Fig. 25.
figure 25

Comparative results of simulation, the camera and the HMI of LabVIEW.