Vortex flowmeter testing apparatus and method

By employing multi-threaded management and serial port information processing methods, efficient parallel testing of vortex flowmeters was achieved, solving the problems of low efficiency and high resource consumption in existing technologies, and improving testing accuracy and stability.

CN119394406BActive Publication Date: 2025-11-04SHANGHAI FEEJOY ELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411457123.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-11-04
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing vortex flowmeters have low testing efficiency, require manual testing, occupy a large space, are costly, and make it difficult to conduct parallel testing of multiple products.

Method used

A multi-threaded refresh timer queue and unified serial port data reception and processing method is adopted. The test process is managed by timer threads, serial port information is processed uniformly, and parallel testing of multiple vortex flowmeters is realized. A compensation coefficient is used to correct the transmitter voltage signal.

Benefits of technology

It improves testing efficiency, reduces system resource consumption, lowers the probability of lag and crashes, enables simultaneous testing of multiple vortex flow meters, and improves accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119394406B_ABST
    Figure CN119394406B_ABST
Patent Text Reader

Abstract

The application discloses a vortex flowmeter testing device and method, which is suitable for PCBA testing and comprises the following steps: receiving a starting instruction to execute a starting self-check and completing test variable initialization according to parameter configuration; maintaining a timing thread; the timing thread refreshes a timing queue through a preset time, and determines whether timing time is reached by comparing the timing time conversion times of threads in the queue, and then executes operation as required to meet the timing requirements of each test thread; and maintaining a receiving data processing thread; the receiving data processing thread receives all serial port information and processes the serial port information; after initialization is completed, test actions are executed according to test commands. Through the application, the purposes of simultaneously testing multiple vortex flowmeters and multiple test procedures can be achieved; on the other hand, system resource consumption can be greatly reduced, and the probability of occurrence of lag and death is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of vortex flow meter testing devices and methods. BACKGROUND

[0002] Printed Circuit Board Assembly (PCBA) is an important process in the production of electronic products. With the miniaturization of components, the increasing complexity of products, and the shortening of time to market, the importance of PCBA testing is increasing, and the efficiency requirements are also increasing.

[0003] PCBA function testing is a testing method that verifies the functionality of a PCBA by providing a simulated operating environment and obtaining parameters in various states. It typically includes the measurement of functional parameters such as voltage, current, power, power factor, frequency, duty cycle, and position determination. The PCBA testing process includes program burning, ICT testing, FCT testing, and aging testing. FCT testing provides a simulated operating environment such as excitation and load to the PCBA board, obtains various state parameters of the board, and detects whether the functional parameters of the board meet the design requirements. The PCBA testing process is to provide an input signal to a functional module and obtain the corresponding output signal. By judging whether the output signal is correct, it can determine whether the functional module has defects.

[0004] Existing vortex flow meter (VMF) testing is performed manually with corresponding fixtures to test one product at a time. Linearly, each test project executes the corresponding test script, resulting in low testing efficiency. If there are large quantities of products, multiple testing devices and multiple operators are required, which not only occupies a large space, but also requires more manpower, and the practicality is low. SUMMARY

[0005] The present application aims to provide a vortex testing device that can efficiently test vortexes and overcome the problems existing in parallel testing.

[0006] To achieve the above object, the first aspect of the present application provides a vortex test device suitable for PCBA test, comprising: receiving a start instruction to perform a start self-check, and completing test variable initialization according to parameter configuration; maintaining a timing thread execution; the timing thread refreshes a timing queue through a preset time, and determines whether the timing time is reached by comparing the timing time conversion times of each thread in the queue, and then performs an operation as needed; defining a thread class object triggered by timing, and presetting the thread object trigger time as n, and applying a variable for recording the current trigger times TimeCount of the thread; and applying an array for saving the scanning times Count of each specified serial port; the scanning times Count is calculated and obtained according to the preset timing time W and the trigger time n, and the array value of the scanning times Count array is greater than 0; when a thread event occurs, the trigger times TimeCount is increased; when the array value in the scanning times Count array is less than or equal to the trigger times TimeCount, a specified operation is performed on the corresponding serial port; maintaining a receiving data processing thread; the receiving data processing thread receives all serial port information and performs serial port information processing; after the initialization is completed, a test action is performed according to a test command.

