Implementation of Siemens S7-1200 PID Control on Festo Labvolt 3531 Plant Level Controller with Topkapi SCADA Using Modbus Communication Protocol

Plant Festo LabVolt 3531 is a DCS, SCADA and process control system trainer based on the Allen Bradley Controllogix 5572 PLC and Factorytalk View SCADA. This research aims to provide another controller solution that can be used on the Festo Labvolt 3531 plant besides the Allen Bradley Controllogix 5572 PLC and FactoryTalk View SCADA. So that students have alternatives and variations of other technologies in learning. In this research, the Siemens S7-1200 PLC was used as a replacement for the Allen Bradley Controllogix 5572 PLC and Topkapi SCADA as a replacement for FactoryTalk View SCADA. As validation of the test, PID control was used to regulate the water level in both tubes at the Festo Labvolt 3531 plant. The test results for several specified height levels showed that the Siemens S7-1200 PLC with PID control integrated into Topkapi SCADA using the mobus communication protocol was successfully implemented , where the resulting control response has an average steady-state error of less than 2% and the delay between the interface and the device on the plant is 0s.


Introduction
In the Industry 4.0 era, industrial automation has become the foundation for the transformation of the manufacturing sector, integrating technology to create smart manufacturing .This allows companies to optimize production processes in real-time , increasing efficiency, productivity and quality (Goecks et al., 2024).To support this transformation, manufacturers of controllers such as PLCs continue to improve their products with new intelligent features that simplify the commissioning process without requiring special skills (Slavíček et al., 2021).For example, the Siemens S7-1200 series offers high computing power in a compact size and advanced control algorithms such as PID (Moll, 2021;Adhikari, 2018).
Although PLC and PID control have been widely adopted, challenges arise in integrating various industrial components (Dominic et al., 2016).A modern factory consists of hundreds of related processes with their respective control systems (Salkić et al., 2022).Without integration, these systems are isolated, making efficient monitoring and control difficult.This is where SCADA (Supervisory Control and Data Acquisition) becomes crucial, acting as the brain that coordinates factory operations in real-time (Upadhyay & Sampalli, 2020;Anggraeni et al., 2023).Connecting SCADA with diverse field devices requires communication protocols.Standard communication protocols, especially Modbus, are emerging as popular integration solutions (Alzahrani et al., 2023).Developed by Modicon in 1979, Modbus is known for its simplicity and open nature in industrial communications (Herath et al., 2020).However, while systems integration is gaining attention in industry, there is a gap in education.Students often learn about PLCs, PIDs, and SCADA separately, without sufficient exposure to the integration challenges they will face in their careers (Roldan, 2019;Folgado et al., 2014).
For practice process control , Department of Automation Engineering POLMAN Bandung currently This own LabVolt 3531 as tool show eye lecture on DCS (Distributed Control System) based on the Allen Bradley Controllogix 5572 PLC and SCADA Factorytalk View (Roldan, 2019).LabVolt 3531 is a teaching module about pressure, flow, height and temperature of water with the aim of introducing various industrial processes, as well as instruments and control devices.The components and systems in the DCS Labvolt 3531 plant are currently in one type of manufacturing, giving rise to limitations and a lack of flexibility where students only focus on Allen Bradley PLC and FactoryTalk technology without being able to try various other technologies.
To overcome this problem, the solution offered is to replace the existing PLC and SCADA control system with a Siemens S7-1200 PLC and Topkapi SCADA.The selection of the Siemens S7-1200 PLC and Topkapi SCADA was based on ease of integration, flexibility, scalability and cost efficiency.By using different PLCs and SCADA, students can gain broader knowledge and be ready to face various situations in industry.Implementation of this solution is expected to improve learning quality, system flexibility and operational cost efficiency.

Methods
In this research, the waterfall method is used, which is a method commonly used by system analysts.This method operates on systems sequentially or linearly (Febriono & Lukman, 2023).An illustration of the waterfall method is shown in Figure 1 with the final section changed to Analysis of Results.

Needs Analysis
Data collection at this stage can be done through literature studies, tool observations, or discussions with various related parties.The needs analysis in this research begins with a description of the system in existing facilities.A general description of the equipment used in this research can be seen in Figure 2.  From Figure 2, it can be seen that the user will access control on the Labvolt 3531 through the Area Topkapi Vision 32 application interface installed on the computer.This interface display will connect the user with the Labvolt 3531.The Siemens S7 1200 PLC on the Labvolt 3531 will connect all sensors and actuators with the Topkapi Area SCADA interface which is connected via the Modbus communication protocol.So users have the ability to process and control the plant through this interface.The interface will display the controls that can be controlled.Then the data values obtained from the radar transmitter level sensor and the integrated differential pressure transmitter will appear.System design is the stage of creating a system design that suits existing problems to obtain solutions.The system design in this research is designed based on the process flow of a tool that functions to regulate the height of the water level using PID control, which can then be controlled via the Topkapi SCADA interface.

Writing Program Code
Program writing is the translation of a design into a program language that can be recognized by the system as shown in Figure 4 below.The plant process in this research uses a Siemens S7 1200 PLC which is presented in the form of a ladder diagram.The stages of program creation are presented in figure 4 while figure 5 will describe the process of checking the program that has been created.
The final part of this research programming is to create an integration program using the Modbus communication protocol with the MB_Server function block.Later in the MB_Server there must be several sections filled in such as MB_Hold_Reg which is a type of register in the Modbus communication protocol which is used to store data that can be read and written.These registers will later be created in a Buff Array which is used to store process parameters, setpoints, status, or other data needed in industrial control systems.Then in the Topkapi SCADA Application you must add a port in the acquisition section with the modbusip driver protocol whose IP address is the same as the PLC IP address.You can see in Figure 6 the flow of creating a Siemens S7 1200 PLC integration program with Topkapi SCADA.

Program Testing
The next stage is the system testing stage to find out whether the results are in accordance with the previously designed design.Testing begins by testing the control and monitoring functions.The function of PID control can be seen in the response field device, while the monitoring and control function can be seen and used on the SCADA interface after there are changes to the system due to PID control.
In figure 7 is a picture of the control system diagram which is used to control the height of the water level in tube 1 and tube 2 sequentially using PID control.Next is the analysis process of the results obtained.The analysis will be carried out using the system response table and the interface response testing table.Can be seen in the next discussion

Program Creation Results
The structure of the PLC program that has been created is as follows in Figure 8 It can be seen from Figure 9.The Cyclic interrupt [OB30] section is the part that controls the PID on tube 1.The PID_Compact_3 section on the Cyclic interrupt [OB30] will be active when the PID and Start coils are on.It will also turn on Coil PID1 which will later function to turn on pump contact1.
In the PID_Compact_3 section there are 3 inputs, namely Setpoint1 as a target value that can be input by the user, then there is a Level1 value as a feedback value from the height reading by the Radar Level Transmitter and there is Reset.For the output, there is a Frequency1 value which will later set the inverter frequency for pump1.Because in this experiment we tried using 2 tubes in series, a condition was made for pump 2 to be active after the water in tube 1 reached the set point and the steady state can be seen from Figure 10.In this study, conditions were made for pump 2 to be active after the water level remained for 6 seconds.pump 2 will be active.In the overview menu, displays the entire process that occurs in the Labvol 3531 plant as shown in Figure 13, from the level transmitter sensor value for tube height 1, the pressure transmitter for tube height 2, the on/off status of pumps 1 and 2, ongoing control, also the setpoint values on tubes 1 and 2. Apart from that, the condition of the plant is also shown, whether it is on stand-by, shown by a yellow signal light, the plant is active and running, shown by a green signal light, the plant is in an emergency condition, it is shown by a light.red signal.

ISSN
With this menu display, operators can monitor system status effectively because all important information is presented on one screen.Visual indicators make it easier for operators to understand plant operational conditions and make the right decisions without having to check further details.This display increases operational efficiency by providing clear and organized real-time information, enabling operators to manage the Labvol 3531 plant more effectively.The graphic menu display, as shown in Figure 14, will show the movement of water in tube 1 and tube 2 to reach the predetermined setpoint value.From this menu, data can later be retrieved to see the running system response.Additionally, this display is very useful for tracking system performance and identifying trends in water movement.By analyzing graphs, operators can see changing patterns of water flow and evaluate the effectiveness of applied controls.This is important for optimizing setpoint values and improving overall process Copyright © 2024, Journal La Multiapp, Under the license CC BY-SA 4.0 control efficiency, as historical and real-time data enable more precise adjustments to plant operations.

Figure 15. Control menu display
Figure 15 is a control menu, the control display is a display where the user will access to enter the setpoint value for each tube and access the start, stop and emergency button controls.
Apart from that, this display is very important to ensure that the process runs according to the specified parameters.With this control display, operators can easily adjust setpoints and manage plant operations quickly and efficiently.Clear visual indicators and control buttons help operators quickly respond to emergencies and optimize system performance, ensuring that operations continue safely and efficiently.

