Encoder structure and displacement detection method

By combining incremental encoders and positioning encoders, periodic and mutually exclusive pulse signals are generated, solving the problem of encoder position loss after power failure and realizing a high-precision, anti-interference, and wear-resistant encoder design.

CN122015922APending Publication Date: 2026-05-12HANGZHOU FULLSEMI SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU FULLSEMI SEMICON CO LTD
Filing Date
2026-02-28
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing incremental encoders cannot record position after power failure, while absolute encoders have complex structures and poor fault tolerance, making it difficult to simultaneously ensure anti-interference and anti-wear properties in high-precision scenarios.

Method used

The encoder employs a combination of incremental encoders and positioning encoders. The incremental encoder generates periodic pulse signals of equal width, while the positioning encoder generates pulse signals with different widths. By recording the position of signal jumps through forward and reverse movement, the encoder achieves fault tolerance and anti-interference capability.

Benefits of technology

It ensures that the encoder can remember its position after power failure, has strong fault tolerance and anti-interference capabilities, simplifies the coding structure, and improves positioning accuracy and wear resistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122015922A_ABST
    Figure CN122015922A_ABST
Patent Text Reader

Abstract

The invention provides an encoder structure and a displacement detection method, and particularly relates to the technical field of sensors, and the method comprises an incremental encoding part which comprises a first code channel, the first code channel comprises a plurality of first light-transmitting windows which are uniformly distributed at intervals and are consistent in effective aperture, and the first code channel can generate a periodic first pulse signal based on an optical signal; the positioning encoding part can move in cooperation with the incremental encoding part and comprises at least one second code channel, and the second code channel comprises a plurality of second light-transmitting windows which are distributed at intervals and have different effective apertures; the second code channel can generate a second pulse signal based on the optical signal, and the pulse widths corresponding to the second light transmitting windows in the same second code channel are different; the current counting position of the incremental encoding part can be positioned based on the first signal jump position of the forward and reverse movement by positioning the forward and reverse movement of the encoding part and recording the first signal jump position of the forward and reverse movement in the same second pulse signal. According to the invention, the detection fault tolerance can be ensured and memory wakeup can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sensor technology, and in particular to an encoder structure and displacement detection method. Background Technology

[0002] An encoder is a sensor widely used in mechanical or electronic signal conversion. It can be applied to industrial control systems, digital audio, video, and imaging fields. Its working principle is mainly to convert angular or linear displacement into electrical signals, thereby completing the recording and detection of displacement.

[0003] Currently, encoders can be divided into two categories: incremental and absolute. The former uses binary encoding, triggering a pulse signal of equal width every unit distance traveled. The encoding structure is simple, not easily damaged, and has a certain degree of fault tolerance, but it has no storage function, and the position will be lost when power is off. The latter works by emitting a unique matching photoelectric signal at each reference position to avoid position loss after power failure. However, this method requires complex encoding, which leads to a complex encoder structure. Especially in high-precision scenarios, the complexity increases exponentially. Furthermore, once a single encoding is damaged, the entire encoder will fail, resulting in poor fault tolerance. Summary of the Invention

[0004] This application provides an encoder structure and a displacement detection method, specifically including the following:

[0005] On the one hand, this application provides an encoder structure, including: The incremental encoder includes a first code track, which includes a plurality of first light-transmitting windows that are evenly spaced and have the same effective aperture. The first code track is capable of generating a periodic first pulse signal based on an optical signal. The positioning encoder, capable of coordinating with the incremental encoder, includes at least one second code track. The second code track includes multiple second light-transmitting windows spaced apart and with different effective apertures. The second code track can generate a second pulse signal based on an optical signal, and the pulse widths corresponding to each second light-transmitting window in the same second code track are different. By moving the positioning encoder in both directions and recording the first signal transition position of the forward and reverse movement in the same second pulse signal, the current counting position of the incremental encoder can be located based on the first signal transition position of the forward and reverse movement.

[0006] On the other hand, a displacement detection method is provided, the method comprising: Record the pulse count of the first pulse signal of the incremental encoder, and determine the displacement data based on the pulse count; In the event of a loss of pulse count for the incremental encoder, the positioning encoder is controlled to move forward and backward, and the first signal transition position of the forward and backward movement in the same second pulse signal of the positioning encoder is recorded. The current counting position of the incremental encoder is located based on the first signal transition position of the forward and reverse movements.

[0007] On the other hand, a displacement detection device is provided, the device comprising: Incremental detection module: used to record the pulse count of the first pulse signal of the incremental encoder, and determine the displacement data based on the pulse count; The positioning module is configured to, in the event of loss of pulse count of the incremental encoder, control the positioning encoder to move forward and backward, and record the first signal transition position of the forward and backward movement in the same second pulse signal of the positioning encoder; and, locate the current counting position of the incremental encoder based on the first signal transition position of the forward and backward movement.

[0008] On the other hand, a computer device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the displacement detection method as described above.

[0009] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the displacement detection method as described above.

[0010] On the other hand, a computer program product is provided, which includes computer instructions that, when executed by a processor, implement the displacement detection method as described above.

[0011] The encoder structure, displacement detection method, device, equipment, storage medium, and computer program product provided in this application have the following technical advantages: The technical solution of this application sets up an incremental encoder and a positioning encoder that can move in coordination with the incremental encoder. The incremental encoder includes a first code track and multiple first light-transmitting windows with the same effective aperture, which can generate a periodic first pulse signal. The displacement data can be determined by recording the pulse count of the first pulse signal. The positioning encoder includes at least one second code track and multiple second light-transmitting windows with different effective apertures, which can form second pulse signals with different pulses. By moving the positioning encoder in both directions and recording the first signal jump position of the forward and reverse movement in the same second pulse signal, the corresponding specific pulse position in the second pulse signal can be determined, thereby locating the current counting position of the incremental encoder. In this way, the encoder's detection fault tolerance, anti-interference and wear resistance are ensured. At the same time, memory wake-up after position loss can be achieved by using a small displacement, ensuring positioning accuracy.

[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0013] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of the structure of an incremental coding component provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a positioning coding component provided in an embodiment of this application; Figure 3 This is a waveform diagram of a first pulse signal provided in an embodiment of this application; Figure 4 This is a waveform diagram of a second pulse signal provided in an embodiment of this application; Figure 5 This is a schematic flowchart of a displacement detection method provided in an embodiment of this application; Figure 6 This is a waveform diagram of a set of reset signals, a first pulse signal, and a second pulse signal provided in an embodiment of this application; Figure 7 This is a waveform diagram of another set of reset signals, first pulse signals, and second pulse signals provided in an embodiment of this application; Figure 8 This is a waveform diagram of another set of reset signals, first pulse signals, and second pulse signals provided in an embodiment of this application; Figure 9 This is a structural block diagram of a displacement detection device provided in an embodiment of this application; Figure 10 This is a hardware structure block diagram of an electronic device with an encoder structure provided in an embodiment of this application.

[0015] Figure label: 10 - Incremental coding component, 11 - First light-transmitting window, 12 - First light-blocking interval, 13 - Reset window, 14 - First code track, 20 - Positioning coding component, 21 - Second light-transmitting window, 22 - Second light-blocking interval, 23 - Minimum light-transmitting window, 24 - Second code track. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0017] It should be noted that, in the description of this application, the following definitions shall apply unless a different definition is given elsewhere in the claims or this specification. All numerical values, whether or not explicitly indicated, are defined herein as being modified by the term "about". The term "about" generally refers to a range of numerical values ​​that a person skilled in the art would consider equivalent to the stated values ​​to produce substantially the same properties, functions, results, etc. A range of numerical values ​​indicated by a low value and a high value is defined as including all numerical values ​​within that range and all subranges included within that range.

[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules not explicitly listed or inherent to such processes, methods, products, or devices.

[0019] Existing encoder structures can be applied to scenarios such as motor speed measurement. They can be connected to a rotating motor or shaft via external screws or clips. When the motor rotates, the encoder structure obtains the same angular displacement, thus recording and monitoring the displacement. Based on this principle, encoders can be divided into incremental and absolute types. Light passes through the encoding element to generate intermittent light signals, and the receiving end converts these light signals into electrical signals to record the position. However, incremental encoders use binary encoding. Even if the encoding element is slightly damaged or there is slight interference during signal transmission, displacement detection is unaffected as long as it is within the high / low potential resolution limit. They have advantages such as wear resistance and interference resistance. However, because the individual encoded signals on the encoder disk are identical, the position cannot be recorded after power failure or signal loss, resulting in position loss. Absolute encoders have specific encoding positions for each position, thus solving the position memory problem of breakpoint recovery. However, because each position requires specific encoding, the encoding structure is complex and costly. Damage to any encoding element will affect the entire encoder, and the transmission requirements are also higher.

[0020] To address at least one of the aforementioned problems, an encoder structure according to this application is described below. Please refer to... Figure 1 and Figure 2 , Figure 1 and Figure 2 This is a schematic diagram of an encoder structure provided in an embodiment of this application. Specifically, the encoder structure includes an incremental encoder 10 and a positioning encoder 20 capable of co-moving with the incremental encoder 10. (Reference) Figure 1 The incremental encoder 10 uses binary encoding to detect displacement. It triggers a pulse of equal width every unit displacement. By recording the pulse count, the current detected displacement can be determined.

[0021] refer to Figure 1 The incremental encoder 10 includes a first code track 14, which includes a plurality of first light-transmitting windows 11 that are evenly spaced and have the same effective aperture. The first code track 14 is capable of generating a periodic first pulse signal based on the optical signal.

[0022] Specifically, the first code channel 14 is the encoding channel in the incremental encoder 10 used for displacement detection. A first light-blocking interval 12 exists between two adjacent first light-transmitting windows 11, and the interval width of each first light-blocking interval 12 in the first code channel 14 is consistent. (Reference) Figure 3 The first pulse signal includes the first pulse corresponding to each of the first light-transmitting windows 11 in the first code channel 14. A single first pulse includes a high-level pulse formed by the light signal passing through the first light-transmitting window 11 and a low-level pulse formed by the light signal passing through the adjacent first light-blocking interval 12.

[0023] Specifically, the pulse width of each first pulse in the first pulse signal is consistent, and the pulse high-level width of each first pulse is consistent. Displacement data can be calculated by counting the number of pulses n in the first pulse signal, i.e., the number of first transparent windows 11 traversed during displacement detection. For example, Ldis = n×d, where Ldis is the displacement, n is the pulse count, and d is the unit displacement of the incremental encoder 10, i.e., the displacement corresponding to a single first pulse.

[0024] In some embodiments, the incremental encoder 10 can be a linear encoder for detecting linear displacement, with a single first pulse corresponding to a unit linear displacement. In other embodiments, the incremental encoder 10 can be a disc encoder for detecting rotational displacement, with a single first pulse corresponding to a unit rotational displacement, which can be characterized by a unit rotation angle.

[0025] The positioning encoder 20 and the incremental encoder 10 are coaxially connected in parallel, meaning that the positioning encoder 20 and the incremental encoder 10 move together, and during the displacement detection process, their displacements are synchronous and consistent.

[0026] refer to Figure 2 The positioning encoder 20 includes at least one second code track 24, the second code track 24 includes a plurality of second light-transmitting windows 21 that are spaced apart and have different effective apertures; the second code track 24 can generate a second pulse signal based on the optical signal, and the pulse widths corresponding to each second light-transmitting window 21 in the same second code track 24 are different.

[0027] Specifically, the second code channel 24 is the coding channel used for positioning detection in the positioning coding component 20. Within the same second code channel 24, there is a second light-blocking interval 22 between adjacent second light-transmitting windows 21. (Reference) Figure 4 The second pulse signal includes the second pulse corresponding to each of the second light-transmitting windows 21 in the second code channel 24. The pulse widths of each second pulse are different from each other. A single second pulse includes a high-level pulse formed by the light signal passing through the second light-transmitting window 21 and a low-level pulse formed by the light signal passing through the adjacent second light-blocking interval 22.

[0028] In some embodiments, the second light-transmitting windows 21 in the second code track 24 are evenly distributed, that is, the spacing width of the second light-blocking intervals 22 in the second code track 24 is consistent, and the pulse high-level widths of the second pulses are different, such as... Figure 4 The pulse high-level widths of T1-T5 are different, while the pulse low-level widths are the same.

[0029] In some implementations, the positioning encoder 20 and the incremental encoder 10 are of the same type. For example, they can be linear encoders to locate the current counting position of the incremental encoder 10 when detecting linear displacement, or they can both be disc encoders to locate the current counting position of the incremental encoder 10 when detecting rotational displacement.

[0030] By moving the positioning encoder 20 in both directions and recording the first signal transition position of the forward and reverse movement in the same second pulse signal, the current counting position of the incremental encoder 10 can be located based on the first signal transition position of the forward and reverse movement.

[0031] Understandably, within the same second pulse signal, a high-level pulse segment is formed between the first signal transition position (pulse signal edge) of forward movement and the first signal transition position (pulse signal edge) of reverse movement. Within the same second code track 24, the pulse width of the second pulse formed by each second light-transmitting window 21 is specific, meaning the displacement corresponding to each second pulse is specific. The current displacement of the positioning encoder 20 can be determined by the pulse width of the current second pulse. Since the positioning encoder 20 and the incremental encoder 10 are connected in parallel, their displacements are the same, thereby determining the current counting position of the incremental encoder 10.

[0032] In summary, the technical solution of this embodiment sets up an incremental encoder 10 and a positioning encoder 20 that can move in coordination with the incremental encoder 10. The incremental encoder 10 includes a first code track 14, and multiple first light-transmitting windows 11 with the same effective aperture of the first code track 14 can generate a periodic first pulse signal. The displacement data can be determined by recording the pulse count of the first pulse signal. The positioning encoder 20 includes at least one second code track 24, and multiple second light-transmitting windows 21 with different effective apertures of the second code track 24 can form second pulse signals with different pulses. By moving the positioning encoder 20 in both directions and recording the first signal jump position of the forward and reverse movement in the same second pulse signal, the corresponding specific pulse position in the second pulse signal can be determined, thereby locating the current counting position of the incremental encoder 10. In this way, the detection fault tolerance, anti-interference and anti-wear of the encoder are ensured, and the memory wake-up after position loss can be realized by using a small displacement, ensuring positioning accuracy.

[0033] In some implementations, reference is made to Figure 6The pulse low-level widths of the first pulse signal M2 and the second pulse signal M3 are consistent. That is, in the first code channel 14, the first shading interval 12 between adjacent first light-transmitting windows 11 is consistent with the second shading interval 22 between adjacent second light-transmitting windows 21, thereby forming consistent pulse low-level widths in the first and second pulse signals. This simplifies the complexity of the positional correlation between the second and first pulse signals, allows the positioning calculation to focus on the pulse high-level width, and improves the robustness of the encoding hardware and algorithm settings.

[0034] In some embodiments, in the same second code track 24 of the positioning encoder 20, starting from the smallest light-transmitting window 23 of the second code track 24, the effective aperture of the plurality of second light-transmitting windows 21 increases sequentially along the position sequence.

[0035] In some embodiments, in the second pulse signal, starting from the pulse corresponding to the smallest light-transmitting window 23, the pulse high-level width corresponding to each of the second light-transmitting windows 21 increases sequentially along the bit order.

[0036] This allows the detection width of the positioning code component 20 to increase sequentially, which is beneficial for the positional tracing of the specified code positioning and for the stacking of multiple code channels.

[0037] In a preferred embodiment, within the same second code channel 24, starting from the smallest light-transmitting window 23 of the second code channel 24, the effective apertures of the plurality of second light-transmitting windows 21 increase sequentially in equal arithmetic order.

[0038] In a preferred embodiment, in the second pulse signal, starting from the pulse corresponding to the smallest light-transmitting window 23, the pulse high-level width corresponding to each of the second light-transmitting windows 21 increases arithmetically along the bit sequence.

[0039] For example, refer to Figure 2 and Figure 4 The encoding of the second code channel 24 increases incrementally based on the minimum light-transmitting window 23, thereby causing the pulse high-level width of the second pulse signal to increase sequentially at equal arithmetic progressions. For example, it can be an integer multiple of the width of the minimum light-transmitting window 23, such as 2 times, 3 times, 4 times, etc., or it can be a fractional multiple, such as 1.1 times, 1.2 times, 1.3 times, etc. Figure 4 As shown in the figure, an example of sequentially increasing arithmetic multiples is illustrated. The width of the second pulse high level is twice the width of the first pulse high level, the width of the third pulse high level is three times the width of the second pulse high level, and so on.

[0040] Thus, by combining the consistent setting of the low pulse level, the code tracks can be increased uniformly during the reciprocating movement of the positioning encoder 20, further simplifying the positioning design and positioning calculation.

[0041] In some embodiments, the effective aperture of the minimum light-transmitting window 23 of the second code track 24 is greater than or equal to the effective aperture of the first light-transmitting window 11.

[0042] In some implementations, the pulse high-level width corresponding to the smallest light-transmitting window 23 of the second code channel 24 is greater than or equal to the pulse high-level width of the first light-transmitting window 11.

[0043] In this way, the light-transmitting window currently used for positioning in the positioning encoder 20 is prevented from being smaller than the window width of the incremental encoder 10, so that each pulse of the second pulse signal can cover the pulse of the first pulse signal, thus avoiding positioning failure.

[0044] In the preferred embodiment, reference Figure 6 The effective aperture of the minimum light-transmitting window 23 of the second code track 24 is equal to the effective aperture of the first light-transmitting window 11. The pulse high-level width corresponding to the minimum light-transmitting window 23 of the second code track 24 is equal to the pulse high-level width of the first light-transmitting window 11.

[0045] In this way, while avoiding positioning failure, it is beneficial to the alignment of the first code track 14 and the second code track 24, as well as the sequential offset between each second code track 24.

[0046] In some implementations, reference is made to Figure 2 The positioning encoder 20 includes at least two parallel output second code tracks 24, and the number of second light-transmitting holes and the effective aperture of the second light-transmitting holes of different second code tracks 24 are set to be consistent.

[0047] In some implementations, the wavenumber and waveform of the second pulse signal generated by each of the second code channels 24 are consistent.

[0048] For example, the positioning encoder 20 includes n second code tracks 24. Each of the n second code tracks 24 is provided with m second light-transmitting windows 21. The effective apertures of the m second light-transmitting windows 21 in the same second code track 24 are different from each other. The effective apertures of the smallest light-transmitting windows 23 of the n second code tracks 24 are consistent with each other, and the second light-transmitting windows 21 of the n second code tracks 24 are set in a one-to-one correspondence with each other. That is, the effective aperture, second light-transmitting interval and number of windows of each second code track 24 are consistent with each other. This makes the wave number, waveform, pulse high-level width and pulse low-level width of each generated second pulse signal correspond to each other, forming consistent second pulse signals. This is beneficial for the regular offset setting of multi-code track signal positioning and the simplicity of code track signal encoding.

[0049] In some implementations, reference is made to Figure 2If the positioning encoder 20 includes at least two parallel output second code tracks 24, the minimum light-transmitting windows 23 of each second code track 24 are staggered. Understandably, within the same second code track 24, the effective apertures of each second light-transmitting window 21 are different, meaning the corresponding pulse high-level widths are different. The wider the pulse high-level width, the greater the displacement the encoder structure needs to reciprocate during breakpoint positioning. To avoid excessive reciprocating movement and mechanical collision damage, more than one second code track 24 can be provided. Through the staggered arrangement of each second code track 24, each first light-transmitting window 11 has a second light-transmitting window 21 with a smaller effective aperture, thereby aligning the first pulse with a smaller second pulse width, facilitating signal positioning during reciprocating movement.

[0050] Understandably, the number of second code tracks 24 in the positioning encoder 20 can be set based on requirements. The more second code tracks 24 there are, the better the alignment effect of the misalignment setting, the smaller the displacement when positioning at different positions, the faster the positioning speed, and the higher the storage capacity, thereby improving the positioning accuracy of the encoder structure.

[0051] In some implementations, the number of second code channels 24 can be less than or equal to a preset number to avoid overly complex encoding settings. The preset number can be, but is not limited to, 30, and for example, the number of second code channels 24 can be 10-20.

[0052] In some embodiments, if the positioning encoder 20 includes at least three parallel output second code channels 24, the total number of conversion codes for each second code channel 24 is a positive integer multiple of the number of conversion codes for the first code channel 14.

[0053] For example, the positioning encoder 20 includes n second code tracks 24, each second code track 24 includes m1 second light-transmitting windows 21, and the incremental encoder 10 includes m2 first light-transmitting windows 11. Then n * m1 = αm2, where α is a positive integer, such as 1 or 2. By setting the high-low level switching code number of the positioning encoder 20 to an integer multiple of that of the incremental encoder 10, combined with the consistent size setting of the first and second shielding intervals, it is beneficial to align the first shielding interval in the first code track 14 with the second shielding interval in the second code track 24, thereby improving positioning accuracy.

[0054] In some embodiments, each of the second code channels 24 is arranged in parallel in sequence, and the position of the minimum light-transmitting window 23 of each of the second code channels 24 is shifted sequentially based on the arrangement order of the second code channels 24.

[0055] Specifically, refer to Figure 7 and Figure 8Each second code track 24 outputs a second pulse signal in parallel, and the high level of the pulse generated by each minimum light-transmitting window 23 is shifted sequentially along the position sequence, so that each second pulse signal is shifted sequentially as a whole. This allows the narrower pulses in each second pulse signal to be evenly distributed to different stroke segments of the encoder structure, so that positioning can be achieved through the narrower second pulses at different first light-transmitting windows 11, avoiding damage such as mechanical collisions caused by excessive positioning reciprocating stroke.

[0056] Furthermore, the positions of each minimum light-transmitting window 23 are shifted sequentially based on the arrangement order of the second code channel 24. Combined with the consistency settings of each second code channel 24, namely the consistent pulse number, waveform, corresponding pulse high-level width and pulse low-level width of each second pulse signal, the encoding complexity of using multiple second pulse signals to locate the first light-transmitting window 11 in different sections can be simplified.

[0057] In some embodiments, the incremental encoder 10 and the positioning encoder 20 are linear encoders capable of detecting linear displacement. The first code track 14 and at least two second code tracks 24 are linear code tracks. The effective aperture of each second code track 24 increases sequentially from the minimum light-transmitting window 23 to the maximum light-transmitting window. The starting position of at least one second code track 24 is the minimum light-transmitting window 23. If the starting position of any second code track 24 is not the minimum light-transmitting window 23, such as when the minimum light-transmitting window 23 is offset, the other second light-transmitting windows 21 after the last second light-transmitting window 21 at the end of the second code track 24 are moved to the front of the minimum light-transmitting window 23 so that the maximum light-transmitting window is located in front of the minimum light-transmitting window 23 and the two are adjacent to each other.

[0058] In some implementations, reference is made to Figure 2 and Figure 4 The incremental encoder 10 and the positioning encoder 20 are coaxially connected in parallel disk-type incremental encoders 10. The first code track 14 and the second code track 24 are circular code tracks. The plurality of first light-transmitting windows 11 are evenly spaced along the circumference. The second code tracks 24 of the positioning encoder 20 are concentrically arranged, and the plurality of second light-transmitting windows 21 are spaced along the circumference. In this way, the incremental encoder disk and the positioning encoder disk are coaxially connected in parallel to form a wake-up encoding structure. The two encoder disks cooperate with each other, which can not only meet the engineering requirements, but also realize mutual self-checking.

[0059] Specifically, during displacement detection, the incremental encoder 10 and the positioning encoder 20 can rotate collaboratively. Based on the light signal passing through the first light-transmitting window 11 and the second light-transmitting window 21, a first pulse signal and several second pulse signals are formed. Displacement measurement is achieved by counting the number of pulses of the first pulse signal. In the event of power failure and restart, or loss of displacement counting signal, the positioning encoder 20 is rotated in both directions, and the displacement counting and positioning of the incremental encoder 10 are performed using the second pulse signals in both directions.

[0060] Specifically, in the first code track 14, the angles corresponding to each first light-transmitting window 11 are consistent with each other, and in the second code track 24, the angles corresponding to each second light-transmitting window 21 are different from each other, that is, each second light-transmitting window 21 in a single second code track 24 has a unique angle range. In some embodiments, the arrangement of each second code track 24 is consistent with each other, and the second light-transmitting windows 21 in each second code track 24 are arranged in a one-to-one correspondence, and the effective aperture (i.e., the angle range corresponding to the second light-transmitting window 21) is arranged in a one-to-one correspondence with each other.

[0061] In some implementations, the phase offset of each of the second code channels 24 is set, such as Figure 2 As shown, the minimum light-transmitting windows 23 (starting points) of different second code tracks 24 are successively offset so that shorter second light-transmitting windows 21 can be distributed circumferentially, correspondingly, as Figure 7 and Figure 8 As shown, the starting positions of different second pulse signals (the pulses corresponding to the smallest light-transmitting window 23) are shifted successively so that each position can be positioned and memory-wake-up through small positive and negative displacements. Compared with existing absolute encoders, the encoding structure of this embodiment is simple to set, has strong fault tolerance, and has excellent anti-interference transmission performance.

[0062] In some embodiments, the angular difference between the minimum light-transmitting windows 23 of two adjacent second code tracks 24 is 360° / n, where n is the number of code tracks in the positioning encoder 20. For example, if n=3, then the difference between the starting points of two adjacent second code tracks 24 is 120°. By setting the starting points of different tracks to bisect 360°, combined with the aforementioned consistency setting of each second code track 24, the synchronous high-low transition of different second code tracks 24 can be achieved. Even if the signal edges of each second pulse signal overlap, this facilitates the filtering of shorter high-level pulses during multi-track signal positioning calculations, improving positioning efficiency and safety.

[0063] In some embodiments, at least one of the second code channels 24 has a portion of its second light-shielding interval 22 aligned with the first light-shielding interval 12 in the incremental encoder 10, that is, the pulse low-level edge of the corresponding portion of the second pulse signal is aligned with the pulse low-level edge of the first pulse signal, thereby facilitating the positioning calculation of the positioning encoder 20.

[0064] In some implementations, reference is made to Figure 1 The incremental encoder 10 further includes a reset window 13, and the smallest light-transmitting window 23 of the reference code track in each of the second code tracks 24 is aligned with the reset window 13.

[0065] Specifically, the reset window 13 is used to mark the starting encoding position of the incremental encoder 10, for reference. Figure 6 This can be a channel independent of the first code channel 14 and the second code channel 24, forming a reset signal M1. At least one code channel in each of the second code channels 24 can serve as a reference code channel, with its minimum light-transmitting window 23 (i.e., the starting point) aligned with the reset window 13 of the incremental encoder 10, such as... Figure 7 The second code channel 24 corresponding to the pulse signal M3 in the code is the reference code channel, thereby aligning the starting pulses of the first pulse signal and the second pulse signal of the reference code channel to facilitate the position initialization of the coding structure.

[0066] Specifically, the reset signal M1 generated by the reset window 13 can be used for position correction and initialization of the encoder structure. For example... Figure 6 As shown, taking a disc-type encoding structure as an example, during the detection process, the incremental encoder 10 and the positioning encoder 20 rotate coaxially. If the pulse generated by the minimum light-transmitting window 23 of the reference code track is triggered simultaneously with the pulse of the reset signal, i.e., the pulse signals are synchronized, it indicates that the relative position of the incremental encoder 10 and the positioning encoder 20 is accurate, and the position is recorded and fed back through the first pulse signal of the incremental encoder 10. Otherwise, it indicates that the two are misaligned and mechanical correction is required.

[0067] When the encoding structure resumes operation after a power outage or recovers after signal loss, such as Figure 6 As shown, in pulse T4 of the second pulse signal M3, O1 is the signal breakpoint. The entire encoding structure rotates clockwise (moves forward) A1, detects the first high-to-low level transition position L2, and then rotates counterclockwise (moves backward) A2, detecting the first high-to-low level transition position L1. At this time, the relative step number recorded by the incremental encoder corresponds to the specific encoding position A2=TX1 of the first pulse signal M2, thus determining the corresponding position O1 in the first pulse signal M2, thereby achieving position recovery. Both the incremental encoder 10 and the positioning encoder 20 achieve position detection through level recognition. Therefore, even with certain signal fluctuations, they can continue to work, giving the encoding structure strong fault tolerance, high anti-interference transmission capability, and position memory function. It can use a small displacement to wake up the memory, achieving passive memory function.

[0068] The following describes a displacement detection method of this application, applied to the encoder structure described above. Please refer to it. Figure 5 , Figure 5This is a flowchart illustrating a displacement detection method provided in an embodiment of this application. This specification provides the method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive methods, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as... Figure 5 As shown, the method may include the following steps S201-S205: S201: Record the pulse count of the first pulse signal of the incremental encoder 10, and determine the displacement data based on the pulse count.

[0069] Specifically, during normal detection, the incremental encoder 10 and the positioning encoder 20 move synchronously. Position recording is performed based on the first pulse signal generated by the incremental encoder 10, i.e., the number of pulses in the first pulse signal is recorded to obtain a pulse count. The product of the unit displacement corresponding to a single pulse and the pulse count is the displacement amount, thus determining the displacement data. For example, the displacement data Ldis = n×d, where n is the pulse count and d is the unit displacement.

[0070] In some cases, prior to S201, the method also includes: S301: Obtain the minimum trigger time difference between the reset signal and the second pulse signal of the reference code track; S303: If the trigger time difference meets the simultaneous triggering condition, execute S201: S305: If the trigger time difference does not meet the simultaneous triggering condition, determine that the incremental encoder 10 and the positioning encoder 20 are mismatched.

[0071] Specifically, the reference code track is the second code track 24, which is aligned with the minimum light-transmitting window 23 and the reset window 13 of the incremental encoder 10. Alignment means that during the movement of the encoding structure, the optical signal can simultaneously trigger the reset pulse corresponding to the reset window 13 and the minimum pulse corresponding to the minimum light-transmitting window 23, both corresponding to the same detection position.

[0072] Specifically, the trigger time difference refers to the time difference between the reset pulse and the minimum pulse mentioned above being triggered during actual operation. If the trigger time difference is less than or equal to the preset error time difference, it indicates that the two are triggered simultaneously, thus meeting the detection conditions and executing the position recording in S201. If it is greater than the preset error time difference, it indicates that the two are not triggered simultaneously, that is, the minimum light-transmitting window 23 of the reference code track is not aligned with the reset window 13, and mechanical correction needs to be performed.

[0073] S203: In the event of loss of pulse count of incremental encoder 10, control the positioning encoder 20 to move forward and backward, and record the first signal jump position of forward and backward movement in the same second pulse signal of positioning encoder 20.

[0074] Specifically, pulse count loss can occur due to power failure, restart, signal loss, etc. Since the effective aperture of each first light-transmitting window 11 of the incremental encoder 10 is the same, and the first pulse signal is a pulse signal of equal width, after the breakpoint is recovered, the current pulse count cannot be determined by the first pulse signal. The current counting position needs to be determined based on the single pulse specificity of the second pulse signal.

[0075] Specifically, the first signal transition position is the signal edge position where the pulse high level changes to the pulse low level. Recording the first signal transition position of forward and reverse movement can determine the pulse high level width where the second pulse signal interruption point is located. Since the pulse high level width is specific, the location range of the interruption point can be determined.

[0076] S205: Locate the current counting position of the incremental encoder 10 based on the first signal transition position of the forward and reverse movements.

[0077] Specifically, during the process of recording the first signal transition position of forward and reverse movement, the distance to the first signal transition position in the forward direction and the distance to the first signal transition position in the reverse direction can be recorded. The current breakpoint position can be calculated using these two distances, thereby determining the precise breakpoint position within the aforementioned defined position range.

[0078] In some implementations, the first signal transition position of the forward and reverse movement includes the first edge position and the second edge position of the same high-level pulse of the target pulse signal, wherein the target pulse signal is the signal used for positioning calculation in at least one second pulse signal. The first edge position is the falling edge position of the high-level pulse, and the second edge position is the rising edge position of the high-level pulse.

[0079] Accordingly, S205 may include S2051-S2053: S2051: Determine the first signal distance between the current position and the first edge position; S2052: Determine the target high-level width information between the first edge position and the second edge position; S2053: Determine the current counting position based on the target high-level width information in the target pulse signal and the first signal distance.

[0080] Specifically, during forward or reverse movement, the movement distance can be recorded. This movement distance can be calculated by recording the signal width traversed during the movement process in the target pulse signal, or by recording the number of pulses in the first pulse signal.

[0081] Specifically, regardless of whether forward or reverse movement is performed first, the distance between the first edge position and the second edge position corresponds to the target pulse high-level width, i.e., the width of the target pulse high-level at the current position. If forward movement is performed first, followed by reverse movement, the first signal distance is the distance from the current position to the falling edge of the signal. The difference between the target pulse high-level width and the first signal distance represents the signal distance between the rising edge of the signal and the current position. Adding the cumulative signal distance before the target pulse high level in the target pulse signal to the above difference yields the current counting position. If reverse movement is performed first, followed by forward movement, the first signal distance is the distance from the current position to the rising edge of the signal. Adding the cumulative signal distance before the target pulse high level in the target pulse signal to the first signal distance yields the current counting position.

[0082] For example, refer to Figure 6 T4 is the target pulse high level. The first signal distance of the forward movement is A1 (corresponding to 2 pulses (2 rising edges) in the first pulse signal M2). The target pulse high level width is A2 = TX1 (4 pulses in M2). Then the current counting position O1 = A2 - A1 + PT3 = 4 - 2 + 6 = 8, which is the 8th pulse in the M2 signal. The pulse count is 8, where PT3 is the cumulative signal distance of the pulse high level T3 in the M3 signal (corresponding to 6 pulses in M2). Alternatively, after determining TX3, the pulse high level T4 can be located, that is, its cumulative signal distance can be determined. Subtracting A2, the current counting position of O1 can be determined. If the angle range of T4 can be determined in the disc encoder, the angle range corresponding to A1 can be subtracted from the angle range of T4 to obtain the angle of O1.

[0083] Understandably, if only a single second code track 24 is set, the target pulse high level becomes wider and wider as the displacement increases, and the forward and reverse movement distance required for positioning calculation becomes larger and larger, which may lead to damage such as mechanical collision. To avoid this problem, two or more second code tracks 24 can be set. By staggering the second code tracks 24, the shorter second light transmission window 21 is distributed to each interval of the detection range. Thus, when the signal connection is disconnected at any detection position, the position positioning and memory recovery can be achieved by the shorter target pulse high level.

[0084] Accordingly, in some embodiments, if the positioning encoder includes at least two second code tracks 24, the target pulse signal is the second pulse signal with the shortest high-level pulse width corresponding to the current position among the at least two second pulse signals corresponding to the at least two second code tracks 24. In this way, using the shortest high level can shorten the forward and reverse movement distance, thereby improving positioning efficiency and safety.

[0085] Understandably, the target pulse signal does not need to be preset or stored. It can be automatically determined by the first signal transition position during forward and reverse movement. For example, moving forward until the first edge of each second pulse signal is detected is taken as the first edge position. Then, moving backward until the first edge of each second pulse signal is detected, if this edge and the first edge position belong to the same second pulse signal, it is determined as the second edge position. If they do not belong to the same second pulse signal, it can continue to move backward until the edge position of the same second pulse signal is detected, which is taken as the second edge position. Alternatively, the first edge of the reverse movement can be determined as the second edge position, and then moving forward again until the first upward edge of the corresponding second pulse signal is detected, which is taken as the updated first edge position for positioning calculation. In this way, in addition to the reference code track of the positioning encoder disk, other second code tracks 24 in the inner or outer ring are set with offset settings to reduce the positioning reciprocating movement distance, achieve breakpoint positioning with minimum displacement, and restore the current counting position of the breakpoint.

[0086] For example, refer to Figure 7 M3 is the second pulse signal corresponding to the reference code track, M4 is the second pulse signal of another second code track 24 that is misaligned with the reference code track, and T1' is the pulse (minimum pulse) corresponding to the minimum light transmission window 23. The dashed line in the figure marks the breakpoint position, which belongs to pulse T5 in M3 and pulse T2' in M4. The pulse high level width TX2 of pulse T5 is obviously greater than the pulse high level width TX3 of pulse T2'. The first signal jump positions L3 and L4 in the forward and reverse movement process both belong to pulse T2'. Therefore, the current counting position of point O2 is calculated based on pulse T2'.

[0087] For example, refer to Figure 8M3 is the second pulse signal corresponding to the reference code track, M4 and M5 are the second pulse signals of the two second code tracks 24 that are misaligned with the reference code track, and T1' is the pulse (minimum pulse) corresponding to the minimum light-transmitting window 23. The two dashed lines in the figure mark the two breakpoint positions. For breakpoint O3, its position falls within pulses T5, T2', and T7". Among them, the pulse width TX5 of pulse T2' is obviously smaller than the other two pulses. The two edge positions L5 and L6 of forward and reverse movement are both edges of pulse T2', used for positioning calculation. For breakpoint O4, its position falls within pulses T5, T3', and T8". Among them, the pulse width of pulse T3' is obviously smaller than TX4 and TX6. The two edge positions L7 and L8 of forward and reverse movement are both edges of pulse T3', used for positioning calculation.

[0088] Understandably, as the number of second code tracks 24 increases, the back-and-forth displacement of the breakpoint positioning becomes smaller, meaning the positioning sensitivity of the encoder structure becomes better. Of course, the complexity also increases. The number of second code tracks 24 can be selected based on the application scenario to balance positioning accuracy and engineering complexity. For example, in scenarios with strict positioning displacement requirements, 10-20 second code tracks 24 can be set.

[0089] It should be noted that the displacement (e.g., angle) corresponding to each code (second light-transmitting window 21 and second light-transmitting interval) of the incremental encoder 10 in the encoder structure is very small. The illustration is only enlarged for illustration purposes. The angle corresponding to the pulse high-level width of each incremental encoder can be as low as 0.1 degrees or even 0.001 degrees. Therefore, the breakpoint position before and after the high level can be considered to be the same, or the breakpoint position within one pulse cycle (one high level and one low level) can also be considered to be the same, that is, below the minimum resolution.

[0090] Understandably, the displacement detection method described above can be executed by a controller corresponding to the encoder structure. This controller can be a standalone electronic device or an electronic device integrated into the encoder structure. The controller can acquire pulse signals and execute the displacement detection method described above based on the program code running on it.

[0091] This application embodiment also provides a displacement detection device 500, such as... Figure 9 As shown, Figure 9 This paper presents a schematic diagram of a displacement detection device according to an embodiment of the present application. The device may include the following modules: Incremental detection module 10: used to record the pulse count of the first pulse signal of the incremental encoder 10, and determine displacement data based on the pulse count; The positioning module 20 is configured to, in the event of loss of pulse count of the incremental encoder 10, control the positioning encoder 20 to move forward and backward, and record the first signal transition position of the forward and backward movement in the same second pulse signal of the positioning encoder 20; and, locate the current counting position of the incremental encoder 10 based on the first signal transition position of the forward and backward movement.

[0092] In a possible implementation, the first signal transition position of the forward and reverse movement includes the first edge position and the second edge position of the same high-level pulse of the target pulse signal, wherein the target pulse signal is the signal used for positioning calculation in at least one second pulse signal; the positioning module 20 may be specifically used for: Determine the first signal distance between the current position and the first edge position; Determine the target high-level width information between the first edge position and the second edge position; The current counting position is determined based on the target high-level width information in the target pulse signal and the distance of the first signal.

[0093] In a possible implementation, if the positioning encoder includes at least two second code tracks 24, the target pulse signal is the second pulse signal with the shortest high-level pulse width corresponding to the current position among the at least two second pulse signals corresponding to the at least two second code tracks 24.

[0094] It should be noted that the above-described device embodiments and method embodiments are based on the same implementation methods.

[0095] This application provides an electronic device, which can be a terminal or a server, including a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the encoder structure provided in the above method embodiments.

[0096] Memory can be used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and wafer scratch detection. Memory can primarily include a program storage area and a data storage area. The program storage area stores the operating system, application programs required for the functions, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory may also include a memory controller to provide the processor with access to the memory.

[0097] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 10 This is a hardware structure block diagram of an electronic device with an encoder structure provided in an embodiment of this application. For example... Figure 10 As shown, the electronic device 900 can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute the series of instruction operations in the storage media 920 on the electronic device 900. Electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0098] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module used for wireless communication with the Internet.

[0099] Those skilled in the art will understand that Figure 10 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 10 The more or fewer components shown, or having the same Figure 10 The different configurations shown.

[0100] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing an encoder structure in the method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the encoder structure provided in the above method embodiment.

[0101] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0102] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0103] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0104] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0105] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0106] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An encoder structure, characterized in that, The encoder structure includes: The incremental encoder includes a first code track, which includes a plurality of first light-transmitting windows that are evenly spaced and have the same effective aperture. The first code track is capable of generating a periodic first pulse signal based on an optical signal. The positioning encoder, capable of coordinating with the incremental encoder, includes at least one second code track. The second code track includes multiple second light-transmitting windows spaced apart and with different effective apertures. The second code track can generate a second pulse signal based on an optical signal, and the pulse widths corresponding to each second light-transmitting window in the same second code track are different. By moving the positioning encoder in both directions and recording the first signal transition position of the forward and reverse movement in the same second pulse signal, the current counting position of the incremental encoder can be located based on the first signal transition position of the forward and reverse movement.

2. The encoder structure according to claim 1, characterized in that, The encoder structure satisfies at least one of the following characteristics: In the same second code track of the positioning code element, starting from the smallest light-transmitting window of the second code track, the effective aperture of the plurality of second light-transmitting windows increases sequentially along the position sequence. In the second pulse signal, starting from the pulse corresponding to the smallest light-transmitting window, the high-level pulse width corresponding to each second light-transmitting window increases sequentially along the bit order; The pulse low-level widths of the first pulse signal and the second pulse signal are the same.