[0007] In one or more embodiments, the maintaining a receiving data processing thread; the receiving data processing thread receiving all serial port information and performing serial port information processing comprises: defining a serial port receiving data processing thread class object; applying a string list object as a receiving buffer of serial port receiving data; in the receiving event of each serial port, the return data is stored in the string list object; in the thread trigger event of the serial port receiving data processing thread class object, the content of the string list object is parsed according to the content of the string list object.

[0008] In one or more embodiments, after the return data is stored in the string list object in the receiving event of each serial port, the return data is further added with a corresponding identification mark for distinguishing; the identification mark comprises attribute information corresponding to the return data.

[0009] In one or more embodiments, the test action performed according to the test command comprises: compensating the variable voltage signal value in the test according to a compensation coefficient; the compensation coefficient is the average value of the measurement error according to the device test and the manual test of a plurality of groups of standard vortex flowmeters.

[0010] To achieve the above object, the second aspect of the present application provides a vortex flowmeter testing device, which is suitable for PCBA testing and comprises: an initialization unit, which receives a start instruction to perform a start self-check and completes initialization of testing variables according to parameter configuration; a processing unit, which comprises a first creation module for maintaining a timing thread execution; the timing thread refreshes a timing queue through a preset time and determines whether the timing time is reached by comparing the timing time conversion times of threads in the queue, and then performs an operation as needed; and a receiving data processing thread is maintained; the receiving data processing thread receives all serial port information and performs serial port information processing; a thread class object triggered by a timing is defined, a thread object triggering time n is preset, and a variable is applied to record the current triggering times TimeCount of the thread; and an array for saving the scanning times Count of each specified serial port is applied; the scanning times Count are obtained according to the preset timing time W and the triggering time n, and the array values of the scanning times Count array are greater than 0; when a thread event occurs, the triggering times TimeCount are increased; when the array values in the scanning times Count array are less than or equal to the triggering times TimeCount, a specified operation is performed on the corresponding serial port; and an execution unit performs a testing action according to a testing command after the initialization is completed.

[0011] In one or more embodiments, the processing unit comprises a second creation module for defining a serial port receiving data processing thread class object and applying a string list object as a receiving buffer of serial port receiving data; a receiving module for storing return data into the string list object in a receiving event of each serial port; and a parsing module for sequentially parsing messages according to the content of the string list object in a thread triggering event of the serial port receiving data processing thread class object.

[0012] In one or more embodiments, the receiving module is further used for adding a corresponding identification mark to the return data for distinguishing; and the identification mark comprises attribute information corresponding to the return data.

[0013] In one or more embodiments, the execution unit comprises a compensation module for compensating a variable voltage signal value in testing according to a compensation coefficient; and the compensation coefficient is an average value of measurement errors according to device testing and manual testing of a plurality of groups of standard vortex flowmeters.

[0014] Compared with the prior art, the vortex flowmeter testing device has the following beneficial effects:

[0015] The method of refreshing the timing queue by using multi-thread can sequentially refresh all related timing requirements in a timing thread, and at the same time, all serial port received data can be stored in the receiving buffer by using the receiving buffer and the separate serial port receiving data processing thread, and all of them can be processed by a serial port receiving data processing thread. Therefore, on the one hand, the method of multi-thread and state machine can replace the traditional vortex test to solve the problems of low efficiency, high cost and large space of manual or fixture testing of one product at a time, and achieve the purpose of testing multiple vortex flowmeters and multiple test procedures at the same time; on the other hand, the system resource consumption can be greatly reduced, and the probability of freezing and crashing can be greatly reduced, and even it basically does not appear in the applicant's test. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.

[0017] Figure 1 is a flowchart of a vortex flowmeter test method according to an embodiment of the present application;

[0018] Figure 2 is a structural schematic diagram of a vortex flowmeter test device according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the person skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creating any creative labor should belong to the scope of protection of the present application.

[0020] In order to solve the low efficiency and high cost problems existing in the vortex flowmeter test due to the use of single test, the applicant explores the way of parallel detection to realize the test of multiple vortex flowmeters at the same time. In order to achieve the above purpose, the applicant uses the method of multi-thread for the test software, hoping to achieve the purpose of testing multiple products and multiple test procedures at the same time. The specific test steps are as follows:

[0021] (1) After the software self-checking is started and completed, the system completes the initialization of related variables according to the user's configuration of product parameters, and starts the test according to the indication.

[0022] (2) The software starts the same number of test threads according to the number of products to be tested. Usually, one test thread is responsible for the test action of one product to be tested, and multiple test threads can simultaneously execute tests on multiple products to be tested. In addition, another management thread and a data receiving and processing thread need to be started. The management thread can be used to control the state of the test thread, and the data receiving and processing thread is used to process the returned data of each product.

[0023] (3) Each test thread sends relevant commands to the product through the serial port in sequence according to the test procedure of the product to be tested.

[0024] (4) The data receiving and processing thread performs real-time monitoring and processes the returned data and state of the tested product. After analysis, it is passed to the display module for real-time display, while marking the current test product procedure state.

[0025] (5) The management thread can monitor the state of each test product procedure in real time, and adjust the corresponding test thread to ensure the stability of the test and the synchronization of the state of each test thread.

[0026] (6) After the test procedure of each product to be tested is completed, the test system judges the qualified and unqualified products according to the previous product parameter configuration, and gives a prompt to the user for packaging.

[0027] (7) The user decides whether to continue testing according to the test needs. If yes, the product is put in and the start key is pressed; if not, the product is not put in or the stop test key is pressed, and the test is automatically stopped.

[0028] When the applicant designs and implements this test method, the first software problem encountered is that the system resource consumption is too large, which causes the program to be prone to freezing and crashing. Since each serial port, timer and thread consumes certain system resources (CPU time and memory space are both resources) in the Win system. In the implementation example of the software test process, ten serial ports are occupied by products to be tested, and each serial port controls one product to be tested. Other serial ports are occupied by other test modules inside the device: pulse capture module, transmission capture module, relay control board, PLC, program-controlled power supply, digital camera, two-dimensional code scanner and other devices, so seventeen serial ports need to be controlled in real time. In order to control stability in real time, each sent message is equipped with a timer for real-time monitoring, and has a retransmission mechanism. Each serial port has a read and write thread separately to ensure the stability and reliability of sending. The timer also uses multiple threads to ensure the accuracy of the system when it is busy and the action is executed on time. At the same time, the system control logic is one product one thread, plus a management thread. Therefore, when the software is running, the system will have: (serial ports) + (timers) + (Products) +1 (management), a total of 62 threads running simultaneously, so it will consume a large amount of system resources. When there are abnormal products to be tested or other time-consuming tasks, the system is prone to freezing, dead phenomenon.

[0029] To solve this problem, the applicant has tried various methods, including, for example, placing the serial port in the main thread; the serial port uses a single thread to send and receive; or the timer is placed in the main thread; such as setting the system control logic to use the main thread event mode... But the overall effect is not good, and some effects will be worse.

[0030] Compared with the traditional way of testing one test product at a time by manual and corresponding fixtures, since the system needs to simultaneously consider and respond to the test execution of multiple test products, abnormal events and other processing work, the design difficulty is greatly increased, which is also the reason why parallel testing is difficult to implement in vortex flowmeter testing. Based on the above problems, the embodiment of the application discloses a vortex flowmeter testing method, which can be applied to PCBA testing of vortex flowmeters. Specifically, the testing method can include:

[0031] Step S101, receiving a start instruction to perform a self-check, and completing test variable initialization according to parameter configuration;

[0032] In this embodiment, when testing is needed, the operator can first double-click the test software icon on the computer desktop to start the test software. After the system receives the start instruction, it first performs a self-check, such as a self-check of the PCBA testing equipment and communication lines, detects whether each internal module and device system can normally communicate and respond, then reads system configuration parameter information, and initializes the system. After completion, the software interface is displayed for operation.

[0033] Further, according to the product caliber and output signal type, the test software can provide the operator with corresponding options for selection, and according to the test accuracy requirement, the error range of the test parameters set by the test personnel is received, which is used as a basis for judging whether the product is qualified or not.

[0034] In actual operation, after the initialization work is completed and the operator clicks the "start test" button of the software, automatic testing can be started. The test system will control the equipment turntable to rotate in turn (multiple test stations can be provided for simultaneous testing, such as 3 or more), press down the product to be tested, and lift the test needle to connect to the test point of the PCBA.

