# PLC-SCADA Automation of Inlet Wastewater Treatment Processes: Design, Implementation, and Evaluation

<figure><img src="image_1.png" /></figure>

Check for
updates

Kadhim Hassan Kaittan* ID, Samir Jasim Mohammed ID

Department of Electrical Engineering, University of Babylon, Hillah 51001, Iraq

Corresponding Author Email: eng300.kadhum.Hussan@student.uobabylon.edu.iq

Copyright: ©2024 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

https://doi.org/10.18280/jesa.570317

**Received:** 4 April 2024

**Revised:** 1 June 2024

**Accepted:** 7 June 2024

**Available online:** 25 June 2024

**Keywords:**

BOD, COD, PH, PLC-S7300, SCADA, TCP/IP, TIA portal, wastewater treatment

## ABSTRACT

The intelligent automation of inlet wastewater treatment plants necessitates the deployment of integrated control systems such as programmable logic controllers (PLCs). These systems manage the continuous operation of pumps, valves, and biochemical processes through precisely designed electrical algorithms, achieving a high-level processing system. This study presents an innovative approach to the design and evaluation of ladder block algorithms for optimizing processors rapidly by leveraging PLCs to organize data analysis, display, and supervisory control and data acquisition (SCADA). The proposed methodology involves establishing a connection between the SCADA system and the Siemens PLC-S7-300 controller to enable efficient and rapid calculations. The results demonstrate that the ideal electrical algorithm derived from the biochemical system's behaviour, implemented through the PLC S7-300 Siemens, effectively treats incoming wastewater. This system ensures precise monitoring and control, promptly recording and notifying on-site personnel of any unexpected events, such as biochemical defects or electrical malfunctions, and adapting to these issues using the designed algorithm. The system is developed using Totally Integrated Automation (TIA) portal software, underscoring its robustness and reliability in managing wastewater treatment processes.

## 1. INTRODUCTION

Within the inflow region of the treatment plant, three fundamental operations occur: The untreated wastewater must be conveyed to pump stations without any interruption. Consequently, it is necessary to continuously monitor the rotational velocity of the delivery pumps to enable the system to transition to a backup pump in case of a malfunction. Simultaneously, the rate at which the wastewater flows and the level at which it is present are measured to avoid overwhelming the succeeding stages of the plant. The conveyor systems activate and deactivate as needed, ensuring the most efficient utilization of energy [1, 2]. The preservation of the environment is one of the main advantages of wastewater treatment. Untreated wastewater may contain chemicals, nutrients, pathogens, and other dangerous materials. Untreated wastewater discharge into bodies of water can cause pollution, endangering ecosystems and aquatic life. The water quality is monitored to safeguard the ambient conditions for the bio-organisms in the succeeding biological stage of the treatment plant. In addition to temperature and salt content, the pH value is an important measure that might indicate either alkaline conditions or excessive acidity [3]. This implies that suitable actions can be implemented to safeguard the biological phase of the treatment facility. Aside from the specific process areas of a wastewater treatment facility that necessitate a variety of intrinsically safe solutions, it is also crucial to monitor the water filtration equipment and the entire

wastewater treatment plant to safeguard against corrosive, dusty, dirty, and explosive environments. Additionally, measures such as lightning protection and purge suppression should be implemented. Offers a diverse array of protective measures to ensure the safety and efficient operation of the wastewater treatment facility [4].

Intelligent wastewater systems may meet the freshwater needs of the Internet of Things (IoT) smart community by utilizing IoT sensors to identify and prevent the occurrence of combined sewage and chemical overflows in wastewater. Freshwater is a rare and highly valued natural resource that is not readily accessible on a daily basis [5, 6]. The IoT employs the notion of deploying sensing devices at various locations within the water environment to facilitate aquatic care. These sensors acquire and relay data to surveillance systems. The data may encompass water quality, fluctuations in temperature, variations in pressure, detection of water leakage, and identification of chemical leakage [7]. These sensors acquire and relay data to surveillance systems. An intelligent water sensor, utilizing the IoT, can monitor and assess the quality, pressure, and temperature of water. Indeed, a sensor solution can regulate the movement of fluids within the treatment facility and might be employed by a water utility provider [8, 9]. A wastewater treatment facility removes solid particles before discharging the liquid waste into the surrounding ecology. The wastewater treatment facility incorporates a PLC with human-machine interface (HMI) capabilities to construct a water level monitoring system [10]. The injection of an
adequate quantity of chemicals is a key aspect of boosting the overall efficacy of a typical wastewater treatment facility. Modify the water level to match the desired quantity. In addition, the conventional plant provides reliability through the incorporation of high-speed protective mechanisms, which efficiently mitigate any system malfunctions [11]. Challenges in wastewater treatment: Enhancing the treatment processes based on data analyzing the parameters of flowing water, incoming wastewater, and the liquid waste in treated form, the establishment of the communications network, and the system scenario programming process.

