Abstract: The system uses DOP as the human-machine interface and S7 300-PLC to complete the process control. The process control program collects process variables in real time, sets them digitally, optimizes the controlled object, implements online control, and uses system function blocks to complete the constant temperature control of the washing water, ensuring the reliable operation of the washing machine control system.
Keywords: Human-machine interface, PLC , stem washing, process control
In tobacco product manufacturing, besides tobacco leaves which can be processed into shredded tobacco, a large amount of tobacco stems generated during processing can also be utilized. During stem processing, impurities need to be removed and the stems restored to their flexibility to facilitate slicing. This process requires rehydration of the stems. A water-tank type stem rehydration machine is a key piece of equipment on the stem processing line. It uses a circulating, constant-temperature water medium to purify the stems. The equipment mainly consists of four parts: a stem washing chamber, a piping system, a conveyor belt, and a moisture control system. The entire moisture control process is primarily controlled by water temperature, the residence time of the stems in the water, and the compressed air blowing volume to ensure the moisture content meets process requirements.
To meet the operational requirements of the equipment, we designed a PLC-based stem washing machine control system with a DOP (Digital Operator Interface) to ensure that the water content of the stem washing machine meets the process requirements. This system uses a DOP HMI as a touchscreen display and an S7-300 PLC as the control host to form the control system. The system can perform analog closed-loop control of water temperature, digital closed-loop control of water level, adjustable open-loop control of circulating water flow speed, and interlocking control of upstream and downstream water levels. The system operates stably with high control accuracy, meeting the system's process requirements.
1. Hardware Components of the Control System
The stem washing machine hardware system mainly consists of four parts. The first part is the human-machine interface (HMI). The system uses a Delta Electronics DOP-AE80THTD touchscreen. The AE80 touchscreen has 65,536 colors, a 32-bit RISC microprocessor, 32MB of memory, 512KB of power-off retention, and USB programming. It has three serial communication ports, with RS232, RS422, and RS485 interfaces available. Considering our direct communication with the S7-312C, we use the RS485 interface. The touchscreen handles system display and control, as well as adjusting system control parameters, displaying temperature trend graphs, and providing fault alarms. The second part, the process control section, uses an S7-312-5BOO-OABO PLC. It has 10 digital inputs and 10 digital outputs, sufficient for the system's digital requirements. In addition to the CPU312C, a 6ES7331-7KFO2-OABO analog input module needs to be configured via hardware. This is an 8-channel 12-bit analog A/D converter module. Its 12-bit control accuracy meets the system's requirements. The 8 inputs can be configured as 3 channels for temperature platinum resistance thermometers (PT100), and 0-10V voltage input for the frequency converter to input speed signals, which are then converted and displayed as water flow speed. A 6ES7332-5HB01-OABO analog output module is also included. This is a 4-channel 12-bit analog output module. One output is 4-20mA to control a pneumatic diaphragm regulating valve, controlling the water tank temperature by adjusting the valve opening. The third part consists of system input detectors. The digital inputs complete basic start/stop interlocking and water level control. Analog input temperature detection is achieved using a PT100 sensor to detect three temperature signals, enabling closed-loop control of the water tank temperature. One voltage input is fed into the inverter's output frequency, which is converted into a digital signal for the touchscreen to display the water flow rate. The fourth part is the actuator, which mainly controls the interlocking output signals between the upstream and downstream systems, and the start and stop of the water flow inverter. A water-filling solenoid valve controls the water level, and an inlet water heating solenoid valve controls the inlet water temperature. A thermally insulated pneumatic diaphragm regulating valve completes the constant temperature control of the water tank. See Figure 1 for the specific components.
2. Communication between DOP Touch Screen and Siemens PLC
The Siemens S7-312C PLC only has an MPI interface and lacks standard RS232 and RS485 interfaces. Typically, touchscreens connect only to Siemens' own touchscreens using their own MPI interface. However, Siemens touchscreens are expensive, and sometimes, for system cost-effectiveness, other brands are chosen. This requires more technical expertise in communication protocol settings. A Siemens PC-MPI adapter cable is commonly used, which is simple and reliable but expensive, requiring multiple adapter boxes and making installation inconvenient. This system uses a direct connection, making protocol settings particularly important. The specific setup process is as follows: First, communication rate: 19200, 8, EVEN, 1 (RS485); then, PLC station number; finally, control area/status area: DBWO/DBW20. Important notes: This driver can only be used to connect one DOP HMI to one PLC; the PLC communication rate needs to be changed to 19200 (8, EVEN, 1); both communication ports cannot be used simultaneously; the DOP station number needs to be set to 0-15; if it exceeds this range, the communication protocol will automatically change to 15; when no connecting cable is connected, the DOP HMI will display an error message after about 5 seconds. If the connecting cable is connected, the DOP HMI needs to be powered on again to successfully connect and communicate; after powering on, the DOP needs to receive a notification from the PLC before it can connect. Therefore, the first connection takes a relatively long time, and under normal circumstances, it should connect within 5 seconds; this protocol is a multi-segment back-and-forth communication (one command requires multiple communications between the DOP HMI and the PLC to complete). Therefore, the communication speed is slower than that of a general controller, but it is basically the same as the speed of using an S7-300 with a PC adapter. The specific wiring diagram of the DOP touch screen and PLC hardware is shown in Figure 2.
3. Design of Analog Module
3.1 Setting up the analog module
In the moisture control section of the stem washing machine, the SM331 is selected. The analog input module converts analog signals into digital signals for internal CPU processing; its main component is an A/D converter. Generally, analog signals are output as standard DC voltage and DC current signals from the transmitter. The SM331 can directly connect to temperature sensors without transmitters, eliminating the need for a separate temperature transmitter, saving hardware costs and reducing potential failure points. However, direct sensor connection requires setting the measurement range. The input type of the S7331-7KFO2-OABO analog module is set using the range cards on the side of the module. The range cards are installed on the side of the analog module, with two channels per group, eight channels per group of four range cards. When set to temperature, two channels constitute one input. The default setting is usually B (±10V) at the time of delivery. Three temperature detection channels need to be set; according to the documentation, A is the temperature sensor input. Therefore, use a screwdriver to loosen the range card from the analog input module, then select position A on the range card, pointing it to the marked point on the module, and insert the range card. The system sets three range cards to A, leaving the fourth unchanged at B, thus completing the range card setup for three temperature and two voltage inputs. After the hardware setup is complete, you need to go online and enter the hardware settings in STEP7 to select the analog range. The specific range settings for the analog input module in STEP7 are shown in Figure 3.
3.2 Analog Value Module Conversion, Looping, and Response Time
The conversion time consists of the basic conversion time and the module's testing and monitoring processing time. The basic conversion time directly depends on the conversion method of the analog input module (integral method, instantaneous value conversion). The scan time of the analog input channel, i.e., the time elapsed from the current conversion of the analog input value to the next conversion, refers to the sum of the conversion times of all active analog input channels of the analog input module. The conversion time of the analog output channel consists of two parts: the time it takes for the digital value to be transferred from the CPU memory to the output module and the digital-to-analog conversion time of the analog module. The analog output channel also performs sequential conversion, meaning the analog output channels are converted one after another. The scan time, i.e., the time elapsed from the current conversion of the analog output value to the next conversion, refers to the sum of the conversion times of all active analog output channels of the analog output module. Therefore, the I/O scan time can be reduced by disabling all unused analog channels in STEP7.
3.3 Connecting the sensor to the analog input
Depending on the measurement method, different types of sensors, such as voltage or resistance sensors, can be connected to the analog input module. To reduce electromagnetic interference, shielded twisted-pair cables should be used for analog signals, and the shield of the analog signal cable should be grounded at both ends. If there is a potential difference between the two ends of the cable, an equipotential coupling current will be generated in the shield, causing interference to the analog signal. In this case, one end of the cable shield should be grounded. For isolated analog input modules, there is no electrical connection between the CPU's M terminal and the measurement circuit reference point MANA (usually terminals 10 and 11). If there is a potential difference UISO between the reference voltage UN and the CPU's M terminal, an isolated analog input module must be selected. By using an equipotential bonding wire between the MANA terminal and the CPU's M terminal, it can be ensured that UISO does not exceed the allowable value. If a non-isolated sensor is used, a finite potential difference UCM (common-mode voltage) will occur between the measurement line M- of the input channel and the measurement circuit reference point MAA. To prevent exceeding the allowable value, an equipotential bonding wire must be used between the measurement points.
4. Temperature control program function block design
STEP7 allows for online and offline program editing. First, create the OB1 system organization block, then create the timer interrupt organization block OB35. Within OB35, call the temperature control function block FB58. Calling FB58 requires the Standard Library to be installed in STEP7. The calling process is: open OB35 → click View → click Overview → click Library on the right → click Standard Library → click PID Control Blocks → click the FB58 temperature control function block. When inputting parameters, input the background database DB1. DB1 serves as the background database for OB35. The data structure in the background database is automatically generated by the system and cannot be modified by the user. Data must be entered according to the data format requirements of the Standard Library. The background database also contains some system control parameter settings, some of which can be modified there. Open the background database DB1, select the parameter view, and you can modify parameters such as sampling period, PID parameters, upper and lower limits, and pulse output.
In OB35, the FB58 function is invoked, and response control quantities, digital quantities, and analog quantities are input. Once the parameters are input, the system can run the program. In the LAD display during program invocation, there are over a dozen inputs, from which you can select the required inputs. Some are mandatory, while others can use system default values. After the system starts, output M6.0 to activate FB58. The setpoint variable SP_INT is a required floating-point input. Data MW2 is input via the touchscreen and converted to the floating-point number MD6, which is then used as SP_INT. Process variables are input using PV_PER (peripheral process control variable) format, which is the process variable input from the peripheral device (I/O). This uses the digital value of the PIW258 of the S7-331-7KF02 analog input module as the process variable. If this data is converted to a floating-point number, it can be input as PV_IN. In the ladder diagram, only one input (PV_IN or PV_PER) is needed. Inputting PV_PER simplifies the process and reduces the amount of code needed for conversion. In the control function block, PV_PER is typically input and then converted to the floating-point number PV_IN. The error is obtained by subtracting PV_IN from the setpoint SP_INT. This is used in PID control within the system. The function block also has a manual function. When the external conditions do not meet the automatic working conditions, the operation can be manually controlled. Specifically, MAN_ON is set to M1.0. When M1.0 is 1, the touch screen can be set to manually output data MD10. When MAM is set to MD10, LMN_PER process output directly outputs the control value.
The controller has seven outputs that can be used for system control and display. The primary output utilizes PV formatted process variables, which can be used to display the valve opening of the steam regulating valve. LMN_PER is an I/O formatted control output value, directly output to the PQW272, providing a 4-10mA analog output to control the pneumatic diaphragm regulating valve. The functional modules also include QLMN_HLM and QLMN_LLM upper and lower limit alarms. This completes the basic functional block program design. The programming interface for the temperature control functional block is shown in Figure 4.
5. Conclusion
The DOP human-machine interface is aesthetically pleasing, featuring an intuitive graphical interface that is simple to operate and easy to use. It simplifies the monitoring of complex production lines, significantly reducing labor intensity. Production practice in the stem washing machine control system demonstrates that all functions of the system meet production needs and improve production efficiency. The automatic stem water temperature control system implemented using the DOP human-machine interface ensures that the moisture content of the stems remains within the acceptable range.
References
[1] Delta Electronics, Inc. DOP Series HMI Manual [K]. Delta Electronics, Inc., 2007
[2] Yan Yingfu, Introduction to Touch Screens and PLCs [M]. Beijing: Posts & Telecom Press, 2006.
[3] Siemens. STEP7 Programming Manual [K]. Beijing. 1996.
[4] Cai Wandong. Computer Networks [M]. Xi'an: Xi'an University of Electronic Science and Technology Press, 2000.
[5] S. Brian Morriss. Programmable Logic Controllers [M]. Translated by Yang Zhi, Wang Lang, and Zhu Haifeng. Beijing: China Machine Press, 2006.
[6] Wang Zhixing. Automatic Control Principles [M]. Beijing: Machinery Industry Press, 1987. PLC Process Control System for Straw Washing Machine Based on DOP Human-Machine Interface