3. The encoder structure according to claim 2, characterized in that, The encoder structure satisfies at least one of the following characteristics: Within the same second code channel, starting from the smallest light-transmitting window of the second code channel, the effective apertures of the plurality of second light-transmitting windows increase arithmetically in sequence along the positional order. In the second pulse signal, starting from the pulse corresponding to the smallest light-transmitting window, the high-level pulse width corresponding to each second light-transmitting window increases arithmetically along the bit sequence.

4. The encoder structure according to claim 1, characterized in that, The encoder structure satisfies at least one of the following characteristics: The effective aperture of the minimum light-transmitting window of the second code track is greater than or equal to the effective aperture of the first light-transmitting window; The pulse high-level width corresponding to the smallest light-transmitting window of the second code channel is greater than or equal to the pulse high-level width of the first light-transmitting window; The number of second light-transmitting ports and the effective aperture of the second light-transmitting ports are set to be consistent for different second code tracks; The wavenumber and waveform of the second pulse signal generated by each of the second code channels are consistent.

5. The encoder structure according to claim 1, characterized in that, The encoder structure satisfies at least one of the following characteristics: If the positioning encoder includes at least two parallel output second code channels, the minimum light-transmitting windows of each second code channel are staggered from each other; If the positioning encoder includes at least three parallel output second code channels, the total number of conversion codes for each second code channel is a positive integer multiple of the number of conversion codes for the first code channel.

