A control method and system for a pulse output system of an electromagnetic flowmeter

CN121783282BActive Publication Date: 2026-06-26HANGZHOU ZHENHUA INSTR

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU ZHENHUA INSTR
Filing Date
2026-03-06
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing electromagnetic flowmeter pulse output methods cannot achieve accurate and high-speed pulse feedback cumulative control in the bottling industry, resulting in large bottling errors.

Method used

The control and counting module with real-time counting function and the isolation and pulse output circuit with real-time pulse feedback function are configured to determine the pump valve closing time by counting method, so as to avoid excessive pulse output caused by settlement delay.

Benefits of technology

It achieves precise control of pulse output, reduces errors caused by settlement delays, and improves filling accuracy and speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121783282B_ABST
    Figure CN121783282B_ABST
Patent Text Reader

Abstract

The application provides a control method of an electromagnetic flowmeter pulse output system, which comprises the following steps: a host computer settles and feeds back an actual pulse frequency signal output in a previous period to a control and counting module; the control and counting module outputs a preset pulse frequency signal in a current period to an isolation and pulse output circuit according to the actual pulse frequency signal output in the previous period, controls the isolation and pulse output circuit to be disconnected or conducted, and outputs a pulse output frequency signal actually output in the current period to the host computer; the control and counting module feeds back the actual pulse number actually output in the current period to the control and counting module in real time; the host computer controls a pump valve to be closed or opened according to the received pulse output frequency signal actually output in the current period; the control and counting module counts the actual output pulse in real time; when the control and counting module accumulatively receives a preset total output pulse, the control and counting module stops outputting the pulse to the isolation and pulse output circuit, and informs the host computer to control the pump valve to be closed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow meters, and more particularly to a control method and system for an electromagnetic flow meter pulse output system. Background Technology

[0002] In traditional applications of electromagnetic flowmeters, pulse output is a commonly used digital signal. The number of pulses is continuously output according to a set pulse equivalent. The user's host computer receives and counts these pulses to calculate the cumulative flow over a certain period. The frequency of the pulse output is continuously adjusted based on the real-time monitored instantaneous flow rate to adapt to the entire pulse output update cycle. This method is common in volumetric calibration and customer applications. However, as the requirements for electromagnetic flowmeters in field applications continue to increase, the conventional pulse output method is gradually becoming insufficient. For example, in the bottling industry, pulse output experiences significant output delays during sudden changes in instantaneous and cumulative flow. Relying on pulse output cumulative feedback to control flow valves will result in substantial bottling errors.

[0003] Therefore, developing a precise and high-speed electromagnetic flowmeter pulse output method to meet the needs of rapid pulse feedback accumulation in the bottling industry has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] To address the aforementioned technical deficiencies, the control and counting module of this invention is equipped with a real-time counting function, and the isolation and pulse output circuit is equipped with a real-time pulse feedback function. This allows the timing of the pump valve closure to be determined through counting, avoiding the problem of excessive pulse output caused by settlement delays and achieving precise control of pulse output.

[0005] This invention provides a control method for an electromagnetic flowmeter pulse output system, applicable to electromagnetic flowmeters.

[0006] A pulse output system, comprising: a host computer, pumps and valves, a control and counting module, and an isolation and pulse output circuit; the method comprising:

[0007] The host computer calculates and feeds back the actual pulse frequency signal output in the previous cycle to the control and counting module;

[0008] The control and counting module outputs a preset pulse frequency signal for the current cycle to the isolation and pulse output circuit based on the received actual pulse frequency signal from the previous cycle, thereby controlling the isolation and pulse output circuit to be disconnected or turned on.

[0009] The isolation and pulse output circuit outputs the pulse output frequency signal actually output in the current cycle to the host computer; and in real time feeds back the number of pulses actually output in the current cycle to the control and counting module;

[0010] Based on the pulse output frequency signal actually output in the current cycle received by the host computer, the host computer controls the pump valve to close or open;

[0011] The control and counting module performs real-time counting on the actually output pulses fed back by the isolation and pulse output circuit in real time; the control and counting module has a preset total amount of output pulses built in;

[0012] When the total number of pulses accumulated by the control and counting module reaches the preset total amount of output pulses, it stops outputting pulses to the isolation and pulse output circuit, so as to output an instruction to stop outputting pulses, notifying the host computer to control the pump valve to close immediately after the accumulated output pulses reach the preset total amount of output pulses.

[0013] Optionally, before the host computer controls the pump valve to close immediately after the accumulated output pulses reach the preset total amount of output pulses, it further includes:

[0014] The host computer accumulatively settles the current total amount of output pulses based on the pulse output frequency signals actually output in each cycle; the host computer has the preset total amount of output pulses built in;

[0015] The host computer predicts the stop time point for controlling the pump valve to close based on the preset total amount of output pulses, the current total amount of output pulses, the actual pulse frequency signal output in the previous cycle, and a prediction model;

[0016] So that: when the host computer receives the instruction to stop outputting pulses and reaches the predicted stop time point, it controls the pump valve to close, so that immediately after the last pulse is actually output, the host computer immediately controls the pump valve to close.

