CN104807490A - Detection method for rotating coding switch - Google Patents

Detection method for rotating coding switch Download PDF

Info

Publication number
CN104807490A
CN104807490A CN201510150393.9A CN201510150393A CN104807490A CN 104807490 A CN104807490 A CN 104807490A CN 201510150393 A CN201510150393 A CN 201510150393A CN 104807490 A CN104807490 A CN 104807490A
Authority
CN
China
Prior art keywords
time
block
coding switch
rotary coding
waveform
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201510150393.9A
Other languages
Chinese (zh)
Other versions
CN104807490B (en
Inventor
严思杰
李勇华
郑志伟
丁汉
叶松涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HUST Wuxi Research Institute
Original Assignee
HUST Wuxi Research Institute
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 HUST Wuxi Research Institute filed Critical HUST Wuxi Research Institute
Priority to CN201510150393.9A priority Critical patent/CN104807490B/en
Publication of CN104807490A publication Critical patent/CN104807490A/en
Application granted granted Critical
Publication of CN104807490B publication Critical patent/CN104807490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a detection method for a rotating coding switch. The method is on the basis of the concept of time blocking. The method comprises the steps of performing time blocking for acquired waveform data; setting conditions which can represent the time blocks of one pulse according to the detection requirement of the rotating coding switch to be detected, and finding out the time blocks from the waveform data; detecting the pulse number according to the quantity of the time blocks; detecting the phase difference between oscillating, kicking and waveform within each pulse by using the time bocks as single pulse starting markers, so as to finish the detecting of the output waveform of the whole rotating coding switch. The method is high in implementing efficiency, accurate and reliable in detection result, and can detect various indicators of the output waveform of the rotating coding switch.

Description

A kind of rotary coding switch detection method
Technical field
The present invention relates to rotary coding switch detection technique field, particularly relate to a kind of rotary coding switch detection method.
Background technology
In the quality testing of rotary coding switch and rotary encoder, be main test item to the detection of its output waveform, generally comprise number of pulses, concussion time, catastrophic time (slip noise) and A, B two Testing index such as phase differential of phase waveform.At present, for the detection of output waveform, be nearly all adopt manual detection, workman is by an auxiliary electrical checkout equipment, and the rotating shaft of hand-turning rotary coding switch, then observes the waveform that checkout equipment shows, by manually judging that whether product is qualified.This manual detection mode can only paired pulses quantity detect, and Detection job cannot ensure, testing result is also unstable.Therefore, the robotization realizing this detection is necessary, and the key of Aulomatizeted Detect is just that developing reliable wave test algorithm detects indices.But, prior art mostly adopts the means of Waveform Matching to the detection of waveform, its operand is large, simultaneously in this detection demand, due to vibration, kick irregular existence and need to measure accurately their time width, cause being difficult to set up suitable matching template, so the means of Waveform Matching are not suitable for this detection demand.
Summary of the invention
The object of the invention is to, by a kind of rotary coding switch detection method, solve the problem that above background technology part is mentioned.
For reaching this object, the present invention by the following technical solutions:
A kind of rotary coding switch detection method, it comprises the steps:
S101, gather the output waveform of rotary coding switch to be detected, wherein, the sampling time is the time that the theoretical test duration T of rotary coding switch adds a pulse;
S102, time blocking: according to the characteristic of described rotary coding switch, setting-up time blocking condition, gained waveform in step S101 is carried out time blocking from first data, thus becoming the waveform represented with the time block containing status information and time span with the waveform of numeric representation;
S103, characteristic according to rotary coding switch, setting can determine the time block of rotary coding switch off status and the condition of OFF block, from second time block of wave sequence, search OFF block according to this condition, and remember the index of each OFF block in the time block sequence of waveform;
S104, judge whether the umber of pulse in this waveform meets testing requirement according to the OFF block number found in step S103;
The time block sequence of S105, intercepting theoretical time length, and with OFF block for recurrence interval segmentation mark detected each cycle;
S106, with the OFF block found out in step S103 for period divisions mark, the Wave data in each cycle is carried out to the detection of concussion time, catastrophic time;
S107, output waveform in conjunction with A, B two-phase, with the start time of the OFF block found out in step S103 for burst length segmentation mark, and consider that the start time that the time block removed in step S105 causes is poor, carry out phase difference detection.
Especially, described step S104 specifically comprises:
If S1041 OFF block number M is less than the theoretical pulse number N of rotary coding switch, then judge that pulse number is not enough, rotary coding switch is defective, and algorithm stops;
If the time span of S1042 from the starting point of the 1st OFF block to the terminal of N number of OFF block is greater than the theoretical test duration T of rotary coding switch, then judge that pulse number is not enough, rotary coding switch is defective, and algorithm stops;
If S1043 OFF block number M is not less than N+1 and its time span of terminal from the starting point of the 1st OFF to N+1 OFF block is not more than theoretical time T, then judge that in a rotary coding switch theoretical test duration, pulse number is no less than N+1, defective, algorithm stops.
Especially, described step S105 specifically comprises: remove the time block before first the OFF block found in step S103 in each wave sequence, and remember the time span sum of the time block removed; With the start time of first OFF block for standard, intercept the time block sequence of theoretical time length backward, and with OFF block for recurrence interval segmentation mark detected each cycle.
Especially, described step S106 specifically comprises:
S1061, with the OFF block found in step S103 for individual pulse period divisions mark, using the closed interval between current OFF block to the previous time block of next OFF block as a recurrence interval, each recurrence interval in the time block sequence intercepted in analytical procedure S105 successively;
S1062, examination criteria according to rotary coding switch, setting can represent the time block of open state and the condition of ON block; Within each cycle, analyze from second time block: if it is not ON block, then the time of this time block cumulative also moves a time block backward; If it is ON block, then record current cumulative time span according to the order of sequence, and this accumulated variables of zero setting is again to add up; The time span of cumulative all ON blocks simultaneously;
S1063, feature according to rotary coding switch, analyze in the cumulative time span sequence of preserving in S1062 first and last represents is the concussion time, what all the other represented is catastrophic time, finds out the maximal value of concussion time and catastrophic time respectively with to be checked;
S1064, the maximal value of the concussion time found out in ON block time cumulative in step S1062, step S1063 and catastrophic time to be detected.
First the rotary coding switch detection method that the present invention proposes carries out time blocking to the Wave data collected, testing requirement setting according to rotary coding switch to be checked can represent the condition of the time block of a pulse and in Wave data, find these time blocks, realizes the detection of paired pulses number according to the quantity of these time blocks; Then, then with these time blocks for individual pulse beginning flag, the phase differential between the concussion in each pulse, kick and waveform is detected, complete the detection to whole rotary coding switch output waveform.Execution efficiency of the present invention is high, and testing result accurately and reliably, can detect the indices of rotary coding switch output waveform.
Accompanying drawing explanation
The rotary coding switch structural representation that Fig. 1 a provides for the embodiment of the present invention;
The open and close time diagram of the rotary coding switch that Fig. 1 b provides for the embodiment of the present invention;
The phase differential schematic diagram of the rotary coding switch output waveform that Fig. 2 provides for the embodiment of the present invention;
The rotary coding switch detection method process flow diagram that Fig. 3 provides for the embodiment of the present invention;
What Fig. 4 provided for the embodiment of the present invention detects the whether qualified method flow diagram of pulse number according to OFF block number;
Concussion in the individual pulse cycle that Fig. 5 provides for the embodiment of the present invention, kick overhaul flow chart.
Embodiment
Below in conjunction with drawings and Examples, the invention will be further described.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not full content, unless otherwise defined, all technology used herein and scientific terminology are identical with belonging to the implication that those skilled in the art of the present invention understand usually.Term used herein, just in order to describe specific embodiment, is not intended to be restriction the present invention.
Following table is the output waveform testing requirement of certain model rotary coding switch in the present embodiment:
Please refer to shown in Fig. 3, in the present embodiment, rotary coding switch detection method specifically comprises the steps:
S101, gather the output waveform of rotary coding switch to be detected, wherein, the sampling time is the time that the theoretical test duration T of rotary coding switch adds a pulse.Known with reference to upper table, in the present embodiment, the sampling time is 1042ms.Sample frequency should meet testing requirement, and be set as that each signal sampling passage is 10KHz for the sample frequency in the present embodiment, the time span that each like this sample represents is 0.1ms, meets accuracy of detection requirement.To the waveform sample data collected, store according to the order of sequence respectively according to A, B output channel.
S102, time blocking: according to the characteristic of described rotary coding switch, setting-up time blocking condition, gained waveform in step S101 is carried out time blocking from first data, thus becoming the waveform represented with the time block containing status information and time span with the waveform of numeric representation.
Rotary coding switch characteristic in the present embodiment is that more than magnitude of voltage 3.5V is OFF state, and below magnitude of voltage 1.5V is ON state, and all the other are transition state, and therefore its time blocking formula is:
OFF 3.5<=voltage
MIDDLE 1.5<voltage<3.5
ON voltage<=1.5
A, B output channel waveform sample data stored in step S101 are traveled through, the continuous sample data of all expression equal state are represented with the time block comprising rotary coding switch status information and time span, so just becoming the waveform represented with the time block containing code switch status information and time span information with the waveform of numeric representation.
S103, characteristic according to rotary coding switch, setting can determine the time block of rotary coding switch off status and the condition of OFF block, in the present embodiment, setting this condition is time block and the OFF block that a time span is not less than the expression off status of 10.0ms, from second time block of wave sequence, search OFF block according to this condition, and remember the index of each OFF block in the time block sequence of waveform.
S104, judge whether the umber of pulse in this waveform meets testing requirement according to the OFF block number found in step S103.
The pulse number of the generation of each signalling channel is detected, judges whether the umber of pulse in this waveform meets testing requirement, and as shown in Figure 4, detailed process is as follows according to the OFF block number found in step S103:
If S1041 OFF block number M is less than the theoretical pulse number N of rotary coding switch, then judge that pulse number is not enough, rotary coding switch is defective, and algorithm stops.In the present embodiment, N is 24.
If the time span of S1042 from the starting point of the 1st OFF block to the terminal of N number of OFF block is greater than the theoretical test duration T of rotary coding switch, then judge that pulse number is not enough, rotary coding switch is defective, and algorithm stops.In the present embodiment, N is 24, T is 1s.
If S1043 OFF block number M is not less than N+1 and its time span of terminal from the starting point of the 1st OFF to N+1 OFF block is not more than theoretical time T, then judge that in a rotary coding switch theoretical test duration, pulse number is no less than N+1, defective, algorithm stops.In the present embodiment, N is 24, T is 1s.
The time block sequence of S105, intercepting theoretical time length T, and with OFF block for recurrence interval segmentation mark detected each cycle.Detailed process is as follows: remove the time block before first the OFF block found in step S103 in each wave sequence, and remember the time span sum of the time block removed; With the start time of first OFF block for standard, intercept the time block sequence of theoretical time length T backward, and with OFF block for recurrence interval segmentation mark detected each cycle.In the present embodiment, T is 1s.
S106, with the OFF block found out in step S103 for period divisions mark, the Wave data in each cycle is carried out to the detection of concussion time, catastrophic time.As shown in Figure 5, detailed process is as follows:
S1061, with the OFF block found in step S103 for individual pulse period divisions mark, using the closed interval between current OFF block to the previous time block of next OFF block as a recurrence interval, each recurrence interval in the time block sequence intercepted in analytical procedure S105 successively.
S1062, examination criteria according to rotary coding switch, setting can represent the time block of open state and the condition of ON block; Within each cycle, analyze from second time block: if it is not ON block, then the time of this time block cumulative also moves a time block backward; If it is ON block, then record current cumulative time span according to the order of sequence, and this accumulated variables of zero setting is again to add up; The time span of cumulative all ON blocks simultaneously.It should be noted that, according to the rotary coding switch testing requirement in the present embodiment, the ON block condition in the present embodiment is time block and the ON block that time span is not less than the expression open state of 1ms.
S1063, feature according to rotary coding switch, analyze in the cumulative time span sequence of preserving in S1062 first and last represents is the concussion time, what all the other represented is catastrophic time, finds out the maximal value of concussion time and catastrophic time respectively with to be checked.
S1064, the maximal value of the concussion time found out in ON block time cumulative in step S1062, step S1063 and catastrophic time to be detected.
S107, output waveform in conjunction with A, B two-phase, with the start time of the OFF block found out in step S103 for burst length segmentation mark, and consider that the start time that the time block removed in step S105 causes is poor, carry out phase difference detection.
Technical scheme of the present invention not only execution efficiency is high, and testing result is accurately and reliably, can to the number of pulses of rotary coding switch output waveform, concussion, kick and A, B two the indices such as phase differential of phase waveform detect.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (4)

1. a rotary coding switch detection method, its spy is being, comprises the steps:
S101, gather the output waveform of rotary coding switch to be detected, wherein, the sampling time is the time that the theoretical test duration T of rotary coding switch adds a pulse;
S102, time blocking: according to the characteristic of described rotary coding switch, setting-up time blocking condition, gained waveform in step S101 is carried out time blocking from first data, thus becoming the waveform represented with the time block containing status information and time span with the waveform of numeric representation;
S103, characteristic according to rotary coding switch, setting can determine the time block of rotary coding switch off status and the condition of OFF block, from second time block of wave sequence, search OFF block according to this condition, and remember the index of each OFF block in the time block sequence of waveform;
S104, judge whether the umber of pulse in this waveform meets testing requirement according to the OFF block number found in step S103;
The time block sequence of S105, intercepting theoretical time length, and with OFF block for recurrence interval segmentation mark detected each cycle;
S106, with the OFF block found out in step S103 for period divisions mark, the Wave data in each cycle is carried out to the detection of concussion time, catastrophic time;
S107, output waveform in conjunction with A, B two-phase, with the start time of the OFF block found out in step S103 for burst length segmentation mark, and consider that the start time that the time block removed in step S105 causes is poor, carry out phase difference detection.
2. rotary coding switch detection method according to claim 1, its spy is being, described step S104 specifically comprises: if S1041 OFF block number M is less than the theoretical pulse number N of rotary coding switch, then judge that pulse number is not enough, rotary coding switch is defective, and algorithm stops; If the time span of S1042 from the starting point of the 1st OFF block to the terminal of N number of OFF block is greater than the theoretical test duration T of rotary coding switch, then judge that pulse number is not enough, rotary coding switch is defective, and algorithm stops; If S1043 OFF block number M is not less than N+1 and its time span of terminal from the starting point of the 1st OFF to N+1 OFF block is not more than theoretical time T, then judge that in a rotary coding switch theoretical test duration, pulse number is no less than N+1, defective, algorithm stops.
3. rotary coding switch detection method according to claim 2, its spy is being, described step S105 specifically comprises: remove the time block before first the OFF block found in step S103 in each wave sequence, and remember the time span sum of the time block removed; With the start time of first OFF block for standard, intercept the time block sequence of theoretical time length backward, and with OFF block for recurrence interval segmentation mark detected each cycle.
4. rotary coding switch detection method according to claim 3, its spy is being, described step S106 specifically comprises:
S1061, with the OFF block found in step S103 for individual pulse period divisions mark, using the closed interval between current OFF block to the previous time block of next OFF block as a recurrence interval, each recurrence interval in the time block sequence intercepted in analytical procedure S105 successively;
S1062, examination criteria according to rotary coding switch, setting represents the time block of open state and the condition of ON block; Within each cycle, analyze from second time block: if it is not ON block, then the time of this time block cumulative also moves a time block backward; If it is ON block, then record current cumulative time span according to the order of sequence, and this accumulated variables of zero setting is again to add up; The time span of cumulative all ON blocks simultaneously;
S1063, feature according to rotary coding switch, analyze in the cumulative time span sequence of preserving in S1062 first and last represents is the concussion time, what all the other represented is catastrophic time, finds out the maximal value of concussion time and catastrophic time respectively with to be checked;
S1064, the maximal value of the concussion time found out in ON block time cumulative in step S1062, step S1063 and catastrophic time to be detected.
CN201510150393.9A 2015-03-31 2015-03-31 A kind of rotary coding switch detection method Active CN104807490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510150393.9A CN104807490B (en) 2015-03-31 2015-03-31 A kind of rotary coding switch detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510150393.9A CN104807490B (en) 2015-03-31 2015-03-31 A kind of rotary coding switch detection method

Publications (2)

Publication Number Publication Date
CN104807490A true CN104807490A (en) 2015-07-29
CN104807490B CN104807490B (en) 2017-08-18

Family

ID=53692523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510150393.9A Active CN104807490B (en) 2015-03-31 2015-03-31 A kind of rotary coding switch detection method

Country Status (1)

Country Link
CN (1) CN104807490B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109164733A (en) * 2018-08-24 2019-01-08 深圳市廿年科技有限公司 A kind of power supply of high efficiency programmable controller and signal transmission system and mode

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101173864A (en) * 2006-10-31 2008-05-07 三菱重工业株式会社 Method and device for detecting tooth matching angle of gear
CN101995533A (en) * 2009-08-11 2011-03-30 深圳市英威腾电气股份有限公司 Real-time wire-break detection method and system for digital incremental encoder
CN102607630A (en) * 2012-02-20 2012-07-25 中联重科股份有限公司 Detection method, device and system of fault of encoder
CN103076036A (en) * 2012-12-31 2013-05-01 深圳市配天数控科技有限公司 Incremental encoder disconnection detection method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101173864A (en) * 2006-10-31 2008-05-07 三菱重工业株式会社 Method and device for detecting tooth matching angle of gear
US20100023297A1 (en) * 2006-10-31 2010-01-28 Mitsubishi Heavy Industries, Ltd. Gear meshing angle detection method and device
CN101995533A (en) * 2009-08-11 2011-03-30 深圳市英威腾电气股份有限公司 Real-time wire-break detection method and system for digital incremental encoder
CN102607630A (en) * 2012-02-20 2012-07-25 中联重科股份有限公司 Detection method, device and system of fault of encoder
CN103076036A (en) * 2012-12-31 2013-05-01 深圳市配天数控科技有限公司 Incremental encoder disconnection detection method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曾镜源等: "《旋转开关状态检测系统设计》", 《嘉应学院学报(纵然科学)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109164733A (en) * 2018-08-24 2019-01-08 深圳市廿年科技有限公司 A kind of power supply of high efficiency programmable controller and signal transmission system and mode
CN109164733B (en) * 2018-08-24 2021-03-19 深圳市廿年科技有限公司 High-efficiency programmable controller power supply and signal transmission system and method

Also Published As

Publication number Publication date
CN104807490B (en) 2017-08-18

Similar Documents

Publication Publication Date Title
CN105529688B (en) Transformer excitation flow and failure difference stream recognition method based on Hausdorff distance algorithms
CN102842128B (en) Method for checking object and device thereof
CN104915568B (en) Satellite telemetering data method for detecting abnormality based on DTW
CN106505557B (en) Remote measurement error identification method and device
CN110895526A (en) Method for correcting data abnormity in atmosphere monitoring system
CN109461095A (en) A kind of data processing method and equipment of the load event detection for the identification of non-intrusion type load
CN103344368B (en) Based on the squirrel cage asynchronous motor efficiency on-line monitoring method can surveying electric parameters
CN110008565A (en) A kind of industrial process unusual service condition prediction technique based on operating parameter association analysis
US8542722B2 (en) Communication analysis apparatus and communication analysis method
CN109375060B (en) Method for calculating fault waveform similarity of power distribution network
CN109374953B (en) Voltage sag waveform point detection method based on voltage effective value sequence
CN105389648A (en) Distinguishing method for steady-state operating condition of atmospheric and vacuum distillation device
CN112116013B (en) Voltage sag event normalization method based on waveform characteristics
CN114490156A (en) Time series data abnormity marking method
CN105245203A (en) System and method for duty ratio detection employing high precision and low speed clock
CN109425894A (en) A kind of seismic anomaly road detection method and device
TW201339779A (en) Bi-directional association and graphical acquisition of time-based equipment sensor data and material-based metrology statistical process control data
CN201935964U (en) Automatic intelligent detection device for quartz oscillator instrument
CN103543331B (en) A kind of method calculating electric signal harmonic wave and m-Acetyl chlorophosphonazo
CN104807490A (en) Detection method for rotating coding switch
CN106772193B (en) Measuring method using current transformer frequency characteristic measuring device
CN102721878A (en) Intelligentized automatic checkout device of quartz crystal oscillator instrument
CN114460360B (en) Detection method, system and device based on ammeter measurement current time integral
CN110910954A (en) Method and system for detecting low-depth whole genome gene copy number variation
CN106353528A (en) Apparatus and method for measuring motor speed

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant