CN108362208B - Pseudo-random code channel grating ruler and reading method thereof - Google Patents

Pseudo-random code channel grating ruler and reading method thereof Download PDF

Info

Publication number
CN108362208B
CN108362208B CN201810283129.6A CN201810283129A CN108362208B CN 108362208 B CN108362208 B CN 108362208B CN 201810283129 A CN201810283129 A CN 201810283129A CN 108362208 B CN108362208 B CN 108362208B
Authority
CN
China
Prior art keywords
pseudo
random code
ruler
scale
reading
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.)
Active
Application number
CN201810283129.6A
Other languages
Chinese (zh)
Other versions
CN108362208A (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.)
Guangzhou Numerical Control Equipment Co Ltd
Original Assignee
Guangzhou Numerical Control Equipment Co Ltd
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 Guangzhou Numerical Control Equipment Co Ltd filed Critical Guangzhou Numerical Control Equipment Co Ltd
Priority to CN201810283129.6A priority Critical patent/CN108362208B/en
Publication of CN108362208A publication Critical patent/CN108362208A/en
Priority to PCT/CN2018/117885 priority patent/WO2019192196A1/en
Application granted granted Critical
Publication of CN108362208B publication Critical patent/CN108362208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/26Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • G01D5/32Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light
    • G01D5/34Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells
    • G01D5/347Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells using displacement encoding scales
    • G01D5/34776Absolute encoders with analogue or digital scales
    • G01D5/34792Absolute encoders with analogue or digital scales with only digital scales or both digital and incremental scales
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/249Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using pulse code
    • G01D5/2492Pulse stream
    • G01D5/2495Pseudo-random code

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optical Transform (AREA)

Abstract

The utility model discloses a coding method of a pseudo-random code path grating ruler, a pseudo-random code path grating ruler manufactured by the coding method of the pseudo-random code path grating ruler and a method for reading the pseudo-random code path grating ruler. The pseudo-random code path grating ruler comprises a linear guide rail, a reading head and a pseudo-random code path grating ruler, wherein the pseudo-random code path grating ruler comprises a main ruler, a secondary ruler and an incremental code path; the code tracks of the main ruler and the auxiliary ruler are grating lines which are arranged at non-equal intervals continuously, and are arranged according to the coding method, and the incremental code tracks are periodic grating lines which are arranged at equal intervals continuously. The grating ruler has the advantages of high resolution, large measuring range, short starting recognition position distance, simple absolute value code path mathematical derivation method and simplified product production process.

Description