[0017] Optionally, the prediction model includes:[[ID=2​​​​​​​The host computer calculates the predicted cutoff time t for controlling the valve to close based on formula (1), the total number of currently transmitted output pulses Y, the preset total number of output pulses Z, and the actual pulse frequency signal k of the previous cycle in the (N+1)th cycle. :

[0021] t=((ZYK) / K)*T, formula (1); where T is the pulse settlement period;

[0022] When the host computer outputs ZY pulses in the Nth cycle, it reaches the stop time point and controls the pump valve to close.

[0023] The present invention also provides an electromagnetic flowmeter pulse output system for implementing the control method of the electromagnetic flowmeter pulse output system described in any of the preceding claims; the system includes:

[0024] Host computer, pumps and valves, control and counting modules, and isolation and pulse output circuits;

[0025] The control and counting module is connected to the isolation and pulse output circuit and is also connected to the host computer.

[0026] The host computer is used to calculate and feed back the actual pulse frequency signal output in the previous cycle to the control and counting module.

[0027] The control and counting module is used to output a preset pulse frequency signal for the current period to the isolation and pulse output circuit based on the actual pulse frequency signal received from the previous period, and to control the isolation and pulse output circuit to be turned on or off.

[0028] The isolation and pulse output circuit is connected to the host computer; it is used to output the actual pulse output frequency signal of the current cycle to the host computer, and to provide real-time feedback on the actual number of pulses output in the current cycle to the control and counting module.

[0029] The host computer is connected to the pump valve; it is used to control the pump valve to close or open based on the received pulse output frequency signal of the current cycle.

[0030] The control and counting module has a built-in preset total output pulse count, used for real-time counting of the actual output pulses fed back by the isolation and pulse output circuit; and used for:

[0031] When the total number of pulses received by the control and counting module reaches the preset total number of output pulses, it stops outputting pulses to the isolation and pulse output circuit, and outputs a command to stop outputting pulses, notifying the host computer to immediately control the pump valve to close after the total number of output pulses reaches the preset total number of output pulses.

[0032] Optionally, the host computer is also used to calculate the total current output pulse based on the actual output pulse frequency signal of each cycle; the host computer has the preset total output pulse built in.

[0033] And for: predicting the stop time point for controlling the pump valve to close based on the preset total output pulse, the current total output pulse, the actual pulse frequency signal output in the previous cycle, and the prediction model;

[0034] This ensures that: upon receiving the instruction to stop output pulse, and upon reaching the predicted stop time point, the pump valve is controlled to close, so that the host computer immediately controls the pump valve to close after the last pulse is actually output.

[0035] Optionally, the control and counting module includes: a first timing unit and a second timing unit;

[0036] The first timing unit is connected to the isolation and pulse output circuit and communicates with the host computer; it is used to output a preset pulse frequency signal for the current period based on the actual pulse frequency signal of the previous period calculated by the host computer, so as to control the isolation and pulse output circuit to be turned on or off.

[0037] The second timing unit is used to receive the actual pulses output in the current cycle as real-time feedback from the isolation and pulse output circuit, and to count them; and is used to:

[0038] When the total number of pulses received reaches the preset total number of output pulses, the first timing unit is controlled to stop outputting pulses to the isolation and pulse output circuit, and the host computer is notified to control the pump valve to close after the total number of output pulses reaches the preset total number of output pulses.

[0039] Optionally, the pulse output and feedback circuit includes: a pulse output execution module and a pulse output feedback module;

[0040] The pulse output execution module has an input end connected to the first timing unit and an output end connected to the host computer. It is controlled by the current cycle preset pulse frequency signal to disconnect or connect, so as to output the actual pulse output frequency signal of the current cycle to the host computer.

[0041] The pulse output feedback module has one end connected to the feedback terminal of the pulse output execution module and the other end connected to the second timing unit; it is used to collect data in real time and turn the device on or off according to the electrical signal of the feedback terminal, so as to feed back the actual number of pulses output in the current cycle to the second timing unit.

[0042] Optionally, the pulse output execution module includes: a first switching unit, a first optocoupler isolation unit, and a second switching unit;

[0043] One end of the first switching unit is connected to the first timing unit, and the other end is connected to the transmitter of the first optocoupler isolation unit;

[0044] The receiving end of the first optocoupler isolation unit is connected to one end of the second switching unit; the other end of the second switching unit is connected to the host computer.

[0045] The first switching unit and the first optocoupler isolation unit are used to sequentially disconnect or connect according to the preset pulse frequency signal of the current period output by the first switching unit, so as to output the actual pulse output frequency signal of the current period to the host computer through the second switching unit.

[0046] Optionally, the first switching unit includes a first transistor; the first optocoupler isolation unit includes a first optocoupler; and the second switching unit includes a second transistor.

[0047] The base of the first transistor is connected to the first timing unit, the drain of the first transistor is connected to the first emitter pin of the first optocoupler, and the source is grounded.

[0048] The first receiving pin of the first optocoupler is connected to the base of the second transistor; the second transmitting pin and the second output pin of the first optocoupler are respectively connected to their respective operating power outputs; the second receiving pin serves as the feedback pin of the pulse output execution module.

[0049] The drain of the second transistor is connected to the host computer, and the source is grounded.

[0050] Optionally, the pulse output feedback module includes a comparison unit and a second optocoupler isolation unit;

[0051] The first input terminal of the comparison unit is connected to the second receiving pin of the first optocoupler isolation unit, and the second input terminal is connected to the reference voltage output terminal; the output terminal of the comparison unit is connected to the transmitting terminal of the second optocoupler isolation unit; it is used to output a high level when the electrical signal is greater than the reference voltage, and output a low level otherwise; the electrical signal is used to characterize the signal that the first optocoupler isolation unit is turned on or off.

[0052] The receiving end of the second optocoupler isolation unit is connected to the second timing unit; the second optocoupler isolation unit is used to turn on when it receives a high level from the comparison unit, or to turn off when it receives a low level, so as to feed back to the second timing unit the number of pulses actually output in the current period collected by the feedback end.

[0053] Compared with existing technologies, the above technical solution has the following advantages:

[0054] 1. The control and counting module of this invention is equipped with a real-time counting function, and the isolation and pulse output circuit is equipped with a real-time pulse feedback function. Thus, the timing of the pump valve closing is determined by counting, avoiding the problem of excessive pulse output caused by settlement delay, and realizing precise control of pulse output.

[0055] 2. The host computer is configured to predict the time when the pump valve will be shut down in advance, which makes up for the defect of excessive pulse output caused by the delay in host computer settlement.

[0056] 3. When the host computer executes the action of closing the pump valve, it combines the predicted closing time of the pump valve with the stop output pulse command issued by the control and counting module when the accumulated output pulse reaches the last pulse. This ensures that the pump valve closes at the correct time and further guarantees the filling accuracy.

[0057] 4. The control and counting module can compare the pulse frequency fed back by the isolation and pulse output circuit with the output pulse frequency within a settlement cycle to determine whether a pulse output fault has occurred, thus realizing functional self-testing. Attached Figure Description

[0058] Figure 1 This is a structural block diagram of an electromagnetic flowmeter pulse output system according to an embodiment of the present invention;

[0059] Figure 2 yes Figure 1 The diagram shows a specific isolation and pulse output circuit structure for isolating and executing pulse output.

[0060] Figure 3 This is a flowchart illustrating a control method for an electromagnetic flowmeter pulse output system according to an embodiment of the present invention.

[0061] Figure 4 This is a timing diagram of the prediction model for predicting the time of the stop output pulse according to an embodiment of the present invention;

[0062] Figure label:

[0063] 1-Isolation and pulse output circuit;

[0064] 11-Pulse output execution module;

[0065] 111 - First Switching Unit;

[0066] 112 - First optocoupler isolation unit;

[0067] 113 - Second Switching Unit;

[0068] 12-Pulse output feedback module;

[0069] 121 - Comparison Unit;

[0070] 122 - Second optocoupler isolation unit;

[0071] 2. Control and counting module;

[0072] 3-Host computer;

[0073] 4-Pump valves;

[0074] R1~R8 - Resistors;

[0075] U1 - First optical coupler;

[0076] U2 - Second optical coupler;

[0077] U3 - Comparator;

[0078] C1 - Capacitor;

[0079] Q1 - First transistor;

[0080] Q2 - Second transistor. Detailed Implementation

[0081] The advantages of the present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments.

[0082] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0083] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0084] In the description of this invention, it should be understood that the terms "inner" and "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0085] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0086] In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the convenience of the description of the invention and have no specific meaning in themselves. Therefore, "module" and "part" can be used interchangeably.