## 2. CONTRIBUTION OF THE PAPER

The contribution of the paper is as follows: The research proposes improving the biochemical treatment system for incoming wastewater units by designing algorithms with a scenario different from previous studies in terms of the type of system used, the program used, and the algorithm, as follows: PLCS7-300 performs control (monitoring and treatment) first. To achieve performance and low processing costs. Secondly, this research proposes creating new units to collect data from remote terminal units (RTU) to create a larger smart control node that helps in collecting various data, and thirdly, a PC Station to obtain data from RTUs and PLCs through the use of communications. Networking and Communications Protocol (TCP/IP), thus achieving other important processors in the main data center to provide high accuracy in real-time and send data back to the subunits.

This system can also achieve real-time operation in milliseconds because the program used for the design is one of the best programs used by Siemens for data acquisition and processing speed.

## 3. LITERATURE SURVEY

Włodarczak et al. [12] describe the design of a flow meter utilizing a PLC. The implementation of a flow meter regulated by a PLC enhances the potential for managing and automating the movement of fluids. Furthermore, the educational capacity of employing basic automation through a PLC was taken into account. A fluid flow rate measurement device was designed, manufactured, and tested using a PLC controller.

According to Wang and Zhang [13], the objective is to enhance the intelligence of sewage detection during the sewage treatment process, thereby increasing the precision and immediacy of monitoring data. This study focuses on analyzing the PLC platform developed by the Allen-Bradley Company. The primary objective is to utilize a basic monitoring apparatus to measure the pH value and COD value in treated sewage. By optimizing the architecture of the distributed control system (DCS) structure and communication network level in the sewage treatment system, using a PLC as the platform, more effective monitoring of sewage has been obtained.

Zhang et al. [14] introduced an application case based on IoT sensor control and supporting maintenance businesses. They introduced a method of bringing the IoT into the membrane bioreactor (MBR) system of industrial wastewater treatment, which can continuously and accurately monitor the nodes of the system.

Salem et al. [15] developed an industrial IoT cloud-based

model for real-time wastewater monitoring and controlling, which monitors the power of hydrogen and temperature parameters from the wastewater inlet that will be treated in the wastewater treatment plant, thereby avoiding impermissible industrial wastewater that the plant cannot handle.

Morales and Lawagon [16] suggested an IoT system for monitoring the pH of wastewater in real-time using web browsers. This system allows for the regulation of waste disposal through web browsers. The authors demonstrated that the pH level fluctuated with temperature, but the variations were rather minimal.

The proposed design in this study, in comparison to previous studies, utilizes advanced programs from Siemens, which necessitate significant expertise and meticulous handling to construct an accurate scenario for the processing units. Previous studies predominantly employed systems that connect a single PLC. This study, however, demonstrates a network of PLCs integrated with a central control unit, capable of achieving real-time operation in milliseconds. This is in contrast to the PLC systems used in other studies, whose specifications will be clarified in the designed work.

## 4. PROGRAMMABLE LOGIC CONTROLLER (PLC)

A PLC is an industrial computing device employed to regulate a particular process, machinery system, or, occasionally, an entire assembly line. A PLC is a type of computer used in industrial settings that does not require a mouse, keyboard, or monitor. Given that it is an industrial computer, logical software is developed to manage the process on the main computer [17]. The program is subsequently sent to the PLC using cables. The program is stored in the memory of the PLC. The logical program is created using a programming language known as ladder logic, data list, or function block diagram. The program is designed to be simply understandable for anyone with expertise in electrical or hardware domains. A PLC comprises diverse inputs and outputs. A PLC monitors the condition of switches and sensors by utilizing input terminals. Based on this status, it issues commands to output devices via output terminals.