Pseudo-random code channel grating ruler and reading method thereof
Technical Field
The utility model relates to the technical field of grating ruler position measurement, in particular to a pseudo-random code channel grating ruler and a reading method thereof.
Background
The grating ruler is a measurement feedback device working by utilizing the optical principle of the grating. The grating ruler is commonly used in a closed-loop servo system of a numerical control machine tool and used for detecting linear displacement or angular displacement. The signal output by the grating ruler is digital pulse, and has the characteristics of large detection range, high detection precision and high response speed.
The prior grating ruler is mainly divided into an incremental grating ruler and an absolute grating ruler. The measuring principle of the incremental grating ruler is that light is modulated into mole stripes through two gratings which move relatively, displacement variation is obtained after counting and subdividing the mole stripes, and absolute positions are determined by setting one or more reference points on the scale grating. The measuring principle of the absolute grating ruler is that a code channel with absolute position codes is engraved on a scale grating, and a reading head can obtain the absolute position by reading the codes of the current position.
The absolute code track of the absolute grating ruler is provided with a serial coding absolute grating ruler and a parallel coding absolute grating ruler. For the traditional serial coding absolute grating ruler, as only one absolute value code channel exists, along with the lengthening of the range and the improvement of the precision resolution, the algorithm derivation of a coding sequence is too complex, and the requirements of large range and high precision resolution are difficult to meet at the same time. Specifically, a traditional serial coding absolute grating ruler can generate a series of binary codes through a complex mathematical derivation process according to the measuring range and the measuring precision of the grating ruler, and the series of binary codes are recorded on the long grating ruler. Along with the increase of the range length and the improvement of the precision, the mathematical derivation process is more complicated, and the research and development workload is large; meanwhile, as the range length increases, the distance of an invalid position which needs to be spanned when a boot-up machine recognizes an absolute position increases, the boot-up error is large, and high resolution and a wide range are difficult to realize. For serial coding absolute grating ruler, because there is only one absolute code channel, when the absolute position is identified by starting up, the number of coding bits needed to be crossed is more, which results in longer invalid position of starting up. Specifically, as resolution and span length increase, absolute encoding with a larger bit length needs to be set, which makes it difficult to realize high resolution and wide span.
Patent ZL201310318825.3 discloses a multi-track encoding method of an absolute grating scale, which specifically comprises the following steps: the common monorail binary M-sequence absolute grating ruler linear coding, M-sequence disc encoder, spread code mode multi-code channel pseudo-random code linear coding, p-element M-sequence pseudo-random code of spread code mode are applicable to linear absolute position encoders and disc absolute angle encoders, can be positioned at any time, and have the advantages of easy generation and low decoding cost. The code channels adopted in the patent are multiple pseudo-random code channels with multiple elements, and the number of the code channels is increased along with the increase of the measuring range, so that the problem of complex overall measuring, reading and operation structures of the grating ruler is caused; in addition, the coding mode adopts full-scale coding, the mode is a cyclic coding method, pseudo random codes are periodically generated, and mainly the parallel code mode for increasing code channels is used for expanding in the length direction, and the technical complexity is obviously increased along with the increase of the length, so that the method is not beneficial to being applied to grating scales with large measuring range length.
Disclosure of Invention
The utility model mainly aims to overcome the defects and shortcomings of the prior art and provides a pseudo-random code channel grating ruler and a reading method thereof; the grating ruler has the advantages of high resolution, large measuring range, short starting recognition position distance, simple absolute value code path mathematical derivation method and simplified product production process.
A method of encoding a pseudo-random code track grating scale, the method comprising the steps of:
step one, a pseudo-random code table is established, wherein the pseudo-random code table is provided with 2 n+1 A number of storage addresses, each storage address storing the data content binary number of the current position in binary number with n+1; n is the cycle number 2 of the increment code channel contained in each section of length of the main pseudo-random code channel M n+1
Setting the value of the first storage address in the pseudo-random code table data as 0;
setting the value of a second storage address in pseudo-random code table data as 1;
step four, the numerical value of the rest storage address in the pseudo random code table is expressed according to a VHDL language formula, wherein the VHDL language formula is as follows: d (D) (n to 0) <=D (n-1 to 0) &(D (n) XOR D (1) ) Current data D (n to 0) Is the previous data D (n-1 to 0) Left shift by one bit, original highest bit D (n) Discarding the mixture.
Further, n in the coding method of the pseudo-random code channel grating ruler is a positive integer and is an even number.
The utility model also provides a pseudo-random code path grating ruler manufactured by the coding method of the pseudo-random code path grating ruler, which comprises a linear guide rail, a reading head and the pseudo-random code path grating ruler, wherein the pseudo-random code path grating ruler comprises a main ruler, an auxiliary ruler and an incremental code path; the code tracks of the main ruler and the auxiliary ruler are grating lines which are arranged at non-equal intervals continuously, and are arranged according to the coding method, and the incremental code tracks are periodic grating lines which are arranged at equal intervals continuously.
Further, the value of the main pseudo-random code channel M of the main ruler is the highest bit D of the pseudo-random code table (n) Values of columns; the value of the auxiliary ruler pseudo-random code S of the auxiliary ruler is the product of the main pseudo-random code channel M and the auxiliary ruler proportion coefficient f; the increment code channel is provided with 2 n+1 The width of each grating period is the same as the width of the data stripe corresponding to the grating main scale 0 or 1, and each grating period comprises a bright line and a dark line with the same width.
Further, the scale factor f of the auxiliary scale is f=2 n+1 /(2 n+1 -1), if the scale factor f of the auxiliary scale cannot be obtained by aligning the main scale and the auxiliary scale periodically, the scale factor f of the auxiliary scale can also be obtained as f= (2) n+1 +1)/2 n+1 The periodic integral grids of the main ruler and the auxiliary ruler are aligned or are aligned close to the integral grids.
Further, the device also comprises an LED luminous tube, a pseudo-random code path grating ruler, a modulation grating sheet, a photoelectric conversion device and a reading head circuit board, wherein the pseudo-random code path grating ruler, the modulation grating sheet, the photoelectric conversion device and the reading head circuit board are sequentially arranged along the direction of the emitted light of the luminous tube, and the photoelectric conversion device and the reading head circuit board are arranged in the reading head.
Further, the photoelectric conversion assembly comprises photoelectric conversion windows corresponding to sine signals and cosine signals of the main scale, the auxiliary scale and the incremental code channels respectively, and the photoelectric conversion windows are used for processing optical signals modulated by the photoelectric conversion device signals.
Further, the reading head also comprises an amplifying module, an A/D conversion module and an FPGA module; the amplifying module amplifies signals of sine signals and cosine signals of the main scale signal, the auxiliary scale signal and the incremental code channel, the A/D converting module performs AD conversion on the amplified sine signals and cosine signals, the FPGA comprises an AD interface, a main auxiliary scale interface and an algorithm processing unit, the AD interface is used for receiving the AD converted sine signals and cosine signals, the main auxiliary scale interface is used for receiving pseudo-random code waveform signals of the main scale and the auxiliary scale, and the FPGA algorithm processing unit synthesizes the data according to a program algorithm to generate output data.
The utility model also provides a method for reading the pseudo-random code channel grating ruler, which comprises the following steps:
the first step, sliding the reading head in the same direction;
reading a main scale, namely matching the current reading value with the content of the pre-stored data of the data table, finding an address sequence number corresponding to the current reading value, and confirming the value of the current main pseudo-random code channel M according to the address sequence number and the moving direction of the reading head;
thirdly, reading the auxiliary ruler, wherein the reading method of the auxiliary pseudo-random code S is the same as that of the main pseudo-random code channel M, and subtracting the main pseudo-random code channel M from the read auxiliary pseudo-random code S to obtain a difference value N;
step four, reading subdivision value XF of the current real-time increment code channel;
and fifthly, taking the difference value N of the readings of the main scale and the auxiliary scale as high position, taking the reading M of the main scale as middle position, taking the increment code channel fine value XF as low position, and obtaining real-time absolute position data after processing by a mathematical algorithm. The VHDL language is expressed as follows: output_data < = N & M & XF.
Further, in the second step, if the reading head reading moving direction is the direction of increasing the address value, that is, the current main rule reading m=address number+n; if the reading moving direction of the reading head is the direction in which the address value is reduced, the current main pseudo-random code channel M is the corresponding address sequence number;
compared with the prior art, the utility model has the following advantages and beneficial effects:
the utility model can take three code channels, namely a main code channel, an auxiliary code channel and an increment code channel, and the three code channels can obtain real-time absolute positions through simple operation, the distance of invalid positions which need to be spanned when the absolute positions are identified is small, and the derivation method for increasing the range length is simple, so that the product design and the production and adjustment process are simplified, the assembly and adjustment are easy, and the utility model is suitable for batch production. The utility model can overcome the problems of complicated deduction of a range increasing algorithm and large starting invalid distance error in the serial coding mode in the prior art; the method solves the problems of the prior art that the parallel coding mode has a large number of code channels and complex installation and adjustment process.
The utility model is provided with a main size channel and a secondary size channel, and participates in absolute position identification. When the absolute position is identified during starting, the number of code bits needed to be spanned is small, and under the condition of the same range and resolution, the number of code bits needed to be spanned can be reduced by at least 35%, namely, the length of the invalid position during starting is shortened by more than 35% compared with that of a traditional serial code absolute grating ruler.
Drawings
FIG. 1 is a schematic diagram of a pseudo-random code track grating scale;
FIG. 2 is a schematic diagram of an optical assembly of a pseudo-random code track grating scale;
FIG. 3 is a schematic diagram of the main scale unit segment with data "1" as the bright stripes in column D4 of Table 1;
FIG. 4 is a schematic diagram of the main scale unit segment with data "0" as the bright stripe in column D4 of Table 1;
FIG. 5 is a schematic diagram of a primary and secondary scale of a pseudo-random code track grating scale and a stripe arrangement of incremental code tracks;
FIG. 6 is a schematic diagram of the stripe arrangement of the primary and secondary scales and incremental tracks of a dual pseudo-random code track grating scale;
FIG. 7 is a schematic diagram of the optical principle of a double pseudo-random code track grating ruler;
FIG. 8 is a schematic diagram of a modulation grating and photoelectric converter assembly of a dual pseudo-random code track grating scale;
FIG. 9 is a schematic block diagram of a circuit of a dual pseudo-random code track grating ruler;
FIG. 10 is a diagram showing the reading of data in the increasing direction of the pseudo-random code of the main scale of the pseudo-random code track grating;
fig. 11 is a diagram showing the reading of the data of the decreasing direction of the pseudo-random code of the main scale of the pseudo-random code track grating.
Detailed Description
The utility model is described in further detail below with reference to specific embodiments and accompanying drawings. In the present utility model, the following defined values are made for the following symbols: n is the cycle number 2 of the increment code channel contained in each section of length of the main pseudo-random code channel M n+1 The method comprises the steps of carrying out a first treatment on the surface of the addr is the memory address; d (D) (n) The most significant bit of the pseudo-random code;f is the scale factor of the auxiliary scale; m is a main pseudo-random code channel; s is a pseudo-random code of the auxiliary scale; n is the difference of the auxiliary ruler reading value S minus the main ruler reading value M; XF is the delta derivative value.
The coding method of the pseudo-random code in the utility model comprises the following steps:
first, a pseudo-random code table is established. The pseudo-random code table is provided with 2 n+1 Memory addresses addr0 to addr2 n+1 -1, each memory address stores the data content in binary numbers, the number of bits of the binary numbers being n+1.
In the second step, the data content of address addr0 in the pseudo-random code table data stores fixed data 0.
Third, the data content of address addr 1 in the pseudo-random code table data stores fixed data 1.
Fourth, the storage addresses in the pseudo-random code table are addr2 to addr2 n+1 -1 is expressed in terms of a VHDL language formula: d (D) (n to 0) <=D (n-1 to 0) &(D (n) XOR D (1) ) The expression means the current data D (n to 0) Is the previous data D (n-1 to 0) Left shift by one bit, original highest bit D (n) Discarding; former data D (n-1 to 0) The highest order D of (2) (n) And first bit data D (1) Exclusive or value is added to the current data D (n to 0) Least significant bit D of (2) (0)
As shown in fig. 1, the pseudo-random code track grating ruler in the present utility model comprises: the device comprises a grating ruler base 1, a linear guide rail 2, a reading head bracket 3, a reading head 4 and a pseudo-random code grating ruler 5. When the reading head bracket moves along the linear guide rail in operation, the reading head can pick up the pseudo-random code sequence of the double pseudo-random code channel grating ruler, so that the reading head bracket is converted into absolute position data.
The pseudo-random code channel grating ruler 5 comprises a main ruler provided with a main pseudo-random code channel M, a subsidiary ruler provided with a subsidiary pseudo-random code channel S and an increment code channel.
The value of the main pseudo-random code channel M is the highest bit D of the pseudo-random code table (n) Binary numbers of columns; with 1 as bright stripe, 0 as dark stripe, orDepending on the circuit or optics requirements, 0 may be bright stripes and 1 may be dark stripes; and (5) arraying and burning the glass substrate of the grating ruler.
The value of the auxiliary scale pseudo-random code S is multiplied by the auxiliary scale proportionality coefficient f based on the value of the second step main scale pseudo-random code, wherein f=2 n+1 /(2 n+1 -1). If the scale factor f of the auxiliary ruler cannot align the primary ruler and the auxiliary ruler in one data period, the f can also be f= (2) n+1 +1)/2 n+1 The periodic integral grids of the main ruler and the auxiliary ruler are aligned or are aligned close to the integral grids.
For example: the main scale 1 st section auxiliary scale initial 0 position is aligned with the position of the main scale reading 1, the main scale 2 nd section initial 0 position is aligned with the position of the auxiliary scale reading 2, the main scale 3 rd section initial 0 position is aligned with the position of the auxiliary scale reading 3 … … main scale 10 th section auxiliary scale initial 0 position is aligned with the position of the main scale reading 10, and the main scale 11 th section auxiliary scale initial 0 position is aligned with the position of the main scale reading 11.
The increment code channel is provided with 2 n+1 The data stripe width of each 0 or 1 of the grating, main scale or auxiliary scale is one grating period width T of the incremental code track.
The optical assembly of the pseudo-random code track grating ruler in the utility model is shown in figure 2. The optical component comprises an LED luminous tube 6, a pseudo-random code path grating ruler 5, a modulation grating sheet 7, a photoelectric conversion device 8 and a reading head circuit board 9, wherein the pseudo-random code path grating ruler 5, the modulation grating sheet 7, the photoelectric conversion device 8 and the reading head circuit board 9 are sequentially arranged along the emitted light of the luminous tube. The modulation grating sheet 7, the photoelectric conversion device 8 and the reading head circuit board 9 are arranged in the reading head 10; the arrow direction in the figure is the direction of movement of the reading head 10. The schematic diagram of the optical component is as follows: when the LED 6 emits a beam of parallel light, the parallel light irradiates the pseudo-random code path grating ruler 5, the parallel light is modulated for the first time through the pseudo-random code path grating ruler 5, the effect is that one beam passes through bright stripes, reaches the modulation grating sheet 7 after being transmitted, and is modulated for the second time; the other beam is blocked by the dark stripes of the pseudo-random code track grating ruler 5 and the modulation grating sheet 7 and reflected back. After the light beam modulated by the second signal passes through the modulation grating sheet 7, the light beam enters the photoelectric conversion device 8, and after the photoelectric conversion window of the reading head circuit board 9 corresponding to the photoelectric conversion device 8 receives the incident light beam, the light signal is converted into an electric signal and is output to the next-stage electric signal processing circuit.
The method for reading the absolute position by the double pseudo-random code channel grating ruler comprises the following steps:
the first step, sliding the reading head to slide n+1 grid distances in the same direction;
and secondly, reading the main scale, matching the current reading value with the content of the data stored in the data table in advance, and finding the address serial number corresponding to the current reading value. Specifically, if the reading moving direction of the reading head is the increasing direction of the address value, namely the current main pseudo-random code channel M=addr serial number+n; if the reading moving direction of the reading head is the direction in which the address value is reduced, namely the reading M=addr serial number of the current main pseudo-random code channel M;
thirdly, reading the auxiliary rule, wherein the reading method of the auxiliary rule pseudo-random code S is the same as that of the main pseudo-random code channel M, the auxiliary rule pseudo-random code S is obtained according to a two-step operation method, and then the auxiliary rule reading value S is subtracted by the main rule reading value M, so that a main auxiliary rule difference value S-M=N. N is the high order of the position data, which means the number of main scale unit segments in which the current reading head is stopped. If n=s-m=0, it means that the current reading head is stopped in the 0 th main rule single segment; if n=s-m=1, it means that the current reading head is stopped in the 1 st main scale single segment; e.g., n=s-m=9, meaning that the current reading head is stopped within the 9 th main scale single segment, and so on. The maximum number of the main scale unit section M must be less than 2 in the whole measuring range n . When the reading head just reads the joint position of the two main ruler single sections, N=S-M is larger than 2 n At this time n=2 can be used n+1 -(S-M)。
Reading subdivision value XF of the current real-time increment code channel, processing the increment code channel signal by a circuit to generate two paths of sine and cosine signals with 90 degrees of phase difference, and processing the signals by an arctangent function algorithm to obtain real-time increment subdivision value XF;
and fifthly, taking the real-time numerical values obtained in the second step to the fourth step, taking the difference value N of the readings of the main scale and the auxiliary scale as high position, taking the reading M of the main scale as middle position, taking the increment code channel fine value XF as low position, and processing by a mathematical algorithm, wherein the VHDL language formula of the mathematical algorithm is as follows: output_data < = N & M & XF, a real-time absolute position value output_data is obtained, and the real-time absolute position value is OUTPUT to an upper computer through a DATA bus.
The following illustrates the specific case of creating a 5-bit pseudo-random code table (n=4) as follows:
table 1: pseudo-random code table (n=4)
In the second step, the binary data of the most significant D4 column of the main pseudorandom code channel M is striped with 1 as bright stripe and 0 as dark stripe, as shown in fig. 3. Or may be bright stripes with 0 and dark stripes with 1, as shown in fig. 4, depending on the circuit or optics requirements.
The value of the auxiliary scale pseudo-random code is obtained according to the value of the second step of the main scale pseudo-random code; multiplying the primary scale value by the secondary scale scaling factor f, where f= (2) 5 +1)/(2 5 ) The value of the secondary-scale pseudo-random code shown in fig. 5 is obtained.
The increment code XF is provided with 32 gratings, and the data stripe width of each 0 or 1 of the main scale is one grating period width T of the increment code XF.
In some occasions with low requirements, in order to simplify the product design and production adjustment process, three code channels, namely a main rule, an auxiliary rule and an increment code channel, can be used, and the three code channels are in the form of grating recorded stripes as shown in figure 5.
In some cases with high requirements, five code channels are usually used to improve the fault tolerance and reliability of the product. The main size channel is provided with two lines, wherein one line takes 1 as a bright stripe, 0 as a dark stripe, the other line takes 0 as a bright bar, and 1 as a dark stripe; the auxiliary size channel is provided with two auxiliary size channels, wherein one of the auxiliary size channels takes 1 as a bright stripe, 0 as a dark stripe, the other auxiliary size channel takes 0 as a bright stripe, and 1 as a dark stripe; and an incremental code track is arranged, and the form of five code tracks is adopted, and the grating recorded stripe schematic diagram is shown in fig. 6.
As shown in fig. 7, a front view of a dual pseudorandom code track grating ruler including five code tracks is shown. The first is a secondary pseudo-random code channel with data 1 as an obvious stripe, the second is a primary pseudo-random code channel with data 1 as an obvious stripe, the third is an incremental code channel, the fourth is a primary pseudo-random code channel with data 0 as an obvious stripe, and the fifth is a secondary pseudo-random code channel with data 0 as an obvious stripe. The structure of the photoelectric converter unit 8 is shown in fig. 8. The photoelectric conversion assembly is provided with a main scale M+, M-, a subsidiary scale S+, S-, an increment sine signal A+, A-and a cosine signal B+ and B-, which correspond to the double pseudo-random code channel grating scale, and 8 photoelectric conversion windows are formed. The optical signals modulated by the signals twice are incident to the 8 photoelectric conversion windows. The corresponding incremental code track positions in the photoelectric conversion assembly output incremental sine signals A+, A-and incremental cosine signals B+, B-, and input the incremental sine signals A+, A-and B-to a next-stage electric signal processing circuit for amplification processing. Outputting a pair of pseudo-random code pulse sequences M+ and M-which are opposite in phase at the corresponding position of the main size channel in the photoelectric conversion component, and synthesizing a pseudo-random code waveform signal of the main size channel M after passing through a comparator; and outputting a pair of S+ and S-pseudo-random code pulse sequences which are opposite in phase to each other at the corresponding position of the auxiliary size channel in the photoelectric conversion component, and synthesizing a pseudo-random code waveform signal of the auxiliary size channel S after the pulse sequences pass through the comparator.
The flow of the reading head data processing of the double pseudo-random code channel grating ruler is shown in figure 9. The reading head comprises an FPGA module. The photoelectric conversion component outputs sine A+, A-and cosine B+ and B-of the incremental code channel, and generates sine signals of the incremental code channel A and the incremental code channel B respectively after the output of the photoelectric conversion component is amplified; the sine signal is input into an AD converter, the AD converter converts the A and B analog signals into multi-bit binary values DA and DB, the multi-bit binary values DA and DB are transmitted to an AD interface of the FPGA, the FPGA carries out numerical filtering on the AD interface signals, and then an arctangent algorithm is carried out to obtain an incremental code channel fine value FX. The photoelectric conversion component outputs M+, M-and S+ of the primary and secondary size tracks, synthesizes a primary ruler M pseudo-random code sequence waveform signal and a secondary ruler S pseudo-random code sequence waveform signal through a comparator, transmits the signals to an FPGA primary and secondary ruler interface, and after the FPGA carries out digital filtering on the primary and secondary ruler M and S signals, executes a primary and secondary ruler pseudo-random code synthesis algorithm to generate a primary ruler absolute coding value M and a primary and secondary ruler difference value N. The FPGA executes a program algorithm to synthesize the data M, N and the incremental track fraction FX, and generate output data Dout. The FPGA executes a serial bus data processing algorithm, synthesizes position data according to a predefined serial communication protocol format, and outputs the position data to an external upper computer position reading device through a serial bus.
In this embodiment, the method of reading the dual pseudorandom code track grating scale is as follows.
The first step, sliding the reading head to slide n+1 grid distances in the same direction;
and secondly, reading the main scale. The main scale pseudo-random code reads data in an incremental direction, as shown in fig. 10, where the read head is moved from the position of AD9 to AD13. The moving direction of the reading head is an address increasing direction, n+1 data are read along the address increasing direction, the FPGA places the data read first at a high position, then the read data are placed at a low position, namely AD9 is taken as a high position, AD13 is taken as a low position, a read value Din=11101 is read, table 1 is checked to obtain addr9=11101, binary number 11101 read by the reading head is matched with data stored in advance at an address addr9 in table 1, and the reading M=addr serial number+n of a main scale, namely M= 9+4 =13; from the above data reading process, it can be deduced that the current reading head is stopped at the absolute position of the main scale data AD13.
If the main scale pseudo-random code reads data in a decreasing direction, fig. 11 shows the reading head moving from the position of the AD24 to the AD20. The moving direction of the reading head is an address decreasing direction, n+1 data are read along the address decreasing direction, the FPGA places the data read first at a lower position, then places the read data at a higher position, namely takes AD24 as a lower position, takes AD20 as a higher position, reads a value Din=11100, table 1 is searched to obtain addr20=11100, the binary value 11100 read by the reading head is matched with the data prestored by the address addr20 in table 1, and the reading M=addr serial number of a main scale, namely M=20; from the above data reading process, it can be deduced that the current reading head is stopped at the absolute position of the main scale data AD20.
And thirdly, reading the auxiliary ruler. The reading method of the auxiliary ruler is the same as that of the main ruler in the second step. And subtracting the main scale reading value M from the auxiliary scale reading value S, and obtaining a main scale difference value N.
Step four, reading subdivision value XF of the current real-time increment code channel;
fifthly, substituting the real-time values N, M and XF obtained in the second step to the fourth step into a VHDL language formula: output_data < = N & M & XF, a real-time absolute position value output_data is obtained, and the real-time absolute position value is OUTPUT to an upper computer through a DATA bus.
The embodiments of the present utility model are not limited thereto, and the present utility model may be modified, replaced or altered in various other ways by using the general knowledge and conventional means in the art according to the above-mentioned aspects of the present utility model without departing from the basic technical idea of the present utility model, and all the modifications and alterations fall within the scope of the present utility model.