[0087] Figure 1 An electromagnetic flowmeter pulse output system according to an embodiment of the present invention is shown. See also... Figure 1 The electromagnetic flowmeter pulse output system includes: a host computer 3, a pump valve 4, a control and counting module 2, and an isolation and pulse output circuit 1.

[0088] The control and counting module 2 is connected to the isolation and pulse output circuit 1 and is also connected to the host computer 3.

[0089] The host computer 3 is used to calculate and feed back the actual pulse frequency signal output in the previous cycle to the control and counting module 2. For example... Figure 1 As shown, in practice, pump valve 4 will feed back a flow signal to control and counting module 2, which includes the actual pulse frequency output in the previous cycle. Under normal circumstances, the actual pulse frequency output in the previous cycle in the flow signal is consistent with the calculation result of the host computer 3.

[0090] The control and counting module 2 is used to output a preset pulse frequency signal for the current period to the isolation and pulse output circuit 1 based on the actual pulse frequency signal received from the previous period, and to control the isolation and pulse output circuit 1 to be disconnected or turned on.

[0091] The isolation and pulse output circuit 1 is connected to the host computer; it is used to: output the actual pulse output frequency signal of the current cycle to the host computer 3, and to provide real-time feedback on the actual number of pulses output in the current cycle to the control and counting module 2.

[0092] The host computer 3 is connected to the pump valve 4; it is used to control the pump valve 4 to close or open based on the received pulse output frequency signal of the current cycle; it has a built-in preset total output pulse amount. The actual pulse frequency signal of the previous cycle is obtained based on the received pulse output frequency signal of the current cycle.

