Liquid tank volume calculation module with density compensation function based on STL language
By designing a liquid storage tank volume calculation module based on STL language on the PLC controller, using the calculus equation and density compensation function, the error problem of measuring volume of traditional Chinese medicine liquids for extraction and production of traditional Chinese medicine is solved, and high-precision and real-time volume calculation is achieved , suitable for the food and drug manufacturing industry.
Patent Information
- Application Number
- CN202111290938.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-11-02
AI Technical Summary
During the Chinese medicine extraction and production process, there are human errors and non-real-time problems in the measurement of the volume of the medicine liquid. It is difficult for the prior art to accurately calculate the liquid volume in the liquid storage tank, especially for the nonlinear head and density changes.
A liquid storage tank volume calculation module based on PLC is designed. By directly collecting density and liquid level signals, using calculus equations for accurate calculations, and providing density compensation function, supporting the volume of vertical and horizontal storage tanks. calculate.
It realizes accurate calculation of the liquid volume in the liquid storage tank, improves calculation accuracy and real-timeness, reduces human error, and is suitable for the food and drug manufacturing industry, supporting logical control and production report records.
Smart Images

Figure CN114065107B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a calculation module, in particular to a liquid storage tank volume calculation module with a density compensation function based on STL language. Background Art
[0002] In the extraction and production process of traditional Chinese medicine, the volume of the medicinal solution is often an extremely important parameter in each production stage. This parameter, as a control result, directly determines when to start the next production process. In addition, according to the current national GMP production quality management standards, the volume of the medicinal solution involved in each process of each production batch needs to be strictly recorded in the production process report according to the actual situation.
[0003] At present, most manufacturers generally use two methods to deal with volume parameters. One method is to measure the liquid level through a liquid level transmitter and then convert it into volume manually. This will bring about errors caused by various human factors, such as the inability to accurately calculate the nonlinear part of the elliptical head at the bottom of the tank, and the real-time change of liquid density, which leads to inaccurate volume conversion. The other method is to calculate the volume parameters by a third-party computer program. Although this method eliminates human errors, it still has the disadvantages of being too targeted, not real-time, and not interacting closely with the control system data.
[0004] In this way, a liquid tank volume calculation module with density compensation based on the control system STL language solves these problems well. It can not only intuitively and accurately display the current volume of the tank, but also has good universality and can call volume parameters in real time for logical control. Automatic control engineers only need to load relevant parameters (density, liquid level, tank head geometry parameters) at the input end of the calculation module to obtain accurate liquid volume at the output end. Summary of the invention
[0005] The purpose of the present invention is to provide a function block based on a commonly used PLC programming language, directly collect the measured values of a density meter and a liquid level meter, accurately calculate the nonlinear and linear parts of the liquid volume in a storage tank through calculus equations, and provide a liquid storage tank volume calculation module with a density compensation function based on the STL language.
[0006] The objective of the present invention is achieved in this way: it comprises a data input end and an output end, the data input end comprises a working mode, a liquid level interface, a density interface, and geometric parameters, the output end is a volume parameter, the working mode is to set the application scenario of the calculation module, the liquid level interface is a port for collecting liquid level signals, the density interface is a port for collecting density signals, the geometric parameters are two geometric characteristic parameters for setting the liquid storage tank, and the volume parameter is the liquid volume of the storage tank finally calculated by the calculation module.
[0007] The present invention also includes such structural features:
[0008] 1. The data type of the working mode is Boolean, and the set value is "TRUE" and "FALSE", corresponding to vertical storage tanks and horizontal storage tanks respectively.
[0009] 2. The data type of the liquid level interface is a 32-bit floating point number. The PLC system obtains the liquid level signal of the liquid level instrument through the analog quantity acquisition module, processes the signal to obtain a 32-bit floating point number, and finally inputs it into the calculation module through this port for volume calculation.
[0010] 3. The data type of the density interface is a 32-bit floating point number. The density signal measured by the density meter enters the calculation module from this port to participate in volume correction.
[0011] 4. The data type of the geometric parameters is a 32-bit floating point number, which are the radius of the manually input storage tank and the radius of the minor axis of the bottom elliptical head.
[0012] 5. The data type of the volume parameter is a 32-bit floating point number. The volume value has been density-corrected and can be directly used in logical operations. It can also be displayed in real time on the host computer screen for operators to use and recorded in the production process reporting system.
[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: the results of the present invention are applied to the food and drug production and manufacturing industry, and the automatic calculation of the volume of the contents of the liquid medicine storage tank is realized by compiling the STL language generally supported by the PLC controller, thereby improving the calculation accuracy of the nonlinear part of the volume of the tank head, and more intuitively reflecting the important volume parameters in the production process.
[0014] The implementation process of this volume calculation module:
[0015] 1. The calculation module collects density and liquid level measurements in real time;
[0016] 2. The calculation module uses a microcomputer equation to perform an initial calculation of the volume of the contents based on the size of the elliptical head;
[0017] 3. Density compensation is performed on the volume obtained by the initial calculation to obtain the final result;
[0018] Relevant technical features of this volume calculation module:
[0019] 1. The calculation module is written based on the PLC programming language (STL language), loaded and run on the PLC controller, does not rely on any other software and hardware, and has stable operation, high reliability and easy application.
[0020] 2. The calculation module uses calculus equations to accurately calculate the nonlinear head volume of the tank in real time, eliminating the error caused by nonlinearity.
[0021] 3. The calculation module is suitable for volume calculation of various elliptical head storage tanks, such as vertical tanks and horizontal tanks.
[0022] 4. It has density compensation function and can calculate the volume of liquids with different densities.
[0023] 5. High degree of automation, full background operation, eliminating the possibility of human intervention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is the application scenario of this volume calculation module;
[0025] Figure 2 It is the input and output structure of this volume calculation module. DETAILED DESCRIPTION
[0026] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0027] The gist of the present invention is as follows:
[0028] 1. Based on the STL language commonly supported by PLC, it is loaded and run on the PLC controller, and does not rely on any other software or hardware to output the liquid volume value in real time. It is stable, reliable and easy to use. The nonlinear and linear parts of the liquid volume in the tank are accurately calculated through the operation equation, and the volume parameters are corrected through the density value.
[0029] 2. Good versatility, with 2 working modes, supporting volume calculation of vertical and horizontal storage tanks.
[0030] 3. Use calculus equations to accurately calculate the nonlinear head volume of the tank in real time to eliminate the error caused by nonlinearity.
[0031] 4. It has density compensation function, which can calculate the volume of liquids with different densities.
[0032] Combination Figure 1 , you can see the three application scenarios and calculation methods of the volume calculation module.
[0033] Figure 1 The figure shows a standard elliptical head liquid storage tank. The upper and lower heads of the tank are standard ellipsoids, and the straight-through part in the middle of the tank is a cylinder. The volume calculation module is a calculation tool developed for this type of liquid storage tank. The calculation module has two operation modes, namely vertical tank mode and horizontal tank mode;
[0034] Figure 1 As shown in the leftmost tank, the elliptic curve equation of the side view of the head part is assumed to be Where (a>b>0), a is the major axis radius of the ellipse, b is the minor axis radius of the ellipse, and h is the liquid level measured by the level gauge. The gray part in the figure is the liquid in the tank (taking H2O under standard conditions as an example). When the storage condition is as shown in the leftmost figure, the volume of the liquid is the volume of the nonlinear part of the head. The volume equation of this part is deduced from the calculus equation: Since the liquid level meter generally uses H2O as the medium to indicate the nominal liquid level under standard conditions, the volume obtained is the volume of H2O. If the density of the liquid is different from that of H2O, the calculation module will finally obtain the final volume parameter of the same mass through the density value ρ collected by the density meter, that is: V = V F / ρ. Other application scenarios use roughly the same principle to calculate volume.
[0035] Combination Figure 2 The figure shows the general composition of the volume calculation module. The calculation module is written in step7 5.5sp3, a lower-level computer software of Siemens DCS system, and loaded and run on Siemens 300 and 400 series controllers. It has the characteristics of high execution efficiency, small resource occupation and high reliability. The entire calculation module adopts the "FC function block" structure and is loaded in the main cycle scanning program. Each cycle scan of the CPU will perform a calculation and can be called at any time. It does not require background DB support, automatically calculates according to the parameters of each inlet, and gives the current tank liquid volume value in real time at the output end, which is very convenient to use.
[0036] The items on the left side of the module in the figure are data input terminals, and the item on the right side is the output terminal of the volume parameter, where:
[0037] "Working mode" - to set the application scenario of this calculation module. The data type is Boolean, and the setting value is "TRUE" and "FALSE", corresponding to vertical storage tanks and horizontal storage tanks respectively (the corresponding calculation method and calculation formula used in the module are different). Switching the storage tank form through the setting of this Boolean interface is simple and effective.
[0038] "Liquid level interface" - is the port for collecting liquid level signals, and the data type is 32-bit floating point number. The PLC system obtains the liquid level signal of the liquid level meter through the analog acquisition module, and processes the signal to obtain a 32-bit floating point number, and finally inputs it into the calculation module through this port for volume calculation.
[0039] "Density interface" - is the port for collecting density signals, and the data type is 32-bit floating point number. The density signal measured by the density meter enters the calculation module from this port to participate in volume correction. However, not every manufacturer has the conditions to install a density meter on the storage tank, so the density value can be manually filled in this port based on experience. For example, when the density of the tank content is 1g / cc (the density of water under standard environment), the value of "1.0" in REAL format can be manually filled in to replace the density meter.
[0040] "Geometry parameters" - to set the two geometric characteristic parameters of the liquid storage tank, the data type is a 32-bit floating point number, that is, the radius of the tank and the radius of the minor axis of the elliptical head at the bottom.
[0041] "Volume parameter" - is the final calculated volume of the tank liquid by the calculation module, and the data type is a 32-bit floating point number. This volume value has been density-corrected and can be directly used in logical operations, or displayed in real time on the host computer screen for operators to use, and recorded in the production process report system.
[0042] In summary, this liquid tank volume calculation module with density compensation function based on STL language is applied to food and pharmaceutical manufacturing enterprises. The purpose is to provide a calculation module based on the commonly used STL language of PLC, directly collect the measurement values of the liquid level meter and density meter, combine the geometric characteristics of the storage tank, and accurately calculate the nonlinear and linear parts of the liquid volume in the storage tank through calculus equations. Finally, the density value is used to correct the liquid volume, which improves the intelligence of the program. It can not only intuitively and accurately display the current volume of the storage tank on the terminal, but also has good universality. Automatic control engineers can call volume parameters in real time for logical control.
Claims
1. Liquid storage tank volume calculation module with density compensation function based on STL language, Features: It includes a data input terminal and an output terminal. The data input terminal includes a working mode, a liquid level interface, a density interface, and geometric parameters. The output terminal is a volume parameter. The working mode is to set the application scenario of the calculation module. The liquid level interface is a port for collecting liquid level signals. The density interface is a port for collecting density signals. The geometric parameters are two geometric characteristic parameters for setting the liquid storage tank. The volume parameter is the liquid volume of the storage tank finally calculated by the calculation module. The data type of the working mode is Boolean, and the set values are "TRUE" and "FALSE", corresponding to vertical storage tanks and horizontal storage tanks respectively; The data type of the liquid level interface is a 32-bit floating point number. The PLC system obtains the liquid level signal of the liquid level instrument through the analog quantity acquisition module, and obtains a 32-bit floating point number after processing the signal. Finally, it is input into the calculation module through the liquid level signal port for volume calculation. The data type of the density interface is a 32-bit floating point number. The density signal measured by the density meter enters the calculation module from the density signal port to participate in volume correction. The data type of the geometric parameters is a 32-bit floating point number, which are the radius of the manually input storage tank and the radius of the minor axis of the bottom elliptical head.
2. The liquid storage tank volume calculation module with density compensation function based on STL language according to claim 1, Features: The data type of the volume parameter is a 32-bit floating point number. The volume value has been density-corrected and can be directly used in logical operations, or displayed in real time on the host computer screen for operators to use, and recorded in the production process reporting system.
Citation Information
Patent Citations
On-line computation device utilizing liquid level method for computing storage tank oil gas liquid chemical weight
CN103034200A
Dual-body type oil-well three-phase automatic metering device
CN105804720A
Storage tank metering data processing method and device, computer equipment and storage medium
CN109801012A
Sensor system
US20130238145A1
