Master-slave control system design for feed production equipment
2026-04-06 05:03:07··#1
Abstract: This paper designs a master-slave control system for feed production equipment, which consists of an industrial control computer and a PLC. The paper details the working principle of the system and explains its overall structure, hardware configuration, and software functions. Actual operation shows that the system has a good human-machine interface, stable operation, and high reliability. Keywords: Industrial control computer; PLC; Master-slave control; Feed 1. Introduction to Feed Production Process The feed production process is as follows: 1. Raw material crushing. According to the feed formula, the constituent raw materials are crushed, and the crushed materials are sent to the respective storage bins by elevators for later use. 2. Feed formulation. Each storage silo has a screw feeder underneath. The screw feeders are activated sequentially to feed raw materials from the storage silos into the weighing silo. Simultaneously, the weighing instrument continuously monitors the amount of a certain raw material fed in. Once the required weight of a certain raw material is reached according to the formula, another feeder is switched on. This continues until all raw materials are added to the weighing silo in the correct proportions. The weighing silo door is opened, and the raw materials are fed into the buffer silo. A prompt to add trace elements is displayed. The empty weighing silo door is closed, and the next round of batching can begin. 3. Raw material mixing and stirring. At this point, the scraper conveyor and elevator begin to lift the raw materials with added trace elements to the high mixing silo for mixing. Various oil-based raw materials are added to the mixing silo simultaneously. Mixing is performed for a specified time according to regulations. After mixing, the finished feed is produced. The mixing machine silo door is opened, and the finished feed is sent into the finished product silo. 4. Finished feed weighing and packaging. Below the finished product silo is a weighing and packaging machine. After quantitative packaging, the feed is ready for warehousing. Under the control of the control system, the four processes proceed strictly in logical order. Before the next process is completed, the preceding process waits. Each process also requires logical control based on the set running time, pulse quantity, or silo door position. Therefore, the control system needs multiple inputs to understand the progress of each process and multiple outputs to turn a device on or off. 2. Hardware Composition of the Master-Slave Control System From the above process flow, it can be seen that the feed production control system consists of two parts: one is the input detection and output control of the field equipment; the other is formula management and production management. The control of the field equipment is implemented using a PLC, specifically the Siemens S7-200 series CPU224 [1-2]. Formula and production management are implemented using a PC; considering the numerous interference factors in the production site, an industrial control computer is specifically used. The weight of the feed is collected by a separate weighing instrument. The weighing instrument communicates with the host computer via serial port, and the host computer reads the current value of the weighing instrument during a 0.1-second timer interrupt. The hardware composition of the control system is shown in Figure 1. [align=center]Figure 1. Hardware Composition of the Control System[/align] 3. Software Design of the Master-Slave Control System In the master-slave control system, the functions of the host computer, i.e., the industrial control computer, are implemented using high-level programming languages. It has a good human-machine interface and can animate the equipment operation process during production. Its functions include recipe management and production management. It is a system combining real-time control and a small database. In the recipe management function, users can create, add, and delete recipes, query and browse recipes in various ways, and print out recipes. In the recipe, the names and proportions of each component raw material can be entered. The production management function includes equipment detection, real-time production control, production statistics, and report output. The equipment detection function communicates with the PLC, issues commands to a specific device, and then reads the input signals fed back by the PLC to determine the device's integrity. Before each formal production run, the equipment must be tested. If all equipment is in good condition, production can proceed; otherwise, an alarm signal is output, indicating the name of the faulty equipment. During production, the system continuously checks the PLC's return signals to determine if any equipment malfunctions and issues alarm signals accordingly. Production control is a real-time and crucial function. Before the equipment starts operating, the user must first select the formula, set the production batch size, and the location of various raw materials in their storage bins. These values are stored in the database as production parameters. Based on the user-selected formula, the system reads the weights of various raw materials from the database into memory. After verifying that the equipment is in good working order, production can begin. The production control flowchart of the industrial control computer is shown in Figure 2. [align=center] Figure 2. Production Control Flowchart of the Industrial Control Computer[/align] The production statistics and report output functions are used to generate and print various production statistics reports. The lower-level PLC receives control commands through communication with the upper-level computer and performs logical judgments according to the input signals from the field equipment, based on the logical requirements of the process, to achieve the on/off control of the equipment. Due to space limitations, the PLC control flowchart is not provided here. 4. Communication Implementation The industrial control computer and the PLC use serial communication. The serial communication protocol of the industrial control computer is RS-232, and the serial communication protocol of the S7-200 is RS-485. Protocol conversion is required. Siemens cable with protocol conversion is used for direct connection. Since RS-485 in S7-200 is half-duplex, the communication method is determined as follows: communication is always initiated by the industrial control computer. The content is either reading the equipment input signal detected by the PLC or issuing control equipment commands. The PLC must respond when it receives the information. The response content is always the current equipment input signal. A timer with a time interval of 0.1 seconds is set in the industrial control computer program. Timed communication with the PLC is realized in the timer interrupt [3]. The communication between the industrial control computer and the weighing instrument uses RS-232 protocol. No conversion is required. The two are directly connected. According to the communication format of the weighing instrument, the industrial control computer reads the current value of the weighing instrument in the timer interrupt with a time interval of 0.1 seconds. The weighing instrument receives the reading command and returns the current weighing value. 5. Conclusion This paper, considering the characteristics of feed production systems, adopts a master-slave control method. The control system consists of an industrial computer and a PLC. The industrial computer can display the equipment operation process during production with animation, complete formula management and production management, and has a good human-machine interface. The lower-level PLC realizes the detection of equipment input signals and the output control of equipment, making full use of the high anti-interference capability of the PLC. The upper-level computer and the lower-level computer communicate via serial port. The entire system has a simple structure and stable operation. References: 1. Yang Weiming, Xu Pingping, Chen Jianxin. Application of PLC in batching and weighing control system. Microcomputer Information (Measurement and Control Automation), 2005, No. 2, pp. 9-10. 2. Siemens (China) Co., Ltd. Automation and Drives Group. Siemens S7-200 PLC Explained. Beijing: Beijing University of Aeronautics and Astronautics Press, 2003.12. 3. Zhang Yang, Cheng Hong, Meng Mei, et al. Design and implementation of communication between S7-200 programmable controller and microcomputer. Microcomputer Information (Measurement and Control Automation), No. 8, 2004, pp. 13-14.