[0093] The control and counting module 2 has a built-in preset total output pulse count, which is used to count the actual output pulses fed back by the isolation and pulse output circuit 1 in real time; and is used to: when the total number of pulses received by the control and counting module 2 reaches the preset total output pulse count, stop outputting pulses to the isolation and pulse output circuit 1, so as to output a stop output pulse instruction to notify the host computer 3 to control the pump valve 4 to close after the total number of output pulses reaches the preset total output pulse count.

[0094] This invention provides an electromagnetic flowmeter pulse output system. The isolation and pulse output circuit is configured to simultaneously output pulses and provide real-time feedback of the actual number of pulses output within the current cycle to the control and counting module. The control and counting module is also configured to count the actual output pulses in real time. When the total number of pulses received by the control and counting module reaches a preset total output pulse count, it stops outputting pulses to the pulse output and feedback circuit and notifies the host computer to immediately close the pump valve after the total output pulse count reaches the preset total output pulse count. Compared to traditional methods that control the total output pulse count through host computer calculations, this invention avoids the problem of excessive pulse output caused by calculation delays and achieves precise control of pulse output.

[0095] In a further preferred embodiment, the host computer 3 is used to accumulate and calculate the total current output pulse based on the actual output pulse frequency signal of each cycle; the host computer 3 has the preset total output pulse built-in; and is used to: predict the stop time point for controlling the pump valve 4 to close based on the preset total output pulse, the current total output pulse, the actual pulse frequency signal of the previous cycle, and the prediction model; the host computer 3 receives the instruction to stop the output pulse, and when the predicted stop time point is reached, controls the pump valve 4 to close, so that the host computer 3 immediately controls the pump valve 4 to close after the last actual output pulse.

[0096] The specific details of the prediction model will be described in the subsequent section on electromagnetic flowmeter pulse output control methods, and will not be repeated here.

[0097] As can be seen from the solution provided in this embodiment, the host computer is configured to predict the closing time of the pump valve in advance, that is, to close the pump valve at a predicted time point before the preset total output pulse amount, Z pulses are output. This makes up for the defect of excessive pulse output caused by the delay in settlement by the host computer, and improves the accuracy of pulse output control. Thus, the pulse can be quickly output to the host computer, avoiding the limitation on the filling speed caused by the excessive amount of pulse output linearly increasing with the speed due to the delay in settlement, and indirectly improving the filling speed.

[0098] Furthermore, when executing the pump valve closing action, the host computer of this invention can combine the stop output pulse command issued by the control and counting module when the accumulated output pulse reaches the last pulse with the predicted pump valve closing time to determine the accurate time for closing the pump valve. This achieves the technical effect of the host computer immediately controlling the pump valve to close after the actual last output pulse. The host computer can ensure the accuracy of the pump valve closing time through two aspects of information, further guaranteeing the filling accuracy.

[0099] In a further preferred embodiment, the control and counting module 2 also has a self-testing function. The control and counting module 2 is used to compare the number of pulses actually output in the current cycle with the preset pulse frequency signal output in the current cycle within a settlement cycle. If the error exceeds a threshold range, a pulse output fault is determined.

[0100] In an optional embodiment of the present invention, the control and counting module 2 includes a first timing unit and a second timing unit. The first timing unit is connected to the isolation and pulse output circuit 1 and communicatively connected to the host computer 3; it is used to output a preset pulse frequency signal for the current period based on the actual pulse frequency signal of the previous period calculated by the host computer 3, thereby controlling the isolation and pulse output circuit 1 to open or close. The second timing unit is used to: receive the pulses actually output in the current period as real-time feedback from the isolation and pulse output circuit 1 and count them; and to: when the total number of received pulses reaches the preset total number of output pulses, control the first timing unit to stop outputting pulses to the isolation and pulse output circuit, and notify the host computer 3 to control the pump valve 4 to close after the total number of output pulses reaches the preset total number of output pulses.

[0101] Figure 2 yes Figure 1 A schematic diagram of the isolation and pulse output circuit 1 in one specific embodiment.

[0102] exist Figure 1 Based on, combined Figure 2Optionally, the pulse output and feedback circuit includes a pulse output execution module 11 and a pulse output feedback module 12. The pulse output execution module 11 has its input end connected to the first timing unit and its output end connected to the host computer 3. It is controlled by the current period preset pulse frequency signal to disconnect or connect, so as to output the actual pulse output frequency signal of the current period to the host computer 3.

[0103] The pulse output feedback module 12 has one end connected to the feedback terminal of the pulse output execution module 11 and the other end connected to the second timing unit; it is used to collect data in real time and turn the device on or off according to the electrical signal of the feedback terminal, so as to feed back the actual number of pulses output in the current cycle to the second timing unit.

[0104] Optionally, the pulse output execution module 11 includes: a first switching unit 111, a first optocoupler isolation unit 112, and a second switching unit 113. One end of the first switching unit 111 is connected to the first timing unit, and the other end is connected to the transmitting end of the first optocoupler isolation unit 112. The receiving end of the first optocoupler isolation unit 112 is connected to one end of the second switching unit 113; the other end of the second switching unit 113 is connected to the host computer 3. The first switching unit 111 and the first optocoupler isolation unit 112 are sequentially disconnected or connected according to the preset pulse frequency signal of the current period output by the first switching unit 111, so as to output the actual pulse output frequency signal of the current period to the host computer 4 through the second switching unit 113.