[0035] Step S102, maintaining a timing thread to meet the timing requirements of each test thread; the timing thread refreshes the timing queue by preset time, determines whether the time has arrived by comparing the timing time conversion times of each thread in the queue, and then executes the operation as needed to meet the timing requirements of each test thread;

[0036] In the embodiment, before the test procedure, the system first defines a thread class object T1 triggered by timing, sets the trigger time to a specified value such as n (mS), and applies a global trigger time TimeCount to record the current thread trigger times. At the same time, a two-dimensional array A[z] for saving the scan times is also applied. The array index z represents the serial port number, and its value is determined according to the number of serial ports required for testing; the array value of a specified index represents the scan times converted from the timing time of the specified serial port. For example, assuming that the value of array A[1] is equal to 3, it represents that the scan times converted from the timing time of serial port 1 is 3. When the timing of a serial port, such as serial port B, is required, the system directly assigns a value to array A[B] and synchronizes during the assignment to avoid other problems.

[0037] The scan times Count above are calculated according to the preset timing time W and the trigger time n. The preset timing time W here represents the actual timing time required by each test thread. For example, if test thread 1 requires timing for 3000 (mS), then the W corresponding to test thread 1 is 3000.

[0038] Assuming that the actual timing time required is W (mS) and the array fill-in value is Count, then the relationship between the thread class object trigger time n and Count is: Count = W / n. In the specific implementation, W can be defined as an integer multiple of n, that is, Count only takes an integer to minimize the timing error. If no timing is required, Count can be directly assigned a value of 0 to cancel the timing setting.

[0039] In the thread event, each time into, TimeCount increases 1; then scan all values of array A in turn, and compare the required timing number A[X] and the current scan number TimeCount. Scan number TimeCount is increased from 0, while A[X] value is a number greater than 0. When the required timing value is not reached, TimeCount is less than A[X]. Only when TimeCount increases to its value greater than or equal to A[X] value, that is, TimeCount >= A[X], it means that the time has come or exceeded the demand. Relative to A[X] value, that is, A[X] is less than or equal to TimeCount, that is, A[X] <= TimeCount. At this time, the timing time of X serial port is up, so the corresponding code of X serial port is directly executed. After the execution is completed, the array A[X] value can be assigned 0, thereby completing the realization of the timing function of each test thread.

[0040] It should be pointed out that, in order to prevent the specified thread from having no timing demand (that is, A[k]=0), the special case of repeated execution of the logic operation needs to be prevented. A[k]>0 needs to be added after the condition A[k]<=TimeCount. It is required that the two conditions are met at the same time.

[0041] In the specific implementation, the pseudo code implementation of step S102 is as follows:

[0042] / *** declaration of thread object, setting trigger time, definition of array and variable*** /

[0043] TimeThread T1;

[0044] T1.inteval = n; / / thread object trigger time is set to n;

[0045] int A[Z]={0,0,........};

[0046] Word TimeCount =0;

[0047] / ******* in the process position B that needs timing****** /

[0048] Word S= 0;

[0049] S= serial port B timing time / T1.inteval; / / timing time is converted into scan number

[0050] / / add synchronization statement here

[0051] A[B] = S; / / specified serial port B timing time is converted into scan number

[0052] / / Here add exit synchronization statement

[0053] / ************in thread event************** /

[0054] ++TimeCount;

[0055] / / Actually in order to prevent the need for no timing, the operation is executed, this place to increase A[k] > 0 condition limit

[0056] If((A[k]<=TimeCount) && (A[k] > 0))

[0057] {..... / / When the serial port k timing time to do things

[0058] A[k]=0; / / Prevent repeated execution

[0059] } .....

[0061] Those skilled in the art can understand that the step S102 can be in the step S101 test system startup execution is complete related parameters, such as TimeCount and array A initialization, but also in step S101 after execution, the test begins to create and initialize, it all belong to the protection scope of the present embodiment.

[0062] Step S103, maintaining a receiving data processing thread;

[0063] In the present embodiment, the test system will also create a receiving data processing thread, for unified reception of all serial port information and serial port information processing. Specifically, the creation and maintenance of a receiving data processing thread can include:

[0064] (1) define a serial port receiving data processing thread class object RecvData;

[0065] (2) apply a string list object as a receiving buffer, for saving serial port receiving data;

[0066] (3) in each serial port receiving event, the return data is stored in the receiving buffer formed by the string list, and appropriate identification mark (may be related to the attribute information of the data, such as table number, process number, command identification code, etc.), so as to distinguish the subsequent return data analysis;

[0067] (4) in the thread triggering event of RecvData, according to the content of the string list object list, the message is parsed in turn.

[0068] In a specific implementation, the pseudo code implementation of step S103 is as follows:

[0069] / *************define thread object, string list cache************ /

[0070] TRecvData RecvData; / / thread object for processing serial port received data

[0071] Tstringlist ST; / / serial port return message, receive cache

[0072] / **************** in each serial port receiving event *************** /

[0073] String s;

[0074] S = '';

[0075] / / here F represents the data message returned by the serial port

[0076] / / add appropriate identification mark before receiving the command

[0077] S = 'table number:'+ A + '; process number:'+ B + '; command identification code:'+ D + ';'+ F;

[0078] ST.add(s); / / store in the receive buffer ........

[0080] / ******************RecvData thread triggering event in****************** /

[0081] String CmdStr; / / save the extracted serial port return command string

[0082] Word L, i, TableCount, No, CmdID;

[0083] BufCount = ST.Count; / / get the data number of the buffer

[0084] CmdStr = '';

[0085] for (i = 0; i < BufCount; i++)

[0086] {

[0087] D = ST.string[i]; / / take out the ith cache data D

[0088] / / Extract table number, procedure number, command identification code, and serial port return command from cache data D

[0089] ExtractData(D, TableCount, No, CmdID, CmdStr);

[0090] switch(No) / / Process according to procedure number

[0091] {1 :....; break;

[0092] 2: switch(CmdID) / / Assume the second procedure has multiple commands, process according to command identification code

[0093] { 1:.....; break; 2:...... .........

[0096] } ......

[0098] }

[0099] }

[0100] ST.clear; / / Clear all data in the receive cache

[0101] Those skilled in the art can understand that the step S103 and the aforementioned step S102 do not have a certain sequence. The division into two steps here is only for convenience of explanation, and does not constitute a limitation on the protection scope of the embodiment.

[0102] Step S104, execute test action according to test command.

[0103] When the timing time is up, the subsequent test procedures can be completed according to the test script, for example, the following internal modules of the control device complete a series of test actions on the product to be tested: Flash read / write test, temperature calibration and test, pulse test, variable transmission calibration and test, product two-dimensional code scanning, product display video capture, etc., and the judgment results of each test procedure and real-time test data corresponding to each product are displayed in real time on the software interface.

[0104] In actual testing, the applicant found that due to the influence of the measurement accuracy of the internal measurement module of the device and the internal line impedance, some test physical quantities are affected, resulting in the problem of "uncertain measurement and inaccurate calibration". The transmission voltage signal is one of them. In the vortex street test, the transmission voltage signal value and the standard value error are large, and each error is different. To this end, the applicant tries to solve it by standardizing the wiring length, which has a certain effect after testing, and can make the error smaller, but still there are some differences with the manual test results, and it is difficult to achieve accurate measurement. After analyzing and trying various processing methods, the embodiment adopts the method of compensating the device, that is, when executing the test action according to the test command, the transmission voltage signal value in the test can also be compensated according to the compensation coefficient. The compensation coefficient can be the average value of the measurement error according to the device test and manual test of a plurality of standard vortex street flowmeters. Specifically: during device debugging, first test several standard products with the device, and then test the same group of standard products manually with the standard source. After repeated testing of multiple standard products, the difference between machine testing and manual testing of each standard product is recorded, and finally the average value of multiple records is taken as the compensation coefficient for storage. When testing the transmission voltage next time, the corresponding compensation coefficient is taken out according to the table number to compensate the result. Because this compensation coefficient is the average value of multiple measurement errors, it is very close to the real line error. After compensation, the voltage data and the real data error are very small, and the error caused by the line can be perfectly compensated.

[0105] When all the corresponding processes of the products are tested, the test system automatically controls the mold to pop up and release the products. The pass judgment is performed, and then the judgment result box is popped up to distinguish the good products from the bad products; at the same time, the test data and the process test results of each product are saved in the background for query.

[0106] If subsequent testing is still needed, the product can be placed in another station before the current mold pops up and releases the product, and the testing can be continued in this way. If you don't want to test, you can click the stop testing button during testing. After receiving the relevant instruction, the test system will automatically stop after this test is completed, or you can directly stop placing the product. After the test is completed, the test system will automatically stop when there is no product, or you can stop pressing the start key of the test device, and the test system will respond and stop.

[0107] The embodiment adopts the mode of refreshing the timing queue thread and the unified serial port receiving thread, on one hand, all timing requirements are refreshed in a timing thread in turn, on the other hand, all serial port receiving information processing is processed by a thread module. In this way, the resource competition probability is greatly reduced, and the simultaneous testing of multiple vortex flowmeters can be carried out smoothly, overcoming the problem that only single testing of vortex flowmeters can be carried out due to the related technical obstacles. At the same time, the voltage transmission signal is compensated by using a compensation coefficient, and the related quantity is corrected, which can effectively overcome the error caused by the line.

[0108] In order to solve the above technical problems, the embodiment of the application further discloses a vortex flowmeter testing device which can be applied to PCBA testing, comprising: an initialization unit which receives a start instruction to perform a start self-checking and completes testing variable initialization according to parameter configuration; a processing unit which is used for maintaining a timing thread execution; the timing thread refreshes a timing queue through multi-threading, realizes timing requirements of each testing thread, and then sequentially issues a testing instruction; a receiving data processing thread is maintained; the receiving data processing thread receives all serial port information and performs serial port information processing; and an execution unit which executes a testing action according to a testing command after initialization is completed.

[0109] In the specific implementation, the processing unit of the vortex flowmeter testing device can comprise: a first creation module which is used for defining a thread class object triggered by timing, pre-setting a thread object triggering time n, and applying a thread current triggering time TimeCount for recording; and applying an array for saving the scanning times Count of each specified serial port; the scanning times Count are calculated according to the preset timing time W and the triggering time n; and an execution module which increases the triggering times TimeCount when a thread event occurs, and issues a testing instruction to the corresponding serial port when the array value in the array is less than or equal to the triggering times TimeCount.

[0110] In the specific implementation, the processing unit of the vortex flowmeter testing device comprises: a second creation module which is used for defining a serial port receiving data processing thread class object and applying a string list object list as a receiving buffer of the serial port receiving data; a receiving module which is used for storing the returned data into the string list object list in the receiving event of each serial port; and a parsing module which is used for sequentially parsing the message according to the content of the string list object list in the thread triggering event of the serial port receiving data processing thread class object.

[0111] In the specific implementation, the receiving module of the vortex flowmeter testing device is further used for adding a corresponding identification mark to the returned data for distinguishing; and the identification mark comprises attribute information of the corresponding returned data.

[0112] In a specific implementation, the vortex flowmeter testing device described above, the execution unit includes a compensation module for compensating the variable voltage signal value in the test according to a compensation coefficient; the compensation coefficient is the average of the measurement error according to the equipment test and the manual test of a plurality of standard vortex flowmeters respectively.

[0113] Those skilled in the art can understand that the vortex flowmeter testing device of the embodiment and the vortex flowmeter testing method of the foregoing embodiments belong to the same inventive concept, and therefore, for the related content of the embodiment, the related content of the vortex flowmeter testing method in the foregoing embodiments can be referred to, and details are not described herein.

[0114] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of the machine-readable storage medium will include one or more lines of electrical connection, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0115] For those skilled in the art, it should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the purpose of clarity, those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that those skilled in the art can understand.

[0116] The foregoing description of specific exemplary embodiments of the application is intended to be illustrative only and is not intended to limit the application to the precise forms described. Many modifications and variations are possible in light of the above teachings without departing from the spirit or essential characteristics of the application. The exemplary embodiments were chosen and described in order to explain the principles of the application and its practical application and to allow others skilled in the art to understand the various exemplary embodiments of the application with various modifications being suitable for particular uses contemplated by those skilled in the art. The scope of the application is to be limited only by the claims and their equivalents.

Claims

1. A vortex flowmeter testing method characterized by, The application is suitable for PCBA test, comprising: receiving a start instruction to perform a start self-check and complete test variable initialization according to parameter configuration; maintaining a timing thread execution; the timing thread refreshes a timing queue through a preset time, and determines whether the timing time is reached by comparing the timing time conversion times of threads in the queue, and then performs an operation as needed; a thread class object triggered by timing is defined, and the thread object triggering time is preset as n, and a variable is applied to record the current triggering times TimeCount of the thread; and an array for saving the scanning times Count of each specified serial port is applied; the scanning times Count is calculated and obtained according to the preset timing time W and the triggering time n, and the array value of the scanning times Count array is greater than 0; when a thread event occurs, the triggering times TimeCount is increased; when the array value in the scanning times Count array is less than or equal to the triggering times TimeCount, a specified operation is performed on the corresponding serial port; maintaining a receiving data processing thread; the receiving data processing thread receives all serial port information and performs serial port information processing; after the initialization is completed, a test action is performed according to a test command.

2. The vortex flowmeter testing method of claim 1, wherein, The receiving data processing thread receives all serial port information and performs serial port information processing, comprising: defining a serial port receiving data processing thread class object; applying a string list object as a receiving buffer of serial port receiving data; in the receiving event of each serial port, the return data is stored in the string list object; in the thread triggering event of the serial port receiving data processing thread class object, the content of the string list object is analyzed according to the content of the string list object.

3. The vortex flowmeter testing method of claim 2, wherein, After the return data is stored in the string list object in the receiving event of each serial port, the return data is further added with a corresponding identification mark for distinguishing; the identification mark comprises attribute information corresponding to the return data.

4. The vortex flowmeter testing method of claim 1, wherein, The test action performed according to the test command comprises: compensating the variable sending voltage signal value in the test according to a compensation coefficient; the compensation coefficient is the average value of the measurement error obtained by respectively performing equipment test and manual test on multiple groups of standard vortex flowmeters.

5. A testing device for a vortex flowmeter, characterized by The application is suitable for PCBA test, comprising: an initialization unit receiving a start instruction to perform a start self-check and complete test variable initialization according to parameter configuration; The processing unit comprises a first creating module for maintaining a timing thread execution; maintaining a timing thread execution; the timing thread refreshes a timing queue by a preset time, and determines whether the timing time is reached by comparing the timing time conversion times of threads in the queue, and then executes an operation as needed; and maintaining a receiving data processing thread; the receiving data processing thread receives all serial port information and performs serial port information processing; a thread class object triggered by timing is defined, and the thread object triggering time is preset as n, and a variable is applied to record the current triggering times TimeCount of the thread; and an array for saving the scanning times Count of each specified serial port is applied; the scanning times Count is calculated and obtained according to the preset timing time W and the triggering time n, and the array value of the scanning times Count array is greater than 0; when a thread event occurs, the triggering times TimeCount is increased; when the array value in the scanning times Count array is less than or equal to the triggering times TimeCount, a specified operation is performed on the corresponding serial port; The execution unit executes a test action according to a test command after the initialization is completed.

6. The vortex flowmeter testing apparatus of claim 5, wherein, The processing unit comprises: A second creating module for defining a serial port receiving data processing thread class object, and applying a string list object as a receiving buffer of serial port receiving data; A receiving module for storing return data into the string list object in the receiving event of each serial port; A parsing module for parsing messages in turn according to the content of the string list object in the thread triggering event of the serial port receiving data processing thread class object.

7. The vortex flowmeter testing apparatus of claim 6, wherein, The receiving module is further used for adding corresponding identification marks to the return data to distinguish them; the identification marks comprise attribute information corresponding to the return data.

8. The vortex flowmeter testing device of claim 5, wherein, The execution unit comprises a compensation module for compensating the variable voltage signal value in the test according to a compensation coefficient; the compensation coefficient is the average value of measurement errors obtained by respectively performing equipment testing and manual testing on a plurality of standard vortex flowmeters.

Citation Information

Patent Citations

  • PCBA test method and system, computer equipment and storage medium

    CN113406477A

  • Online verification method and device for flow instrument and medium

    CN116519099A