logxlogx

EN
nan4
画板 1 拷贝
TECH-EXHI
Recommendations
PC software design for automatic raw material filling machine
2020.02.13

Summary:In response to the control needs of the filling machine, a host computer software that realizes automatic filling monitoring was designed.The system is programmed in the +i language, developed based on the 0t platform, uses QSlite as the backend database, and relies on Qt's own class library QSerialPort to realize serial port communication with the lower computer and complete the real-time transmission, display and storage functions of data.The software extracts target weight information by parsing data packets and uses the QCustomPlot control to complete line chart drawing, which can effectively improve the efficiency of data collection and processing.

0 Introduction.

The development and application of automatic filling monitoring system has significant economic and social benefits, to realize the automatic collection of weighing data and statistics, to avoid the manual mode of reading, recording and statistical errors and other issues, Geng Zhihui and other due to the] people have studied an industrial inspection of the upper computer monitoring system, which can clearly and distinctly display the working conditions, store historical data for future analysis as a reference; through the reasonable allocation of functions, the lower computer to complete the Through the rational allocation of functions, the lower computer performs the functions of data acquisition, action control and other interactions with hardware with real-time requirements, while the upper computer focuses on data processing and storage as well as human-computer interaction, and provides a beautiful operation interface through visualization programming. For the filling machine adopts the master-slave control architecture to realize the automatic control of the filling process, the design and development of the monitoring software of the upper computer is completed on the basis of the analysis of the functional requirements of the system monitoring software.

1 overall program design

This filling system is mainly composed of the upper computer monitoring system and the bottom microcontroller control of the automatic weighing unit. The upper computer system is supported by a database, storing the relevant static parameters of the system and real-time data in the production process; complete human-computer interaction, filling process monitoring and production data image display. According to the requirements of filling process, the database contains two core data tables: process parameter table and production data table. Process parameter table is used to store the relevant parameters of filling product specifications, such as product code, product name, filling volume and up and down deviation, etc. These parameters are the basis for automatic control of the filling process. Production data table is used to record real-time production data, such as the actual filling volume and the number of filled bags and other information, so that the subsequent program call, error analysis and data query, statistics and so on. The lower computer mainly realizes the filling weight collection and filling process control, and the collected data are uploaded through the serial port.

2 upper computer software design

In order to meet the process requirements of the monitoring system, the upper computer software mainly includes system calibration, user management, process parameter management, real-time data monitoring and historical data query and other functional modules. For the above functions, the system uses Ot to design the host computer interface, and the use of unique signals and slots (signals/slots) mechanism to achieve the transfer of information between the object, the class library OSerialPort to achieve the serial port communication with the lower machine, QtSgl module to provide the platform and the type of database has nothing to do with the database interface to achieve the integration of the database and the user interface asked. Based on the Ot class library itself, the user can build operation panel and display panel questions by means of customized or built-in dialog boxes. These features make the software programming of the automatic filling monitoring system easier. The "user management" and "process parameter management" in the above functional modules are similar to the general monitoring system, and the "system calibration" has been introduced in the published articles by Wu Jiajing et al. This paper focuses on analyzing the realization of real-time data monitoring module and historical data query module.

2.1 Real-time data monitoring module design

This module realizes the real-time monitoring of the production process, through the visualization of charts and graphs to display the current filling status, so that operators can monitor the production process in real time.

1) Data source and processing method

The data of this module comes from two sources: static data in the database and real-time weighing of dynamic data. The static data is provided by the "Process Parameter Table", which is mainly used to select the filling process and displayed in the drop-down box and text box at the top of the main interface. The drop down box selects the product code and the text box displays the corresponding process parameters. Find the product code field from the process parameter table, bind the drop-down box, and display the product code of all filled products in the drop-down box. Use the currentIndexChanged0 event of the drop-down box to trigger the query condition of the data table, and bind the corresponding field with each OLimeEdit.

The dynamic data is the real-time weighing data acquired through the serial port, and the backstage production data table is used as the support to realize data parsing and storage display. The received 14-byte data packet consists of the packet header and the signal values of A and B load cells. Parsing the data packet to get the voltage signal value collected by the weighing module, converting it to the corresponding weight value, and then adding it up to get the total weight of the actual filled material.