[0105] In one optional example, the first switching unit 111 includes a first transistor; the first optocoupler isolation unit 112 includes a first optocoupler; and the second switching unit 113 includes a second transistor. The base of the first transistor is connected to the first timing unit, the drain of the first transistor is connected to the first transmitter pin of the first optocoupler, and the source is grounded. The first receiver pin of the first optocoupler is connected to the base of the second transistor; the second transmitter pin and the second output pin of the first optocoupler are respectively connected to their respective operating power output terminals; the second receiver pin serves as the feedback terminal of the pulse output execution module 11. The drain of the second transistor is connected to the host computer 3, and the source is grounded. In a specific example, the transmitter of the first optocoupler is connected to a transmitter, which is a light-emitting diode; the receiver is connected to a receiver, which is a phototransistor.

[0106] In one optional embodiment, the pulse output feedback module 12 includes a comparison unit 121 and a second optocoupler isolation unit 122. The first input terminal of the comparison unit 121 is connected to the second receiving pin of the first optocoupler isolation unit 122, and the second input terminal is connected to the reference voltage output terminal. The output terminal of the comparison unit 121 is connected to the transmitting terminal of the second optocoupler isolation unit 122. It outputs a high level when the electrical signal is greater than the reference voltage, and outputs a low level otherwise. The electrical signal is used to characterize whether the first optocoupler isolation unit 122 is turned on or off. The receiving terminal of the second optocoupler isolation unit 122 is connected to the second timing unit. The second optocoupler isolation unit 122 is turned on when it receives a high level from the comparison unit 121, or turned off when it receives a low level, to feed back to the second timing unit the actual number of pulses output in the current period collected by the feedback terminal.

[0107] In one optional example, the comparison unit 121 includes a comparator, a first resistor, and a second resistor; the second optocoupler isolation unit 122 includes a second optocoupler. The first input terminal of the comparator is connected to the second receiving pin of the first optocoupler, and the second input terminal is connected to the reference voltage output terminal through the first resistor; the output terminal of the comparison unit 121 is connected to the first transmitting pin of the second optocoupler isolation unit 122, the positive power supply terminal is used to connect to the operating power supply voltage, and the negative power supply terminal is grounded; the second resistor is connected between the second input terminal and the ground terminal. The first receiving pin of the second optocoupler is connected to the power supply of its receiving terminal and is also connected to the second timing unit; the second receiving pin and the second transmitting pin are each grounded. In a specific example, the transmitting terminal of the first optocoupler is connected to a transmitter, which is a light-emitting diode; the receiving terminal is connected to a receiver, which is a phototransistor.

[0108] by Figure 2 Taking a specific pulse output and feedback circuit as an example, the pulse output system of an electromagnetic flowmeter according to the present invention will be specifically described: wherein, the control and counting module 2 is a flowmeter, the first timing unit is timer A, corresponding to output pin A, the second timing unit is timer B, corresponding to output pin B; the initial pulse frequency can be set to 5KHZ.

[0109] Reference Figure 1 and Figure 2 It can be seen that timer A in the main control microcontroller is configured to PWM mode, and the pulse is output at the maximum frequency signal of 5kHz of the electromagnetic flowmeter pulse output. This pulse is output on pin A of the microcontroller. The base of the first transistor Q1 is connected to the timer A through resistor R3. The drain of the first transistor is connected to the first transmitter pin of the first optocoupler U1, and the source is grounded.

[0110] The first receiving pin of the first optocoupler U1 is connected to the base of the second transistor Q2; the second transmitting pin of the first optocoupler U1 is connected to the power output terminal VDD through resistor R4, and the second output pin is connected to the B5V operating power output terminal through resistor R5. The drain of the second transistor is connected to the host computer 3, and the source is grounded. A resistor R6 is connected in parallel between the source and base of the second transistor Q2. Thus, timer A outputs PWM to control the opening and closing of the isolation optocoupler, and the opening and closing of the isolation optocoupler controls the opening and closing of the external transistor, thereby outputting pulses to the host computer 3 for reception.

[0111] The positive input of comparator U3 is connected to the second receiving pin of the first optocoupler U1, and the negative input is connected to the B5V reference voltage output through resistor R1. The output of comparator U3 is connected to the first transmitting pin of the second optocoupler U2 through resistor R7. The positive power supply is used to connect to the B5V operating voltage, and the negative power supply is grounded. Resistor R2 is connected between the second input and the ground. The first receiving pin of the second optocoupler U2 is connected to the VDD operating power supply terminal of its receiving end and is also connected to the timer B. The second receiving pin and the second transmitting pin are each grounded. Capacitor C1 is connected in series with resistor R8 and then connected between the VDD operating power supply terminal and the ground. At the same time, capacitor C1 is connected in parallel between the first receiving pin and the second receiving pin of the second optocoupler U2. This synchronizes the open / closed state of the aforementioned external transistor to the open / closed state of the reverse optocoupler U2. The open / closed state of the reverse optocoupler U2 is then input to the timer B through another pin B of the microcontroller. Timer B in the microcontroller is configured to receive external pulses. When Timer B receives a preset total output pulse count Z, it controls Timer A to stop outputting pulses.