System Response Results
System response data is taken from graphic data on the graphic menu page, which is then taken as CSV data and exported as Excel data.To make it easier to analyze the data, the values taken are setpoint, level and time.So the results can be seen in table 2. From test tables 2 and 3 of the PID1 and PID2 control systems which were carried out 10 times each, it can be concluded that PID control by PID Compact used on the Labvolt 3531 shows very good performance.Each experiment shows that the resulting error is very small, below 2%, some even have 0 error, indicating that the PID control system is able to set and maintain the desired parameters with a high level of precision.This minimal error indicates that the PID control system effectively reduces deviations from the setpoint value, thereby ensuring stability and accuracy in control.These test results strengthen the reliability and effectiveness of PID control in complex control applications, and show that the Compact PID on the Labvolt 3531 is very suitable for use in a variety of industrial applications that require high precision control.

Interface testing results
The interface testing analysis design parameters are by testing the features created in Topkapi SCADA, especially features that are integrated with the PLC using the Modbus communication protocol.Then see how much time it takes to process the data transaction.
Integration system testing must successfully receive and send data in real time to the PLC and SCADA.The test results can be seen in table 3.  Table 3 of feature testing shows that all the features tested function well and optimally without experiencing delays.Each feature in the table was thoroughly tested, and the test results confirmed that no errors or performance issues were found.The response to each feature is also proven to be fast and efficient, showing no annoying delays.Thus, this table provides a clear picture that the implementation and performance of all the features are at a satisfactory level and ready to be used in a production environment.

Conclusion
The results of the tests carried out show that the Modbus communication protocol functions optimally.It can be seen in table 4, from the 10 experiments carried out, all features functioned well without experiencing delays ( delay 0 s) which could affect system performance.This ensures that communication between the Siemens S7-1200 PID control components and the Topkapi SCADA system occurs efficiently and reliably.The control response produced by PID Compact is very good, with a very small error rate of under 2% in each tube.This shows that PID control systems are capable of regulating process variables with high precision, which is very important in industrial applications where accuracy and reliability are key.
This research succeeded in offering a solution, that the Siemens s7 1200 PLC and Topkapi SCADA could be used on the Labvolt 3531 as a water level control teaching module.Overall, the integration of the Siemens S7-1200 PID control with Topkapi SCADA via the Modbus communication protocol is not only technically successful, but also makes an important contribution in connecting the theory studied in an academic context with practical applications in industry.

Figure
Figure 2. System Overview

Figure 6 .
Figure 6.Flowchart for Program Creation Part 3 Figure 5. Flowchart for Program Creation Part 2

Figure 8 .Figure 9 .
Figure 8. PLC Program StructureIt can be seen in Figure8.There are organizational blocks created, namely Cyclic interrupt [OB30], Cyclic interrupt [OB31], and main [OB1].After 3 organization blocks, then there are 3 function blocks created in this programming.Namely "Integration to Modbus" which is a PLC tag addressing program with Buff data that will enter MB_Hold_Reg as an address in SCADA, because the BUFF data array used is an "array of int" so it is necessary to provide several conversion functions from integer data types to other data types or vice versa, so that data can be entered into MB_Hold_Reg and can be read by SCADA Topkapi."Standby" is a function block that contains a light indicator as well as a timer to set the delay on the inverter when the panel is first turned on ."TestMotor " is a function that contains pump addressing for both pump 1 and pump 2, also contains sensor scale calculations from the level transmitter and pressure sensors.transmitters.
Then from the results of the PID tuning carried out by PID_Compact_3 it produces a Proportional value of 7.193086, Integral 17.94597, and Derivative 4.549264.These values are obtained based on the Fine Tuning results in tube 1.

Figure 11 .
Figure 11.Cyclic interrupt [OB31]Just like Cyclic interrupt [OB30], Cyclic interrupt [OB31] is also a PID controller on tube 2 which can be seen in Figure11.Where PID_Compact_2 on Cyclic interrupt [OB31] will be active after the condition on Cyclic interrupt [OB30] is active.The input in PID_Compact_2 is Setpoint2 as the target input by the user at the water level of tube 2, Level2scale is the feedback value from the height reading by the Differential Pressure Transmitter and there is a Reset.For the output, there is a frequency value which will later set the inverter frequency for the pump.Then from the results of the PID tuning carried out by PID_Compact_3 it produces a Proportional value of 3.136874, Integral 7.546312, and Derivative 1.909271.These values are obtained based on the Fine Tuning results in tube 2.

Figure 12 .
Figure 12.Main [OB1]Organization block Main [OB1] collects other function blocks in this programming which can be seen in Figure12, apart from collecting 3 other function blocks as explained in the discussion in Figure8.Main [OB1] is also a place for programming the Modbus communication protocol with MB_Server_DB, which is a function block that activates the Modbus communication protocol so that the PLC can be integrated into Topkapi SCADA.

Table 1 .
Table 1 below explains the input output addresses used in the ladder in the PLC and explains the array addresses used for program integration.Input, output and array addresses

Table 2 .
PID 1 control system response