[Abstract] This paper mainly describes the principle and method of PLC-based automatic control in the lime digestion section of an aluminum plant. The main contents include: upper-level computer configuration, lower-level computer configuration, and electrical control system. This paper provides a currently popular solution for factory automation control, achieving not only automatic control of the equipment but also the required control precision while ensuring reliable equipment operation.
Keywords: Factory automation, electrical control, configuration, PLC
Chapter 1 Introduction
1.1 The Proposal and Significance of the Research
We were commissioned by an alumina plant to develop an automated control system for its lime digestion section. The requirement was to achieve automated control of the production process using the most minimal hardware resources. Upon completion, the system will provide reliable control of the controlled equipment in the section, monitor the status of various analog quantities, record in real-time operator actions on critical controlled equipment from the host computer, record alarm information from the controlled equipment, and provide effective prompts to the operator.
1.2 Determination of Control Scheme
Industrial control automation technology is a comprehensive technology that uses control theory, instrumentation, computers and other information technologies to detect, control, optimize, schedule, manage and make decisions in industrial production processes, thereby increasing output, improving quality, reducing consumption and ensuring safety. It mainly includes three parts: industrial automation software, hardware and systems.
Industrial control automation mainly comprises three levels, from bottom to top: basic automation, process automation, and management automation, with basic automation and process automation being the core.
(1). Low-cost industrial control automation based on industrial PCs
In my country, small and medium-sized enterprises and near-large enterprises are still pursuing the path of low-cost industrial control automation.
(2). PLC-based industrial control automation
PLCs are characterized by their versatility, ease of use, wide adaptability, high reliability, strong anti-interference ability, and simple programming. Their role in industrial automation control, especially in sequential control, is irreplaceable in the foreseeable future. Currently, PLCs are developing towards miniaturization, networking, PC integration, and openness.
(3). Industrial control automation based on DCS
DCS (Distributed Control System) is a comprehensive control system that has emerged with the rise of automation in modern large-scale industrial production and the increasing complexity of process control requirements. It is a product of the combination of computer technology, system control technology, network communication technology, and multimedia technology, providing a user-friendly human-machine interface and powerful communication functions. It is a modern device for completing process control and management.
(4) Industrial control systems are developing towards fieldbus (FCS).
Fieldbus Control Systems (FCS) can completely distribute PID control to field devices. Utilizing fieldbus technology to construct low-cost fieldbus control systems promotes the intelligence of field instruments, the decentralization of control functions, and the openness of control systems, aligning with the technological development trends of industrial control systems.
PLCs have many unique characteristics, as described below:
1) Stable operation and high reliability. Extensive anti-interference measures have been implemented in both hardware and software, resulting in a mean time between failures (MTBF) of over 300,000 hours and a long service life for the PLC.
2) Strong control functions. PLCs can realize sequential control, logic control, position control, and process control, etc.
3) Simple programming and easy to use. PLCs use ladder diagram programming, which is similar to relay circuits, making them intuitive, easy to understand and program.
4) Suitable for harsh industrial environments, with strong anti-interference capabilities. The PLC has undergone extensive hardware and software improvements to enhance its reliability. These measures include: (a) shielding, filtering, power supply regulation and protection, isolation, and the adoption of a modular structure. (b) fault detection, information protection and recovery, the implementation of a warning clock (WDT), enhanced program inspection and verification, and battery backup for the program and dynamic data.
5) It has complete functions, various interfaces, and is very convenient to connect with external devices. It is also flexible in combination and easy to expand.
Taking into account the scale of control, the required control accuracy, and the actual site conditions of the lime digestion section, it was decided to use a PLC as the basic framework for the automatic control system of this section. The selected PLC model is SIEMENS S7-300, the host computer configuration is WinCC6.0, and the PLC programming software is Step7 V5.3.
Chapter Two System Overview
2.1 System Functions
The HMI serves as the interface between the control system and the operator. From the host computer, it can command the PLC to perform desired functions, such as controlling the start and stop of motors and monitoring special functional components, like the quantitative feeder for the specific section, all from the host computer's configuration screen. The configuration screen also includes an alarm screen, displaying alarm information for various analog quantities in the section. It can also display all valid operations performed by the operator on the controlled equipment after logging in. The variable profile screen displays process values for various quantities over a certain period (e.g., one week), which can be used to calculate total production. The user login option sets the user's operating permissions after login. Generally, users only have permission to browse the production process of the section and cannot perform any valid operations on the controlled equipment, such as starting and stopping motors. System operators have all permissions granted by the system and can perform any valid operations on the controlled equipment. Analog quantity trends are used for real-time monitoring of analog quantities, achieving the control precision required by the production process.
2.2 System Composition
The entire system consists of a host computer, a slave computer, and a control circuit.
The host computer is configured using WinCC 6.0 and communicates with the slave computer via CP5611 using MPI. It is an operation platform that is directly visible to the user. The user's operations on the host computer will be transmitted to the slave computer in real time and effectively recorded on the host computer.
The lower-level computer, as the core part of this system, adopts the SIEMENS S7-300 architecture and uses ladder diagram language to program the PLC. It realizes the control objectives required on site, collects data from the field and processes it accordingly, and communicates with the upper-level computer in real time to exchange data.
The control circuit is a crucial component of a PLC for data acquisition and control functions. This part primarily includes relay circuits and input/output control circuits.
It is placed in the control cabinet along with the PLC.
2.3 Control System Operation Procedures
2.3.1 Start the host monitoring computer
1. Turn on the UPS power switch;
2. Turn on the power switch of the host computer, and the host computer will start automatically;
3. After the operating system login screen appears, the system will prompt "Please enter a valid username and password". Enter the username you have already created in the "Username" field and the corresponding password in the "Password" field. Then click the "OK" button, and the system will enter the desktop.
2.3.2 Starting the WinCC 6.0 Human-Machine Interface
After the computer starts up, double-click the WinCC system icon on the desktop to start the system automatically. If this is the first time starting the system, the WinCC HMI will open. In this case, click the black arrow in the toolbar at the top of the interface to run the program. After the program starts, you will enter the main control screen of the lime digestion section, as shown in Figure 1 below:
Overall, the layout of the workshop screen can be divided into three main parts. The top row of buttons are system function buttons. Clicking one of them can switch between different function screens and perform operations such as user login and logout. The specific functions and operations of each part will be described in detail in Chapter 4, Upper Computer Configuration.
2.3.3 User Login and Logout
After entering the main screen of the lime digestion chamber, click "User Login/Change User" in the system function buttons at the top of the window to log in. If a user is not logged in, they can only view the main data of the monitoring system, but cannot perform any effective operations on the monitoring system.
Left-clicking "User Login/Change User" will bring up the dialog box shown in Figure 2 below.
After entering the corresponding username and password, click the "OK" button to complete the user login process. To change the operator, repeat the above steps.
Note: After logging in and completing all control operations, the operator must click the "User Login/Change User" button at the top of the operation window again, and select "Logout" in the pop-up login dialog box to log out. Otherwise, if the operator leaves, any unauthorized personnel will still be able to perform control operations, which is not allowed by the system control.
2.3.4 Exit the system
When the system is running normally, for system reliability reasons, many shortcut keys in the Windows operating system are disabled. The system has a dedicated button for exiting the system. When you need to shut down the control system for maintenance of the control system or equipment, left-click the "Exit Login" button, and a dialog box as shown in Figure 3 will pop up:
Clicking the "OK" button will exit the control system; clicking the "Cancel" button will return you to the corresponding screen.
Note: The system must not be exited arbitrarily during normal operation. If it is necessary to exit the system for some reason, the equipment controlled by the analog signal output by the PLC (usually a 4-20 mA signal) (such as a solenoid regulating valve) must be switched to manual mode first.
2.4 System Design and Development Work
This paper, after consulting a large number of domestic and international technical documents, solved many technical problems during the design and development process of the project. The work done and the main problems solved are as follows:
1) Through thorough on-site investigation, gain a deep and detailed understanding of the actual application of the controlled equipment, the workers' production habits, and the on-site working environment, determine the solution and technical route of the control system based on the current status of industrial automation and the main solutions.
2) Lower-level machine configuration. Using ladder diagrams in the PLC, real-time control of the controlled equipment and acquisition of its status data can be achieved.
3) Host Computer Configuration. The host computer's operating platform uses Microsoft's Windows 2000 Server operating system. The host computer's configuration is implemented using WinCC 6.0, including real-time communication between the host and slave computers, and the configuration of the system's main control screen.
4) Electrical control system: including PLC power supply system and relay circuits connected to field equipment.
Chapter 3 Lower-level computer system
3.1 Hardware System of the Lower-Level Machine
3.1.1 Hardware system configuration of the lower-level machine
The lime digestion section has 80 digital inputs, 40 digital outputs, 8 analog inputs, and 2 analog outputs. Considering a certain margin, it was decided to use an S7-300 series PLC to build the control system. The specific hardware resource allocation is shown in Table 1 below:
Table 1 Hardware Resources of PLC Station
Following the steps outlined above, other modules are added, resulting in the final hardware system configuration of the lower-level machine, as shown in Table 2 below:
Table 2 Hardware configuration result diagram
3.1.2 Brief Description of the Working Principle of Programmable Logic Controller (PLC)
The PLC uses a cyclic scanning mode, meaning the user program is executed in the sequence shown in Figure 4:
There are two scanning methods for PLCs:
Network scanning method: The PLC's user memory is represented by a network, which is divided into many networks in sequence. Each network consists of X rows and Y columns. When the PLC is working, it scans the networks in sequence, first scanning network 1, then network 2, and so on, until all networks are scanned, thus completing one scan cycle. Then it returns to network 1 to start a new scan cycle.
Row-by-row scanning: The PLC first scans the first row, then the second row, and so on, completing one scan cycle after scanning all rows. It then returns to the first row to begin a new scan cycle. During the scanning of each row, program execution proceeds from left to right. Therefore, within a scan cycle, the execution result of a certain logical row affects the operations of subsequent logical rows, but has no effect on the operations of previous logical rows; the effect only applies to the preceding logical rows in the next scan cycle. The following diagram shows the PLC initialization workflow (Figure 5):
3.2 Software System of the Lower-Level Machine
The PLC program is the core program of the entire control system. Its main functions include: collecting digital status information from the input template to monitor the status of the equipment; driving the equipment to process according to the workpiece program input by the user; receiving control commands issued by the user from the button station and driving the equipment to execute the specified actions; and sending out fault information according to the faults generated by the equipment.
3.2.1 Step 7 Introduction
The PLC program for this control system is written using ladder logic in the Step7 V5.3 environment, which allows for easy utilization of all the functions of the S7-300. Step7 includes all the functions required for each stage of an automation project, from project initiation, implementation to testing and service. It includes powerful tools suitable for various automation projects.
3.2.2 Lower-level software design
The specific steps for designing the lower-level machine software are as follows:
The software system consists of one OB module, three data blocks (DB4, DB6, DB14), and six functional modules (FC1-FC6). The main program code and detailed explanations are given below, and the source code is shown in Figures 6 to 9:
1) Analog signal conversion
The sensors on site convert the actual analog values into 4-20mA signals, while the AI (16-bit) module converts these signals into an internal code number (0-27648) via an A/D converter. The PLC reads only this internal code value, requiring programming to convert it into an actual value for display on the host computer. The formula is as follows:
Actual value = × (Actual value upper limit - Actual value lower limit) + Actual value lower limit
Ladder diagram programming is shown in Figure 10:
2) Digital quantity processing
Digital signal processing includes both input and output. In this project, the digital inputs of each remote RIO station are stored in different database blocks: RIO1 has 48 points stored in DB4; RIO2 has 96 points stored in DB3; RIO3 has 32 points stored in DB5; and RIO4 has 64 points stored in DB7. Digital outputs are directly generated through PLC programming.
1) Create a digital DB block and define the data attribute as BOOL.
2) Create a function block FC that reads peripheral port data and stores it in the corresponding DB (taking DB3 as an example) block.
The system handles motor start/stop operations, analog-to-digital conversion of analog signals, alarm control and automatic processing, and communication with the host computer. The following section focuses on the lime digestion process. A detailed description of the motor start/stop program is provided below:
In the third program segment of OB module source code 01, the motor must meet 6 conditions to start, namely...
Two digital inputs, I0.6 and I1.0, are required. The two internal M bits of the PLC must be set. M20.1 corresponds to the start button on the host computer's WinCC configuration screen. When the start button is pressed, M20.1 connected to the PLC is set. M30.0 is a pre-signal; it is set when the motor control box is switched to manual mode and the air switch is closed. When the operator presses the motor start button, the relay contacts close, introducing 220V voltage. The motor circuit starts; after starting, pressing the stop button again clears M20.0, so Q0.1 outputs zero, the relay contacts open, cutting off the 220V power supply, and the motor stops.
Chapter 4 Configuration of the Host Computer
4.1 The host computer's configuration software is WinCC 6.0.
SIEMENS WinCC 6.0 is a brand new version of Siemens' supervisory control and data acquisition (SCADA) software. It not only inherits the advanced technologies of previous versions such as SCADA, configuration, scripting language and OPC, but also inherits the advanced technology and seamless connectivity features of Siemens' fully integrated automation products.
As a crucial component of the SIMATIC Totally Integrated Automation system, WinCC ensures convenient, rapid, and efficient connection with SIMATIC S5, S7, and 505 series PLCs. The tight integration of WinCC with Step 7 programming software shortens project development cycles. Furthermore, WinCC offers system diagnostics for SIMATIC PLCs, facilitating hardware maintenance.
4.2 Main configuration screens and operations
4.2.1 Main screen and operation
The main screen, as shown in Figure 11, displays a simplified process flow diagram for this section and serves as the system's primary operating area. During normal operation, operators use this area to monitor and control the workshop's operation. The conveyor belts and the agitator in the lime slurry tank are animated to display their running status; if the agitator is running, its image will flash. Additionally, the conveyor belts, plow-type electric unloaders, lime sintering machines, sewage pumps, and dust collector motors are all operable components. The background color of the text labels for these operable components indicates their operating status: yellow for stopped and green for running. Clicking on a text label will bring up a corresponding movable operation window, allowing users to operate the corresponding component.
Left-clicking on the text of each controlled device will bring up the control interface for all controlled devices in that section, as shown in Figure 12 below:
The following describes how to operate a specific device. For example, clicking on the text "17# Belt" will bring up the following operation window, as shown in Figure 13:
Status bar: Displays the window name and whether the window is selected. When the window is selected, it displays a dark blue background; otherwise, it is gray. Clicking the "×" on the right side of the status bar will close the window.
Automatic/Distributed Status Display: Displays the operating status of belt #17, which is consistent with the status of the machine-side control box and is inoperable. "Distributed" indicates local manual control, and "Automatic" indicates remote automatic control.
Working status display: Displays the working status of belt #17, with red indicating stop and green indicating operation.
Operating Buttons: With the control box set to "Automatic," these three operating buttons control the belt's operation. When the switch on the control box is in "Dispersed," all three buttons are dark and inoperable. If the switch is switched from "Dispersed" to "Automatic," the "Pre-announcement" button will change from dark to black, becoming operable. Left-clicking the "Pre-announcement" button will ring the electric bell next to the belt, and both the "Start" and "Stop" buttons will become operable. Clicking the "Start" button will start the belt and stop the electric bell. The "Start" button is only operable when the "Pre-announcement" button is pressed. If the electric bell has already rung or the belt has started, clicking the "Stop" button will stop either the bell or the belt.
In addition to these switching components, the screen also displays some analog quantities that need to be observed or controlled: the liquid level in the hot water tank, the liquid level in the lime slurry tank, the material level in the lime silo, and the flow rate of hot water flowing into the lime slaking machine. The liquid or material levels in the hot water tank, lime slurry tank, and lime silo are displayed intuitively with bar graphs and precise numerical values, as shown in Figure 14 below:
The flow rates of hot water flowing into ash-making machines #1 and #2 are two controllable analog quantities in this section. The flow rate can be controlled by adjusting the rolling bar of the corresponding pneumatic regulating valve. In actual operation, the flow rate can be adjusted by combining the flow rate display and valve opening display on the screen, as shown in Figure 15.
At the bottom of the workshop screen is a row of control buttons. Clicking any of them will bring up the corresponding operation window, the content of which is similar to that of the operation window for belt conveyor #17, so it will not be described again here.
4.2.2 Analog Quantity Trend Screen
Clicking the "Reports and Trend Display" button at the top of the main screen will switch to the analog quantity trend chart (Figure 17). The analog quantity trend mainly includes two types: real-time trend and historical record. It is displayed in real-time as an archive of the measured analog quantity values in the form of a trend chart. Analog quantity data is archived every 500 milliseconds, with a maximum of one thousand archives. When the archive limit is reached, the newest archived value overwrites the oldest archived value.
The screen displays five analog trend windows, each showing archived data for nine analog quantities. At the top of each window is a status bar displaying the curve's name. The status bar is dark blue when selected and gray otherwise. Below the status bar is the toolbar.
Introducing the toolbar icon functionality:
1. Function Introduction
Clicking the icon displays a vertical ruler. Below the trend window, in addition to the archive and variable names, the X and Y coordinates of the measured values are displayed. The X coordinate is the time coordinate, and the Y coordinate is the measured value coordinate. While holding down the left mouse button, point the mouse pointer at the ruler and move the pointer to the desired position to determine its measured value.
2. Trends moving forward and backward
The icon selects the next trend after the current trend. Whether in a trend chart or a history chart, the first chart will be used as the current chart. This chart cannot be hidden. Clicking the icon will cause the curves in the real-time trend (history) chart to cycle to the left, with the current chart becoming the last one, the second becoming the first, and so on. Conversely, clicking the icon will cause the curves in the real-time trend (history) chart to cycle to the right, with the last becoming the first, and the first becoming the second.
3.
This button operation corresponds to the property of the reproduction trend control in the configuration system. Clicking this button will open the operation dialog box.
4. Display and stop trend charts
Click the icon to start displaying the trend. In the trend window, you can see the curve constantly changing. When you click again, the trend display stops, but sampling continues, and the data is saved to the clipboard. When you click again, the data from the clipboard is automatically filled into the trend curve, ensuring the integrity of the trend chart. Below the toolbar is the trend coordinate graph, displaying the simulated volume trend over 10 minutes.
4.2.3 Alarm Screen
Clicking the "Alarm Record" button at the top of the main screen of the lime digestion section will switch to the alarm record screen as shown in Figure 4.9. The alarm record screen displays the data and corresponding descriptions of alarm occurrences, enabling the archiving of alarm information for all analog and digital quantities in the process. This system can archive alarms occurring within a month; alarms generated after one month will overwrite the oldest archived ones. Alarm information can also be stored in a corresponding location on the hard drive for future reference. After entering the alarm screen, clicking will automatically switch to the screen displaying the current alarm.
The alarm screen displays which device malfunctioned, the time of the malfunction, and the duration of the malfunction, and provides effective prompts, such as red text when there is an alarm message and green text when the alarm is cleared.
There are 18 buttons on the toolbar of the alarm screen, of which the first three are the most important. When the alarm screen is opened, it displays the current alarm information. To view the alarm information for the past week, left-click the second button; to view the alarm information for the past month, left-click the third button. The alarm screen can display a maximum of 1000 alarm messages. If there are more than 1000, the newest alarm message will overwrite the first one.
4.2.4 Reporting System
The reporting system configured on WinCC is used for tasks such as production output statistics and equipment safe operating time statistics. Its formats are flexible and diverse, including both system-provided formats and user-defined formats.
The reporting system is configured in the report editor. After configuring a reporting system, corresponding settings need to be made. For example, printer settings include setting the printing time, paper type, and print size.
After completing the necessary settings, you must also select the report system in the "Run System" menu of your computer, as WinCC does not load the report printing function by default. Once these steps are completed, the report printing function will be loaded the next time you start the system. At this point, simply connect a printer, and the system will complete the print job according to the preset settings.
4.2.5 Equipment control and status display
After completing all the labels, they need to be linked to the screen to ensure they are displayed correctly. Open the screen in the "Graphics Editor." Analog data is typically displayed in the input/output fields or on bar graphs. Device status is indicated by color changes. Device control is divided into automatic control and manual control via a host computer. Manual control via a host computer can be achieved using buttons on the computer.
1. Analog display
Analog data is transmitted to the computer via PROFIBUS fieldbus. In the properties of the input/output field, select the input/output value as a variable connection, select the corresponding label as the variable, set the field type to output, and after the connection is completed, the data can be read from the PLC. Figure 18 below shows the input/output field properties for dissolved oxygen reading.
1. Digital signal reading
Reading digital data is similar to reading analog data. Digital data typically represents the device's status. A standard object, such as a circle, is inserted into the screen. The circle's properties are set, and color changes are used to display the device status. A dynamic dialog box connects the corresponding labels and colors.
2. Digital output
Remote manual control of the device is also achieved by connecting buttons to labels. In the button's properties, select "Release Left Mouse Button" under "Events" and compile the C action as follows to control the device's start and stop.
#include "apdefap.h"
void OnLButtonUp(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y)
{SetTagBit("1#qianshuibengstart",1);
SetTagBit("1#qianshuibengstop",0);
END
}
Chapter Five: Conclusion
The system studied in this project is a comprehensive and complete measurement and control system that integrates modern information technologies such as communication, PLC, computers, intelligent detection, and automation. It performs real-time detection of important equipment information (such as flow rate and temperature) and equipment status monitoring, realizing digital informatization and automated monitoring of factory equipment management, and solving the problem of effectively monitoring various controlled equipment in the factory. Through the design of this project, we have gained a deeper understanding and research into the composition of control systems and the implementation of control algorithms. We have also gained a more comprehensive understanding and knowledge of our professional field. In the 21st century, with the rapid development of information technology, industrial automation systems are evolving towards simplicity, reliability, and cost-effectiveness, and are becoming increasingly integrated with network applications. It is believed that more powerful, reliable, and cost-effective control systems will be applied in the industrial control field in the near future.