[0112] This invention provides a control method for an electromagnetic flowmeter pulse output system, applicable to electromagnetic flowmeter pulse output systems. Figure 3 This is a schematic flowchart illustrating a control method for an electromagnetic flowmeter pulse output system according to an embodiment of the present invention. (See attached diagram.) Figure 3 The method includes steps S1 to S6:

[0113] S1: The host computer calculates and feeds back the actual pulse frequency signal output in the previous cycle to the control and counting module 2.

[0114] S2: The control and counting module outputs a preset pulse frequency signal for the current cycle to the isolation and pulse output circuit based on the received actual pulse frequency signal from the previous cycle, and controls the isolation and pulse output circuit to be disconnected or turned on.

[0115] S3: The isolation and pulse output circuit outputs the actual pulse output frequency signal of the current cycle to the host computer; and provides real-time feedback on the actual number of pulses output in the current cycle to the control and counting module.

[0116] S4: The host computer controls the pump valve to close or open based on the received pulse output frequency signal of the current cycle.

[0117] S5: The control and counting module counts the actual output pulses fed back by the isolation and pulse output circuit in real time; the control and counting module has a built-in preset total output pulse count.

[0118] S6: When the total number of pulses received by the control and counting module reaches the preset total number of output pulses, the control and counting module stops outputting pulses to the isolation and pulse output circuit, and outputs a command to stop outputting pulses, notifying the host computer to immediately control the pump valve to close after the total number of output pulses reaches the preset total number of output pulses.

[0119] This invention provides a control method for an electromagnetic flowmeter pulse output system. While the isolation and pulse output circuit outputs pulses, it simultaneously feeds back the actual number of pulses output within the current cycle to the control and counting module. The control and counting module counts the actual output pulses in real time. When the total number of pulses received by the control and counting module reaches a preset total output pulse count, it stops outputting pulses to the pulse output and feedback circuit and notifies the host computer to immediately close the pump valve after the total output pulse count reaches the preset total output pulse count. Compared to the traditional method of controlling the total output pulse count through host computer calculation, this invention avoids the problem of excessive pulse output caused by calculation delays and achieves precise control of pulse output.

[0120] In a further preferred embodiment, before the host computer controls the pump valve to close immediately after the accumulated output pulses reach the preset total output pulse count in step S6, the method further includes:

[0121] The host computer calculates the total number of output pulses based on the actual output pulse frequency signal of each cycle; the host computer has a built-in preset total number of output pulses.

[0122] The host computer predicts the stop time point for controlling the pump valve to close based on the preset total output pulse, the current total output pulse, the actual pulse frequency signal output in the previous cycle, and the prediction model; and is used to: receive the instruction to stop the output pulse, and when the predicted stop time point is reached, control the pump valve to close, so that the host computer immediately controls the pump valve to close after the last pulse is actually output.

[0123] As can be seen from the solution provided by this embodiment, the host computer predicts in advance the time point for controlling the closing of the pump valve, that is, by predicting when the actual output reaches the preset total amount of output pulses, the valve is accurately closed, rather than performing the closing operation only when the total amount is settled in the traditional way, which compensates for the defect of excessive pulse output caused by the delay in the host computer settlement and improves the accuracy of pulse output amount control; thus, the host computer can configure a faster pulse output rate, avoid the limitation of the canning speed caused by the excessive amount increasing linearly with the speed due to the delayed settlement, and indirectly improve the canning speed.

[0124] Furthermore, when the host computer closes the pump valve, by combining the predicted time for closing the pump valve with the instruction received from the control and counting module to stop outputting pulses when the cumulative output pulses reach the last pulse, it is achieved that after the actual output of the last pulse, the host computer immediately and accurately controls the closing of the pump valve. The host computer can ensure the accuracy of the pump valve closing moment through two aspects of information, further ensuring the canning accuracy.

[0125] Optionally, the prediction model includes: assuming that the actual pulse frequency signals output within the (N + 1)th and (N + 2)th periods are both k, when Y + K < Z and Y + K + K >= Z, the pump valve is closed between the (N + 1)th and (N + 2)th periods; where Z represents the preset total amount of output pulses; Y represents the current total amount of currently actually sent output pulses; then: then: the host computer calculates the predicted cut-off time t = ((Z - Y - K) / K)*T for controlling the closing of the valve according to formula (1), and the current total amount of currently actually sent output pulses Y, the preset total amount of output pulses Z, and the actual pulse frequency signal k output in the previous period of the (N + 1)th period, formula (1); where T is the pulse settlement period. The host computer outputs Z - Y pulses after the predicted cut-off time t in the Nth period, reaches the stop time point, and controls the pump valve to close. Further, according to formula (2), it can be obtained that: total time: t 总 = N*T + t; formula (2).

[0126] Specifically, when the host computer calculates the pump valve stop time, it always outputs the number of pulses calculated in the previous flow settlement period based on the pulse output period. Since the flow can be considered stable within a short period of time, it can be predicted that the number of settlement pulses in the next period is very close to and can be considered equal to the number of settlement pulses in the previous period. Assume this number of pulses is K. Since the maximum output frequency is 5Khz, the time for outputting pulses is K / 5000, in seconds. It is impossible to end within the time of outputting K pulses, and it can only end within the time range of K / 5000~T. The total number of target pulses is Z, and the total number of pulses already sent is Y.