<figure><img src="image_2.png" /><figcaption>Figure 1. PLC hardware configuration [18]</figcaption></figure>

Figure 1 shows the internal and external circuits for PLC S7 300. The SIMATIC S7-300 universal controllers offer a compact installation and are designed with a modular structure [18, 19]. The system can be expanded either centrally or in a decentralized manner using a diverse selection of modules,
depending on the specific purpose. This allows for efficient
storage of spare components while minimizing costs.
SIMATIC is renowned for its consistent performance and
exceptional quality. Effortlessly scalable as the range of
features increases. Enhanced by a multitude of integrated
functionalities [17].

5. SUPERVISORY CONTROL AND DATA ACQUISITION (SCADA)

Computers, networked data flows, and graphical user interfaces (GUIs) make up a control system architecture, which enables high-level machine and process supervision. Additionally, it consists of sensors and additional hardware—like PLCs—that connect to machinery or process plants [20]. The operator interfaces that facilitate the monitoring and execution of process directives, such as adjustments to controller set points, are managed by the SCADA computer system. Ancillary processes, including controller computations or real-time control logic, are handled by modules that are coupled to field sensors and actuators. The SCADA concept shown in Figure 2 was devised as a versatile method for remote access to various local control modules, regardless of their manufacturer, and enabled access using standard automation protocols [21, 22]. Large SCADA systems have evolved to closely resemble DCS in terms of functionality, employing various methods to interact with the plant. They possess the ability to manipulate extensive operations that encompass numerous locations, functioning effectively across both significant and limited distances. Despite worries regarding the vulnerability of SCADA systems to cyberwarfare and cyberterrorism attacks, they are widely utilized in industrial control systems [23].

<figure><img src="image_3.png" /><figcaption>Figure 2. SCADA system [21]</figcaption></figure>

6. DESIGN AND IMPLEMENTATION OF THE PROPOSED SYSTEM

When constructing the wastewater treatment lifting unit, it
is crucial to take into account many functions, including
precise monitoring of the water level and biochemical sensor
signals relaying this signal through the sensors to the treatment
unit (PLC). The system is equipped with processing
algorithms that enable precise and vital decision-making for

running the equipment in the given scenario. In addition, a
multitude of biological signals are evaluated and relayed to the
same processor. Moreover, these algorithms are organized
sequentially by using a ladder algorithm within the CPU for
PLC S7 314 PN/DP, as illustrated by the programming
parameters in Figure 3. The signals acquired from the sensors
are analog signals (4-20 mA or more) that fluctuate by the
measured ratios. Moreover, the system's behaviors (run, trip,
faults) can be perceived by analyzing digital signals. This
project implementation (in real-time) transforms a biological
system into an electrical system to perform necessary chemical
treatments for the effective functioning of the inlet-station
wastewater-process unit. After completing the programming
of the system, as shown in Figure 4, the system will send the
specified signals over a communication system and
communication protocol (TCP/IP) to the central processing
and monitoring unit. This enables the operators to acquaint
themselves with the system and its functioning, as well as
observe the presented data and surveillance on user interfaces.
Furthermore, the system database architecture displayed in
Figure 5, offers numerous benefits for creating and
implementing the system.

Central subunits, RTUs, are designed to create a larger
smart control node that helps in collecting various data,
through which information is exchanged with the main (PC
Station) through communications networks designed and
communication protocol (TCP/IP) shown in Figure 6, thus
conveniently achieving other processors. Main data center to
provide high accuracy in real-time and send data back to sub-
units.

Specifications PLC Siemens, as explained in Figure 3:

* Modular Design: The S7-300 circuit is grouped in a modular form, which makes it easy for customers who wish to upgrade it. To configure a controller differently to meet my requirements, you can choose any type of CPU and add I/O modules for digital (ON/OFF) or analog (0-10V or 4-20mA or more) signals.