6. The encoder structure according to claim 5, characterized in that, Each of the second code channels is arranged in parallel, and the position of the smallest light-transmitting window of each second code channel is shifted sequentially based on the arrangement order of the second code channels.

7. The encoder structure according to any one of claims 1-6, characterized in that, The incremental encoder and the positioning encoder are coaxial parallel disk-type incremental encoders. The first code track and the second code track are circumferential code tracks. The plurality of first light-transmitting windows are evenly spaced along the circumference. The second code tracks of the positioning encoder are concentrically arranged. The plurality of second light-transmitting windows are spaced along the circumference.

8. The encoder structure according to claim 7, characterized in that, Each second code track is set with a phase offset, and the angular difference between the minimum light-transmitting windows of two adjacent second code tracks is 360° / n, where n is the number of code tracks of the positioning encoder.

9. The encoder structure according to any one of claims 1-6, characterized in that, The incremental encoder also includes a reset window, and the smallest light-transmitting window of the reference code track in each of the second code tracks is aligned with the reset window.

10. A displacement detection method, applied to the encoder structure according to any one of claims 1-9, characterized in that, The method includes: Record the pulse count of the first pulse signal of the incremental encoder, and determine the displacement data based on the pulse count; In the event of a loss of pulse count for the incremental encoder, the positioning encoder is controlled to move forward and backward, and the first signal transition position of the forward and backward movement in the same second pulse signal of the positioning encoder is recorded. The current counting position of the incremental encoder is located based on the first signal transition position of the forward and reverse movements.

11. The displacement detection method according to claim 10, characterized in that, The first signal transition position of the forward and reverse movement includes the first edge position and the second edge position of the same high pulse level in the target pulse signal, and the target pulse signal is the signal used for positioning calculation in at least one second pulse signal; The method of locating the current counting position of the incremental encoder based on the first signal transition position of the forward and reverse movements includes: Determine the first signal distance between the current position and the first edge position; Determine the target high-level width information between the first edge position and the second edge position; The current counting position is determined based on the target high-level width information in the target pulse signal and the distance of the first signal.

12. The displacement detection method according to claim 10, characterized in that, If the positioning encoder includes at least two second code tracks, the target pulse signal is the second pulse signal with the shortest high-level pulse width corresponding to the current position among the at least two second pulse signals corresponding to the at least two second code tracks.