2) Line drawing

In the center of the interface is a real-time line graph of the filling weight. In order to allow users to monitor the production process in real time, an adaptive line graph is used. Adaptive coordinates are used because of the high demands of the product process and the asymmetric deviation of some products. Setting different display ranges for the vertical axis, so that it can adaptively change according to the process parameters, enables the user to understand more intuitively whether the actual weight deviation is in the given range of deviation, so as to determine whether the production is effective or not.

The plot is drawn using the gcustomplot control, which reads the rated weight and the upper and lower deviation fields in the process parameter table, and uses yAxis->setRange0 to set the longitudinal axis coordinate system. setData0) function of the OCustomPlot class combines two OVector parameters, which are used to receive the data for the horizontal and vertical axes, respectively. The points plotted at one time in the folded plot are limited, which is related to the number of points of the horizontal axis and the range of the horizontal coordinate axis [8-9 Therefore, when the number of points exceeds the set value, the initialization of the plot is carried out, and it returns to the initial point of the horizontal coordinate axis to start plotting the next data. Every bag is filled, the real-time filling weight is written into the production data table, the data table update is completed and displayed at the bottom of the interface; the real-time filling weight value is displayed in the line graph when the division.

2.2 Historical data query module design

On the one hand, the data in the production process is displayed in real time in the form of charts and other forms, and on the other hand, it is stored in the database as historical data so that it can be called by subsequent programs. This module takes the production data table as the support, interacts the data with the user interface, binds the data table using the setTable( function of the QSglTableModel class, performs the data table query, and binds the query result through the setModel0 method of the QTableView control to realize the display of the product code, the number of filled bags and other information [0-]. The top of the main interface is the query condition column, and the middle is the historical data table. The query conditions are divided into three categories: time period, product code and operator, which can realize the query of three conditions and seven combinations. Due to space limitations, this article only introduces the "time period + product code" and "product code" two ways to realize the rest of the combination of ways to query the idea is similar to this. Because the calendar control input is not empty, add a QCheckBox check box, according to check or not to determine whether the time period as one of the query conditions.

For the case of large amounts of data table data and the use of multi-conditional combination of queries, in order to make the query convenient, step-by-step screening conditions, the results of the screening will be displayed in the rest of the query conditions in the drop-down box. That is, select a condition, such as a time period, using the calendar control's dateChanged0 event to call the query function, query the production data table in the current time period contains the product code and operator information, and binding with the respective drop-down box. If further selection of product code or operator conditions is required, the control's currentIndexChanged0 event is utilized, which is called when the dropdown box sub-item is selected, to query all operator/product code information in the current time period + product code/operator field, and display it in the corresponding dropdown box. With the selection of the previous condition, the selectable range of the next condition will be greatly reduced, and all for the current combination of conditions under the effective range of values, reducing the useless operation of the database and improving the flexibility of the program.

3 Conclusion

In this paper, for automatic filling machine design based on Ot's upper computer monitoring system, the use of Ot's own module QSerialPort to achieve serial communication, the use of QSql module to achieve database operations. The host computer software provides a good user interface, can be easily operated to achieve the transmission of data, processing, graphical display and database query call, can effectively improve the efficiency of the monitoring system.

Multi-station liquid filling machine
The field management and control system of liquid filling machine based on single chip microcomputer, radio frequency card and network integration technology can control the filling of materials in real time and effectively. Realize the real-time detection of filling weight and the real-time opening and closing of solenoid valve in filling process, and upload data for effective microcomputer management.
Application of liquid pumping and mixing batching system
The batching system adopts dual CPU to form a redundant system, and the STEP7MicroWin V4.0SP6 programming software provided by Siemens is used as the man-machine interface to write debugging programs and download programs. The PC and PLC experimental machine are connected by a PC/PPI cable for communication, and the corresponding parameters are set.
Automatic liquid filling machine function application
Automatic liquid filling machine is controlled by frequency converter to realize stepless speed change, set the target weight, easy operation and fast filling speed, adopting large and small feeding and filling methods, optional computer connection or real-time printing of filling parameters such as filling date, serial number, net weight, tare weight, cumulative weight and so on.
×