* Memory Capacity: The size of the memory is also dependent on the chosen CPU but provides adequate space for storing logical programs as well as data processing in wastewater treatment as explained in Appendix (Figure A1).

* Communication Protocols: The S7-300 supports several communication protocols, including the PROFIBUS protocol, which enables the use of the S7-300 to connect with other devices such as sensors, HMIs, and other PLCs for easy control of a central system.

* Rugged Construction: These PLCs are made for durability and industrial applications and are also suitable for temperature and relative humidity factors that exist in wastewater treatment plants.

Capabilities relevant to wastewater treatment:

* **Logic Control:** With the S7-300, logic programs of different levels of complexity can be performed for various tasks in WWTP. Currently, it can manage pump functions according to water levels, manage the amount of chemicals to be released, and set off alarms when reading levels are not normal as in Appendix (Figure A2) showing the symbols for the basic ladder algorithm.

* Data Acquisition and Processing: It can record
information produced by sensors that control some parameters of the treatment, such as the flow, pH, and DO. It may then analyze this data and make control decisions within preprogrammed values that have been inputted into its hardware.

* **Scalability:** About the design of the wastewater treatment plant: It must be modular. You have the option to add more I/O modules or upgrade the RISC CPU if you need more software processing capabilities.

<table><caption>Figure 3. The ladder program algorithm proposed and the parameter system</caption><caption>General Catalog information</caption><thead><tr><th>Short designation</th><th>CPU 314-C-2 PN/DP</th><th>Description</th><th>Article number</th></tr></thead><tbody><tr><td></td><td></td><td>Work memory 192KB; 0.6ms/1000 instructions; DI2/DO 16; AI5/A02 integrated; + pulse outputs (2.5kHz); + channels counting and measuring with 24 V (60kHz) incremental encoders; integrated positioning function; PROFINET interface and 2 Ports; MRP; PROFINET CBA; PROFINET CBA Proxy; TCP/IP transport protocol; combined MPI/DP interface (MPI or DP master or DP slave); multi-tier configuration up to 31 modules; capable of sending and receiving in direct data exchange; constant bus cycle time; routing; firmware V3.3</td><td>6E57 31 +6EH04-0AB0</td></tr><tr><th>Name</th><th>Data type</th><th>Offset</th><th>Default value</th><th>Comment</th></tr><tr><td>▼ Temp</td><td></td><td></td><td></td><td></td></tr><tr><td>OB1_EV_CLASS</td><td>Byte</td><td>0.0</td><td></td><td>Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)</td></tr><tr><td>OB1_SCAN_1</td><td>Byte</td><td>1.0</td><td></td><td>1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)</td></tr><tr><td>OB1_PRIORITY</td><td>Byte</td><td>2.0</td><td></td><td>Priority of OB Execution</td></tr><tr><td>OB1_OB_NUMBR</td><td>Byte</td><td>3.0</td><td></td><td>1 (Organization block 1, OB1)</td></tr><tr><td>OB1 RESERVED_1</td><td>Byte</td><td>4.0</td><td></td><td>Reserved for system</td></tr><tr><td>OB1 RESERVED_2</td><td>Byte</td><td>5.0</td><td></td><td>Reserved for system</td></tr><tr><td>OB1_PREVCycle</td><td>Int</td><td>6.0</td><td></td><td>Cycle time of previous OB1 scan (milliseconds)</td></tr><tr><td>OB1_MINCycle</td><td>Int</td><td>8.0</td><td></td><td>Minimum cycle time of OB1 (milliseconds)</td></tr><tr><td>OB1_MAXCycle</td><td>Int</td><td>10.0</td><td></td><td>Maximum cycle time of OB1 (milliseconds)</td></tr><tr><td>OB1_DATE_TIME</td><td>Date And Time</td><td>12.0</td><td></td><td>Date and time OB1 started</td></tr></tbody></table>

<figure><img src="image_4.png" /><figcaption>Figure 4. Ladder program (analog & digital) scenario signal algorithm proposed</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Figure 5. Database system (Address, Tag, Data type, and OPC/HMI)</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Figure 6. Architecture proposed system show (SCADA with RTU, PLC, and Communication) design</figcaption></figure>
# 7. RESULT AND DISCUSSION

