Keywords

1 Introduction

An automated industrial process integrates monitoring and control technologies of the process variables, eliminating human intervention, increasing production, efficiency and safety, as well as a product with quality guarantees [1,2,3]. This requires professionals with theoretical and practical knowledge in the area of industrial automation [4]. The generation of skills, abilities, technical criteria for the selection, installation, operation and manipulation of components such as controllers, sensors and actuators can be achieved through training in process automation [5, 6].

The automotive industry is one of the fastest growing and the trend is to have efficient processes in the various stages, one of these being the area of vehicle painting which is implementing various automation techniques allowing an increase in the quality of the finished product, reducing waste and labor, since being automated processes can work all year round [7, 8].

The HIL technique together with virtual reality provides the opportunity to obtain virtual industrial environments allowing immersion in a simulated environment, [4] facilitating experimental automation training since it is possible to interact with the programmable logic controller in writing and reading process signals and, unlike a real environment, this allows performance testing by applying different techniques or control methods without production stoppages or economic losses. This presents a great advantage by reducing equipment implementation costs in laboratories [9,10,11].

In this context, several works have been developed in the field of engineering, specifically in the area of process control applying the HIL technique where it is evident that the realism of the elements of the virtual environment provide the same characteristics as those that exist at the industrial level and this has been gaining strength in recent years [2, 12].

The present work is divided into 5 stages including the introduction, Sect. 2 presents the system structure, Sect. 3 3D virtual environment control modes, Sect. 4 results and finally Sect. 5 conclusions.

2 System Structure

In this stage, the development of a 3D virtual environment of the vehicle painting process is detailed. In the Unity 3D graphic engine, the simulation environment of the operation and functioning of the sensors and actuators is developed by applying the HIL technique, resembling real industrial equipment, allowing automation proposals with the Siemens S7-1200 programmable controller, this structure is developed in the system, as shown in Fig. 1.

Fig. 1.
figure 1

Virtual environment schematic

2.1 Virtual Environment Modeling

The freely available modeling software Blender allows modeling, rendering and texturing 3D graphics to give the necessary realism to the virtual environment, [4] in this case the vehicle painting process as shown in Fig. 2.

When designing the environment, one of the main parts is the identification of the rotation elements, because the correct configuration and animation of these points will allow a greater realism when simulating, for example, robotic arms, gauges among others, this is shown in Fig. 3.

In the case of using imported models it is necessary to optimize the resources to avoid unnecessary overloading of the computer (Fig. 4).

Fig. 2.
figure 2

3D environment in Blender

Fig. 3.
figure 3

Configuration of rotation points

Fig. 4.
figure 4

Model optimization in Blender

2.2 Unity 3D Design

To import the design from Blender it should have been previously saved as *.fbx extension, this allows to keep details such as textures among other features and you can add other details such as terrain, clouds and other features in order to give more realism as shown in Fig. 5.

Fig. 5.
figure 5

3D environment in Unity

2.3 Communication

The communication between the 3D virtual environment and the PLC S7-1200 is done through the Sharp7 library and the TCP/IP communication protocol which relates the Tia Portal variables with the environment variables in Visual Studio. Two buffers are used where Unity3D sends and receives data through a.dll file located in the root of the project with all the scripts, the scheme is shown in Fig. 6.

Fig. 6.
figure 6

Communication between the Virtual environment and PLC S7-1200

3 3D Virtual Environment Control Modes

The virtual environment has two control modes: manual and automatic, these will allow the user to become familiar with each of the components of the process such as sensors and actuators prior to the automation proposal.

The process was divided into three stages, the first stage of painting, the second stage of immersion in varnish and the third stage of drying. For this, the paint pressure, varnish temperature and drying temperature must be initially configured in the HMI console as shown in the Fig. 7.

Fig. 7.
figure 7

Virtual environment HMI console

3.1 Manual Control

The manual control of the process is done through the computer keyboard, allowing the user to navigate and control each component of the environment, resulting in the familiarization of the operation of the process for the development of the automation proposal.

The navigation in the 3D virtual environment is done through the arrow keys, it is configured so that it can collide and interact with objects within the scenario, for this the user can choose which stage to work, reading each of the sensors and controlling the actuators conditioning that each of these must be completed to continue to the next stage. The following is the sequence of operation of each stage with the assigned keypad letters.