[0127] Figure 4It is a timing diagram for predicting the time to stop outputting pulses by a prediction model according to an embodiment of the present invention. As Figure 4 shown, when Y + K < Z and Y + K + K >= Z, it can be predicted that the valve should be closed at a certain time point between the N+1 and N+2 cycles, rather than stopping the valve during the N+2 output cycle; the predicted stop time point is: within the Nth cycle, after time t, t = (Z - Y - K) / K. Due to the delay in the host computer settlement, therefore, in the Nth cycle, when the host computer outputs Z - Y pulses within the time t = ((Z - Y - K) / K)*T calculated by the host computer, the valve closing action can be executed in advance. At this time, the actual stop time is just at a certain time point between the N+1 and N+2 cycles, and the number of output pulses is exactly Z. The pulse frequency f at this time is (Z - Y) / (((Z - Y - K) / K)*T). The total filling duration is N*T + t. Through the above process, the number of output pulses can be controlled quickly and accurately, so that the cumulative amount of the flowmeter can be quickly output to the host computer, and the host computer can quickly close the valve, achieving the purpose of accurately controlling the filling amount.

[0128] In summary, the present invention provides a control method and system for an electromagnetic flowmeter pulse output system, which is applied to the rapid feedback of the cumulative amount of pulses in the filling industry. The isolation and pulse output circuit is configured with a real-time pulse feedback function, and the control and counting module is configured with a function of real-time counting of the feedback pulses. The system accurately determines the moment to execute the pump valve closing through counting, avoiding the problem of excessive pulse output caused by relying on the host computer settlement delay, and realizing the rapid and accurate output of pulses.

[0129] Furthermore, in the present invention, the host computer has a function of predicting the time point for closing the pump valve. When executing the instruction to close the pump valve, it will also combine the two aspects of information of the predicted time to close the pump valve in advance and the received instruction. When reaching the last pulse, it ensures that the pump valve closing moment is accurate and无误, further ensuring the accuracy of the time point for executing the pump valve closing and improving the filling accuracy.

Claims

1. A control method for an electromagnetic flowmeter pulse output system, characterized in that, Applied to electromagnetic flowmeter Pulse output system, the system includes: a host computer, a pump valve, a control and counting module, and an isolation and pulse output circuit; the method includes: The host computer calculates and feeds back the actual pulse frequency signal output in the previous cycle to the control and counting module; The control and counting module outputs the preset pulse frequency signal of the current cycle to the isolation and pulse output circuit according to the received actual pulse frequency signal output in the previous cycle, and controls the isolation and pulse output circuit to be disconnected or turned on; The isolation and pulse output circuit outputs the pulse output frequency signal actually output in the current cycle to the host computer; and feeds back the actual number of pulses output in the current cycle to the control and counting module in real time; The host computer controls the pump valve to close or open according to the pulse output frequency signal actually output in the current cycle received; The control and counting module performs real-time counting on the actual output pulses fed back by the isolation and pulse output circuit in real time; the control and counting module has a preset total output pulse amount built in; When the total number of pulses accumulated by the control and counting module reaches the preset total output pulse amount, stop outputting pulses to the isolation and pulse output circuit, so as to output an instruction to stop outputting pulses, and notify the host computer to control the pump valve to close immediately after the accumulated output pulses reach the preset total output pulse amount; Before the host computer controls the pump valve to close immediately after the accumulated output pulses reach the preset total output pulse amount, it further includes: The host computer accumulatively calculates the current total output pulse amount according to the actual pulse output frequency signals of each cycle; the host computer has the preset total output pulse amount built in; The host computer predicts the stop time point for controlling the pump valve to close according to the preset total output pulse amount, the current total output pulse amount, the actual pulse frequency signal output in the previous cycle, and a prediction model; So that: when the host computer receives the instruction to stop outputting pulses and reaches the predicted stop time point, it controls the pump valve to close, so that immediately after the last pulse is actually output, the host computer just controls the pump valve to close.

2. The control method of the electromagnetic flowmeter pulse output system according to claim 1, wherein The prediction model includes: Assume that the actual pulse frequency signals output in the N+1 and N+2 are both K. When Y+K<Z and Y+K+K>=Z, the pump valve is closed between the N+1 and N+2 cycles; Where, Z represents the preset total output pulse amount; Y represents the current total output pulse amount actually sent so far until the stop time point; then: The host computer calculates the predicted cut-off time t for controlling the valve to close according to formula (1), the current total output pulse amount Y actually sent so far, the preset total output pulse amount Z, and the actual pulse frequency signal k output in the previous cycle of the N+1th cycle: t=((Z-Y-K) / K)*T, formula (1); where, T is the pulse settlement cycle; When the host computer outputs ZY pulses in the Nth cycle, it reaches the stop time point and controls the pump valve to close.

