CN101806820B - Automatic zero-setting method for software - Google Patents

Automatic zero-setting method for software Download PDF

Info

Publication number
CN101806820B
CN101806820B CN 201010127379 CN201010127379A CN101806820B CN 101806820 B CN101806820 B CN 101806820B CN 201010127379 CN201010127379 CN 201010127379 CN 201010127379 A CN201010127379 A CN 201010127379A CN 101806820 B CN101806820 B CN 101806820B
Authority
CN
China
Prior art keywords
signal
zero
digital
time
software
Prior art date
Application number
CN 201010127379
Other languages
Chinese (zh)
Other versions
CN101806820A (en
Inventor
黄文平
Original Assignee
安徽皖仪科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 安徽皖仪科技股份有限公司 filed Critical 安徽皖仪科技股份有限公司
Priority to CN 201010127379 priority Critical patent/CN101806820B/en
Publication of CN101806820A publication Critical patent/CN101806820A/en
Application granted granted Critical
Publication of CN101806820B publication Critical patent/CN101806820B/en

Links

Abstract

The invention discloses an automatic zero-setting method for software, which comprises the following steps: acquiring an analog electric signal of a master signal at each time, converting the analog electric signal into a plurality of digital electric signals, recording and storing the plurality of digital electric signals in real time through a singlechip, setting a digital electric signal at some time as a zero signal, thereafter, comparing the digital electric signal at each time with the zero signal through a zero-setting function of the software, fluctuating the zero signal in real time according to the comparison result, after the software stops setting zero, recording a difference value between the digital electric signal at some time or a plurality of times and the zero signal through the singlechip as an effective signal, and displaying and storing the effective signal. The method of the invention improves detection efficiency, detection sensitivity and detection result accuracy of an instrument, avoids inaccuracy of effective signals through manual calculation, overcomes serious shortcomings of the traditional hardware zero-setting method and software zero-setting methodand reduces the cost for hardware zero-setting and the design difficulty of the hardware.

Description

软件自动调零方法 Software Auto-zero method

技术领域 FIELD

[0001] 本发明涉及分析仪器领域对信号处理的一种通过软件实现方法领域,具体涉及一种软件自动调零方法。 [0001] The present invention relates to the field of analytical instruments for one implementation of the art method of signal processing by software, in particular to a software auto-zero method.

背景技术 Background technique

[0002]自动调零技术分为硬件调零和软件调零,硬件调零后,随着时间的推移,本底信号还会变化,这样导致检测结果的不准确。 After [0002] autozeroing techniques into hardware and software zero zero, zero hardware, over time, the background signal will also change, which causes inaccurate test results. 原有的软件调零功能并不具有在采集过程中的自动跟踪零点的功能,这样直接影响了检测灵敏度、检测结果的准确性和检测效率。 The original function of the software does not have zero zero automatic tracking function in the acquisition process, which directly affects the sensitivity, accuracy and efficiency of the detection result of the detection.

发明内容 SUMMARY

[0003] 本发明要解决的技术问题是提供一种软件自动调零方法,提高软件调零的灵敏度、准确度和检测效率。 [0003] The present invention is to solve the technical problem of providing a software auto-zero method, software zero improve sensitivity, accuracy, and detection efficiency.

[0004] 本发明的技术方案如下: [0004] aspect of the present invention is as follows:

[0005] 一种软件自动调零方法,即对总信号的模拟电信号在各个时刻进行采集并转换为若干个数字电信号,并通过单片机对若干个数字电信号进行实时记录和存储,然后设定某一时刻的数字电信号为零点信号,在此后的一定时间内,通过软件调零功能,将各个时刻的数字电信号与零点信号进行比较,并根据比较结果实时对零点信号进行浮动,在软件停止调零后,通过单片机记录某一个或若干个时刻的数字电信号与零点信号的差值作为有效信号并显示、保存;其特征在于:其方法具体包括以下步骤: [0005] A software Auto-zero method, i.e., a total of analog electrical signals collected at various times and converted to a plurality of digital electrical signals, and real-time recording and storing a plurality of digital electrical signals through the microcontroller, then set given a certain time to zero digital electric signal within a predetermined time thereafter, the timing of the respective digital electrical signals are compared with zero-zero function by software, and the zero signal in real time according to the comparison result of floating, in after the software stops zero, a digital electrical signal by the microcontroller records the difference in time one or several of the zero point signal as a valid signal and display, save; characterized in that: the method which comprises the steps of:

[0006] (I)、对总信号的模拟电信号在各个时刻进行采集并经AD转换得到若干个数字电信号,再将采集得到的若干个数字电信号通过单片机进行实时记录和存储,当软件执行“开始调零”功能时,以此时刻单片机记录的总信号的数字电信号作为第一个数字电信号,再以第一个数字电信号作为零点信号,此时第一个数字电信号的值为零; [0006] (I), the total of the analog electrical signal is collected at various times and dried to obtain a plurality of AD conversion digital electrical signal, and then collected to obtain a plurality of digital electrical signals by the real-time recording and storage devices, when the software when performing "zeroing start" feature, this time the digital total signal recorded microcontroller digital electrical signal as the first electrical signal, and then to the first electric signal as a digital zero signal, a digital electrical signal of the first case value of zero;

[0007] (2)、当单片机记录到下一时刻的数字电信号,即为第二个数字电信号时,软件对第二个数字电信号和第一个数字电信号,即与零点信号进行比较,如果第二个数字电信号大于零点信号,即大于第一个数字电信号,则继续以第一个数字电信号作为零点信号,显示零点信号为第一个数字电信号,然后通过单片机记录第二个数字电信号与零点信号,即与第一个数字信号的差值作为有效信号并显示;如果第二个数字电信号小于零点信号,即小于第一个数字电信号,则以第二个数字电信号作为零点信号,此时第二个数字电信号的值为零; [0007] (2), when the microcontroller to a digital electric signal recorded next time, namely a second digital electric signal, the second software digital electrical signal and a digital electric signal, i.e. with zero signal comparison, if the second number is greater than zero electrical signal, a digital electrical signal that is larger than the first, to continue the first electric signal as a digital zero signal, display a zero signal as the first digital electrical signal, and then recorded by the microcontroller the second digital electric signal with a zero signal, i.e. the difference between the first digital signal as a valid signal and displayed; if the second number is less than zero electrical signal, a digital electrical signal that is smaller than the first, at a second a digital electric signal as the zero signal, the second digital electric signal at this time the value of zero;

[0008] (3)、当单片机记录到再下一时刻的数字电信号,即为第三个数字电信号时,软件对第三个数字电信号和零点信号进行比较,如果第三个数字电信号大于零点信号,则通过单片机记录第三个数字电信号与零点信号的差值作为有效信号并显示;如果第三个数字电信号小于零点信号,则以第三个数字电信号作为零点信号,此时第三个数字电信号的值为零; [0008] (3) when the microcontroller to a digital electrical signal and then recorded the next time, that is the third digital electric signal, the third digital electric signal for software and zero signals are compared, if the third digital circuit signal is greater than zero signal, then the microcontroller records the difference by a zero signal as an active signal and displaying a third digital electric signal; if the third digital electric signal is less than 0:00, places the third digital electric signal as the zero signal, At this time, the value of the third digital electric signal is zero;

[0009] (4)、依次类推,将单片机记录的每一时刻的数字电信号分别与零点信号进行比较,并根据比较结果实时对零点信号进行浮动,当软件执行“停止调零”功能时,通过单片机记录从软件执行“开始调零”功能到软件执行“停止调零”功能的这段时间内的某一个或若干个时刻的数字电信号与零点信号的差值作为有效信号,并绘制出有效信号的曲线图并显示、保存。 [0009] (4), and so on, the SCM digital electric signal recorded at each time are compared with the zero signal and the zero signal in real time according to the comparison result of floating, when the software executing "zero stop" function, by recording the microcontroller execute software "start zero" function to software executing "stop zero" or a digital electrical signal a plurality of timing functions within this time the difference signal as the valid signal 0:00, and draw valid signal and graph display, save. [0010] 本发明的有益效果: [0010] Advantageous effects of the invention:

[0011] 本发明实现的自动调零方法解决了分析仪器在信号采集处理上的难点,提高了仪器的检测效率、检测灵敏度和检测结果的准确性,避免了人为计算有效信号的不准确性,避免了现有硬件调零和软件调零的严重不足,降低了在硬件调零上的成本和硬件上的设计难度。 [0011] Auto-zero method according to the present invention is implemented to solve the difficulties in analyzing the signal acquisition and processing equipment, improve the detection efficiency of the instrument, the detection sensitivity and detection accuracy of the result, to avoid inaccuracies artificial calculation of the effective signal, to avoid the serious shortage of existing hardware and software, zero zero, reducing the cost and difficulty of designing hardware in the hardware zeroed.

附图说明 BRIEF DESCRIPTION

[0012] 图I为本发明的总信号波形图和调零后的有效信号波形图。 [0012] Effective signal waveform view of FIG zero I of the present invention total signal waveform and modulation.

具体实施方式 Detailed ways

[0013] 参见图1,一种软件自动调零方法,即对总信号的模拟电信号在各个时刻进行采集并转换为若干个数字电信号,并通过单片机对若干个数字电信号进行实时记录和存储,然后设定某一时刻的数字电信号为零点信号,在此后的一定时间内,通过软件调零功能,将各个时刻的数字电信号与零点信号进行比较,并根据比较结果实时对零点信号进行浮动,在软件停止调零后,通过单片机记录某一个或若干个时刻的数字电信号与零点信号的差值作为有效信号并显示、保存;具体包括以下步骤: [0013] Referring to Figure 1, a piece of software Auto-zero method, i.e., a total of analog electrical signals collected at various times and converted to a plurality of digital electrical signals, and a plurality of real-time recording of digital electrical signals by the microcontroller and storage, and set a time for the digital electrical signals zero, within a predetermined time thereafter, the timing of the respective digital electrical signals are compared with zero-zero function by software and based on the comparison of the real-time zero signal to float, after the software stops zero, a digital electrical signal by the microcontroller records the difference in time one or several of the zero point signal as a valid signal and display, save; includes the following steps:

[0014] (I)、对总信号的模拟电信号在各个时刻进行采集并经AD转换得到若干个数字电信号,再将采集得到的若干个数字电信号通过单片机进行实时记录和存储,当软件执行“开始调零”功能时,以此时刻单片机记录的总信号的数字电信号作为第一个数字电信号,再以第一个数字电信号作为零点信号,此时第一个数字电信号的值为零; [0014] (I), the total of the analog electrical signal is collected at various times and dried to obtain a plurality of AD conversion digital electrical signal, and then collected to obtain a plurality of digital electrical signals by the real-time recording and storage devices, when the software when performing "zeroing start" feature, this time the digital total signal recorded microcontroller digital electrical signal as the first electrical signal, and then to the first electric signal as a digital zero signal, a digital electrical signal of the first case value of zero;

[0015] (2)、当单片机记录到下一时刻的数字电信号,即为第二个数字电信号时,软件对第二个数字电信号和第一个数字电信号,即与零点信号进行比较,如果第二个数字电信号大于零点信号,即大于第一个数字电信号,则继续以第一个数字电信号作为零点信号,显示零点信号为第一个数字电信号,然后通过单片机记录第二个数字电信号与零点信号,即与第一个数字信号的差值作为有效信号并显示;如果第二个数字电信号小于零点信号,即小于第一个数字电信号,则以第二个数字电信号作为零点信号,此时第二个数字电信号的值为零; [0015] (2), when the microcontroller to a digital electric signal recorded next time, namely a second digital electric signal, the second software digital electrical signal and a digital electric signal, i.e. with zero signal comparison, if the second digital electric signal is greater than zero signal, i.e. a digital electrical signal is greater than the first, to continue the first electric signal as a digital zero signal, display a zero signal as the first digital electrical signal, and then recorded by the microcontroller the second digital electric signal with a zero signal, i.e. the difference between the first digital signal as a valid signal and displayed; if the second number is less than zero electrical signal, a digital electrical signal that is smaller than the first, at a second a digital electric signal as the zero signal, the second digital electric signal at this time the value of zero;

[0016] (3)、当单片机记录到再下一时刻的数字电信号,即为第三个数字电信号时,软件对第三个数字电信号和零点信号进行比较,如果第三个数字电信号大于零点信号,则通过单片机记录第三个数字电信号与零点信号的差值作为有效信号并显示;如果第三个数字电信号小于零点信号,则以第三个数字电信号作为零点信号,此时第三个数字电信号的值为零; [0016] (3) when the microcontroller to a digital electrical signal and then recorded the next time, that is the third digital electric signal, the third digital electric signal for software and zero signals are compared, if the third digital circuit signal is greater than zero signal, then the microcontroller records the difference by the zero signal as a valid signal and displaying a third digital electric signal; if the third digital electric signal is smaller than zero, places the third digital electric signal as the zero signal, At this time, the value of the third digital electric signal is zero;

[0017] (4)、依次类推,将单片机记录的每一时刻的数字电信号分别与零点信号进行比较,并根据比较结果实时对零点信号进行浮动,当软件执行“停止调零”功能时,通过单片机记录从软件执行“开始调零”功能到软件执行“停止调零”功能的这段时间内的某一个或若干个时刻的数字电信号与零点信号的差值作为有效信号,并绘制出有效信号的曲线图并显示、保存。 [0017] (4), and so on, the SCM digital electric signal recorded at each time are compared with the zero signal and the zero point signal in real time according to the comparison result of floating, when the software executing "zero stop" function, by recording the microcontroller execute software "start zero" function to software executing "stop zero" or a digital electrical signal a plurality of timing functions within this time the difference signal as the zero signal active, and draw valid signal and graph display, save.

Claims (1)

1. 一种软件自动调零方法,即对总信号的模拟电信号在各个时刻进行采集并转换为若干个数字电信号,并通过单片机对若干个数字电信号进行实时记录和存储,然后设定某一时刻的数字电信号为零点信号,在此后的一定时间内,启动软件调零功能,将各个时刻的数字电信号与零点信号进行比较,并根据比较结果实时对零点信号进行浮动,在软件停止调零后,通过单片机记录某一个或若干个时刻的数字电信号与零点信号的差值作为有效信号并显示、保存;其特征在于:其方法具体包括以下步骤: (1)、对总信号的模拟电信号在各个时刻进行采集并经AD转换得到若干个数字电信号,再将采集得到的若干个数字电信号通过单片机进行实时记录和存储,当软件执行“开始调零”功能时,以此时刻单片机记录的总信号的数字电信号作为第一个数字电信号,再以 1. A software auto-zero method, i.e., a total of analog electrical signals collected at various times and converted to a plurality of digital electrical signals, and real-time recording and storing a plurality of digital electrical signals through the microcontroller, then set digital electrical signal to a time zero signal within a predetermined time thereafter, to start the software zero function, each time the digital electrical signals are compared with zero, and the zero point signal in real time according to the comparison result of floating, the software after stopping zero, a digital electrical signal by the microcontroller records the difference in time one or several of the zero point signal as a valid signal and display, save; characterized in that: the method which comprises the steps of: (1), of the total signal the analog electrical signals collected at each time and dried to obtain the AD conversion a plurality of digital electrical signals, and then collected to obtain a plurality of real-time digital electric signal recorded and stored by the microcontroller, when the software executing "zero start" feature, to this total time digital electric signal recorded as the first single-chip digital electrical signal, and then to 一个数字电信号作为零点信号,此时第一个数字电信号的值为零; (2)、当单片机记录到下一时刻的数字电信号,即为第二个数字电信号时,软件对第二个数字电信号和第一个数字电信号,即与零点信号进行比较,如果第二个数字电信号大于零点信号,即大于第一个数字电信号,则继续以第一个数字电信号作为零点信号,显示零点信号为第一个数字电信号,然后通过单片机记录第二个数字电信号与零点信号,即与第一个数字信号的差值作为有效信号并显示;如果第二个数字电信号小于零点信号,即小于第一个数字电信号,则以第二个数字电信号作为零点信号,此时第二个数字电信号的值为零; (3)、当单片机记录到再下一时刻的数字电信号,即为第三个数字电信号时,软件对第三个数字电信号和零点信号进行比较,如果第三个数字电信号大于零点信 Electric signal as a digital zero signal, when a value of the first digital electrical signal of zero; (2), when the microcontroller to a digital electric signal recorded next time, namely a second digital electric signal, the first software two digital electrical signal and a digital electric signal, i.e. the signal is compared with zero, if the second number is greater than zero electrical signal, a digital electrical signal that is larger than the first, in order to continue a digital electric signal as the first zero signal, display a zero signal as the first digital electrical signal, and then through the microcontroller to record a second digital electric signal with a zero signal, i.e. the difference between the first digital signal as a valid signal and displayed; if the second digital circuit signal is less than zero signal, a digital electrical signal that is smaller than the first, at a second electrical signal as a digital zero signal, when the value of the second digital electric signal to zero; (3), next to the re-recorded when the microcontroller digital electrical signal timing, that is, when a third digital electric signal, the third digital electric signal for software and zero signals are compared, if the third digital electric signal is greater than 0:00 letter 号,则通过单片机记录第三个数字电信号与零点信号的差值作为有效信号并显示;如果第三个数字电信号小于零点信号,则以第三个数字电信号作为零点信号,此时第三个数字电信号的值为零; (4)、依次类推,将单片机记录的每一时刻的数字电信号分别与零点信号进行比较,并根据比较结果实时对零点信号进行浮动,当软件执行“停止调零”功能时,通过单片机记录从软件执行“开始调零”功能到软件执行“停止调零”功能的这段时间内的某一个或若干个时刻的数字电信号与零点信号的差值作为有效信号,并绘制出有效信号的曲线图并显示、保存。 Number, the MCU by recording the difference between a third digital electric signal as the zero point, and an effective display signal; if the third digital electric signal is smaller than zero, places the third digital electric signal as the zero signal, the first case three digital electrical zero value; (4), and so on, the SCM digital electric signal recorded at each time are compared with the zero signal and the zero point signal in real time according to the comparison result of floating, when the software execution " zero stop "function, performed by the software from the microcontroller records" zero difference start "feature to software executing" a digital electrical signal or a plurality of time within the period of time zero stop "function of the zero signal as an effective signal, and a graph plotted in FIG valid signal and display, save.
CN 201010127379 2010-03-16 2010-03-16 Automatic zero-setting method for software CN101806820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010127379 CN101806820B (en) 2010-03-16 2010-03-16 Automatic zero-setting method for software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010127379 CN101806820B (en) 2010-03-16 2010-03-16 Automatic zero-setting method for software

Publications (2)

Publication Number Publication Date
CN101806820A CN101806820A (en) 2010-08-18
CN101806820B true CN101806820B (en) 2012-08-01

Family

ID=42608706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010127379 CN101806820B (en) 2010-03-16 2010-03-16 Automatic zero-setting method for software

Country Status (1)

Country Link
CN (1) CN101806820B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1798562A1 (en) 2005-12-08 2007-06-20 Tektronix, Inc. Qualified anomaly detection
CN101231310A (en) 2006-12-04 2008-07-30 弗卢克公司 Voltage measurement instrument and method having improved automatic mode operation
CN101551774A (en) 2009-04-24 2009-10-07 东莞虎门泰达电子有限公司 Software automatic test system
CN101609106A (en) 2009-05-27 2009-12-23 东南大学 Automatic setting method of digital oscilloscope

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006292702A (en) * 2005-03-18 2006-10-26 Sunx Ltd Detection sensor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1798562A1 (en) 2005-12-08 2007-06-20 Tektronix, Inc. Qualified anomaly detection
CN101231310A (en) 2006-12-04 2008-07-30 弗卢克公司 Voltage measurement instrument and method having improved automatic mode operation
CN101551774A (en) 2009-04-24 2009-10-07 东莞虎门泰达电子有限公司 Software automatic test system
CN101609106A (en) 2009-05-27 2009-12-23 东南大学 Automatic setting method of digital oscilloscope

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
崔福明等.数据采集系统中桥路自动调零的算法实现.《仪器仪表学报》.2006,第27卷(第6期),142-144.
潘雪等.自校准电子水平仪的设计与实现.《传感器与微系统》.2008,第27卷(第1期),79-81、84.

Also Published As

Publication number Publication date
CN101806820A (en) 2010-08-18

Similar Documents

Publication Publication Date Title
CN101113995A (en) Base wave and harmonic detecting method based on Nuttall window double peak interpolation FFT
CN102288819B (en) FPGA (field programmable gate array)-based power harmonic analyzer
CN101135723A (en) Universal electric power mutual-inductor verify device
CN1316256C (en) Electric network geomagnetic induction current monitoring method and apparatus
CN102053235A (en) On-site steady-state accuracy verification system for electronic current transformer and verification method thereof
CN101907697B (en) Dynamic property tester of electric energy meter
CN101782475B (en) Blade fault diagnosing method based on vibration of wind generating set
CN203299350U (en) Battery internal resistance on-line measuring instrument
CN101299062B (en) Device for checking zinc oxide lightning arrester block property current tester
CN103471848A (en) Rolling bearing fault feature extraction method based on independent component analysis and cepstrum theory
CN102288807B (en) Method for measuring electric network voltage flicker
CN102393488B (en) Harmonic analysis method
Blair Sine-fitting software for IEEE standards 1057 and 1241
CN101852722B (en) Method for evaluating remote sensing inversion accuracy of chlorophyll a in water body
CN102331543A (en) Support vector machine based fault electric arc detection method
CN101609160B (en) Automatic seismic data first-arrival wave pickup method with strong background noise resistance
CN101609058B (en) Measuring device of soil conductivity and method
CN101477170A (en) Electric power wave-recording sampling time-delay detection system and method
CN103076538B (en) Power transmission line traveling wave fault location method using atomic decomposition
CN101539596A (en) Method for monitoring electric network frequency
CN100516856C (en) Intelligent testing system for moisture of cotton fiber
CN1945358A (en) High precision measuring method for deep resource based on natural electric field idealization and detecting instrument
CN103412202A (en) Method for current partitioned calibration
CN2702317Y (en) Resistance instrument scaling method calibration circuit
CN103454497B (en) Improved method of phase difference measurement based on windowed discrete Fourier transform

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
ASS Succession or assignment of patent right

Free format text: FORMER OWNER: HEFEI WANYI TECHNOLOGY CO., LTD.

Effective date: 20120213

Owner name: ANHUI WANYI SCIENCE AND TECHNOLOGY CO., LTD.

C41 Transfer of the right of patent application or the patent right
C14 Granted