Stage 1: Painting Area

  • The rail that transports the vehicle is activated by pressing the “T” key and the vehicles appear automatically according to the progress of the process.

  • For painting, the robotic arms are activated with the “Y” key, provided that the solenoid valve is activated with the letter “U”; if this condition is not met, an error message is displayed on the HMI.

Step 2: Coating Area

  • To activate the varnish pool filling pump, press the “O” key.

  • Once the pool is filled, the heat exchanger must be switched on by pressing the “I” key, it will heat up to the previously set temperature.

  • To empty the varnish from the pool, press the “P” button.

Stage 3: Drying Area

  • In this stage the dryers must be activated, for the right side press the “h” key and for the left side press the “J” key.

3.2 Automatic Control

When the process is already known, the next step is the development of the automation proposal.

To make the automation proposal, a basic procedure must be followed that can be applied to any process:

  • Subdivision of the process into areas.

  • Determination of the sensors and actuators involved in the process.

  • Programming in a universal language for PLC (GRAFCET).

Subdivision of the Process into Areas

For the process it is necessary to identify each of the tasks and how they are related to each other allowing to find sub tasks. Figure 8 shows the subdivision of the automatic car painting process.

Fig. 8.
figure 8

Subdivision of the process

Determination of the Sensors and Actuators Involved in the Process

Once the process is known, the inputs and outputs (sensors and actuators) of each identified stage are classified and detailed as shown in Fig. 9.

Fig. 9.
figure 9

Sensors and actuators for the automatic vehicle painting process.

Programming in a Universal PLC Language (GRAFCET)

A GRAFCET diagram is created for the process automation, showing the programming sequence to be followed for programming in Tia Portal for the PLC S7-1200 (Fig. 10).

Fig. 10.
figure 10

GRAFCET diagram for automating the vehicle painting process

4 Results

For the validation of the 3D virtual environment, tests were carried out in manual control where the process can be controlled by means of the computer keyboard in order to become familiar with the process and then the automatic control is carried out.

4.1 Manual Control

When the application is started, a dialog box appears with instructions for use, as shown in Fig. 11.

Fig. 11.
figure 11

Manual control dialog box

Once the instructions have been reviewed, the next dialog box is displayed to select the vehicle’s paint color (Fig. 12).

Fig. 12.
figure 12

Manual control dialog box

Once the color for painting the vehicle has been selected, the virtual environment of the process is entered, where the HMI must be used to enter the pressure of the paint to be used, the temperature of the varnish and the drying temperature (Fig. 13).

Fig. 13.
figure 13

3D virtual environment interface of initial parameters

4.2 Automatic Control

In the same way that in the manual control it is mandatory to enter the pressure of the paint with which it will work, the temperature of the varnish and drying temperature, additionally the IP of the PLC must be 192.168.0.10 which will allow communication with the environment (Fig. 14).

Fig. 14.
figure 14

HMI operation of the virtual environment

Fig. 15.
figure 15

Correct operation of presence sensors in industrial process steps

Figure 15 shows a light indicator for the activation of the presence sensor of stage 1 and 2, Fig. 16 shows the actuation and movement of the robotic arms and a paint mist is visualized, this will vary depending on the color that was previously selected.

Fig. 16.
figure 16

Operation of robotic painting arms

Figure 17 shows the behavior of the paint tank level while the painting cycle is running.

Fig. 17.
figure 17

Paint tank level display

Fig. 18.
figure 18

Varnish dipping pool operation

Stage two consists of immersing the vehicle in varnish (Fig. 18) and heating to the selected temperature (Fig. 19).

Fig. 19.
figure 19

Thermometer operation

Fig. 20.
figure 20

Operation of drying fans

For this purpose, ambient sounds have been configured throughout the environment to envelop us in the virtual environment and provide greater realism (Fig. 20).

5 Conclusions

The development of the 3D virtual environment for vehicle painting generates a user experience similar to the real one, having the option of manual and automatic control allows familiarization with the process to subsequently make a proposal for automation, generating skills in the training of technical personnel at a low cost.

The implementation of Sharp7 as a complement to the Unity3D graphics engine allows communication between the 3D virtual environment of the vehicle painting process and Tia Portal, helping to optimize the HIL technique.

The sensors, actuators and equipment designed in the virtual environment work in real time, as well as the communication with the PLC, generating a reliable system for training in industrial automation.