3. An electromagnetic flowmeter pulse output system, characterized in that, A control method for implementing the electromagnetic flowmeter pulse output system according to any one of claims 1-2; the system comprising: Host computer, pumps and valves, control and counting modules, and isolation and pulse output circuits; The control and counting module is connected to the isolation and pulse output circuit and is also connected to the host computer. The host computer is used to calculate and feed back the actual pulse frequency signal output in the previous cycle to the control and counting module. The control and counting module is used to output a preset pulse frequency signal for the current period to the isolation and pulse output circuit based on the actual pulse frequency signal received from the previous period, and to control the isolation and pulse output circuit to be turned on or off. The isolation and pulse output circuit is connected to the host computer; it is used to output the actual pulse output frequency signal of the current cycle to the host computer, and to provide real-time feedback on the actual number of pulses output in the current cycle to the control and counting module. The host computer is connected to the pump valve; it is used to control the pump valve to close or open based on the received pulse output frequency signal of the current cycle. The control and counting module has a built-in preset total output pulse count, used for real-time counting of the actual output pulses fed back by the isolation and pulse output circuit; and used for: When the total number of pulses received by the control and counting module reaches the preset total number of output pulses, it stops outputting pulses to the isolation and pulse output circuit, and outputs a command to stop outputting pulses, notifying the host computer to immediately control the pump valve to close after the total number of output pulses reaches the preset total number of output pulses.

4. The electromagnetic flowmeter pulse output system as described in claim 3, characterized in that, The host computer is also used to calculate the total current output pulse based on the actual output pulse frequency signal of each cycle. The host computer has a built-in preset total output pulse count; And for: predicting the stop time point for controlling the pump valve to close based on the preset total output pulse, the current total output pulse, the actual pulse frequency signal output in the previous cycle, and the prediction model; This ensures that: upon receiving the instruction to stop output pulse, and upon reaching the predicted stop time point, the pump valve is controlled to close, so that the host computer immediately controls the pump valve to close after the last pulse is actually output.

5. The electromagnetic flowmeter pulse output system as described in claim 4, characterized in that, The control and counting module includes: a first timing unit and a second timing unit; The first timing unit is connected to the isolation and pulse output circuit and communicates with the host computer; it is used to output a preset pulse frequency signal for the current period based on the actual pulse frequency signal of the previous period calculated by the host computer, so as to control the isolation and pulse output circuit to be turned on or off. The second timing unit is used to receive the actual pulses output in the current cycle as real-time feedback from the isolation and pulse output circuit, and to count them; and is used to: When the total number of pulses received reaches the preset total number of output pulses, the first timing unit is controlled to stop outputting pulses to the isolation and pulse output circuit, and the host computer is notified to control the pump valve to close after the total number of output pulses reaches the preset total number of output pulses.

6. The electromagnetic flowmeter pulse output system as described in claim 5, characterized in that, The isolation and pulse output circuit includes: a pulse output execution module and a pulse output feedback module; The pulse output execution module has an input end connected to the first timing unit and an output end connected to the host computer. It is controlled by the current cycle preset pulse frequency signal to disconnect or connect, so as to output the actual pulse output frequency signal of the current cycle to the host computer. The pulse output feedback module has one end connected to the feedback terminal of the pulse output execution module and the other end connected to the second timing unit; it is used to collect data in real time and turn the device on or off according to the electrical signal of the feedback terminal, so as to feed back the actual number of pulses output in the current cycle to the second timing unit.

7. The electromagnetic flowmeter pulse output system as described in claim 6, characterized in that, The pulse output execution module includes: a first switching unit, a first optocoupler isolation unit, and a second switching unit; One end of the first switching unit is connected to the first timing unit, and the other end is connected to the transmitter of the first optocoupler isolation unit; The receiving end of the first optocoupler isolation unit is connected to one end of the second switching unit; the other end of the second switching unit is connected to the host computer. The first switching unit and the first optocoupler isolation unit are used to sequentially disconnect or connect according to the preset pulse frequency signal of the current period output by the first switching unit, so as to output the actual pulse output frequency signal of the current period to the host computer through the second switching unit.

8. The electromagnetic flowmeter pulse output system as described in claim 7, characterized in that, The first switching unit includes a first transistor; the first optocoupler isolation unit includes a first optocoupler; the second switching unit includes a second transistor. The base of the first transistor is connected to the first timing unit, the collector of the first transistor is connected to the first emitter pin of the first optocoupler, and the emitter is grounded. The first receiving pin of the first optocoupler is connected to the base of the second transistor; the second transmitting pin and the second receiving pin of the first optocoupler are respectively connected to their respective operating power output terminals; the second receiving pin serves as the feedback terminal of the pulse output execution module. The collector of the second transistor is connected to the host computer, and the emitter is grounded.

9. The electromagnetic flowmeter pulse output system as described in claim 8, characterized in that, The pulse output feedback module includes a comparison unit and a second optocoupler isolation unit; The first input terminal of the comparator unit is connected to the second receiving pin of the first optocoupler isolation unit, and the second input terminal is connected to the reference voltage output terminal; the output terminal of the comparator unit is connected to the transmitting terminal of the second optocoupler isolation unit. The signal is used to output a high level when the electrical signal is greater than the reference voltage, and a low level otherwise; the electrical signal is used to characterize the signal that the first optocoupler isolation unit is turned on or off. The receiving end of the second optocoupler isolation unit is connected to the second timing unit; the second optocoupler isolation unit is used to turn on when it receives a high level from the comparison unit, or to turn off when it receives a low level, so as to feed back to the second timing unit the number of pulses actually output in the current period collected by the feedback end.