The results of the design and implementation of a PLC to automate the process of introducing wastewater into the treatment plant are based on a fully integrated automation gateway program, including the ladder for programming the system, which achieved several tasks, including controlling the inlet based on various parameters, where data is acquired. In real-time sensors that monitor water levels, flow rates, and other essential factors based on these inputs, as we can see from Figure 7 (a) and 7 (b), the online system process, the operating status of the ladder for the system, through which the status of the input to the processing unit can be seen (open, closed, failure), and also through the GUI of the SCADA system shown in Figure 8, the GUI provides a visual representation of the state of the system in terms of motor operation and signals from biochemical sensors. Thus, operators can monitor critical parameters such as water levels, flow rates, valve positions in real time, and other chemical signals. In addition, the GUI enabled an alarm function to alert operators about critical events such as overflow or pump failure. Table 1 represents the transition from the biochemical signal to the proposed system's electrical signal.

**Measurement:** The sensor signal (typically a 4-20 mA current output signal) may not go in direct relation to measurement units (for instance, a degree Celsius temperature). It measures the current-to-voltage level on the analog input module, which is present inside the PLC. This voltage is then scaled to represent the actual measuring range of the sensor; the relationship between these values must be directly proportional. For example, 4 mA may mean that the temperature is 0 degrees Celsius, while 20 mA would mean that the temperature is 100 degrees Celsius.

**Filtering:** sensor signals are vulnerable to electrical interference, thus being different.

**Analog-to-digital conversion (ADC):** It has a modal voltage input from the actual process placed on the analog input module, the ADC of the PLC converts it into digital form. This conversion entails partitioning the voltage range into a given number of bits, e.g., 12-bits or 16-bits. Every numerical value is a numbered voltage value, starting from the lowest voltage level in the mentioned range.

**Data processing and use:** After this code, the PLC program can obtain the digital representation of the sensor reading. With this data, it can perform the necessary calculations, comparisons, and also basic logical operations. Depending on the values received from the sensor and the logic employed, the PLC can manage other associated parameters like ON/OFF collars of pumps or valves and alarms ON.

**Integration of the PLC with the SCADA system:**
**Compatibility:** When the communication protocols of the SCADA don't match those of a PLC, data sharing is compromised. **Solution:** utilize a suitable or common communication protocol.

**Data synchronization:** There can be timing disparities resulting in non-concurrent information among systems. **Solution:** Set data update rates and do error checking for reliable communications.

**Security:** A single-point failure could leave both systems exposed to cyber threats. **Solution:** To minimize security risks, install firewalls, access controls, and secure communications protocols.

The improvement of process automation compared to manual operation is evident through the following points:

**Process efficiency:**

* **Reduced cycle time:** Automated operations save between 20% and 90% of the cycle times compared to manual operations, thus increasing production within a particular duration.

* **Improved material handling:** This results in about a 10%-60% decrease in the wastage of materials due to an automation system that handles materials better and faster.

* **Reduce human errors:** Automating repetitive tasks such as workstations can eliminate human errors from the process, saving companies over fifty percent of their workplace accidents.

RTUs play an important role in achieving an intelligent approach to data collection through their use, how they are implemented and programmed according to the designed scenario, and their results are summarized in several points:

* **Decentralized decision-making:** RTUs can develop simple controls, unlike traditional centralized systems. They receive data from sensors, interpret it in terms of pre-programmed rules, and react accordingly. This includes actions such as opening or closing valves without the need for frequent communication with central command. It facilitates fast response times and efficient control, especially for remote site systems.

* **Adaptability:** RTUs are programmed using different control algorithms to adapt to changing situations or processing conditions. This flexibility allows adjustments to be made to these tactics so that they can be executed optimally.

* **Bi-directional Communication:** RTUs allow bidirectional transmission between field sensors/operators and the home control room. The above scenario allows real-time monitoring of system feedback and parameters from the field.

* **Data collection:** Wide range of sensor integration: Different types of sensors can be used to connect to the RTU, and measure different variables such as temperature, pressure flow, etc...

* **Scalability:** RTUs are capable of being implemented in expansive regional networks, where they are accountable for the collection of data from a plethora of sensors spread across a vast territory. This helps in overseeing immense data and drawing better conclusions on a central point.

* **Standardized Protocols:** Most modern RTUs allow the use of certain standard protocols, like Modbus or IEC 61850. This way, the program can be integrated easily with various kinds of controls and SCADA software. Via this feature, the data can be collected and managed without much difficulty.

The GUI of the SCADA system, shown in Figure 9, provides other biochemical indicators in real-time. Furthermore, the GUI has simplified the calculation of the water flow rate, making it easier for operators to be immediately informed of important events, such as overflow or other important factors.
<figure><img src="image_7.png" /><figcaption>(a) Online communication between the PLC and PC system process</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>(b) Ladder program results for the proposed system</figcaption></figure>

**Figure 7. ON line results system**
<figure><img src="image_9.png" /><figcaption>**Figure 8.** GUI SCADA system for inlet wastewater process</figcaption></figure>

<table><caption>**Table 1.** Results of the biochemical change to the electrical signal</caption><thead><tr><td>Parameter</td><td>Standard Value</td><td>Electrical Signal</td></tr></thead><tbody><tr><td>Total suspended solids (TSS)</td><td>412 mg/L</td><td>4-20 mA, analog signal</td></tr><tr><td>Chemical oxygen demand (COD)</td><td>400 mg/L</td><td>0-20 mA, analog signal</td></tr><tr><td>Biochemical Oxygen Demand (BOD)</td><td>370 mg/L</td><td>0-10 V, analog signal</td></tr><tr><td>The potential of hydrogen (PH)</td><td>6 - 9</td><td>RTD, analog signal</td></tr><tr><td>Total Kjeldahl nitrogen (TKN)</td><td>40 mg/L</td><td>4-20 mA, analog signal</td></tr></tbody></table>

<figure><img src="image_10.png" /><figcaption>**Figure 9.** GUI SCADA for inlet wastewater curve biochemical with time process</figcaption></figure>

## 8. CONCLUSIONS

The use of PLC with SCADA to automate inlet wastewater treatment has many advantages over traditional manual methods, including increased efficiency and accuracy as the PLC ensures precise control of flow rates, chemical doses, and treatment times, resulting in improved treatment. Accurate It also improves data acquisition and monitoring as real-time data is acquired from sensors through continuous monitoring of inlet characteristics, allowing for proactive adjustments and optimal operation while enhancing safety and reliability by automating tasks to reduce human intervention. (PLCS7300) for control (monitoring and processing) achieves high performance and lower access time as the RTU suggests creating a larger smart control node that helps in collecting various data and sending it to the computer terminal through the use of communication networks and thus achieves other processors in the data center. The main one provides high accuracy in real-time and sends the data back to the subunits.

Future suggestions for this study are to use other types of Schneider PLC and to use machine learning programming to improve predictive maintenance in SCADA networks.

## REFERENCES

[1] Ali, Q.A., Alhares, H.S., Abd-almohi, H.H., M-Ridha, M. J., Mohammed, S.J., Jabbar, Z.H. (2024). Enhancing microbial desalination cell performance for water desalination and wastewater treatment: Experimental study and modelling of electrical energy production in open and closed-circuit modes. Journal of Chemical Technology & Biotechnology, 99(1): 294-306. https://doi.org/10.1002/jctb.7538

[2] Choudri, B.S., Al-Awadhi, T., Charabi, Y., Al-Nasiri, N. (2020). Wastewater treatment, reuse, and disposal-associated effects on environment and health. Water Environment Research, 92(10): 1595-1602.
https://doi.org/10.1002/wer.1406

[3] Hasan, M.S., Khandaker, S., Iqbal, M.S., Kabir, M.M. (2020). A real-time smart wastewater monitoring system using IoT: Perspective of Bangladesh. In 2020 2nd International Conference on Sustainable Technologies for Industry 4.0 (STI), Dhaka, Bangladesh, pp. 1-6.
https://doi.org/10.1109/STI50764.2020.9350459

[4] Arismendy, L., Cárdenas, C. a. M., Gómez, D.E., Maturana, A., Mejía, R., Quintero, G.M.C. (2020). Intelligent system for the predictive analysis of an industrial wastewater treatment process. Sustainability, 12(16): 6348. https://doi.org/10.3390/su12166348

[5] Hanon, W., Salman, M.A. (2024). Smart controller integrated with MQTT broker based on machine learning techniques. Journal Européen des Systèmes Automatisés, 57(1): 87-94. https://doi.org/10.18280/jesa.570109

[6] Chatterjee, P., Ghangrekar, M.M., Rao, S. (2016). Low efficiency of sewage treatment plants due to unskilled operations in India. Environmental Chemistry Letters, 14: 407-416. https://doi.org/10.1007/s10311-016-0551-9

[7] Adegbenjo, A.A., Onuiri, E.E., Kalesanwo, O.B., Agbaje, M.O., Abel, S.B., Fatade, O.B., Amusa, A.I., Umeaka, K.C., Ehioghae, E., Onamade, K.O. (2023). Design and analysis of an automated IoT system for data flow optimization in higher education institutions. Journal Européen des Systèmes Automatisés, 56(5): 889-897.
https://doi.org/10.18280/jesa.560520

[8] Khan, M.S.I., Rahman, A., Islam, S., Nasir, M.K., Band, S.S., Mosavi, A. (2021). IoT and wireless sensor networking-based effluent treatment plant monitoring system. Acta Polytechnica Hungarica, 18(10): 205-224.
https://doi.org/10.12700/aph.18.10.2021.10.11

[9] Mellado, J., Núñez, F. (2022). Design of an IoT-PLC: A containerized programmable logical controller for the industry 4.0. Journal of Industrial Information Integration, 25: 100250.
https://doi.org/10.1016/j.jii.2021.100250

[10] Hairul, Arifin, F., Wilza, R., Zakaria, Z., Kurniawan, K., Herlambang, Y.D. (2023). Automation of load electricity operating system using PLC (Programmable Logic Controller). International Journal of Research in Vocational Studies, 3(1): 76-81.
https://doi.org/10.53893/ijrvocas.v3i1.200

[11] Melo, J.J.R., Ishraque, M.F., Shafiullah, G.M., Shezan, S.A. (2023). Centralized monitoring of a cost efficient PLC-SCADA based islanded microgrid considering dispatch techniques. The Journal of Engineering, 2023(8): e12293. https://doi.org/10.1049/tje2.12293

[12] Włodarczak, S., Ochowiak, M., Doligalski, M., Kwapisz, B., Krupińska, A., Mrugalski, M., Matuszak, M. (2021). Flow rate control by means of flow meter and PLC controller. Sensors, 21(18): 6153.
https://doi.org/10.3390/s21186153

[13] Wang, H., Zhang, F. (2018). Monitoring system of sewage treatment based on PLC. Chemical Engineering Transactions, 66: 991-996.
https://doi.org/10.3303/CET1866166

[14] Zhang, W., Ma, F., Ren, M., Yang, F. (2021). Application with Internet of things technology in the municipal industrial wastewater treatment based on membrane bioreactor process. Applied Water Science, 11(3): 52. https://doi.org/10.1007/s13201-021-01375-8

[15] Salem, R.M., Saraya, M.S., Ali-Eldin, A.M. (2022). An industrial cloud-based IoT system for real-time

monitoring and controlling of wastewater. IEEE Access, 10: 6528-6540.
https://doi.org/10.1109/access.2022.3141977

[16] Morales, E.J.F., Lawagon, C.P. (2023). IoT-based real time pH monitoring of university of Mindanao's chemical laboratory wastewater. Engineering Innovations, 5: 29-37. https://doi.org/10.4028/p-zz302h

[17] Mohamed, A., Galgal, K., Mogili, U. (2023). Programmable logic controllers in flexible manufacturing system (FMS). AIP Conference Proceedings, 2917: 040003.
https://doi.org/10.1063/5.0175867

[18] Quan, Z., Yuan, X., Zhu, Y., Wang, Z. (2019). Real-time flow control system based on siemens PLC. In 2019 IEEE International Conference on Mechatronics and Automation (ICMA), Tianjin, China, pp. 1703-1708.
https://doi.org/10.1109/icma.2019.8816328

