CN102062615B - Position coding method of single-code channel - Google Patents
Position coding method of single-code channel Download PDFInfo
- Publication number
- CN102062615B CN102062615B CN2010105754469A CN201010575446A CN102062615B CN 102062615 B CN102062615 B CN 102062615B CN 2010105754469 A CN2010105754469 A CN 2010105754469A CN 201010575446 A CN201010575446 A CN 201010575446A CN 102062615 B CN102062615 B CN 102062615B
- Authority
- CN
- China
- Prior art keywords
- code
- code element
- word
- width
- coding
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 239000007787 solid Substances 0.000 claims 7
- 238000012545 processing Methods 0.000 description 6
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000005259 measurement Methods 0.000 description 4
- 238000006073 displacement reaction Methods 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000001208 nuclear magnetic resonance pulse sequence Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Landscapes
- Road Signs Or Road Markings (AREA)
- Instructional Devices (AREA)
Abstract
Description
【技术领域】 【Technical field】
本发明涉及一种位置编码方法,尤其涉及一种应用于位置编码器中的单码道位置编码方法。The invention relates to a position coding method, in particular to a single code track position coding method applied in a position coder.
【背景技术】 【Background technique】
位置编码器是测量位置和位移编码器。按照被测量的类型可分为直线编码器和盘式编码器,分别用来测量长度和角度的几何量。Position encoders are encoders that measure position and displacement. According to the type of measurement, it can be divided into linear encoder and disc encoder, which are used to measure the geometric quantity of length and angle respectively.
目前,在光电式位移测量当中,通常采用增量计数法和绝对位置编码方法。增量计数法是通过对两片光栅相对运动时产生的脉冲序列进行计数,用具有方向性的累计数来表示位移的变化量。这种方法原理简单,所有的光栅工艺流程短、成本低。然而该方法存在较多的缺点:如数据可靠性较差,其一旦累计计数产生差错,这种误差就会一直保存到测量结束;并且在测量过程中如果发生断电,则所记数据立即全部丢失,无法恢复。At present, in the photoelectric displacement measurement, the incremental counting method and the absolute position encoding method are usually used. The incremental counting method counts the pulse sequence generated when two gratings move relative to each other, and uses the directional cumulative number to represent the displacement change. The principle of this method is simple, and the process flow of all gratings is short and the cost is low. However, there are many disadvantages in this method: such as poor data reliability, once the cumulative counting error occurs, this error will be stored until the end of the measurement; and if a power failure occurs during the measurement, all recorded data will be immediately lost and cannot be recovered.
绝对位置编码法是在一片光栅上刻画特定规则的编码,被测量的所有位置均具有唯一的编码与之对应,并且其在断电后重新上电时,这种对应关系保持不变,从而保证了数据的可靠性,也不存在计数丢失的问题。The absolute position coding method is a code that describes a specific rule on a piece of grating, and all positions to be measured have a unique code corresponding to it, and when it is powered off and powered on again, this correspondence remains unchanged, thus ensuring The reliability of the data is guaranteed, and there is no problem of count loss.
然而目前常用的多码道绝对位置编码器存在体积较大、不易安装的技术问题,并且要想提高其精度就必须扩大其码道数,从而使得制造工艺较为复杂。随着技术的发展和进步,单码道绝对式编码器是我们发展的主要目标。由于单码道绝对式编码器由于其信息集中,编码本身的设计和信息的采集过程就成为研究的难点和重点。现有的单码道绝对式编码方法普遍存在编码条纹不易辨别,编码及译码较为繁琐,易产生误差等问题。However, the currently commonly used multi-track absolute position encoder has the technical problems of large size and difficult installation, and in order to improve its accuracy, the number of code tracks must be enlarged, which makes the manufacturing process more complicated. With the development and progress of technology, single-code absolute encoder is the main goal of our development. Because of the information concentration of the single-track absolute encoder, the design of the encoding itself and the process of information collection become the difficulty and focus of the research. The existing single-track absolute coding methods generally have problems such as difficult identification of coding stripes, cumbersome coding and decoding, and prone to errors.
【发明内容】 【Content of invention】
为了解决现有技术单码道绝对式编码方法存在的编码条纹不易辨别、编码及译码较为繁琐的技术问题,本发明提供一种易于辨别编码条纹并且编码、译码都较为简便的单码道位置编码方法。In order to solve the technical problems that the coding stripes in the single-code-track absolute coding method in the prior art are difficult to distinguish, and the coding and decoding are cumbersome, the present invention provides a single-code-track that is easy to distinguish the coding stripes and has relatively simple encoding and decoding. Position encoding method.
本发明提供一种单码道位置编码方法,其包括:设置编码图形划分为多个码区,每一码区包括一位置码和一区标志位,每一位置码包括至少一第一码字和至少一第二码字,每一码字都包括一第一码元和一第二码元,该第一码元和该第二码元的宽度相同,第一码字和第二码字中的第一码元和第二码元的排列顺序相反,该区标志位包括一第三码元,该第三码元的宽度大于或小于该第一码元的宽度。The present invention provides a single code track position coding method, which includes: setting the coding pattern and dividing it into a plurality of code areas, each code area includes a position code and a zone flag, and each position code includes at least one first code word And at least one second code word, each code word all comprises a first code element and a second code element, and the width of this first code element and this second code element is the same, and the first code word and the second code word The arrangement order of the first symbol and the second symbol in is opposite, and the area flag includes a third symbol whose width is larger or smaller than the width of the first symbol.
所述的区标志位的第三码元的宽度为至少两个第一码元的宽度。The width of the third symbol of the zone flag is at least two widths of the first symbols.
所述的位于奇数序列码区的区标志位的第三码元为至少两个第一码元,所述的位于偶数序列码区的区标志位的第三码元为至少两个第二码元。The third symbol of the zone flag located in the odd sequence code area is at least two first symbols, and the third symbol of the zone flag positioned in the even sequence code zone is at least two second code elements Yuan.
所述的位于奇数序列码区的区标志位的第三码元为至少两个第二码元,所述的位于偶数序列码区的区标志位的第三码元为至少两个第一码元。The third code element of the zone flag located in the odd sequence code area is at least two second code elements, and the third code element of the zone flag positioned in the even sequence code area is at least two first code elements Yuan.
设置该区标志位的第三码元以与其邻近的第一码元或第二码元表示,并设置数量为至少两个。The third symbol for which the zone flag is set is represented by the adjacent first symbol or second symbol, and the number of settings is at least two.
所述的位于同一码区中的码字的第一码元或第二码元与该区标志位相邻,设置所述的区标志位的第三码元为至少两个第一码元或至少两个第二码元。The first code element or the second code element of the code word in the same code area are adjacent to the area flag, and the third code element of the area flag is set to be at least two first code elements or At least two second symbols.
所述的位于相邻码区的码字的第一码元或第二码元与该区标志位相邻,设置该区标志位的第三码元为至少两个第一码元或至少两个第二码元。The first code element or the second code element of the code word located in the adjacent code area is adjacent to the area flag, and the third code element of the area flag is set to be at least two first code elements or at least two a second code element.
所述的位置码的第一码字和第二码字都为格雷码编码。Both the first code word and the second code word of the position code are coded by Gray code.
如所述的位置码表示的数值为偶数,则所述的位置码的码字由该偶数数值对应的格雷码按位取反后得到。If the value represented by the position code is an even number, then the code word of the position code is obtained by inverting the Gray code corresponding to the even value.
如所述的位置码表示的数值为奇数,则所述的位置码的码字由该奇数数值对应的格雷码按位取反后得到。If the value represented by the position code is an odd number, the code word of the position code is obtained by inverting the Gray code corresponding to the odd number value.
相较于现有技术,本发明所述的单码道位置编码方法的主要有益效果在于:Compared with the prior art, the main beneficial effects of the single code track position coding method of the present invention are:
(1).每一码区中的区标志位与相邻的位置码码字的编码条纹宽度不相同,区别明显,易于辨别。另外,本发明的编码及译码较为简便,不易产生误差。(1). The area mark bit in each code area is different from the encoding stripe width of the adjacent position code code word, and the difference is obvious and easy to distinguish. In addition, the encoding and decoding of the present invention are relatively simple and less prone to errors.
(2).本发明实施例4中的编码方法中,其按照格雷码的编码对位置码的码元进行取反处理,在其应用数据处理过程中,有益于数据的采集,并能减少数据处理过程中的误差。(2). In the coding method in the embodiment of the present invention 4, it carries out inverse processing to the code element of position code according to the coding of Gray code, in its application data processing process, is beneficial to the collection of data, and can reduce data Errors in processing.
【附图说明】 【Description of drawings】
图1是本发明单码道位置编码方法实施例1的编码图形的直线编码形式的部分码区示意图。Fig. 1 is a schematic diagram of a partial code area in the form of linear coding of the coding pattern in
图2是本发明单码道位置编码方法实施例1的编码图形的盘式编码形式的部分码区示意图。Fig. 2 is a schematic diagram of a part of the code area in the form of disk coding of the coding pattern in
【具体实施方式】 【Detailed ways】
实施例1Example 1
如图1所示,一种单码道位置编码器,其设置有一编码图形。该编码图形采用直线编码的形式,其设置有多个平行相间排列的白条纹80和黑条纹90。其中,黑条码90表示不透光条码,白条码80表示透光条码。所述的单码道位置编码方法,其包括:设置编码图形划分为多个码区,每一码区包括一位置码和一区标志位;每一位置码包括一第一码字和一第二码字;每一码字都包括一第一码元和一第二码元,设置该第一码元和该第二码元的宽度相同,第一码字与第二码字中的第一码元和第二码元的排列顺序相反;该区标志位包括一第三码元,该第三码元的宽度不同于该第一码元的宽度。每一位置码也可以包括多个第一码字和多个第二码字。As shown in Fig. 1, a single code track position encoder is provided with an encoding pattern. The coding pattern adopts the form of linear coding, which is provided with a plurality of white stripes 80 and black stripes 90 arranged in parallel and alternately. Wherein, the black barcode 90 represents an opaque barcode, and the white barcode 80 represents a light-transmitting barcode. The single code track position coding method includes: setting the coding pattern and dividing it into a plurality of code areas, each code area includes a position code and a zone flag; each position code includes a first code word and a first code word Two code words; each code word all comprises a first code element and a second code element, the width of this first code element and this second code element is set to be identical, the first code word and the second code element in the second code word The arrangement order of the first symbol and the second symbol is opposite; the area flag includes a third symbol whose width is different from that of the first symbol. Each position code may also include a plurality of first codewords and a plurality of second codewords.
当该第一码元为一黑条纹时,则该第二码元为一白条纹;当该第一码元为一白条纹时,则该第二码元为一黑条纹。该第三码元为宽度不同于一第一码元的一白条纹或一黑条纹。其中,表示该第三码元的条纹宽度大于或者小于表示该第一码元的条纹的宽度。设置第一码字以第一码元、第二码元的顺序在其中排列,则第二码字以第二码元、第一码元的顺序在其中排列;设置第一码字以第二码元、第一码元的顺序在其中排列,则第二码字以第一码元、第二码元的顺序在其中排列。在二进制编码中,当设置第一码字所表示的数值为1时,则第二码字所表示的数值为0;当设置第一码字所表示的数值为0时,则第二码字所表示的数值为1。该位置码的第一码字和第二码字也可以都为格雷码编码。When the first symbol is a black stripe, the second symbol is a white stripe; when the first symbol is a white stripe, the second symbol is a black stripe. The third symbol is a white stripe or a black stripe with a width different from that of a first symbol. Wherein, the width of the stripe representing the third symbol is larger or smaller than the width of the stripe representing the first symbol. The first code word is set to be arranged in the order of the first code element and the second code element, then the second code word is arranged in the order of the second code element and the first code element; the first code word is arranged in the order of the second code word The order of the code element and the first code element is arranged therein, and then the second code word is arranged therein in the order of the first code element and the second code element. In binary coding, when the value represented by the first code word is set to 1, the value represented by the second code word is 0; when the value represented by the first code word is set to 0, the second code word The value represented is 1. The first codeword and the second codeword of the position code can also both be coded by Gray code.
图1中所示的编码图形,以其中任意一码区为例,该码区10的每一位置码20包括两个第一码字40和一个第二码字50,规定其第一码字40所表示的二进制数值为0,第二码字50所表示的二进制数值为1,第一码元为白条纹80,第二码元为黑条纹90,则第一码字40对应白条纹80、黑条纹90的顺序在其中排列,第二码字50对应黑条纹90、白条纹80的顺序在其中排列。其中,该白条纹80和该黑条纹90的宽度相同。该码区10的区标志位30包括一第三码元60,该第三码元60为白条纹(未标示),其宽度为表示第一码元的白条纹80的宽度的二倍。由上述可知,根据编码图形中位置码20的黑条纹90和白条纹80的排列顺序,即可得出每一码区10的位置码20所表示的二进制数值。In the coding pattern shown in Fig. 1, taking any one of the code areas as an example, each
如图2所示,该编码器的编码图形也可以采用盘式编码的形式。图2中显示了盘式的部分内容,其与图1中所示的采用直线编码的形式的主要区别在于:该黑条纹和该白条码在光栅标尺上按照环形相间排列。对于图2中所示的编码图形,其编码方法与图1所示采用直线编码的形式的编码方法相同,在此不再重复说明。As shown in Figure 2, the encoding pattern of the encoder can also be in the form of disc encoding. Figure 2 shows part of the disk format, and the main difference between it and the form of linear coding shown in Figure 1 is that the black stripes and the white barcodes are arranged alternately in a ring on the grating scale. For the coding pattern shown in FIG. 2 , its coding method is the same as the coding method in the form of linear coding shown in FIG. 1 , so the description will not be repeated here.
实施例2Example 2
本发明所述的单码道位置编码方法与实施例1的单码道位置编码方法大致相同,其主要区别在于:设置所述的位于奇数序列码区的区标志位,其第三码元的宽度为两个第一码元的宽度,所述的位于偶数序列码区的区标志位,其第三码元的宽度为两个第二码元的宽度;同理,也可以设置所述的位于奇数序列码区的区标志位,其第三码元的宽度为两个第二码元的宽度,所述的位于偶数序列码区的区标志位,其第三码元的宽度为两个第一码元的宽度。所述的第三码元的宽度也可以为多个第一码元或多个第二码元的宽度。The single code track position encoding method described in the present invention is roughly the same as the single code track position encoding method in
实施例3Example 3
本发明所述的单码道位置编码方法与实施例1的单码道位置编码方法大致相同,其主要区别在于:设置所述的码区的区标志位的第三码元,以与其邻近的码字中的两个码元表示。所述的位于同一码区中的码字的第一码元与该区标志位相邻,设置所述的区标志位的第三码元为两个第一码元;所述的位于同一码区中的码字的第二码元与该区标志位相邻,设置所述的区标志位的第三码元为两个第二码元。所述的位于相邻码区的码字的第一码元与该区标志位相邻,设置该区标志位的第三码元为两个第一码元;所述的位于相邻码区的码字的第二码元与该区标志位相邻,设置该区标志位的第三码元为两个第二码元。由上述可知,该第三码元的宽度为两个第一码元或两个第二码元的宽度。根据实际操作的需要,也可以设置所述的区标志位的第三码元为多个第一码元或多个第二码元,即该第三码元的宽度为多个第一码元或多个第二码元的宽度。The single code track position coding method of the present invention is roughly the same as the single code track position coding method in
实施例4Example 4
本发明所述的单码道位置编码方法与实施例1、实施例2以及实施例3所述的单码道位置编码方法大致相同,其主要区别在于:如所述的位置码表示的数值为偶数,则所述的位置码的码字由该偶数数值对应的格雷码按位取反后得到;或者采用如下方法,如所述的位置码表示的数值为奇数,则所述的位置码的码字由该奇数数值对应的格雷码按位取反后得到。The single code track position coding method described in the present invention is roughly the same as the single code track position coding method described in
本发明单码道位置编码方法并不限于上述实施例所述,其也可以包括其他变更设计,如:所述的位置码的码字中所包括的码元的数量并不限于两个,其可以根据实际使用的需要设置为多个;所述的第三码元的宽度也可以为一第一码元的半宽度。The single code channel position coding method of the present invention is not limited to the above-mentioned embodiment, and it may also include other modified designs, such as: the number of symbols included in the code word of the position code is not limited to two, it It can be set in multiples according to actual needs; the width of the third symbol can also be half the width of a first symbol.
本发明提供了一种单码道位置编码方法,相较于现有技术,本发明的主要有益效果在于:The present invention provides a single code track position encoding method, compared with the prior art, the main beneficial effects of the present invention are:
(1).每一码区中的区标志位与相邻的位置码码字的编码条纹宽度不相同,区别明显,易于辨别。另外,本发明的编码及译码较为简便,不易产生误差。(1). The area mark bit in each code area is different from the encoding stripe width of the adjacent position code code word, and the difference is obvious and easy to distinguish. In addition, the encoding and decoding of the present invention are relatively simple and less prone to errors.
(2).本发明实施例4中的编码方法中,其按照格雷码的编码对位置码的码元进行取反处理,在其应用数据处理过程中,有益于数据的采集,并能减少数据处理过程中的误差。(2). In the coding method in the embodiment of the present invention 4, it carries out inverse processing to the code element of position code according to the coding of Gray code, in its application data processing process, is beneficial to the collection of data, and can reduce data Errors in processing.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105754469A CN102062615B (en) | 2010-08-27 | 2010-12-07 | Position coding method of single-code channel |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010263799.5 | 2010-08-27 | ||
CN201010263799 | 2010-08-27 | ||
CN2010105754469A CN102062615B (en) | 2010-08-27 | 2010-12-07 | Position coding method of single-code channel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102062615A CN102062615A (en) | 2011-05-18 |
CN102062615B true CN102062615B (en) | 2012-07-25 |
Family
ID=43997992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010105754469A Expired - Fee Related CN102062615B (en) | 2010-08-27 | 2010-12-07 | Position coding method of single-code channel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102062615B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102589442B (en) * | 2012-01-13 | 2014-03-12 | 大连民族学院 | Single-code coding and decoding method based on absolute position determination |
CN107621822B (en) * | 2017-08-30 | 2021-01-05 | 杭州为诺智能科技有限公司 | Magnetic bar code and reading method thereof and path planning method of magnetic navigation robot |
CN108981764A (en) * | 2018-05-04 | 2018-12-11 | 广东工业大学 | A kind of rotating grating encoder rotating angle measurement apparatus and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5651187A (en) * | 1994-08-12 | 1997-07-29 | Dr. Johannes Heidenhain Gmbh | Position measuring device |
CN1493853A (en) * | 2003-10-10 | 2004-05-05 | 杨俊志 | Universal coding method of single loop absolute type angle coder |
CN1598486A (en) * | 2004-09-10 | 2005-03-23 | 北京交通大学 | Method for encoding absolute position |
CN101476902A (en) * | 2009-01-13 | 2009-07-08 | 常州大地测绘科技有限公司 | Single-code channel absolute position encoding method |
-
2010
- 2010-12-07 CN CN2010105754469A patent/CN102062615B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5651187A (en) * | 1994-08-12 | 1997-07-29 | Dr. Johannes Heidenhain Gmbh | Position measuring device |
CN1493853A (en) * | 2003-10-10 | 2004-05-05 | 杨俊志 | Universal coding method of single loop absolute type angle coder |
CN1598486A (en) * | 2004-09-10 | 2005-03-23 | 北京交通大学 | Method for encoding absolute position |
CN101476902A (en) * | 2009-01-13 | 2009-07-08 | 常州大地测绘科技有限公司 | Single-code channel absolute position encoding method |
Also Published As
Publication number | Publication date |
---|---|
CN102062615A (en) | 2011-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101476902B (en) | Single track absolute position encoding method | |
JP6022220B2 (en) | Linear position measurement system | |
JP2004529344A5 (en) | ||
KR101311607B1 (en) | A sequential data storage medium and method for encoding information in the sequential data storage medium | |
CN201780116U (en) | Photoelectric encoder for detecting rotation speed and rotation angle of rotating objects | |
CN109579711B (en) | Absolute position displacement sensor grating absolute position encoding and decoding method | |
US20130200886A1 (en) | Position detecting device and method for producing a marking arrangement for a postion detecting device | |
KR19980087143A (en) | Magnetic tape medium having addressing information superimposed on track following servo information, and its reading and writing method | |
CN102062615B (en) | Position coding method of single-code channel | |
CN103557878A (en) | Absolute grating ruler multi-track encoding method | |
CN102095439A (en) | Single-code-channel absolute-position encoding method, decoding method and measuring device | |
CN102003976B (en) | Single-code channel absolute position coding method, decoding method and measuring device | |
CN101984328B (en) | Single-code channel photoelectric coder | |
WO2013037204A1 (en) | High-precision coding wheel and coder formed thereby | |
CN103134532A (en) | Circumferential code channel coding and decoding method based on judgment to absolute position | |
CN101922947A (en) | a photoelectric encoder | |
JP4622725B2 (en) | Magnetic absolute encoder | |
CN1312457C (en) | Absolute position mark method for rail line | |
CN112880571A (en) | Absolute grating ruler | |
CN110044395A (en) | Optical encoding sensing device | |
CN104374325B (en) | Single-code-channel absolute encoding and decoding method based on dual periodic sequences | |
CN101672661B (en) | One-dimensional absolute position coding system | |
CN108106647A (en) | A kind of code-disc building method of monorail absolute optical encoder | |
CN105973287B (en) | A kind of more rail absolute grating ruler image encoding/decoding methods | |
CN114136351B (en) | A Single Code Channel Absolute Encoding and Decoding Method with Error Detection and Correction Function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120725 Termination date: 20131207 |