logxlogx

EN
nan4
画板 1 拷贝
TECH-EXHI
Recommendations
Design and implementation of microcomputer batching system software
2020.02.13

Summary:In the microcomputer batching system, the working principle and computer control principle of the double-scale batching system are given, and the software design flow chart and the program code for realizing multi-thread control are given.This method has been applied to feed processing and production, playing a vital role in improving production speed and productivity.

Batching control software is the core of the whole control system, which plays an important role in improving the output and quality of batching production, reducing the production cost, reducing the labor intensity of workers, saving manpower and material resources, improving productivity and enterprise efficiency.

The automatic dosage system adopts three-level computer control, connects the dosage units distributed in various places through industrial field bus, realizes the networked management of dosage system, and realizes the management of formula and raw materials, real-time monitoring of production and the management of summary reports of various data on the upper computer, which has the advantages of flexible structure, good man-machine interface, and integrates control and management in one. The dosage function is comprehensive, stable and reliable, can meet the requirements of various dosage production.

In feed processing enterprises, automatic dosage according to the controller has three types of microcomputer, microcontroller and PLC. Dosing software is suitable for microcomputer feeding system, the system has a simple structure, clear control principle, easy and intuitive operation, flexible parameter settings, data management is powerful and so on, in the small and medium-sized feed processing enterprises have been widely used.

1 double scale dosage working principle

In the process of feed preparation and production, one of the important ways to improve the production speed is to realize multi-scale batching, i.e., 2 or more kinds of raw materials are added to the secret bucket at the same time. Assuming that the formula of a certain kind of feed consists of n kinds of raw materials, and the average time for each kind of raw material to be added into the weighing head is t, then theoretically, the batching speed of double secret can be doubled than that of single scale.

Dual structure of the dosage system working principle, bin 11 ~ bin 1n in the raw materials through the corresponding dosage device added to the scale bucket 1, bin 21 ~ bin 2m in the raw materials through the corresponding dosage device added to the scale bucket 2, the scale bucket 1 and the bucket 2 in the preparation of each raw material is complete, open the door to release the material to the mixer mixing and churning, the scale head shut down to continue the next batch of production; mixing machine mixing to the specified time, open the door to release the material to the finished product warehouse, and then close the door, continue the next batch of production; mixing machine mixing to the specified time, open the door to release the After the mixer mixes for a specified time, the door will be opened and the material will be put into the finished product warehouse, then the door will be closed to continue the work of the next batch.

2 double scale dosage computer control principle

According to the above working principle, the computer control principle can be designed, the computer through IO interface A, collects the weight data of weighing bucket sent by the weight indicator; through IO interface B, controls the start and stop of the batching machine; through I/O interface C, on the one hand, it can control the opening and closing door of the weighing bucket and mixer, mixing mixing, and on the other hand, it can also detect the working state of the weighing bucket door and the door of the mixer.

3 double scale batching production design flow chart

According to the working principle of double scales dosage production, the left and right two scales at the same time dosage winter fog a thread. Only when the two scales are finished dosing, can be put into the mixer, so the two scales open the door to release the material needs to be synchronized thread processing; when the material in the hopper to the mixer, the left and right two scales continue to dosage, the mixer needs to be stirred timing and switching the door, so the control of the mixer needs to be the work of the third thread.

4 The realization of the control program of the double scale dosage system

In the microcomputer dosage machine to realize multiple scales at the same time dosage method is to use multi-thread technology. The following describes the method of developing the software of double-weighing dosage system under Windows operating system with C++Builder6.0 as the development tool and utilizing multi-threading technology.

4.1 Establishment of Multi-threading

4 Dosage system with double scale structure

There are three threads: two weighing hopper dosage threads and a mixer stirring thread. The threads are created with the C/C++ runtime library function beginthreadex.

4.2 Synchronization of threads

Synchronization of threads has two meanings: one is the coordination of two or more threads to coordinate their execution process based on certain conditions; the other is the mutually exclusive use of resources to avoid data overwriting.

In the dual scale dosage system, only when both scales have finished dosing can the door be opened and put into the mixer, so the two scales need to be synchronized to open the door and release the material.

In the program, when the left and right two scales finished dosing, through the SetEvent () function will be two thread end event object event_scale set to signal state, with WaitForMultipleObiects () function to wait for and receive the end of the two scales of the signal state, which dwMilliseconds parameter is set to INFINITE, indicating that only after the signals of both the left and right scales are received, the execution continues downwards.

4.3 Establishing Critical Zones

Critical areas are mainly used for the mutually exclusive use of resources to avoid data coverage, belonging to a way of thread synchronization.

In the production of ingredients, each raw material to add the completion of the need to write its quantity and name in the database, at this time in order to avoid two threads at the same time to write operations on the database, you can use the critical area for protection.

5 Conclusion

In the microcomputer automatic dosage system, through the use of multi-threading technology to control the dual scale structure of the dosage system, can significantly improve the dosage speed and productivity. At present, it has been installed and applied in more than 70 feed processing enterprises in Hebei and the surrounding area, and the on-site operation results show that the software runs stably and reliably with fast production speed and obvious effect.

Weighing and mixing machine in powder dosage system application program
The whole automatic batching system consists of industrial control machine, PLC, industrial weighing instrument, frequency converter, vibration motor, mixer, sensor, conveyor belt and other parts.
Application of weighing modules in large storage tanks
Weighing modules can be used as storage and irrigation materials in and out of the warehouse measurement, can also be used for process flow control, in general, according to the shape of the tank and the installation of different ways to choose 3 or 4 weighing modules to complete, especially suitable for chemical plant production process quantitative feeding system occasions to use.
Automatic Powder Batching System
Batching system in the field of powder processing and treatment, the leading technology of powder processing equipment absorbed and optimized in the weighing and mixing machine in accordance with the production instructions and formulas, a variety of materials will be placed, transported to the set station, using automatic walking weighing mechanism, a variety of materials accurately and proportionally added to the barrel.
Reactor feeding and dosage system realization
Reaction kettle feeding dosage system through the explosion-proof electronic weighbridge direct collection of weight signals, automatic control of weighing, the operator through the keyboard or the mouse in the upper computer human-machine interface (HMI) on the input charging information (charging type, weight, etc.), monitoring the whole process of charging control, printing the results of the charging and production reports, to achieve the process of charging the measurement and control of the integration of the management, is not lost as a practicable and effective method.
×