[19] Butuza, R., Naşcu, I., Giurgioiu, O., Crisan, R. (2014). Automation system based on SIMATIC S7 300 PLC, for a hydro power plant. In IEEE International Conference on Automation, Quality and Testing, Robotics, Cluj-Napoca, Romania, pp. 1-6.
https://doi.org/10.1109/aqtr.2014.6857859

[20] Pliatsios, D., Sarigiannidis, P., Lagkas, T., Sarigiannidis, A. (2020). A survey on SCADA systems: Secure protocols, incidents, threats and Tactics. IEEE Communications Surveys and Tutorials, 22(3): 1942-1976. https://doi.org/10.1109/comst.2020.2987688

[21] Cheng, G., Lin, Y., Abur, A., Gómez-Expósito, A., Wu, W. (2024). A survey of power system state estimation using multiple data sources: PMUs, SCADA, AMI, and beyond. IEEE Transactions on Smart Grid, 15(1): 1129-1151. https://doi.org/10.1109/tsg.2023.3286401

[22] Tofani, K.M., Permana, P.a.G., Harsono, B.B.S., Jintaka, D.R., Mangunnkusumo, K.G.H. (2020b). SCADA system implementation for small system electricity. In 2nd International Conference on Industrial Electrical and Electronics (ICIEE), Lombok, Indonesia, pp. 57-61.
https://doi.org/10.1109/iciee49813.2020.9277497

[23] Gao, J., Zhuang, W., Li, M., Shen, X., Li, X. (2021). MAC for machine-type communications in industrial IoT—Part I: Protocol design and analysis. IEEE Internet of Things Journal, 8(12): 9945-9957.
https://doi.org/10.1109/jiot.2021.3051181

## NOMENCLATURE

TCP Transmission Control Protocol

IP Internet Protocol

I Digital Input PLC

Q Digital Output PLC

MB Memory Internal (Byte) in PLC

MD Memory Internal (Double) in PLC

IW Analog Input PLC

## APPENDIX

The characteristics and details of PLC data storage use in the inlet parameters system are noted in Figure A1. Figure A2 shows the educational symbols for the basic ladder algorithm that allow researchers to learn it through these symbols.
<table><caption>Figure A1. The details of PLC data storage</caption><thead><tr><th colspan="11">Resources of inlet</th></tr><tr><th>Objects</th><th>Load memory</th><th>Work memory</th><th>Retain memory</th><th>I/O</th><th>DI</th><th>DO</th><th>AI</th><th>AQ</th></tr><tr><th></th><th>7%</th><th>1%</th><th>0%</th><th></th><th>25%</th><th>13%</th><th>10%</th><th>0%</th></tr></thead><tbody><tr><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>3</td><td>Total:</td><td>not specified</td><td>196608 bytes</td><td>65536 bytes</td><td>Configured:</td><td>24</td><td>16</td><td>21</td><td>18</td></tr><tr><td>4</td><td>Used:</td><td>2506 bytes</td><td>2130 bytes</td><td>46 bytes</td><td>Used:</td><td>6</td><td>2</td><td>2</td><td>0</td></tr><tr><td>5</td><td>Details</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>6 ▼ OB</td><td></td><td>2074 bytes</td><td>1840 bytes</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>7 ☞ Main [DB1]</td><td></td><td>2074 bytes</td><td>1840 bytes</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>8 ▼ FC</td><td></td><td>330 bytes</td><td>244 bytes</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>9 ☞ SCALE [FC105]</td><td></td><td>330 bytes</td><td>244 bytes</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>10 FB</td><td></td><td>-</td><td>-</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>11 ▼ DB</td><td></td><td>102 bytes</td><td>46 bytes</td><td>46 bytes</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>12 ☞ IEC_Counter_o_DB [DB1]</td><td></td><td>102 bytes</td><td>46 bytes</td><td>46 bytes</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>13 Objects for Motion Technology</td><td></td><td>-</td><td>-</td><td>0 bytes</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>14 Data types</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>15 PLC tags</td><td></td><td>-</td><td></td><td>0 bytes</td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

<figure><img src="image_11.png" /><figcaption>Figure A2. Symbols ladder logic diagrams for learning PLC programming</figcaption></figure>