Introduction of high-precision liquid level transmitter test system

Abstract: This paper introduces the system structure and software design of the high-precision liquid level transmitter test system. It focuses on the development and program flow of multi-serial based multi-serial communication protocol, and realizes the parameters of liquid level transmitter and sensor. A large number of acquisitions improve production efficiency and provide a reliable guarantee for software compensation and calibration of the liquid level transmitter, thereby improving the accuracy and reliability of the liquid level transmitter.
With the wide application of microprocessor in industrial measurement and control and the reduction of cost performance, a high-precision intelligent liquid level transmitter with microprocessor as the core has emerged, which puts forward the production and inspection of liquid level transmitter. higher requirement. In order to improve the accuracy, through the combination of software and hardware, this requires a large number of detection of the parameters of the liquid level transmitter and sensor, form a table for software compensation and determine whether the accuracy of the transmitter and sensor meets the requirements. In order to meet this need, this paper establishes a transmitter test system based on industrial control computers.
1. The overall structure of the system structure transmitter test system is shown in the figure. It mainly includes 3 sets of DPI520 series standard liquid level generators of Drucker Company, and 1 digital multimeter 2700 series of Keithley Company. Programming controller (PLC) C2OO day, 1 intelligent thermostat, relay group and transmitter, sensor array and other parts. Since these smart meters all have RS232 communication ports, and the usual industrial control computer only has two 232 communication ports, in order to increase the serial port, we use MOXA's C168 day series of one-to-eight serial port cards.

2. System working principle and function The working principle of the whole test system is: use the human-computer interaction interface of the industrial computer to set the transmitter or sensor group to be detected, the setting of the liquid level and the temperature, and select the change through the PLC. The transmitter or sensor is sequentially detected; the collected data is placed in a database, and then the corresponding calculation is performed.
Under normal circumstances, the liquid level sensor should be subjected to temperature drift compensation and nonlinear correction before use. The traditional method is to test the output value of the corresponding liquid level at several temperature points according to the empirical value. The accuracy after the entire compensation is not high. To obtain high-precision compensation effect in the full temperature range, it is necessary to measure a large number of parameters of the sensor at various temperatures, calculate the size of the compensation resistor by the formula, and improve the accuracy and reliability of the sensor. One of the functions of this test system is to test up to 64 sensors at a time, and calculate the corresponding resistance of the resistor. At the same time, the nonlinearity, repeatability and hysteresis of the sensor can be calculated. On this basis, the accuracy is obtained. And judge whether it meets the requirements.
With the advent of smart transmitters, the method of temperature drift compensation and nonlinear correction of the transmitter has also changed from simple analog circuit regulation to software regulation. The main principle of software adjustment is to calculate the output of the transmitter under different temperature and standard liquid level when the transmitter is produced, and the compensation parameters are stored in the program memory of the transmitter in advance, at the production site, in actual application. The program automatically calls the compensation parameters according to the site temperature and liquid level, thus completing the compensation process. The second function of this system is that it can test up to 64 transmitters, and the relevant parameters can be obtained after relevant processing.
By using the system, on the one hand, the production efficiency of the production and inspection sensors can be improved, and on the other hand, the accuracy of the sensors and the transmitters can be greatly improved.
3, system software design Because the system requires multiple human-computer interaction interface to set and monitor a large number of parameters, we chose to use Microsoft VisuaIC++6.0 development software system, operating system is Windows2000, make full use of its powerful network function and stability. The software design of the system mainly includes the setting of human-machine interface, multi-serial communication and database processing. The setting of man-machine interface is mainly to use the control of VC ten + to program. The database part mainly stores data and calculates corresponding parameters. It is relatively simple. It will not be introduced here. The following focuses on the program design of multi-serial communication.
3.1 package serial port class
VisuaIC++'s Microsoft Foundation Class (MFC) does not provide general-purpose serial communication code, and it is cumbersome to use the 32-bit Windows API function to operate the serial port. Since a large number of data transfers in the system use a serial port, the operation of the serial port is particularly frequent. We mainly adopt the object-oriented design method. Under VC6.O, we implement a serial port class CSerialP0rt to encapsulate related attributes and methods, increase the transparency of serial port operation, improve the reliability of serial port transmission data, and shield the bottom layer. The details facilitate the programming of the serial port operation. It can read, write and monitor the running status of a serial port, and pass events to the host at the serial port.
In order to operate the serial port, we define a series of functions in the SerialPOrt.cpp source file: such as InitP0r () function for initializing the serial port and setting the serial port property; StartMonitoring (), RestartMonitoring (for starting and stopping the thread) ), StoPMonitoring() function; ReeeiveChar() and WriteToPort() functions for reading and writing to the serial port.
3.2 Implementation of the communication protocol The intelligent flowmeter used by the system is produced by different manufacturers, and the protocols used are different, which brings certain difficulties to the software design. The object-oriented method abstracts some common properties (such as port number, instrument serial number, lower-level machine address, function description, etc.) from all smart meters, and combines the common properties into a smart instrument base class. The CC0mmen class also defines a standard set of instrument access and data access interfaces, which are given in the form of virtual functions, and then derive an instrument class that matches itself for each actual instrument. For each smart meter, we use the communication protocol provided by the corresponding manufacturer.
3.3 Multi-thread serial communication realization Because the industrial computer has to communicate with more than 4 smart meters, and it needs long-term dynamic and stable operation, it is the hub of the whole liquid level transmitter detection system, and its reliability and robustness requirements are better. High, so the entire data acquisition driver is particularly important for each serial port read and write coordination, we use multi-threading technology. Before starting the serial data acquisition driver, configure the instrument according to the actual instrument connection, set the type and number of instruments connected to each serial port, and the basic serial communication parameters, and store them. The main thread of the driver is responsible for the interface operation of human-computer interaction and the startup and coordination of each serial operation thread. The communication between threads uses the Windows message mechanism.
4. Conclusion The system uses a multi-serial port expansion controller to set up a liquid level transmitter detection system. By testing the liquid level transmitter and sensor parameters, the resistance value of the sensor compensation and the compensation of the transmitter are calculated. The parameters used are downloaded to the program memory of the transmitter to improve the accuracy and reliability of the transmitter. The serial port data acquisition software design uses the object-oriented design (OO) method to abstract the general serial port class and instrument base class; using Wind0Ws multi-threading and message mechanism to realize the communication and synchronization of multiple serial ports. The system has been operating stably in Zibo's first measurement and control company, which has improved production efficiency and provided a reliable guarantee for the production of high-performance smart transmitters.

Varicella Vaccine In Vial

Chickenpox Vaccines,Varicella Virus Vaccine Live,Varicella Vaccine Single Dose Vial,Chickenpox Vaccines Vial

Changchun BCHT Biotechnology Co. , https://www.ccbcht.net

Posted on