Claims (7)

1. The coding method of the pseudo-random code channel grating ruler is characterized by comprising the following steps of:
step one, a pseudo-random code table is established, wherein the pseudo-random code table is provided with 2 n+1 Each storage address stores the data content of the current position by binary number, and the bit number of the binary number is n+1; n is the cycle number 2 of the increment code channel contained in each section of length of the main pseudo-random code channel M n+1
Setting the value of the first storage address in the pseudo-random code table data as 0;
setting the value of a second storage address in pseudo-random code table data as 1;
step four, calculating the numerical value of the rest storage address in the pseudo random code table according to a VHDL language formula, wherein the VHDL language formula is as follows: d (D) (nto0) <=D (n-1to0) &(D (n) XORD (1) ) Current data D (nto0) Is the previous data D (n-1to0) Left shiftOne bit, the original highest bit D (n) Discarding; the highest order D of the previous data (n) And first bit data D (1) Exclusive or value is added to the least significant bit D of the current data (0)
N is a positive integer and is an even number;
the pseudo-random code path grating ruler comprises a linear guide rail, a reading head and a pseudo-random code path grating ruler, and the pseudo-random code path grating ruler comprises a main ruler, an auxiliary ruler and an incremental code path; the code channels of the main ruler and the auxiliary ruler are grating lines which are arranged at continuous non-equidistant intervals and are arranged according to the coding method, and the incremental code channels are periodic grating lines which are arranged at continuous equidistant intervals;
the value of the main pseudo-random code channel M of the main ruler is the highest bit D of the pseudo-random code table (n) Values of columns; the value of the auxiliary ruler pseudo-random code S of the auxiliary ruler is the product of the main pseudo-random code channel M and the auxiliary ruler proportion coefficient f; the increment code channel is provided with 2 n+1 The width of each grating period is the same as the width of the data stripe corresponding to the grating main scale 0 or 1, and each grating period comprises a bright line and a dark line with the same width.
2. A pseudo-random code track grating scale according to claim 1, wherein the scale factor f has a value of f=2 n+1 /(2 n+1 -1) if the value of the scale factor f of the auxiliary scale cannot align the data period of the main scale and the auxiliary scale, the value of the scale factor f of the auxiliary scale is f= (2) n+1 +1)/2 n+1 The data period of the main ruler and the auxiliary ruler are aligned in whole lattice or close to whole lattice.
3. A pseudo-random code channel grating scale according to any one of claims 1-2, wherein: the device also comprises an LED luminous tube, a pseudo-random code grating ruler, a modulation grating sheet, a photoelectric conversion device and a reading head circuit board which are sequentially arranged along the direction of the emitted light of the luminous tube, wherein the photoelectric conversion device and the reading head circuit board are arranged in the reading head.
4. A pseudo-random code track grating ruler according to claim 3, wherein: the photoelectric conversion assembly comprises photoelectric conversion windows corresponding to sine signals and cosine signals of the main scale, the auxiliary scale and the incremental code tracks respectively, and the photoelectric conversion windows are used for processing optical signals modulated by the signals of the photoelectric conversion devices.
5. The pseudo-random code track grating ruler according to claim 4, wherein: the reading head also comprises an amplifying module, an A/D conversion module and an FPGA module; the amplifying module amplifies signals of sine signals and cosine signals of the main scale signal, the auxiliary scale signal and the incremental code channel, the A/D converting module performs AD conversion on the amplified sine signals and cosine signals, the FPGA comprises an AD interface, a main auxiliary scale interface and an algorithm processing unit, the AD interface is used for receiving the AD converted sine signals and cosine signals, the main auxiliary scale interface is used for receiving pseudo-random code waveform signals of the main scale and the auxiliary scale, and the FPGA algorithm processing unit synthesizes the data according to a program algorithm to generate output data.
6. A method of reading the pseudo-random code track grating scale of claim 5, wherein: the reading method comprises the following steps:
the first step, sliding the reading head in the same direction;
reading a main scale, namely matching the current reading value with the content of the pre-stored data of the data table, finding an address sequence number corresponding to the current reading value, and confirming the value of the current main pseudo-random code channel M according to the address sequence number and the moving direction of the reading head;
thirdly, reading the auxiliary ruler, wherein the reading method of the auxiliary pseudo-random code S is the same as that of the main pseudo-random code channel M, and subtracting the main pseudo-random code channel M from the read auxiliary pseudo-random code S to obtain a difference value N;
step four, reading subdivision value XF of the current real-time increment code channel;
fifthly, calculating the real-time numerical values obtained in the second step to the fourth step by taking the difference N between the readings of the main scale and the auxiliary scale as high level, taking the reading M of the main scale as medium level, taking the increment code channel fine value XF as low level, and obtaining real-time absolute bit data according to a VHDL language formula, wherein the VHDL language expression is as follows: output_data < = N & M & XF.
7. The method of reading a pseudo-random code track grating scale of claim 6, wherein: in the second step, if the reading head reading moving direction is the direction of increasing the address value, namely the current main ruler reading m=address serial number+n; if the reading head reading moving direction is the direction of decreasing address value, namely the current main rule reading M=address serial number.
CN201810283129.6A 2018-04-02 2018-04-02 Pseudo-random code channel grating ruler and reading method thereof Active CN108362208B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810283129.6A CN108362208B (en) 2018-04-02 2018-04-02 Pseudo-random code channel grating ruler and reading method thereof
PCT/CN2018/117885 WO2019192196A1 (en) 2018-04-02 2018-11-28 Pseudo-random code channel grating ruler and reading method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810283129.6A CN108362208B (en) 2018-04-02 2018-04-02 Pseudo-random code channel grating ruler and reading method thereof

