Automatic measurement and calibration method and device suitable for voltage and current and storage medium
By using automated measurement and calibration methods and equipment, the problem of low efficiency in manual calibration of benchtop multimeters has been solved, enabling autonomous calibration and accuracy judgment, thereby improving measurement accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-22
- Publication Date
- 2026-03-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The calibration process of existing benchtop multimeters relies on manual operation, which is inefficient and has a high error rate, and cannot achieve automation and accurate calibration parameter setting.
Design an automatic measurement and calibration method and device. The device can autonomously initiate a calibration request, calculate the calibration coefficient and store it in memory, and autonomously determine whether the measurement accuracy meets the standard. The automated calibration process is realized by using a communication protocol module, a main control module and a calculation module.
It improved calibration efficiency, reduced error rate, enabled autonomous setting of calibration parameters and accuracy judgment, and improved measurement accuracy.
Smart Images

Figure CN121633607A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of measuring instruments, in particular to an automatic measurement calibration method, device and storage medium suitable for voltage and current. BACKGROUND
[0002] The current-voltage measurement calibration device is a basic detection tool in the fields of power systems, industrial automation, electronic research and development, etc. The core function is to accurately collect, display, record and even analyze the current and voltage parameters in the electric circuit. According to the measurement principle, precision level and use scene, it can be divided into multiple categories, and the application scenes and core characteristics of different devices are significantly different. The bench-type multimeter in the current-voltage measurement calibration device is a precision current-voltage measurement core device in electronic component research and development testing, laboratory precision measurement and instrument calibration. Compared with the portable digital multimeter, it has the advantages of ultra-high precision, high stability, multi-functional expansion and long-term continuous measurement, and is an essential tool for electronic research, product testing, instrument calibration and other scenes.
[0003] When the bench-type multimeter is shipped, the output voltage and current values of the calibration source need to be manually set to different set values, and then the set values and measured values are recorded manually and the calibration coefficients are formed by two-point method or polynomial fitting. The calibration parameters are written into the measurement calibration device. During the calibration process, the output value of the calibration source needs to be adjusted repeatedly, and the calibration parameters need to be corrected constantly. During the process, simply relying on manual work has the problems of low efficiency, high error rate, etc.
[0004] Therefore, it is necessary to develop an automatic measurement calibration method, device and storage medium suitable for voltage and current to solve the above technical problems. SUMMARY
[0005] The purpose of the present application is to overcome the above technical deficiencies. The measurement device can independently initiate a calibration request, independently calculate calibration coefficients and measurement value compensation, independently solidify calibration coefficients and independently determine whether the measurement accuracy meets the standard.
[0006] To achieve the above technical purpose, the present application adopts the following technical scheme:
[0007] The present application provides an automatic measurement calibration method suitable for voltage and current, comprising the following steps:
[0008] S1, interconnect the calibration source and the measurement calibration device, the measurement calibration device initiates a calibration request, and sets the output voltage value or current value of the calibration source;
[0009] S2, the calibration source responds to the calibration request and outputs the voltage Vin1 or the current Iin1 according to the set value;
[0010] S3, the measurement calibration device measures the voltage value Vout1 or the current value Iout1, calculates the calibration coefficient and solidifies into the memory;
[0011] S4, the measurement calibration device initiates the calibration request again, sets the voltage or current value output by the calibration source;
[0012] S5, the calibration source responds to the request and outputs the voltage or current according to the set value;
[0013] S6, the measurement calibration device compensates the measured voltage value or current value by using the calibration coefficient, compares the compensated value with the set value of the calibration source, and verifies whether other values within the 10V DC range meet the nominal measurement accuracy; if yes, the process ends; if not, the process returns to step S1.
[0014] Preferably, step S2 further comprises step S21, the calibration source responds to the calibration request of the measurement calibration device and outputs the voltage value or current value according to the set value, the calibration source sends a response data packet to the measurement calibration device after completing the output of each set value, and the measurement calibration device sends a control data packet to the calibration source to initiate the calibration request again after receiving the response data packet of the calibration source, and sets the voltage value or current value output by the calibration source.
[0015] An automatic measurement calibration device suitable for an automatic measurement calibration method of voltage and current, comprising a communication protocol module, a main control module and a calculation module, which are communicatively connected with each other, the communication protocol module is connected with the calibration source through a measurement line, and the voltage calibration button and the current calibration button are arranged on the main control module.
[0016] Preferably, the working process of the main control module comprises two processes of data packet sending and data packet receiving and analyzing, wherein the data packet sending process of the main control module is as follows: when entering step 01, whether a button is pressed is polled every 10 ms, after the voltage calibration button is pressed, step 02A is entered, or after the current calibration button is pressed, step 02B is entered, otherwise, the polling is circularly waited until the button is pressed;
[0017] When entering step 02A, the main control module reads the measurement type in the Flash Memory, and when entering step 02B, the main control module reads the measurement type in the Flash Memory, the measurement type is that the measurement calibration device supports voltage, current or voltage and current, when any measurement type is not read, the automatic calibration process is exited and the information that the device does not support the voltage or current measurement function is sent; when the voltage measurement type is supported, step 03A is entered; when the current measurement type is supported, step 03B is entered;
[0018] When entering step 03A, the host module reads the voltage range and the current range from the Flash Memory, and when entering step 03B, the host module reads the voltage range and the current range from the Flash Memory;
[0019] When entering step 04A, the host module reads the calibration flag of each range from the Flash Memory in sequence, and when entering step 04B, the host module reads the calibration flag of each range from the Flash Memory in sequence. When the calibration flag is valid, the calibration of the range is completed, and the automatic calibration process of the range is exited. When the calibration flag is invalid, the calibration of the range is not completed, and steps 05A and 05B are entered.
[0020] When entering step 05A, the host module reads the nominal measurement accuracy of each range from the Flash Memory in sequence, so that the calculation module can complete the measurement accuracy calculation, and when entering step 05B, the host module reads the nominal measurement accuracy of each range from the Flash Memory in sequence, so that the calculation module can complete the measurement accuracy calculation.
[0021] When entering step 06A-1, the host module sends a control data packet containing a control data message of the first range to the communication protocol module to control the output voltage or current of the calibration source, and simultaneously enters step 06A-2 to generate and send the nominal measurement accuracy data of each range to the calculation module. When entering step 06B-1, the host module sends a control data message of the first range to the communication protocol module to control the output voltage or current of the calibration source, and simultaneously enters step 06B-2 to generate and send the nominal measurement accuracy data of each range to the calculation module.
[0022] Preferably, the data packet receiving and parsing process of the host module is as follows: when entering step 1, the host module waits to receive a data message. The host module receives a response data packet containing a response message from the communication protocol module, and judges whether the response message is valid. If the message is valid, step 2A is entered, otherwise waiting continues. The host module receives a calibration pass message from the calculation module, and judges whether the calibration pass message is valid. If the calibration pass message is valid, step 2B is entered, otherwise waiting continues.
[0023] When entering step 2A, the host module receives a valid response message, and considers that the calibration source has output a set voltage or current value. After waiting, the host module notifies the calculation module software to start measuring the voltage or current value. When entering step 2B, the host module receives a calculation result, and defines the calibration flag of the range as valid. Meanwhile, the calibration coefficient of the range is also written into the Flash Memory.
[0024] Preferably, the working flow of the calculation module is as follows: when entering step 001, the calculation module receives the data packet containing the nominal accuracy data of the current range from the master module, and when receiving the start calculation instruction from the master module, the output voltage or current signal of the calibration source has started sampling, then entering step 002;
[0025] When entering step 002, the calculation module starts collecting the output voltage or current value of the calibration source, and after the collection is completed, entering step 003;
[0026] When entering step 003, the calculation module calculates the calibration coefficient according to the formula y=mx+b (1), wherein y in formula (1) is the measurement value of the measurement calibration device, m is the gain error coefficient, x is the output voltage value, current value or resistance value of the calibration source, and b is the offset error, that is, m and b are the calibration coefficients;
[0027] When entering step 004, the calculation module notifies the master module that the data control packet containing the control message can be sent to control the output voltage or current of the calibration source after the calculation is completed, and this time the calibration source outputs the full-scale 1 / 4 value and 3 / 4 value of the range;
[0028] When entering step 005, the calculation module applies the calibration coefficient to compensate the measurement value;
[0029] When entering step 006, the calculation module compares the measurement value and the set value of the calibration source to calculate the measurement accuracy;
[0030] When entering step 007, the calculation module calculates the measurement accuracy to meet the requirements, and sends a calibration success notification to the master module to write a calibration pass flag; if the calculation module calculates that the measurement accuracy does not meet the requirements, then waits for the next instruction from the master module.
[0031] Preferably, the working flow of the communication protocol module is as follows: when entering step 0001, the master module sends the standard GPIB protocol message to the calibration source through the communication protocol module and waits for the response message of the calibration source, when receiving the response message, it indicates that the calibration source supports the GPIB protocol, then entering step 0003; when not receiving the response message, it indicates that the calibration source does not support the GPIB protocol, then entering step 0002;
[0032] When entering step 0003, the communication protocol module calls the GPIB protocol interface to control the output of the calibration source and parse the response message of the calibration source according to the GPIB protocol, entering step 0003A; when entering step 0002, the communication protocol module calls the self-defined protocol interface to control the output of the calibration source and parse the response message of the calibration source according to the self-defined protocol, entering step 0002A;
[0033] When proceeding to step 0003A, the communication protocol module receives the control data message from the main control module, parses out the voltage or current value to be set by the main control module, converts it into a GPIB message and sends it to the calibration source, then proceeds to step 0003B; when proceeding to step 0002A, the communication protocol module receives the control data message from the main control module, parses out the voltage or current value to be set by the main control module, converts it into a GPIB message and sends it to the calibration source, then proceeds to step 0002B.
[0034] When entering step 0003B, the communication protocol module controls the calibration source to output the set voltage or current, and then enters step 0003C; when entering step 02B, the communication protocol module controls the calibration source to output the set voltage or current, and then enters step 0002C.
[0035] When proceeding to step 03C, the communication protocol module receives the response message from the calibration source, parses the data, converts it into a response message that the main control module can recognize, and sends it to the main control module; when proceeding to step 0002C, the communication protocol module receives the response message from the calibration source, parses the data, converts it into a response message that the main control module can recognize, and sends it to the main control module.
[0036] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the automatic measurement and calibration method applicable to voltage and current.
[0037] Compared with the prior art, the beneficial effects of the technical solution provided by the present invention are that the measuring device can autonomously initiate calibration requests, autonomously calculate calibration coefficients and measurement value compensation, autonomously solidify calibration coefficients and autonomously determine whether the measurement accuracy meets the standard, and can continuously correct calibration parameters, which is highly efficient and has a low error rate. Attached Figure Description
[0038] Figure 1 This is a flowchart of an automatic calibration method for voltage and current measurement and calibration equipment provided in an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram showing the connection between the calibration source and the measurement calibration equipment;
[0040] Figure 3 This is a schematic diagram of the measurement and calibration equipment.
[0041] Figure 4 This is a flowchart of the data packet sending process of the main control module;
[0042] Figure 5 This is a flowchart of the main control module's data packet reception and parsing process;
[0043] Figure 6 This is a flowchart of the computing module's workflow.
[0044] Figure 7 This is a flowchart of the communication module's workflow. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0046] To better understand this invention, the following is combined with... Figure 1 and Figure 2 The technical solution of the present invention is described in detail below: The present invention provides an automatic calibration method suitable for voltage and current measurement calibration equipment, comprising the following steps:
[0047] S1 connects the calibration source and the measurement calibration device, the measurement calibration device initiates a calibration request, and sets the voltage or current value output by the calibration source.
[0048] Step S1 also includes step S11, whereby the measurement type is written into the Flash Memory (i.e., flash memory, a non-volatile semiconductor storage medium) by the manufacturer according to the type of measurement calibration equipment, the measurement range is written into the Flash Memory by the manufacturer according to different measurement ranges, and the nominal accuracy is written into the Flash Memory by the manufacturer according to the measurement accuracy level of the measurement calibration equipment.
[0049] For example, a 6.5-digit multimeter supports voltage and current measurements. The voltage range is 10VDC (DC stands for direct current) and 100VDC; the current range is 1mA and 1A. The nominal accuracy is 15ppm for the 10VDC range, 20ppm for the 100VDC range, 70ppm for the 1mA range, and 500ppm for the 1A range.
[0050] In step S12, the measurement calibration device reads the measurement type, measurement range, and nominal accuracy information from the Flash Memory. After obtaining the information that the calibration source needs to be set, it sends a control data packet to the calibration source to initiate a calibration request and sets the voltage or current value output by the calibration source.
[0051] S2, the calibration source responds to the calibration request and outputs voltage Vin1 or current Iin1 according to the set value.
[0052] Step S2 also includes step S21, whereby the calibration source responds to the calibration request of the measurement and calibration equipment by outputting a voltage or current value according to the set value, and sends a response data packet to the measurement and calibration equipment after each set value is output.
[0053] After receiving the calibration source response data packet, the measurement and calibration equipment sends another control data packet (the content of this data packet is to control the calibration source to output 10VDC) to initiate a calibration request to the calibration source, setting the voltage value (10V) or current value output by the calibration source.
[0054] S3, the measurement and calibration equipment measures the voltage value Vout1 or the current value Iout1, calculates the calibration coefficient, and stores it in memory.
[0055] Specifically, taking a 10VDC range as an example, the measurement calibration device sends a control data packet (the content of which is to control the calibration source to output 0VDC) to set the voltage value of the calibration source output to Vin1 (0V). The calibration source responds to the calibration request of the measurement calibration device by sending a response data packet to the measurement calibration device and outputs the Vin1 (0V) voltage.
[0056] After receiving the calibration source response data packet, the measurement and calibration equipment sends another control data packet (the content of this data packet is to control the calibration source to output 10VDC) to initiate a calibration request to the calibration source, and sets the voltage value of the calibration source output to Vin2 (10V). The calibration source responds to the calibration request of the measurement and calibration equipment by sending a response data packet to the measurement and calibration equipment and outputs Vin2 (10V) voltage.
[0057] During voltage measurement, the measurement calibration device measures voltage Vout1 when Vin1 is input and voltage Vout2 when Vin2 is input. The calibration coefficient (i.e., the values of m and b in the formula) is calculated by the two-point method through y=mx+b(1).
[0058] Then m = (Vout2 - Vout1) / (Vin2 - Vin1), b = Vout1 - m * Vin1.
[0059] Given Vin1, Vin2, Vout1 and Vout2, the values of m and b can be calculated. In formula (1), y is the measured value of the measurement calibration device, m is the gain error coefficient, x is the output voltage, current or resistance value of the calibration source, and b is the offset error. The measurement calibration device compensates for the measured voltage value according to the calibration coefficient, and the measurement accuracy can be greatly improved.
[0060] Specifically, assuming the voltage output of the calibration source is 0V, the measurement value of the calibration device is 1uV, and the voltage output of the calibration source is 10V, the measurement value of the calibration device is 9.999992V. According to formula (1), m=0.9999991 and b=0.000001 are calculated.
[0061] During current measurement, the calibration device is set to output currents Iin1 and Iin2 from the calibration source. The device measures current Iout1 when current Iin1 is input, and measures current Iout2 when current Iin2 is input.
[0062] Then m = (Iout2 - Iout1) / (Iin2 - Vin1), b = Iout1 - m * Iin1.
[0063] Given Iin1, Iin2, Iout1, and Iout2, the values of m and b can be calculated. These values are the calibration coefficients. The measurement calibration equipment compensates for the measured current value based on these coefficients, greatly improving measurement accuracy.
[0064] The calculated calibration coefficients are then stored in memory.
[0065] S4, the measurement and calibration equipment initiates a calibration request again, setting the voltage or current value output by the calibration source.
[0066] Specifically, taking the 10VDC range as an example, the measurement calibration device sends another control data packet to the calibration source to initiate a calibration request, setting the calibration source output to 1 / 4 of the full-scale value (i.e., 2.5VDC) and 3 / 4 of the value (i.e., 7.5VDC).
[0067] S5, the calibration source responds to the request and outputs voltage or current according to the set value.
[0068] Specifically, the calibration source responds to the request and outputs voltages (2.5VDC and 7.5VDC) according to the set 10VDC full-scale 1 / 4 and 3 / 4 values, and sends response data packets to the measurement calibration equipment in a time-division manner.
[0069] S6, the measurement calibration equipment applies a calibration coefficient to compensate for the measured voltage or current value. The compensated value is compared with the calibration source setting value to verify whether other values within the 10VDC range meet the nominal measurement accuracy. If yes, the process ends; otherwise, it returns to step S1.
[0070] Assuming the voltage output from the calibration source is 2.5V, the voltage measured by the calibration device is 2.499998V. Based on formula (1) and the calculated calibration coefficient, the calibration device calculates the compensated measurement value to be 2.499999V.
[0071] The specific calculation process is as follows: The calibration coefficients calculated based on the above 0V and 10V are m=0.9999991, b=0.000001 and y=mx+b (1).
[0072] When y = 2.499998V, then x = (yb) / m = (2.499998 - 0.000001) / 0.9999991 = 2.499999.
[0073] The measurement accuracy is calculated as: (2.499999-2.5) / 2.5=0.4ppm. The nominal accuracy of the voltage at the 10VDC range is 15ppm. Since 0.4ppm is less than 15ppm, the 2.5V voltage meets the measurement accuracy requirement, and the measurement passes.
[0074] Similarly, calculate the measurement accuracy at 7.5V voltage using the steps described above. If the calculated measurement accuracy for both 2.5V and 7.5V voltages meets the nominal accuracy (within 15ppm) after calibration and compensation, the process ends, and the calibration coefficient and flag are written to Flash Memory. If the measurement accuracy does not meet the nominal accuracy, return to S1 for recalibration. If the measurement accuracy still does not meet the requirements after multiple calibrations, the device is considered faulty.
[0075] The remaining 100VDC voltage range, 1mADC current range, and 1ADC current range are calibrated sequentially according to steps 01 to 06, and finally the calibration of all items is completed.
[0076] The calibration source provides standard voltage and current outputs and supports remote setting of voltage and current values via a communication interface. The measurement and calibration equipment has voltage and current measurement functions. The calibration source provides voltage and current to the measurement and calibration equipment through the measurement interface. The measurement and calibration equipment tests and calibrates the voltage and current output values of the calibration source through the communication interface. After the calibration source completes the voltage and current output value setting, it responds through the communication interface.
[0077] Please see Figure 3 The present invention also provides an automatic calibration system suitable for voltage and current measurement and calibration equipment, comprising: a communication protocol module, a main control module, and a calculation module, wherein the communication protocol module, the main control module, and the calculation module are interconnected, the communication protocol module is connected to the calibration source via a measurement line, and the main control module is provided with voltage calibration buttons and current calibration buttons;
[0078] The main control module is used for reading, writing, storing, and parsing Flash Memory parameters, and can also generate and parse data packets;
[0079] The calculation module is used to receive the accuracy data messages transmitted from the main control module, complete the calculation of calibration coefficients, measurement value compensation and measurement accuracy, and feed the results back to the main control module;
[0080] The communication protocol module is used to receive data from the main control module and convert it into standard GPIB data packets or custom messages, thereby enabling output control of the calibration source and parsing of response data packets. At the same time, it transmits the received response messages to the main control module.
[0081] To address the issue that traditional measurement methods require different physical connections for voltage and current measurements, and that mixing different measurement interfaces can easily damage the equipment, this invention provides an external voltage calibration button and a current calibration button on the main control module. After connecting the calibration source and the calibration equipment with the measurement and communication cables, pressing the external voltage calibration button initiates the automatic voltage calibration process; pressing the current calibration button initiates the automatic current calibration process. The calibration equipment operates automatically upon power-on, requiring no application software intervention.
[0082] The main workflow of the main control module is divided into two major processes: data packet sending and data packet receiving and parsing. The data packet sending process of the main control module is shown in Figure 4.
[0083] When entering step 01, poll every 10ms to see if a button is pressed. If a voltage calibration button is pressed, proceed to step 02A, or if a current calibration button is pressed, proceed to step 02B. Otherwise, keep polling and waiting for a button to be pressed.
[0084] Upon entering step 02A, the main control module reads the measurement type from the Flash Memory. Upon entering step 02B, the main control module reads the measurement type from the Flash Memory. The measurement type is whether the measurement calibration device supports voltage, current, or both voltage and current. If the measurement calibration device does not have any measurement type, the automatic calibration process exits and sends a message indicating that the device does not support voltage or current measurement functions. If the measurement calibration device supports voltage measurement, the process proceeds to step 03A; if the measurement calibration device supports current measurement, the process proceeds to step 03B.
[0085] When entering step 03A, the main control module reads the voltage range and current flow from the Flash Memory. When entering step 03B, the main control module reads the voltage range and current range from the Flash Memory.
[0086] Upon entering step 04A, the main control module sequentially reads the calibration flag bits of each range from the Flash Memory. Upon entering step 04B, the main control module sequentially reads the calibration flag bits of each range from the Flash Memory. When the calibration flag bit is valid, the range has been calibrated and the automatic calibration process for that range is exited. When the calibration flag bit is invalid, the range has not been calibrated and the process proceeds to steps 05A and 05B.
[0087] When proceeding to step 05A, the main control module reads the nominal measurement accuracy of each range sequentially from the Flash Memory so that the calculation module can complete the measurement accuracy calculation. When proceeding to step 05B, the main control module reads the nominal measurement accuracy of each range sequentially from the Flash Memory so that the calculation module can complete the measurement accuracy calculation.
[0088] Upon entering step 06A-1, the main control module sends a control data packet containing control data messages for the first range to the communication protocol module to control the output voltage or current of the calibration source. Simultaneously, it enters step 06A-2 to generate and send the nominal measurement accuracy data for each range to the calculation module. Upon entering step 06B-1, the main control module sends the control data message for the first range to the communication protocol module to control the output voltage or current of the calibration source. Simultaneously, it enters step 06B-2 to generate and send the nominal measurement accuracy data for each range to the calculation module. Then, it sends the control data message for the second range until all ranges are calibrated.
[0089] The data packet reception and parsing process of the main control module is as follows: Figure 5 As shown,
[0090] Upon entering step 1, the main control module waits to receive data packets. The main control module receives a response data packet containing a response message from the communication protocol module and determines whether the response message is valid. If the message is valid, proceed to step 2A; otherwise, continue waiting. The main control module receives a calibration pass message containing the calculation result from the calculation module and determines whether the calibration pass message is valid. If the calibration pass message is valid, proceed to step 2B; otherwise, continue waiting.
[0091] When entering step 2A, after receiving a valid response message, the main control module assumes that the calibration source has output the set voltage or current value, and waits for 100ms before notifying the calculation module to start measuring the voltage or current value; when entering step 2B, after receiving the calculation result, the main control module defines the calibration flag of the range as valid, and writes the calibration coefficient of the range into the Flash Memory.
[0092] The workflow of the calculation module is as follows: Figure 6 As shown,
[0093] When entering step 001, the calculation module receives a data packet containing the nominal accuracy data of the current range from the main control module. When the start calculation command is received from the main control module, the output voltage or current signal of the calibration source has started sampling, and then the process proceeds to step 002.
[0094] When proceeding to step 002, the calculation module begins to collect the output voltage or current value of the calibration source. After the collection is completed, proceeding to step 003.
[0095] When entering step 003, the calculation module calculates the calibration coefficient according to the formula y=mx+b (1), where y in formula (1) is the measured value of the measurement calibration device, m is the gain error coefficient, x is the output voltage, current or resistance value of the calibration source, and b is the offset error, that is, m and b are the calibration coefficients;
[0096] When proceeding to step 004, after the calculation module completes the calculation, it notifies the main control module that it can continue to send data control packets containing control messages to control the output voltage or current of the calibration source. This time, the calibration source outputs the full-scale 1 / 4 value and 3 / 4 value of the range (e.g., 10VDC).
[0097] When proceeding to step 005, the calculation module applies calibration coefficients to compensate for the measured values;
[0098] When proceeding to step 006, the calculation module compares the measured value with the calibration source setting value and calculates the measurement accuracy;
[0099] When proceeding to step 007, if the calculation module calculates that the measurement accuracy meets the requirements, it sends a calibration success notification to the main control module to write the calibration pass flag; if the calculation module calculates that the measurement accuracy does not meet the requirements, it waits for the next instruction from the main control module.
[0100] The communication module mainly realizes the communication protocol conversion between the measurement and calibration equipment and the calibration source. The main control module of the measurement and calibration equipment has a built-in GPIB protocol. When the calibration source supports the standard GPIB protocol, there is no need to develop an additional serial interface protocol. When the calibration source does not support the standard GPIB protocol, a custom protocol needs to be written to control the calibration source.
[0101] The workflow of the communication protocol module is as follows: Figure 7 As shown,
[0102] When entering step 0001, the main control module sends a standard GPIB protocol message (i.e., containing data control messages) to the calibration source through the communication protocol module and waits for the calibration source to respond. When a response message is received, it indicates that the calibration source supports the GPIB protocol, and then proceeds to step 0003; when no response message is received, it indicates that the calibration source does not support the GPIB protocol, and then proceeds to step 0002.
[0103] When entering step 0003, the communication protocol module calls the GPIB protocol interface, controls the output of the calibration source and parses the response message of the calibration source according to the GPIB protocol, and enters step 0003A; when entering step 0002, the communication protocol module calls the custom protocol interface, controls the output of the calibration source and parses the response message of the calibration source according to the custom protocol, and enters step 0002A.
[0104] When proceeding to step 0003A, the communication protocol module receives the control data message from the main control module, parses out the voltage or current value to be set by the main control module, converts it into a GPIB message and sends it to the calibration source, then proceeds to step 0003B; when proceeding to step 0002A, the communication protocol module receives the control data message from the main control module, parses out the voltage or current value to be set by the main control module, converts it into a GPIB message and sends it to the calibration source, then proceeds to step 0002B.
[0105] When entering step 0003B, the communication protocol module controls the calibration source to output the set voltage or current, and enters step 0003C; when entering step 0002B, the communication protocol module controls the calibration source to output the set voltage or current, and enters step 0002C.
[0106] When proceeding to step 0003C, the communication protocol module receives the response message from the calibration source, parses the data, converts it into a response message that the main control module can recognize, and sends it to the main control module; when proceeding to step 0002C, the communication protocol module receives the response message from the calibration source, parses the data, converts it into a response message that the main control module can recognize, and sends it to the main control module.
[0107] In practical applications, the technical solution of this invention enables the measurement and calibration equipment to autonomously initiate calibration requests, autonomously calculate calibration coefficients and measurement value compensation, autonomously solidify calibration coefficients, and autonomously determine whether the measurement accuracy meets the standards. It should be noted that in this embodiment, the control module may include a Human Machine Interface (HIM), where voltage calibration buttons and current calibration buttons can be set on the HIM for convenient human-machine interaction.
[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0109] In particular, according to some embodiments of this disclosure, the processes described above can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0110] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0111] In some embodiments of this disclosure, the computer-readable signal medium may include a mission data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated mission data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0112] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital task data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0113] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine the network connection status of the switch production line management application in response to detecting a query operation on a production collaboration document in the switch production line management application; replace the webpage entry information corresponding to the production collaboration document with target entry file information and load target webpage resource information in response to determining that the network connection status of the switch production line management application indicates an offline state, so as to display the webpage of the production collaboration document offline in the switch production line management application, wherein the target entry file information is the file information of the entry file corresponding to the webpage of the production collaboration document downloaded in advance, and the target webpage resource information is the resource information corresponding to the webpage stored locally; in response to determining that the network connection status of the switch production line management application indicates an online state and that the webpage resource information corresponding to the production collaboration document is not stored locally, download the webpage resource information of the webpage from the production line document server, wherein the webpage resource information includes an entry file and resource information; display the webpage of the production collaboration document in the switch production line management application according to the webpage resource information, and store the webpage resource information in a local database.
[0114] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including product-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The specific embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention. Any other corresponding changes and modifications made in accordance with the technical concept of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method for automatic measurement calibration of voltage and current, characterized by, The method comprises the following steps: S1, interconnecting the calibration source and the measurement calibration device, the measurement calibration device initiates a calibration request, and sets the voltage value or the current value output by the calibration source; S2, the calibration source responds to the calibration request and outputs the voltage Vin1 or the current Iin1 according to the set value; S3, the measurement calibration device measures the voltage value Vout1 or the current value Iout1, calculates the calibration coefficient, and solidifies it into the memory; S4, the measurement calibration device initiates the calibration request again, and sets the voltage or current value output by the calibration source; S5, the calibration source responds to the request and outputs the voltage or current according to the set value; S6, the measurement calibration device compensates the measured voltage value or current value by using the calibration coefficient, compares the compensated value with the set value of the calibration source, and verifies whether other values within the 10VDC range meet the nominal measurement accuracy; if yes, the process is ended; if not, the process returns to step S1.
2. The method for automatic measurement calibration suitable for voltage and current as claimed in claim 1 wherein, Step S2 further comprises step S21, the calibration source responds to the calibration request of the measurement calibration device and outputs the voltage value or the current value according to the set value, the calibration source sends a response data packet to the measurement calibration device after completing the output of each set value, and the measurement calibration device sends a control data packet to the calibration source again to initiate the calibration request and set the voltage value or the current value output by the calibration source.
3. An automatic measurement calibration device suitable for use in an automatic measurement calibration method of voltage and current as claimed in any one of claims 1-2, characterized in that, It comprises: A communication protocol module, a main control module and a calculation module, which are communicatively connected, the communication protocol module is connected with the calibration source through a measurement line, and the main control module is provided with voltage calibration buttons and current calibration buttons.
4. The automatic measurement calibration device for voltage and current according to claim 3, characterized in that, The working process of the main control module comprises two processes of data packet sending and data packet receiving and analysis, wherein the data packet sending process of the main control module is that when entering step 01, whether a button is pressed is polled every 10 ms, when the voltage calibration button is pressed, step 02A is entered, or when the current calibration button is pressed, step 02B is entered, otherwise, the polling is circularly waited until a button is pressed; When entering step 02A, the main control module reads the measurement type in the Flash Memory, when entering step 02B, the main control module reads the measurement type in the Flash Memory, the measurement type is that the measurement calibration device supports voltage, current or voltage and current, when reading that the measurement calibration device does not have any measurement type, the automatic calibration process is exited and information that the device does not support voltage or current measurement function is sent; when the measurement calibration device supports the voltage measurement type, step 03A is entered; when the measurement calibration device supports the current measurement type, step 03B is entered; When entering step 03A, the main control module reads the voltage range and the current range from the Flash Memory, when entering step 03B, the main control module reads the voltage range and the current range from the Flash Memory; When entering step 04A, the host module reads the calibration flag of each range from the Flash Memory in turn, and enters step 04B; when entering step 05A, the host module reads the nominal measurement accuracy of each range from the Flash Memory in turn, so that the calculation module can complete the measurement accuracy calculation; when entering step 05B, the host module reads the nominal measurement accuracy of each range from the Flash Memory in turn, so that the calculation module can complete the measurement accuracy calculation; When entering step 06A-1, the host module sends the control data packet containing the control data message of the first range to the communication protocol module to control the output voltage or current of the calibration source, and simultaneously enters step 06A-2 to generate and send the nominal measurement accuracy data of each range to the calculation module; when entering step 06B-1, the host module sends the control data packet containing the control data message of the first range to the communication protocol module to control the output voltage or current of the calibration source, and simultaneously enters step 06B-2 to generate and send the nominal measurement accuracy data of each range to the calculation module. The data packet receiving and analyzing process of the host module is as follows: when entering step 1, the host module waits to receive a data message; the host module receives a response data packet containing a response message from the communication protocol module, and judges whether the response message is valid; if the message is valid, enter step 2A, otherwise continue to wait; the host module receives a calibration pass message from the calculation module, and judges whether the calibration pass message is valid; if the calibration pass message is valid, enter step 2B, otherwise continue to wait; 5. The automatic measurement calibration device for voltage and current as claimed in claim 3, wherein, When entering step 2A, the host module receives a valid response message, and considers that the calibration source has output the set voltage or current value, and waits to notify the calculation module software to start measuring the voltage or current value; when entering step 2B, the host module receives the calculation result, and defines the calibration flag of the range as valid, and writes the calibration coefficient of the range into the Flash Memory. The working process of the calculation module is as follows: when entering step 001, the calculation module receives a data packet containing the nominal accuracy data of the current range from the host module; when receiving the start calculation instruction of the host module, the output voltage or current signal of the calibration source has started sampling, and enters step 002; 6. The automatic measurement calibration device for voltage and current as claimed in claim 3, wherein, When entering step 002, the calculation module starts to collect the output voltage or current value of the calibration source, and enters step 003 after the collection is completed; When entering step 003, the calculation module calculates the calibration coefficient according to the formula y=mx+b (1), wherein y in the formula (1) is the measured value of the measurement calibration device, m is the gain error coefficient, x is the output voltage value, current value or resistance value of the calibration source, and b is the offset error, that is, m and b are the calibration coefficients; When entering step 004, the calculation module notifies the main control module that the data control package containing the control message can continue to be sent after the calculation is completed, the output voltage or current of the calibration source is controlled, and the calibration source outputs the full-scale 1 / 4 value and the full-scale 3 / 4 value of the range this time; When entering step 005, the calculation module applies the calibration coefficient to compensate the measured value; When entering step 006, the calculation module compares the measured value and the calibration source setting value to calculate the measurement accuracy; When entering step 007, the calculation module calculates the measurement accuracy, and if the measurement accuracy meets the requirements, a calibration success notification is sent to the main control module to write the calibration pass flag; if the measurement accuracy does not meet the requirements, the main control module is waited for the next instruction.
7. The automatic measurement calibration device for voltage and current as claimed in claim 3, wherein, The working process of the communication protocol module is as follows: when entering step 0001, the main control module sends a standard GPIB protocol message to the calibration source through the communication protocol module and waits for a response message from the calibration source. When the response message is received, it indicates that the calibration source supports the GPIB protocol, and then step 0003 is entered. When the response message is not received, it indicates that the calibration source does not support the GPIB protocol, and then step 0002 is entered; When entering step 0003, the communication protocol module calls the GPIB protocol interface, controls the output of the calibration source according to the GPIB protocol, and parses the response message of the calibration source, and enters step 0003A; when entering step 0002, the communication protocol module calls the self-defined protocol interface, controls the output of the calibration source according to the self-defined protocol, and parses the response message of the calibration source, and enters step 0002A; When entering step 0003A, the communication protocol module receives the control data message of the main control module, parses the voltage or current value to be set by the main control module, converts it into a GPIB message, and sends it to the calibration source, and enters step 0003B; when entering step 0002A, the communication protocol module receives the control data message of the main control module, parses the voltage or current value to be set by the main control module, converts it into a GPIB message, and sends it to the calibration source, and enters step 0002B; When entering step 0003B, the communication protocol module controls the calibration source to output the set voltage or current, and enters step 0003C; When entering step 02B, the communication protocol module controls the calibration source to output the set voltage or current, and enters step 0002C; When entering step 03C, the communication protocol module receives the response message of the calibration source, parses the data and converts it into a response message that can be recognized by the main control module, and sends it to the main control module; when entering step 0002C, the communication protocol module receives the response message of the calibration source, parses the data and converts it into a response message that can be recognized by the main control module, and sends it to the main control module.
8. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, The computer program, which is executed by a processor, implements the steps of the automatic measurement calibration method for voltage and current according to any one of claims 1-2.