A grating dual reading unit anti-pollution method and device

Through the dual-reading unit grating sensor anti-pollution method, periodic sampling and parameter calculation, the system unreliability problem caused by grating sensor contamination is solved, and cost-effective anti-pollution capability and system reliability are enhanced.

CN116592761BActive Publication Date: 2025-10-10DONGGUAN PUMAI PRECISION MEASUREMENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310407107.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2025-10-10
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

Existing grating sensors are easily contaminated, causing the system to lose its displacement sensing ability. Especially in linear motor drive systems, this may cause "flying car" accidents. In addition, existing redundancy solutions are costly and difficult to implement.

Method used

The anti-pollution method of the grating sensor with dual reading units is adopted. Through periodic sampling and parameter calculation, it is determined whether the reading unit is contaminated, and an alarm or fault signal is output when contamination occurs to ensure system reliability.

Benefits of technology

The anti-pollution ability of the grating sensor is improved, the cost is reduced, the machine tool CNC system does not need to provide more grating signal input interfaces, and the possibility of "runaway" accidents is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116592761B_ABST
    Figure CN116592761B_ABST
Patent Text Reader

Abstract

The application discloses a grating double-reading unit anti-pollution method and device, periodically carries out reading unit count value sampling and parameter calculation; after n times of continuous sampling, starting from the n+1th sampling, whether pollution occurs in each reading unit is judged according to rules; and grating pulse signals, alarm signals and fault signals are output according to the pollution of each reading unit according to the following rules. The technical scheme of the application improves the anti-pollution capability of the grating at low cost, and does not need the machine tool numerical control system to provide more grating signal input interfaces. The application can be applied to existing machine tools and instruments to improve the anti-pollution capability and system reliability of the grating system, and can be applied to a linear motor system to reduce the possibility of "flywheel" accidents of the linear motor system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an anti-pollution method for a grating sensor, and more particularly to a grating anti-pollution method and device based on a dual-reading unit, belonging to the technical fields of measurement technology and instruments, numerically controlled machine tools, etc. Background Art

[0002] Grating is short for grating sensor. Gratings are one of the most widely used position sensors in the machine tool and instrumentation industries. Common grating sensors include long gratings for measuring linear displacement and circular gratings for measuring angular displacement. A typical grating sensor typically consists of a scale grating covering the entire measuring range and a readhead. The readhead integrates a relatively small indicator grating for generating moiré fringes, as well as a light source, optical signal receiver, signal conditioning and processing circuitry, and grating signal output circuitry.

[0003] Usually, there is only one reading head in a grating system. If the scale grating or reading head is contaminated by dust, oil, etc., the grating system will lose its correct position sensing ability. In grating application systems such as machine tools and instruments, if the grating sensor loses its displacement sensing ability, the machine tools and instruments will not work properly. If the grating scale in a linear motion system composed of a rotating motor driving a lead screw and nut pair is contaminated, and the rotating motor also has a rotary encoder, the CNC system of the machine tool instrument can detect the failure of the grating sensor and can shut down the machine in time to avoid danger; but if the grating scale system, which is the only position feedback element, is contaminated in a system driven by a linear motor, it is difficult for the current grating scale system and the CNC system of the machine tool instrument to detect the fault in time, and the motion system using closed-loop control may experience "flying" phenomenon, causing serious accidents.

[0004] To improve the anti-contamination capabilities of grating sensors, a redundant solution can be used to increase system reliability by installing multiple sets of grating sensors simultaneously. However, this approach is costly and requires the CNC system to be able to simultaneously access multiple grating signals. Most existing machine tools and instruments are not capable of accepting multiple grating signals. Even for the few that can, upgrading the existing system, which involves complex hardware and software logic upgrades, is necessary to improve the grating system's anti-contamination capabilities. Summary of the Invention

[0005] In order to solve the problems existing in the prior art, the present invention proposes an anti-pollution method for a grating sensor based on a dual-reading unit, and a grating device to which the method can be applied.

[0006] A grating double-reading unit anti-pollution method, the method comprising the following steps:

[0007] Step 1: Periodically sample the reading unit count value and calculate the parameters;

[0008] The sampling period of the grating reading unit count value is defined as T, and the reading of each reading unit is sampled once every T time; the two reading units of the grating are named in alphabetical order, namely, reading unit A and reading unit B; the readings obtained by continuous sampling of reading unit A for m times are defined as A1, A2, A3, ..., A m , where A m is the latest sampling value, A m-1 The readings obtained by continuous sampling of the reading unit B for m times are defined as B1, B2, B3, ..., B m , where B m is the latest sampling value, B m-1 is the newest sampling value; the change between the i-th adjacent readings of reading unit A is defined as δA i = |A i+1 - A i | , The change between the i-th two adjacent readings of reading unit B is δB i = |B i+1 - B i |; Define the total reading change of the latest n samples of reading unit A as SUM (A, n) = |A m -A m-n |, the total reading change of the latest n samples of reading unit B is SUM (B, n) = |B m -B m-n |,n <m,;定义读数单元A的n次采样判定污染阈值为T(A,n),读数单元B的n次采样判定污染阈值为T(B,n);定义读数单元A的1次采样判定污染系数为k1(A,n),读数单元B的1次采样判定污染系数为k1(B,n);定义读数单元A的n次采样判定污染系数为kn (A,n),读数单元B的n次采样判定污染系数为kn (B,n);

[0009] Step 2: After sampling n times continuously, starting from the n+1th sampling, determine whether each reading unit is contaminated according to the following rules;

[0010] Rule 1: If any of the following conditions is met, reading unit A is considered to be contaminated; otherwise, reading unit A is considered to be working normally:

[0011] (1) SUM(A,n) <kn(A,n)*T(A,n) 且 SUM(B,n)≥T(B,n);

[0012] (2) There is at least one δA i <k1(A,n)*T(A,n) 且 δB i ≥T(B,n), where i=1,2,...,n-1;

[0013] (3) There is a distance mark signal or index signal on the grating, and the actual count value of the reading unit A is not equal to the nominal count value of the distance mark signal or index signal;

[0014] Rule 2: If any of the following conditions is met, reading unit B is considered to be contaminated; otherwise, reading unit B is considered to be working normally:

[0015] (1) SUM(B,n) <kn (B,n)*T(B,n) 且 SUM(A,n)≥T(A,n);

[0016] (2) There is at least one δB i <k1(B,n)*T(B,n) 且 δA i ≥T(A,n), where i=1,2,...,n-1;

[0017] (3) There is a distance mark signal or index signal on the grating, and the actual count value of the reading unit B is not equal to the nominal count value of the distance mark signal or index signal;

[0018] Step 3: According to the contamination of each reading unit, output the grating pulse signal, alarm signal and fault signal according to the following rules;

[0019] (1) If both reading unit A and reading unit B can work normally, the grating pulse signal of reading unit A or the grating pulse signal of reading unit B will be output according to the user configuration;

[0020] (2) If only one of the reading unit A and the reading unit B is working properly, the grating pulse signal of the reading unit that is working properly is output, and an alarm signal is output;

[0021] (3) If both reading unit A and reading unit B cannot work normally, a fault signal will be output and no grating pulse signal will be output;

[0022] (4) Once a reading unit malfunctions, it will continue to be considered malfunctioning until the power is turned on again or the system is reset or initialized.

[0023] A grating sensor device using a grating double reading unit anti-pollution judgment method, at least comprising the following components: a scale grating, a reading unit A, a reading unit B, an anti-pollution function module. Wherein, the reading unit A is composed of a light signal emitter device A, a light signal receiver device A, an electrical signal processing component A, the reading unit B is composed of a light signal emitter device B, a light signal receiver device B, an electrical signal processing component B, the anti-pollution function module is composed of an alarm signal output component, a fault signal output component and a grating pulse processing device. The scale grating is engraved with a plurality of parallel engraved lines with different transmittance or reflectance and base material; the reading unit cooperates with the scale grating to independently complete the position sensing function of the conventional grating sensor, and can obtain position reading output to the anti-pollution function module; the reading unit cooperates with the scale grating to independently complete the position sensing function of the conventional grating sensor, and can obtain position reading output to the anti-pollution function module; the functions of the light signal emitter device A and the light signal emitter device B are to emit measurement light lines converged and modulated through a special light path; the measurement light lines enter the light signal receiver device A or the light signal receiver device B after being reflected or transmitted by the scale grating; the light signal receiver device A and the light signal receiver device B receive the measurement light lines, and send the electrical signals converted by the photosensitive device to the electrical signal processing component A or the electrical signal processing component B respectively; the electrical signal processing component A and the electrical signal processing component B convert the electrical signals into grating pulse signals representing position information output by the grating sensor; the anti-pollution function module determines whether the two reading units appear pollution through the collected grating pulse signals; when the alarm signal needs to be output, the alarm signal is output by the alarm signal output device, when the fault signal needs to be output, the fault signal is output by the fault signal output device, and the grating pulse processing device is realized by taking FPGA, CPLD or MCU as the core device to complete the anti-pollution function digital operation and logic operation function, and output the grating pulse signals determined by the logic judgment function.

[0024] The alarm signal output device can be selected from a light emitting diode, a power driven triode or a MOS tube output, and can also be selected from a serial communication interface UART or SPI or I2C bus output.

[0025] The fault signal output device can be selected from a light emitting diode, a power driven triode or a MOS tube output, and can also be selected from a serial communication interface UART or SPI or I2C bus output.

[0026] The present application has the advantages that: the technical scheme for improving the grating anti-pollution ability is low in cost, and does not need the machine tool numerical control system to provide more grating signal input interfaces. The application can be applied to existing machine tools and instruments to improve the anti-pollution ability and system reliability of the grating system; can be applied to linear motor systems to reduce the possibility of "fly car" accidents of the linear motor system. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 is a grating double reading unit anti-pollution method flow chart;

[0028] Figure 2 is a grating sensor device schematic diagram applying double reading unit anti-pollution method;

[0029] Reference signs: 1, scale grating, 2, reading unit A, 3, optical signal transmitting device A, 4, optical signal receiving device A, 5, electrical signal processing component A, 6, anti-pollution function module, 7, alarm signal output device, 8, fault signal output device, 9, grating pulse processing device, 10, electrical signal processing device B, 11, optical signal transmitting device B, 12, optical signal receiving device B, 13, reading unit B. DETAILED DESCRIPTION

[0030] The advantages, features and specific embodiments of the present application will be further described below in conjunction with the drawings and specific embodiments. These embodiments are given by way of example only and are not intended to limit the present application, illustrate and explain the present application.

[0031] To solve the problems of poor grating anti-pollution ability, possible "fly car" accidents of linear motor closed-loop control system when grating pollution occurs and other problems in the prior art, the present application proposes a grating sensor anti-pollution method based on double reading units and a grating device to which the method can be applied. The reading head of the grating device proposed by the present application integrates two reading units, and the function of each reading unit is equivalent to that of a reading head in an ordinary grating system.

[0032] The overall idea of the grating sensor anti-pollution method proposed by the present application is as follows: (1) first, according to the readings of the two reading units, it is determined whether the reading units and the scale grating have abnormal work caused by pollution; (2) if it is determined that pollution has occurred, but the grating sensor can still complete part of the function, then the correct grating pulse signal is output as much as possible, the normal work is maintained, and an alarm signal is output at the same time; (3) if it is determined that pollution has occurred and cannot work normally, then the grating pulse signal is stopped from being output, and a fault signal is output; (4) if it is determined that no pollution has occurred, then the grating pulse signal is output according to the readings of the reading units selected by the user in advance.

[0033] A grating double reading unit anti-pollution method, which is composed of the following steps:

[0034] Step 1: Periodically sample the reading unit count value and calculate the parameters. Define the sampling period of the grating reading unit count value as T, and sample the reading of each reading unit once every T time; name the two reading units of the grating in alphabetical order, i.e., reading unit A and reading unit B; define the readings obtained by the most recent m consecutive samplings of reading unit A as A1, A2, A3, ..., A m , where A m is the latest sampling value, A m-1 The readings obtained by the latest m consecutive samplings of the reading unit B are defined as B1, B2, B3, ..., B m , where B m is the latest sampling value, B m-1 is the newest sampling value, and so on; the change between the i-th adjacent readings of reading unit A is defined as δA i = |A i+1 - A i | , The change between the i-th two adjacent readings of reading unit B is δB i = |B i+1 - B i |; define the latest n times of reading unit A (n <m)采样的总读数变化量为SUM(A,n)=|A m -A m-n |, read the latest n times of unit B (n <m)采样的总读数变化量为SUM(B,n)=|B m -B m-n |; Define the contamination threshold for n samplings of reading unit A as T(A,n), and the contamination threshold for n samplings of reading unit B as T(B,n); define the contamination coefficient for 1 sampling of reading unit A as k1(A,n), and the contamination coefficient for 1 sampling of reading unit B as k1(B,n); define the contamination coefficient for n samplings of reading unit A as kn(A,n), and the contamination coefficient for n samplings of reading unit B as kn(B,n).

[0035] The following is an example of a set of actual readings in Table 1: The sampling period T of the grating reading unit count value is set to 1ms, and each reading unit is sampled every 1ms. The readings Ai and Bi of reading unit A and reading unit B in the first 25 samples are recorded, as shown in Table 1. Other related parameters, such as δA, can be calculated. i , δB i, SUM(A,10), SUM(B,10), etc. In Table 1, n=10, where T(A,10), T(B,10), k1(A,10), k1(B,10), k1(A,10), and k1(B,10) are all user-specified data.

[0036] Step 2: After sampling n times continuously, starting from the n+1th sampling, determine whether each reading unit is contaminated according to the following rules.

[0037] Rule 1: If any of the following conditions is met, reading unit A is considered to be contaminated; otherwise, reading unit A is considered to be working normally:

[0038] (1) SUM(A,n) <kn(A,n)*T(A,n) 且 SUM(B,n)≥T(B,n);

[0039] (2) There is at least one δA i <k1(A,n)*T(A,n) 且 δB i ≥T(B,n), where i=1,2,...,n-1.

[0040] (3) There is a distance mark signal or index signal on the grating, and the actual count value of the reading unit A is not equal to the nominal count value between the distance mark signal or index signal.

[0041] Rule 2: If any of the following conditions is met, reading unit B is considered to be contaminated; otherwise, reading unit B is considered to be working normally:

[0042] (1) SUM(B,n) <kn(B,n)*T(B,n) 且 SUM(A,n)≥T(A,n);

[0043] (2) There is at least one δB i <k1(B,n)*T(B,n) 且 δA i ≥T(A,n), where i=1,2,...,n-1.

[0044] (3) There is a distance mark signal or index signal on the grating, and the actual count value of the reading unit B is not equal to the nominal count value between the distance mark signal or index signal.

[0045] According to the rules in step 2 above, we can calculate whether reading unit A and reading unit B in Table 1 are working properly. In Table 1, normal operation is represented by 1, and abnormal operation is represented by 0. In the column with number i = 20, the conclusion that reading unit B is working abnormally is the result of the judgment based on item (2) of rule 2.

[0046] Rule 1 (3) and Rule 2 (3) in Step 2 above apply to gratings with distance marks or index signals. Currently, grating scales and circular gratings used in machine tools and instruments generally have index signals, but only a small number of grating products have distance marks. For example, the LS487C grating scale produced by Heidenhain is an incremental grating scale with distance code marks. Its signal period is 20 microns, the zero mark interval is 20 mm, and the distance code mark interval is 0.02 mm.

[0047] The index signal is a fixed position within the travel range of a grating scale or circular grating. When the scale's reading head moves to the index signal position relative to the scale grating, a properly functioning scale will output a fixed reading. It can be assumed that the actual count value of the grating when it reaches the index signal twice is 0. If the actual count value is not 0 when the scale's reading head moves to the index signal position relative to the scale grating, it can be determined that the reading head is not functioning properly. When the circular grating's reading head moves to the index signal position twice in a row relative to the scale grating, the difference between the two readings output by the properly functioning circular grating is equal to an integer multiple of the number of pulses output by the circular grating during one rotation. If the difference between the actual count values ​​when the circular grating's reading head moves to the index signal position twice in a row relative to the scale grating is not an integer multiple of the number of pulses output by the circular grating during one rotation, it can be determined that the reading head is not functioning properly.

[0048] Distance marks are special index signals found on some encoders from manufacturers such as Heidenhain and Renishaw. The nominal number of pulses between two adjacent index signals is unique and known. If the difference between the actual counts when the encoder readhead passes between two adjacent distance marks is inconsistent with the known nominal counts, the readhead is deemed to be malfunctioning.

[0049] Table 1. Example of reading unit A / B readings and related parameter calculations

[0050]

[0051] Step 3: According to the pollution status of each reading unit, output the grating pulse signal, alarm signal and fault signal according to the following rules.

[0052] (1) If both reading unit A and reading unit B can work normally, the grating pulse signal of reading unit A or the grating pulse signal of reading unit B will be output according to the user configuration;

[0053] (2) If only one of the reading unit A and the reading unit B is working properly, the grating pulse signal of the reading unit that is working properly is output, and an alarm signal is output;

[0054] (3) If both reading unit A and reading unit B do not work normally, output a fault signal, and do not output a grating pulse signal;

[0055] (4) Once a reading unit does not work normally, it is continuously identified as not working normally until the system is powered on again or is reset and initialized.

[0056] According to the rules in step 3 above, whether reading unit A and reading unit B work normally, whether an alarm signal and a fault signal are output can be calculated. In Table 1, 1 represents normal working, 0 represents abnormal working; 1 represents that an alarm or a fault signal needs to be output, and 0 represents that no output is needed. In each column of times i = 21~25, the conclusion that reading unit B does not work normally is the result of the judgment according to rule (4) of step 3. In Table 1, the pulse signal source output by the grating is assumed to be reading unit B, which is the user's pre-configuration; in times i = 20 and later, the pulse signal source output by the grating is modified to reading unit A, which is the result of the judgment according to rule (2) of step 3.

[0057] In practical applications, in order to improve the system function, the following contents can be changed on the basis of the above essential structure and method elements:

[0058] (1) In order to further improve the reliability of the system, the number of reading units is increased from two to 3~8 or more. This method can be considered as a simple extension of the method of the present application, that is, one of the two reading units required in the present application is integrated with two reading units, which is equivalent to the nested use of the present application.

[0059] (2) A small number of rules are added to the rules of the present application or the existing rules are repeatedly applied, for example, a new k coefficient is added, the values of m and n are modified, two or more different m values and n values are added, etc.

[0060] The grating sensor device using the above double-reading unit anti-pollution method comprises at least the following components: a scale grating 1, a reading unit A 2, a reading unit B 13, and an anti-pollution function module 6. The reading unit A 2 is composed of a light signal emitter 3, a light signal receiver 4, and an electrical signal processing component 5; the reading unit B 13 is composed of a light signal emitter 11, a light signal receiver 12, and an electrical signal processing component 10; and the anti-pollution function module 6 is composed of an alarm signal output component 7, a fault signal output component 8, and a grating pulse processing device 9. The scale grating 1 is engraved with a plurality of parallel engraved lines with different transmittance or reflectance from the base material; the reading unit 2 can independently complete the position sensing function of a conventional grating sensor in cooperation with the scale grating 1, and can obtain position reading output to the anti-pollution function module 6; the reading unit 13 can also independently complete the position sensing function of a conventional grating sensor in cooperation with the scale grating 1, and can obtain position reading output to the anti-pollution function module 6; the light signal emitter 3 and 6 are used to emit measurement light rays that are converged and modulated through a special light path; the measurement light rays are reflected or transmitted by the scale grating 1 and then enter the light signal receiver 4 or 12; the light signal receiver 4 and 12 receive the measurement light rays, convert the light signals into electrical signals through a photosensitive device, and then send the electrical signals to the electrical signal processing component 5 or 10, respectively; the electrical signal processing component 5 and 10 convert the electrical signals into grating pulse signals representing position information output by a conventional grating sensor; the anti-pollution function module 6 is a circuit system with FPGA, CPLD, or MCU as the core device; when an alarm signal needs to be output, the alarm signal is output by the alarm signal output device 7, which can be selected from a light-emitting diode, a power-driven triode, or a MOS tube, and can also be selected from a serial communication interface UART, SPI, etc.; when a fault signal needs to be output, the fault signal is output by the fault signal output device 8, which can be selected from a light-emitting diode, a power-driven triode, or a MOS tube, and can also be selected from a serial communication interface UART, SPI, etc.; the grating pulse processing device 9 can be realized by FPGA, CPLD, or MCU as the core device, and can complete the digital operation and logical operation functions required for the anti-pollution function, and output grating pulse signals determined by the logical judgment function.

[0061] In practical applications, in order to complete the system function, the following contents can be added on the basis of the above essential structural elements:

[0062] (1) Power supply part. The power supply part can adopt external 3V, 5V, or other voltage power input, or can adopt battery power supply; the power supply needs to be stabilized, filtered, etc.

[0063] (2) Parameter setting and storage. Parameters can be input using buttons, digital tube displays, serial ports, or other methods. Parameters can be stored using EEPROM or FLASH memory, which can be built-in or independent chips, or other methods such as SD cards.

[0064] (3) Electrostatic protection: To increase the reliability of the system, anti-static devices or chips can be added.

[0065] (4) Output signal voltage conversion: The voltage of the grating output signal can be in TTL level, RS-422 level, etc.

[0066] (5) The light-emitting diode displays the judgment situation, the power driving transistor or MOS tube can be connected to an external relay to output the judgment result, and the serial communication interface UART, SPI, and I2C bus can be connected to the host computer output.

[0067] The above contents can be implemented by ordinary technical personnel in the same field according to conventional techniques, and the implementation methods are not limited to those listed. These are simple reasoning and simple technical improvements of the methods and devices of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection declared by the present invention.

Claims

1. A grating dual-reading unit anti-pollution method, characterized in that: The method consists of the following steps: Step 1: Periodically sample the count value of the reading unit and calculate parameters; Define the sampling period of the grating reading unit count value as T, and sample the readings of each reading unit every time T; name the two reading units of the grating in alphabetical order, namely reading unit A and reading unit B; define the readings obtained from m consecutive samplings of reading unit A as A1, A2, A3, ……, A m , where A m is the latest sampling value, and A m-1 is the second latest sampling value; define the readings obtained from m consecutive samplings of reading unit B as B1, B2, B3, ……, B m , where B m is the latest sampling value, and B m-1 is the second latest sampling value; define the change amount of the i-th adjacent two readings of reading unit A as δA i = |A i+1 - A i | , The change amount of the i-th adjacent two readings of reading unit B is δB i = |B i+1 - B i |; define the total change amount of the last n samplings of reading unit A as SUM(A, n) = |A m - A m-n |, and the total change amount of the last n samplings of reading unit B is SUM(B, n) = |B m - B m-n |, n < m; define the pollution determination threshold for n samplings of reading unit A as T(A, n), and the pollution determination threshold for n samplings of reading unit B as T(B, n); define the pollution determination coefficient for 1 sampling of reading unit A as k1(A, n), and the pollution determination coefficient for 1 sampling of reading unit B as k1(B, n); define the pollution determination coefficient for n samplings of reading unit A as kn(A, n), and the pollution determination coefficient for n samplings of reading unit B as kn(B, n); Step 2: After continuously sampling n times, starting from the (n + 1)-th sampling, judge whether each reading unit has been contaminated according to the following rules; Rule 1: If any of the following conditions is met, it is considered that the reading unit A has been contaminated; otherwise, it is considered that the reading unit A is working properly: (1) SUM(A, n) < kn(A, n) * T(A, n) and SUM(B, n) ≥ T(B, n); (2) There exists at least one δA i < k1(A, n) * T(A, n) and δB i ≥ T(B, n), where i = 1, 2,..., n - 1; (3) There is a distance marker signal or index signal on the grating, and the actual count value of the reading unit A is not equal to the nominal count value between the distance marker signal or index signal; Rule 2: If any of the following conditions is met, it is considered that the reading unit B has been contaminated; otherwise, it is considered that the reading unit B is working properly: (1) SUM(B, n) < kn(B, n) * T(B, n) and SUM(A, n) ≥ T(A, n); (2) There exists at least one δB i <k1(B, n)*T(B, n) and δA i ≥T(A, n), where i = 1, 2,..., n - 1; (3) There is a distance marker signal or index signal on the grating, and the actual count value of the reading unit B is not equal to the nominal count value between the distance marker signal or index signal; Step 3: According to the contamination conditions of each reading unit, output grating pulse signals, alarm signals and fault signals according to the following rules; (1) If both the reading unit A and the reading unit B can work properly, output the grating pulse signal of the reading unit A or the grating pulse signal of the reading unit B according to the user configuration; (2) If only one of the reading unit A and the reading unit B is working properly, output the grating pulse signal of the reading unit that can work properly and output an alarm signal; (3) If neither the reading unit A nor the reading unit B can work properly, output a fault signal and do not output a grating pulse signal; (4) Once a reading unit fails to work properly, it will be continuously considered as such until the power is restored or the system is reset and initialized.

2. A grating sensor device using the grating dual reading unit anti-pollution method according to claim 1, characterized in that: The invention comprises at least the following components: a scale grating (1), a reading unit A (2), a reading unit B (13), and an anti-pollution function module (6); wherein the reading unit A (2) is composed of an optical signal transmitting device A (3), an optical signal receiving device A (4), and an electric signal processing component A (5); the reading unit B (13) is composed of an optical signal transmitting device B (11), an optical signal receiving device B (12), and an electric signal processing component B (10); and the anti-pollution function module (6) is composed of an alarm signal output component (7), a fault signal output component (8), and a grating pulse processing component (9); the scale grating (1) is engraved with a transmittance or reflectance The plurality of parallel lines with different rates from the base material; the reading unit A (2) cooperates with the scale grating (1) to independently complete the position sensing of the grating sensor and outputs the obtained position reading to the anti-pollution function module (6); the reading unit B (13) cooperates with the scale grating (1) to independently complete the position sensing of the grating sensor and outputs the obtained position reading to the anti-pollution function module (6); the optical signal emitting device A (3) and the optical signal emitting device B (11) can emit measurement light that is converged and modulated through a dedicated optical path; the measurement light enters the optical signal receiving device A (4) or the optical signal receiving device B after being reflected or transmitted by the scale grating (1). (12); the optical signal receiving device A (4) and the optical signal receiving device B (12) receive the reflected or transmitted measuring light, convert the optical signal into an electrical signal through the photosensitive device, and then send it to the electrical signal processing component A (5) or the electrical signal processing component B (10) respectively; the electrical signal processing component A (5) and the electrical signal processing component B (10) convert the electrical signal into a grating pulse signal representing the position information output by the grating sensor; the anti-pollution function module (6) determines whether the two reading units are contaminated by the collected grating pulse signal; when it is necessary to output an alarm signal, the alarm signal is output by the alarm signal output device (7); when it is necessary to output a fault signal, the fault signal is output by the fault signal output device (8); the grating pulse processing device (9) is implemented by FPGA, CPLD or MCU as the core device, completes the digital operation and logic operation functions of the anti-pollution function, and outputs the grating pulse signal determined by the logic judgment function.

3. The grating sensor device using the grating dual reading unit anti-pollution method according to claim 2, characterized in that: The alarm signal output device (7) is selected from any one of a light emitting diode, a power driving transistor, a MOS tube, a serial communication interface UART, SPI, and an I2C bus for output.

4. The grating sensor device using the grating dual reading unit anti-pollution method according to claim 2, characterized in that: The fault signal output device (8) may be a light emitting diode, a power driving transistor or a MOS tube, or may be a serial communication interface UART or SPI or I2C bus output.

Citation Information

Patent Citations

  • PCB Drill Bit Inspection Method and Device

    CN102294622A

  • Grating ruler, grating ruler reading method and device and computer storage medium

    CN112762836A