Publications (2)

Publication Number Publication Date
CN108362208A CN108362208A (en) 2018-08-03
CN108362208B true CN108362208B (en) 2024-04-05

Family

ID=63002084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810283129.6A Active CN108362208B (en) 2018-04-02 2018-04-02 Pseudo-random code channel grating ruler and reading method thereof

Country Status (2)

Country Link
CN (1) CN108362208B (en)
WO (1) WO2019192196A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108362208B (en) * 2018-04-02 2024-04-05 广州数控设备有限公司 Pseudo-random code channel grating ruler and reading method thereof
CN110879075B (en) * 2019-11-08 2021-06-22 杭州电子科技大学 High-resolution incremental code channel detection method
CN110968122B (en) * 2019-11-28 2023-05-02 歌尔股份有限公司 Position acquisition method of linear conveying system and linear conveying system
CN113124760B (en) * 2019-12-30 2022-08-02 广东万濠精密仪器股份有限公司 Reflective grating ruler
CN112762836B (en) * 2020-12-23 2023-02-28 长春汇通光电技术有限公司 Grating scale, grating scale reading method and device and computer storage medium
CN113029001B (en) * 2021-03-18 2022-02-11 中国科学院长春光学精密机械与物理研究所 Linear displacement measuring device and method
DE102021118091A1 (en) * 2021-07-13 2023-01-19 Neura Robotics GmbH Encoder system and method for determining the reading head position in an encoder system
CN113983935B (en) * 2021-12-29 2022-05-17 太原向明智控科技有限公司 Coal mining machine position coding and positioning device and method
CN115469711A (en) * 2022-01-27 2022-12-13 合肥本源量子计算科技有限责任公司 Sine and cosine signal generator, memory and quantum computer control system
CN115615336B (en) * 2022-09-27 2023-11-03 河南乐佳电子科技有限公司 Grating type self-positioning distance measuring device
CN116045814B (en) * 2023-04-03 2023-06-09 合肥安迅精密技术有限公司 Method and device for evaluating signal quality of grating ruler and storage medium
CN116734734B (en) * 2023-08-14 2023-10-03 中国科学院长春光学精密机械与物理研究所 Self-attaching type grating ruler mounting device and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203053403U (en) * 2012-12-28 2013-07-10 广州数控设备有限公司 A single-FPGA-based position measuring and displaying device supporting multiple grating rulers
CN104374325A (en) * 2014-11-14 2015-02-25 西安交通大学 Single-code-channel absolute encoding and decoding method based on dual periodic sequences
CN104713479A (en) * 2015-03-11 2015-06-17 吉林大学珠海学院 Absolute type linear grating ruler and encoding method thereof
CN105910631A (en) * 2016-04-07 2016-08-31 广东工业大学 Absolute type grating ruler and measurement method
CN105973287A (en) * 2016-05-04 2016-09-28 广东工业大学 Multi-track absolute grating scale image coding and decoding method
CN106500606A (en) * 2016-12-26 2017-03-15 清华大学深圳研究生院 A kind of many code channel grating scales
CN208282777U (en) * 2018-04-02 2018-12-25 广州数控设备有限公司 A kind of pseudorandom code channel grating scale

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102155914B (en) * 2011-03-08 2012-07-04 西安邮电学院 Method and device for coding and measuring absolute position grid ruler based on pseudo random sequence
CN102645167A (en) * 2012-05-04 2012-08-22 中国科学院长春光学精密机械与物理研究所 Absolute displacement measuring device
CN103411540B (en) * 2013-07-26 2016-01-20 广东工业大学 A kind of high-accuracy grating displacement measuring device
CN104501844B (en) * 2014-12-30 2017-04-19 吉林大学珠海学院 Linear grating ruler
CN107121072B (en) * 2017-05-22 2019-10-22 合肥工业大学 Two-dimentional absolute displacement encoder
CN108362208B (en) * 2018-04-02 2024-04-05 广州数控设备有限公司 Pseudo-random code channel grating ruler and reading method thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203053403U (en) * 2012-12-28 2013-07-10 广州数控设备有限公司 A single-FPGA-based position measuring and displaying device supporting multiple grating rulers
CN104374325A (en) * 2014-11-14 2015-02-25 西安交通大学 Single-code-channel absolute encoding and decoding method based on dual periodic sequences
CN104713479A (en) * 2015-03-11 2015-06-17 吉林大学珠海学院 Absolute type linear grating ruler and encoding method thereof
CN105910631A (en) * 2016-04-07 2016-08-31 广东工业大学 Absolute type grating ruler and measurement method
CN105973287A (en) * 2016-05-04 2016-09-28 广东工业大学 Multi-track absolute grating scale image coding and decoding method
CN106500606A (en) * 2016-12-26 2017-03-15 清华大学深圳研究生院 A kind of many code channel grating scales
CN208282777U (en) * 2018-04-02 2018-12-25 广州数控设备有限公司 A kind of pseudorandom code channel grating scale

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种新型光栅位移传感器的研究;郭涛;中国优秀硕士学位论文全文数据库科技信息辑(第10期);第30-45页 *
一种新的二元条码设计与绝对式光电位置编码方法;郝一鸣 等;光电工程;第37卷(第11期);第91-97页 *
基于伪随机序列的索引式绝对位置编码;王阳 等;计量学报;第28卷(第02期);第118-123页 *

