0 Introduction
Yogurt production is a pressure, temperature, and liquid level control system with a fermentation tank as the main reactor. The specific process involves adding fresh raw milk and starter culture (lactic acid bacteria) to a mixing tank, controlling the amount of raw materials injected by monitoring the liquid level in the mixing tank, and then injecting the mixture into the fermentation tank after thorough mixing. The temperature of the fermentation tank is strictly controlled by monitoring, and the finished yogurt is obtained after fermentation is completed.
With its significant advantages such as reliable operation, convenient use and maintenance, strong anti-interference ability, and suitability for new high-speed network structure, PLC control system is usually used in small industrial control systems and mechanical equipment to realize sequential control and transmission control and ensure production efficiency. In order to improve the economy, reliability and maintainability of yogurt production system, yogurt production system tends to use advanced, practical and reliable PLC for control. At the same time, a human-machine interface (HMI) is designed on the host computer using the configuration software "KingSCADA" of Asia Control Company. It communicates with the programmable controller through RS485 to monitor the control system in a comprehensive manner, so as to make the user operation more convenient. The overall technical route includes: hardware design, software programming and configuration design [1].
1. PLC selection and I/O allocation[2]
1.1 System Control Requirements
Yogurt production control methods are mainly divided into several forms, including relay control systems, DDC (Direct Digital Controller) control systems, and PLC control systems. Traditional relay control systems for yogurt production control suffer from significant drawbacks due to numerous mechanical contact points, resulting in complex wiring, inconvenient parameter adjustment, and high power consumption. Furthermore, the low operating frequency, high failure rate, susceptibility to damage, and poor reliability of these mechanical contact points have led to their gradual obsolescence. While DDC control systems can reduce wiring and improve reliability, their inherent limitations—poor anti-interference capabilities, difficulty in networking, low information integration, and hierarchical, step-by-step structure—make them increasingly unable to meet the complex and ever-changing requirements of intelligent control.
Using a PLC to control yogurt production not only allows for complex logic control through programming, but also greatly simplifies hardware wiring, improves control system reliability, provides a user-friendly interface, and offers high information integration, facilitating intelligent control. This yogurt production control system primarily controls the start and stop of two valves (original milk valve 1 and fermentation tank valve 2) and one pump (mixing pump) based on analog inputs of fermentation tank pressure, mixing tank level, and fermentation tank temperature.
The system control requirements are as follows:
1. The system can be started and stopped via a host computer HMI or on-site.
2. After the system is powered on, the original milk valve 1 opens. When the pressure in the fermentation agent tank is greater than 25 MPa, the fermentation agent valve 2 opens. At this time, the original milk and the fermentation agent are mixed in the mixing tank. When the liquid level in the mixing tank is greater than 5 m, the mixing pump is turned on (otherwise it is turned off).
3. Monitor the temperature of the fermenter. When the temperature is below 36 degrees Celsius, shut off the mixing pump.
Figure 1 System Design Block Diagram
1.2 Selection of PLC and Programming Software
The AC500-ECO PLC is manufactured by ABB (America's leading technology company). Due to its advanced technology, powerful functions, and reasonable price, the AC500-ECO PLC is widely used in industries such as metallurgy, petroleum, chemical, water conservancy, and power. The AC500-ECO PLC can meet the requirements of various small-scale control tasks: compact structure, strong expandability, simple application, flexible configuration, and convenient maintenance. Considering the limited number of I/O points in the yogurt production monitoring system, this paper selects the AC500-ECO PLC as the controller, and uses ABB's PS501 Control Builder as the programming software.
The AC500-ECO PLC has the following features:
1. Reliable CPU data backup, no battery required; 2. Integrated I/O on the CPU module, making I/O expansion easier; 3. Program capacity: 128KB, integrated data capacity: 10KB (ensuring reliable data); 4. High compatibility: all I/O modules can be freely connected; 5. I/O module terminals (spring and screw) are pluggable, simplifying wiring; 6. Same product platform as AC500, using the same programming software and tools; 7. The CPU unit supports two serial ports for programming and communication.
PS501 Control Builder is a programming tool for all CPUs in the AC500 series. It is a complete development environment for Programmable Logic Controllers (PLCs). It supports six PLC programming languages according to the IEC61131-3 standard: IL, ST, FBD, LD, CFC, and SFC. Users can choose different languages to edit subroutines, function modules, etc., within the same project. It features: 1. Configuration of the entire system (including fieldbus and communication interfaces); 2. Powerful diagnostic functions and alarm handling; 3. Integrated visualization and open software interfaces.
1.3 I/O Allocation and Selection
Table 1. I/O Allocation of Yogurt Production Control System
Table 2 IO Module Model Selection Table
In summary, the yogurt production monitoring system requires a total of 1 DI point, 3 DO points, and 3 AI points. The AC500-ECO PLC's CPU integrates 8DI+6DO, which can meet the system requirements, so no additional IO module is needed.
2. PLC Main Program Design
2.1 Hardware Configuration
Add the AI module via I/O BUS, as shown in the image below:
Figure 2 System I/O module configuration
2.2 I/O Address Mapping and Variable Declaration
PS501 Control Builder is a complete development system for logic controllers. It is easy to develop programs, has a development environment with a high-level language programming system, and allows setting modes for the operation and debugging functions of the editor.
In POUs, Main (PRG) is equivalent to the main assembly program. The system's required variables are defined in PROGRAM MAIN VAR and END_VAR, and the addresses of input/output terminals are set in the declaration statement section of the ABB PLC's language editor, which is equivalent to defining variables and their types. Variables typically include AI, AO, DI, and DO. DI and DO are of type BOOL; AI and AO are of type INT or REAL.
After configuring the PLC and setting up the corresponding hardware expansion modules, the next step is to program these modules. In programming, the addresses of the expansion modules are represented by dedicated definitions, using two methods:
Variable declaration:
Symbol AT %Array prefix Format Address: Datatype:= init.value;(*Comment*)
[1] Address information can be mapped in variable declarations, for example...
do1 AT %QX4000.0: BOOL; (*Writes do1 to the 0th bit of the 4000th byte*)
turn_on AT %IX4000.0: BOOL; (*Assigns the 0th bit of the 4000th byte to turn_on *)
[2] Direct representation. For example...
%IX4000.0:=TURE;
2.3 Control program writing [3]
The main function of the control system is to automatically start and stop the yogurt production system, display operating parameters such as pressure, liquid level, and temperature, and control the on/off switching of solenoid valves (original milk valve 1, fermentation tank valve 2) and pumps (mixing pump) to achieve control of the yogurt production system. Based on the main functions of the control system, and to increase program readability and reduce program code, the PLC program adopts a program structure of main program calling function blocks. Variables called by multiple function blocks are declared as global variables.
The main program variables are declared as follows:
PROGRAM PLC_PRG
VAR
start AT %IX4000.0: BOOL; (*Start switch*)
stop AT %IX4000.1: BOOL; (*Stop switch*)
output: BOOL; (*System startup status flags*)
value1 AT %QX4000.0: BOOL; (*Original Milk Valve 1*)
AI1 AT %IW0:WORD:=16#7530; (*Fermentation tank pressure*)
AI_yali_ins: AI_FB; (*Fermentation tank pressure analog input module*)
yali_val: REAL; (*Engineering pressure value of the fermentation tank*)
value2 AT %QX4000.1: BOOL; (*Fermentation agent valve 2*)
AI_yewei_ins: AI_FB; (*Mixing tank level*)
AI2 AT %IW1: WORD:=16#61A8; (*Mixing tank level*)
yewei: REAL; (*Engineering value of liquid level in mixing tank*)
beng AT %QX4000.2: BOOL; (*mixing pump*)
AI_wendu_ins: AI_FB; (*Fermentation tank temperature analog input module*)
AI3 AT %IW4: WORD:=16#7FF8; (*Fermentation tank temperature*)
wendu: REAL; (*Engineering temperature values for fermentation tanks*)
ok: BOOL;
END_VAR
The main program uses LD (ladder diagram) as the programming language for MAIN POUs. The main program is shown in the figure below:
Figure 3 System control main program
2.4 Writing Subroutines (Function Blocks)
Linear transformation of temperature, pressure, and liquid level [4]:
A linear parameter refers to a linear relationship between the primary instrument's measurement value and the AD conversion result, or in other words, the primary instrument has a linear scale. The scaling transformation formula is:
2.5 Compiling and Downloading the Program
A unified and well-planned layout of the PLC data storage area, flexibly and rationally allocating memory space for each part, is the foundation and guarantee of software design. It is also key to the entire PLC system's control functionality. Programming, modification, and debugging are all very convenient, greatly shortening debugging time, improving the system's automation level, and reducing hardware complexity. After the control program is written, it is compiled.
(1) Click “project”;
(2) Write the LD or FBD program;
(3) Click “rebuild all” to compile;
(4) If there are no syntax errors, otherwise modify according to the prompts. Click "online", select "communication parameter", and set the parameters as follows: Port: COM3; Baudrate: baud rate; Parity: parity check; Stop bits: stop bits; Motorola byteorder: Yes
(5) Click “Login” to download.
3.1 Communication Settings for KingSCADA
Create a new device in the COM1 device of KingSCADA, select MODBUS (RTU) serial, enter the logical name of the device, select COM1, and set the communication parameters as follows: baud rate 9600, no parity, data bits: 8, stop bits: 1.
3.2 I/O Variable Definitions in the Data Dictionary
Define the required monitoring variables in the data dictionary:
Figure 4 Configuration monitoring variable table
3.3 Design of the Configuration Screen
1. Create a new screen named "Yogurt Production Workshop". This screen represents the reaction workshop in the yogurt production process. The reaction workshop includes a raw material tank (containing raw milk), a starter culture tank, a mixing tank, a fermentation tank, a stirring motor, a pump, and several valves. The raw material tank is associated with its own pressure, the mixing tank with its own liquid level, the fermentation tank with its own temperature, and the motor switch is associated with the stirring motor switch.
2. In the "Reaction Workshop" screen, select four suitable reactors from the "Library" to serve as raw material tanks, inoculum tanks, mixing tanks, and fermentation tanks, respectively, and associate them with their own variables. Taking liquid level as an example, see the following figure:
Figure 5 Variable Association
To make the real-time values of each variable reflect the data intuitively, an animation link can be established. Taking liquid level as an example: select the text tool in the toolbox, write ### in the corresponding position, and link the variable display.
Note: Save the main screen. Go to "File" and select "Save All". To display the projection room image during runtime, before running, configure the main screen settings in "System Configuration" under "Set Running System" and set "Reaction Room" as the main screen. The running screen is as follows:
Figure 6 Main screen running effect
3. To visually reflect the changing trends of various variables, you can add real-time trend curves to the main screen from the "Toolbox" and associate them with the variables whose trends need to be displayed. Since several different screens will be created later, my project will include real-time alarm screens, yogurt recipe screens, trend screens, historical curves, XY control screens, real-time reports, and exit controls. To facilitate easy switching between these screens during runtime, new screens can be created and buttons added.
4. Establish a real-time alarm screen. When the values of certain quantities in the system exceed the specified limits, the system will automatically generate corresponding warning messages (flashing indicator lights or sounding an alarm), indicating that the value has exceeded the limit and alerting the operator. For easy viewing, recording, and differentiation, alarm messages generated by variables should be grouped into different groups, meaning the alarm messages of a variable belong to a specific alarm group. After defining alarms for the corresponding variables, pressure alarm signs, temperature alarm signs, and liquid level alarm signs also need to be created, laying the foundation for the association of buttons and alarm lights under the alarm window. When a new alarm is generated, an indicator light and an alarm sound are added to alert the operator. Suitable indicator lights are found from the library and alarm settings are configured. After an alarm occurs, the indicator light will flash continuously. An "Alarm Confirmation" button is added, and it is configured so that after pressing the "Alarm Confirmation" button, the indicator light will stop flashing for the next alarm.
Figure 7. Real-time alarm screen operation effect
Conclusion
This paper combines ABB AC500-ECO PLC and KingSCADA 6.5 for use in a yogurt production monitoring system, effectively improving the system's automation level, reliability, and communication capabilities. Practice shows that this solution has excellent application prospects and is highly valuable for widespread application.
References
[1] Lü Weiyang, Xu Changrong. PLC Engineering Application Examples Analysis [M]. Beijing: China Electric Power Press, 2007.
[2] He Yanqing, Huang Haiyan, Li Bing. Programmable Controller Principles and Application Techniques [M]. Beijing: Chemical Industry Press, 2010
[3] Yu Zhiqian. Design of a constant pressure water supply control system based on KingSCADA, PLC and frequency converter [J]. 2008
[4] Wang Shudong, Wang Hengxing, Gao Xuehong, He Wei. Application of ABB PLC and Zutaiwang 6.53 in wastewater treatment plants [J]. Electrical Automation, 2012, 04): 70-72.
[5] Su Yun, Pan Feng, Xiao Yingwang. Remote control system based on KingSCADA and PLC [J]. Industrial Instrumentation and Automation Devices, 2004, 02): 53-55.
[6] Su Yun, Pan Feng, Xiao Yingwang. Remote control system based on KingSCADA and PLC [J]. Electrical Automation, 2004, 06): 39-40.
[7] Yan Xin. Remote monitoring system implemented with KingSCADA and PLC [J]. Northeast Electric Power Technology, 2007, 03): 19-22.
Funding Project: 1. Key Project of the Education Department of Xinjiang Uygur Autonomous Region (No.: XJEDU2010T11)
About the author:
Zheng Jianjun (born April 1988), male, is a postgraduate student at the School of Electrical Engineering, Xinjiang University. His main research interests are detection technology and intelligent system development. Email: [email protected]
Chen Zhijun (born May 1967), male, professor, master's supervisor, School of Electrical Engineering, Xinjiang University. His main research areas are intelligent information processing and intelligent control and system development. (Email) [email protected]
Corresponding author: Zheng Jianjun
Telephone: 15809915306
Email: [email protected]
Mailing Address: 2011 Graduate Student, School of Electrical Engineering, South Campus, Xinjiang University, No. 62 Yan'an Road, Urumqi
Postal code: 830047