# Interactive Teaching in Virtual Environments: Integrating Hardware in the Loop in a Brewing Process
## 3 Structure of the Process
### Development of the Supervision, Control and Data Adquisition System (SCADA)  
The implementation and development of the SCADA system are based on the P&ID diagram shown in Figure 2.  
Figure 2: P&ID diagram for the brewing process.  
The process is divided into six stages: (i) Milling or boiling, which consists of incorporating the raw material, malted barley grains, water and adjuncts to generate a homogeneous liquid: (ii) Maccration, the malt is mixed with water at different times and temperatures, producing the necessary transformations to convert the starch into fermentable sugars; (iii) Filtering, responsible for separating the remains of malt from the liquid worth; (iv) Boiling, the liquid resulting from the filtrate is mixed with the hops at a temperature of 100 \({}^{\circ}\)C to provide the bitterness and aroma present in the hops, which will determine the alcohol content of the beer; (v) Fermentation, the yeast is added to the mixture to convert the sugar into alcohol and CO2, which must remain at a constant temperature for a period of two weeks to finally separate the remains of yeast; (vi) Conditioning, a carbonation process is carried out on the mixture resulting from fermentation and filtering at low temperatures, where we will obtain our final product.  
The SCADA system consists of six screens, illustrated in Figure 3, which was developed in the InTouch 10.0.0.1 software and allows the manipulation and visualization of the process operation. The screens are as follows: (a) Welcome, allows access to all interface windows through a user and password, granting rights according to the type of user; (b) Process, this screen displays the stage of the process in real time, also allows graphic display of all system components and access to controls and indicators; (c) Control Panel, allows to control the behavior of all the valves and motors present in the interface; (d) Trends, there is also the general stop of the process; (e) History, shows the alarms and alarms of unusual events that may occur at any stage of the brewing process; (f) Help, which finally shows a total description of all the components and elements of the process.  
In addition, the operating data of the beer brewing process are saved in order to maintain a record that allows for determining the type and frequency of maintenance required by the process. The data are sent through labels considering the inputs, outputs, and marks present in the programming: the program developed in InTouch can read all the labels assigned by the OPC as discrete input-output type variables sent by the TIA Portal. To store the data in Excel, it is required to assign a different type of data; the types of variables that are sent to the different software are shown in Figure 4.  
Figure 3: Development of human-machine interface HMI (process menu).  
Excel can only read integral input-output type data. For this reason, it is through a script that the discrete I/O and integral I/O type variables are combined, and the sampling time in which it will be saved is defined information. Moreover, a file, xtsm, stores the data: it must be linked with all the variables of the InTouch script in order to acquire the process data. It is recommended to configure the cells to which the date and time, temperature, levels, and alarm status will be assigned, considering interaction with the process in real time. Finally, the information obtained can be used to generate trend graphs that allow the management level to define its quality and production level.