Also Published As

Publication number Publication date
CN108362208A (en) 2018-08-03
WO2019192196A1 (en) 2019-10-10

Similar Documents

Publication Publication Date Title
CN108362208B (en) Pseudo-random code channel grating ruler and reading method thereof
CN103759749B (en) Single-code-channel absolute position encoder
CN103512500B (en) A kind of image acquisition circuit of high speed absolute grating ruler
JP5837201B2 (en) Method and apparatus for determining position
CN103557878B (en) A kind of multi-track coding method of absolute grating ruler
CN105627921A (en) Absolute encoder subdivision acquisition system and measurement method thereof
WO2013174216A1 (en) Single-track absolute grating scale and image encoding method thereof
CN102168996B (en) Photoelectric encoder
US20120283986A1 (en) System and Method for Measuring Positions
CN202522198U (en) Absolute linear grating ruler
CN109579711B (en) Absolute position displacement sensor grating absolute position encoding and decoding method
CN104713479A (en) Absolute type linear grating ruler and encoding method thereof
CN204359326U (en) A kind of linear grating chi
CN109724519B (en) Absolute linear displacement sensor based on decimal shift coding
CN104501844B (en) Linear grating ruler
CN208282777U (en) A kind of pseudorandom code channel grating scale
CN114136351B (en) Single code channel absolute coding and decoding method with error detection and correction function
KR101341804B1 (en) Absolute Position Measuring Method, Absolute Position Measuring Apparatus, and Scale
JP2009047595A (en) Absolute position length-measurement type encoder
CN112880571A (en) Absolute grating ruler
CN110375776B (en) Rotary encoder
CN109443402B (en) Code wheel and encoder
JP2017111068A (en) Optical encoder
JP2014106210A (en) Absolute encoder and method for finding absolute position
CN108592960B (en) Absolute value encoder and working method thereof

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant