Photoelectric sensor precision control method, controller, medium and product

By calculating the environmental impact coefficient and comprehensive compensation parameters in the photoelectric sensor, the problem of inaccurate measurement accuracy of photoelectric sensors in complex environments is solved, and dynamic compensation and improvement of photoelectric sensor accuracy is achieved.

CN119779376AActive Publication Date: 2025-04-08SHENZHEN HUAYIFENG TECH CO LTD

Patent Information

Application Number
CN202411922107.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-08
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

Existing photoelectric sensor accuracy control methods are difficult to effectively reflect the coupling effect between complex environmental factors (such as temperature, humidity, and light), resulting in inaccurate measurement accuracy.

Method used

By obtaining the light intensity value of the high and low reference light signal of the photoelectric sensor under the current environmental data, calculating the intensity deviation value, and determining the environmental impact coefficients based on the ambient temperature, humidity, light intensity and deviation values, and calculating the comprehensive compensation parameters in combination with the preset environmental impact weight table, it is applied to the photoelectric sensor to achieve dynamic accuracy compensation.

Benefits of technology

It effectively eliminates the interference of environmental factors on the measurement results, improves the accuracy and reliability of photoelectric sensor accuracy control, and ensures high-precision detection in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119779376A_ABST
    Figure CN119779376A_ABST
Patent Text Reader

Abstract

The invention discloses a photoelectric sensor precision control method, a controller, a medium and a product, and the method comprises the steps: obtaining a first detection light intensity value generated by a photoelectric sensor through collecting a first reference light signal and a second detection light intensity value generated by a second reference light signal under the current environment data; respectively comparing the first detection light intensity value with a first reference light intensity value and comparing the second detection light intensity value with a second reference light intensity value to obtain a first intensity deviation value and a second intensity deviation value; if the first intensity deviation value is not in a preset first error range or the second intensity deviation value is not in a preset second error range, determining an environment temperature influence coefficient, an environment humidity influence coefficient and an environment illumination intensity influence coefficient; comprehensive compensation parameters are determined; and applying the comprehensive compensation parameter to the photoelectric sensor. By implementing the method, the accuracy of precision control of the photoelectric sensor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of optoelectronic technology, and in particular to a method, controller, medium and product for controlling the precision of a photoelectric sensor. Background Art

[0002] With the continuous improvement of industrial automation, photoelectric sensors are widely used in industrial detection, medical equipment, smart home and other fields due to their non-contact, fast response and high precision. In actual application, the detection accuracy of photoelectric sensors directly affects the production quality and the reliability of equipment operation. Therefore, ensuring the detection accuracy of photoelectric sensors has become the focus of industry attention.

[0003] At present, the accuracy control method of photoelectric sensors mainly obtains the measurement data collected by the photoelectric sensor, fits the measurement data through a preset data model, obtains the fitting curve corresponding to the measurement data, and then compares the fitting curve with the preset calibration curve to determine the difference between the two curves, and calibrates the accuracy of the photoelectric sensor based on the difference.

[0004] However, there are limitations to the fitting method using a preset data model. Due to the complex and changeable actual working environment, factors such as ambient temperature, humidity and light will affect the detection accuracy of the photoelectric sensor at the same time, and there is a coupling effect between these environmental factors. A single data fitting model is difficult to fully reflect the comprehensive impact of various environmental factors. Summary of the invention

[0005] The present application provides a photoelectric sensor precision control method, controller, medium and product for improving the accuracy of photoelectric sensor precision control.

[0006] In a first aspect, the present application provides a method for controlling the accuracy of a photoelectric sensor, which is applied to a controller. The method includes: obtaining a first detection light intensity value generated by a first reference light signal collected by the photoelectric sensor and a second detection light intensity value generated by a second reference light signal collected by the photoelectric sensor under current environmental data, wherein the current environmental data includes an ambient temperature value, an ambient humidity value, and an ambient light intensity value, the first reference light signal corresponds to a first reference light intensity value, the second reference light signal corresponds to a second reference light intensity value, and the intensity of the first reference light signal is higher than that of the second reference light signal; respectively comparing the first detection light intensity value with the first reference light intensity value, and the second detection light intensity value with the second reference light intensity value, to obtain a first intensity deviation value and a second intensity deviation value. deviation value; if the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value, determine the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient; according to the ambient temperature influence coefficient, the ambient humidity influence coefficient, the ambient light intensity influence coefficient, the ambient temperature weight, the ambient humidity weight and the ambient light intensity weight, determine the comprehensive compensation parameter, the ambient temperature weight, the ambient humidity weight and the ambient light intensity weight are determined by a preset environmental influence weight table; the comprehensive compensation parameter is applied to the photoelectric sensor.

[0007] By adopting the above technical solution, the controller obtains the detected light intensity value of the two reference light signals, high and low, collected by the photoelectric sensor under the current environmental data, and compares it with the reference light intensity value to obtain the intensity deviation value. When the intensity deviation value exceeds the preset error range, the controller determines each environmental impact coefficient based on the current environmental data (ambient temperature, ambient humidity, light intensity) and the intensity deviation value, and then determines the comprehensive compensation parameters based on each environmental impact coefficient and the preset environmental impact weight table and applies them to the photoelectric sensor. This solution realizes dynamic compensation adjustment of the measurement accuracy of the photoelectric sensor, which can effectively eliminate the interference of environmental factors on the measurement results and improve the accuracy and reliability of the precision control of the photoelectric sensor.

[0008] In combination with some embodiments of the first aspect, in some embodiments, if the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value, the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient are determined, specifically including: searching in a first environmental influence coefficient table for the first ambient temperature influence coefficient, the first ambient humidity influence coefficient and the first ambient light intensity influence coefficient that best match the first intensity deviation value, wherein the first environmental influence coefficient table includes the first intensity The correspondence between the deviation value and the environmental influence coefficient; searching the second environmental temperature influence coefficient, the second environmental humidity influence coefficient and the second environmental light intensity influence coefficient that best match the second intensity deviation value in the second environmental influence coefficient table, wherein the second environmental influence coefficient table includes the correspondence between the second intensity deviation value and the environmental influence coefficient; based on the first environmental temperature influence coefficient, the first environmental humidity influence coefficient, the first environmental light intensity influence coefficient, the second environmental temperature influence coefficient, the second environmental humidity influence coefficient and the second environmental light intensity influence coefficient, determine the environmental temperature influence coefficient, the environmental humidity influence coefficient and the environmental light intensity influence coefficient.

[0009] By adopting the above technical solution, the controller pre-establishes two environmental impact coefficient tables, which respectively store the corresponding relationship between the intensity deviation values ​​of the high and low reference light signals and the environmental impact coefficients, so that the most matching ambient temperature impact coefficient, ambient humidity impact coefficient and ambient light intensity impact coefficient can be quickly found, which simplifies complex calculations, improves the response speed, and ensures the accuracy and reliability of compensation.

[0010] In combination with some embodiments of the first aspect, in some embodiments, before the step of obtaining a first detection light intensity value generated by the photoelectric sensor collecting a first reference light signal and a second detection light intensity value generated by the photoelectric sensor collecting a second reference light signal under the current environmental data, the method also includes: obtaining the working time of the photoelectric sensor; if the working time exceeds a preset time threshold, obtaining a self-test parameter of the photoelectric sensor; judging whether the photoelectric sensor is in a normal working state according to the self-test parameter; if the photoelectric sensor is in the normal working state, executing the step of obtaining a first detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and a second detection light intensity value generated by the photoelectric sensor collecting the second reference light signal under the current environmental data.

[0011] By adopting the above technical solution, the controller will only perform subsequent compensation when the working time of the photoelectric sensor exceeds the limit and the photoelectric sensor is judged to be in a normal working state according to the self-test parameters. By adding a state monitoring mechanism for the photoelectric sensor, the abnormality of the photoelectric sensor itself can be discovered in time to ensure that the photoelectric sensor is compensated in a stable working state, eliminate the measurement deviation caused by the fault of the photoelectric sensor itself, avoid invalid compensation, improve the reliability and effectiveness of the precision control of the photoelectric sensor, and also extend the service life of the photoelectric sensor.

[0012] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining whether the photoelectric sensor is in a normal working state based on the self-test parameters, the method further includes: if the photoelectric sensor is not in the normal working state, determining the self-test abnormality type of the photoelectric sensor, the self-test abnormality type including at least one of signal acquisition abnormality, voltage abnormality and temperature abnormality; determining and executing a processing strategy corresponding to the self-test abnormality type from a preset abnormality processing strategy library.

[0013] By adopting the above technical solution, when the controller detects that the photoelectric sensor is working abnormally, it can intelligently identify the type of self-test abnormality, and combine the preset abnormality handling strategy library to quickly match and execute the corresponding handling strategy for different types of self-test abnormality, so as to realize automatic diagnosis and handling of faults. This classification processing greatly improves the accuracy and efficiency of fault handling, and avoids the blindness and ineffectiveness that may be caused by the use of a unified processing method.

[0014] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining the processing strategy corresponding to the self-test exception type from the preset exception processing strategy library, the method also includes: if the number of executions of the processing strategy exceeds the preset number threshold and the photoelectric sensor is not in the normal working state, a photoelectric sensor exception report is generated, and the photoelectric sensor exception report includes the self-test exception type and the historical processing strategy; and the photoelectric sensor exception report is sent to the management end.

[0015] By adopting the above technical solution, when the processing strategy cannot be restored to normal working state after multiple executions, the controller will automatically generate a photoelectric sensor abnormality report, thereby effectively avoiding invalid repeated processing and promptly reminding the management end to perform manual intervention, which helps to quickly locate the root cause of the problem and improve the maintainability and fault handling efficiency of the photoelectric sensor.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of applying the comprehensive compensation parameter to the photoelectric sensor, the method also includes: obtaining a third detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and a fourth detection light intensity value generated by the photoelectric sensor collecting the second reference light signal; if the deviation value between the third detection light intensity value and the first reference light intensity value is within the preset first error range and the deviation value between the fourth detection light intensity value and the second reference light intensity value is within the preset second error range, then storing the current environmental data and the comprehensive compensation parameter.

[0017] By adopting the above technical solution, after applying the comprehensive compensation parameters, the controller collects the two high and low reference light signals again and detects the deviation value, realizing real-time verification of the compensation effect. When the compensated measurement results meet the accuracy requirements, the controller stores the current environmental data and the comprehensive compensation parameters, and establishes a database of the corresponding relationship between the current environmental conditions and the effective compensation parameters. This self-verification and data storage mechanism not only ensures the effectiveness of the compensation, but also provides a reference for subsequent rapid compensation under similar environmental conditions.

[0018] In combination with some embodiments of the first aspect, in some embodiments, after the steps of obtaining the third detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and the fourth detection light intensity value generated by the photoelectric sensor collecting the second reference light signal, the method further includes: if the deviation value between the third detection light intensity value and the first reference light intensity value is not within the preset first error range or the deviation value between the fourth detection light intensity value and the second reference light intensity value is not within the preset second error range, then adjusting the preset environmental impact weight table to obtain an optimized environmental impact weight table; based on the optimized environmental impact weight table, calculating the comprehensive compensation parameter and applying it to the photoelectric sensor.

[0019] By adopting the above technical solution, the controller can automatically adjust the preset environmental impact weight table when it detects that the compensation effect is not ideal. This adaptive optimization mechanism can dynamically adjust the impact weight of each environmental factor according to the actual compensation effect, making the compensation more in line with the actual situation. Through repeated verification and optimization, the accuracy and adaptability of compensation are continuously improved, thus forming a closed-loop optimization process of continuous self-improvement.

[0020] In a second aspect, an embodiment of the present application provides a controller, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the controller to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product runs on a controller, enables the controller to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a controller, cause the controller to execute the method described in the first aspect and any possible implementation of the first aspect.

[0023] It is understandable that the controller provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By adopting the above technical solution, the controller obtains the detected light intensity value of the high and low reference light signals collected by the photoelectric sensor under the current environmental data, and compares it with the reference light intensity value to obtain the intensity deviation value. When the intensity deviation value exceeds the preset error range, the controller determines each environmental impact coefficient based on the current environmental data (ambient temperature, ambient humidity, light intensity) and the intensity deviation value, and then determines the comprehensive compensation parameters based on each environmental impact coefficient and the preset environmental impact weight table and applies them to the photoelectric sensor. This solution realizes dynamic compensation adjustment of the measurement accuracy of the photoelectric sensor, which can effectively eliminate the interference of environmental factors on the measurement results and improve the accuracy and reliability of the precision control of the photoelectric sensor.

[0025] 2. By adopting the above technical solution, the controller pre-establishes two environmental impact coefficient tables, which respectively store the corresponding relationship between the intensity deviation values ​​of the high and low reference light signals and the environmental impact coefficients, so that the most matching ambient temperature impact coefficient, ambient humidity impact coefficient and ambient light intensity impact coefficient can be quickly found, which simplifies complex calculations, improves response speed, and ensures the accuracy and reliability of compensation.

[0026] 3. By adopting the above technical solution, the controller will only perform subsequent compensation when the working time of the photoelectric sensor exceeds the limit and the photoelectric sensor is judged to be in a normal working state according to the self-test parameters. By adding a state monitoring mechanism for the photoelectric sensor, the abnormality of the photoelectric sensor itself can be discovered in time to ensure that the photoelectric sensor is compensated in a stable working state, eliminate the measurement deviation caused by the fault of the photoelectric sensor itself, avoid invalid compensation, improve the reliability and effectiveness of the precision control of the photoelectric sensor, and also extend the service life of the photoelectric sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of a method for controlling the accuracy of a photoelectric sensor in an embodiment of the present application; Figure 2 is another flow chart of the method for controlling the accuracy of a photoelectric sensor in an embodiment of the present application; Figure 3 It is a schematic diagram of a physical device structure of a controller in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.

[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0030] The following is a description of the process of the method provided by this implementation. Figure 1 , which is a flow chart of the method for controlling the accuracy of a photoelectric sensor in an embodiment of the present application.

[0031] S101, obtaining a first detection light intensity value generated by a first reference light signal collected by a photoelectric sensor and a second detection light intensity value generated by a second reference light signal collected by the photoelectric sensor under current environmental data, wherein the current environmental data includes an environmental temperature value, an environmental humidity value, and an environmental light intensity value, the first reference light signal corresponds to a first reference light intensity value, the second reference light signal corresponds to a second reference light intensity value, and the intensity of the first reference light signal is higher than that of the second reference light signal; Among them, the current environmental data refers to the real-time physical parameter set of the environment in which the photoelectric sensor is located; the ambient temperature value refers to the real-time temperature value in the environment, in degrees Celsius; the ambient humidity value refers to the relative humidity percentage in the environment; the ambient light intensity value refers to the brightness level of the light in the environment, in lux; the reference light signal refers to the light signal emitted by a standard light source with known and stable intensity; the first reference light signal and the second reference light signal respectively represent the light signals emitted by two standard light sources with different intensity levels, and the intensity of the first reference light signal is greater than the intensity of the second reference light signal; the detection light intensity value refers to the electrical quantization value converted after the photoelectric sensor receives the precise light signal; the reference light intensity value refers to the standard output value that the photoelectric sensor should generate when receiving the reference light signal under standard environmental conditions. For example, the first reference light signal can be a standard light signal generated by a 100cd LED light source, and its corresponding first reference light intensity value is 5.0V; the second reference light signal can be a standard light signal generated by a 50cd LED light source, and its corresponding second reference light intensity value is 2.5V.

[0032] Specifically, first, the controller collects the current environmental data in real time through the integrated environmental sensor, including the current environmental temperature value, environmental humidity value and environmental light intensity value. Then, the controller controls the light source device to emit two reference light signals of preset intensities in sequence, and the intensity of the first reference light signal is significantly higher than the intensity of the second reference light signal to cover different measurement ranges. The controller collects and records the detection light intensity values ​​output by the photoelectric sensor when receiving the two reference light signals, as the first detection light intensity value and the second detection light intensity value, respectively.

[0033] S102, respectively comparing the first detected light intensity value with the first reference light intensity value, and the second detected light intensity value with the second reference light intensity value, to obtain a first intensity deviation value and a second intensity deviation value; Among them, the comparison operation refers to the process of quantitatively comparing the reference light intensity value with the detection light intensity value; the first detection light intensity value refers to the actual measured output of the photoelectric sensor for the first reference light signal; the first reference light intensity value refers to the ideal output value that the first reference light signal should obtain under standard conditions; the second detection light intensity value refers to the actual measured output of the photoelectric sensor for the second reference light signal; the second reference light intensity value refers to the ideal output value that the second reference light signal should obtain under standard conditions; the intensity deviation value is used to indicate the degree of difference between the reference light intensity value and the detection light intensity value. For example, when the first detection light intensity value is 4.8V and the first reference light intensity value is 5.0V, the first intensity deviation value is -0.2V, indicating that the measured value is 0.2V lower than the ideal value.

[0034] Specifically, first, the controller reads the standard reference light intensity values ​​corresponding to the two reference light signals. Then, the controller calculates the difference between the two sets of detected light intensity values ​​and the reference light intensity values ​​through mathematical operations: the first detected light intensity value is subtracted from the first reference light intensity value to obtain the first intensity deviation value, and the second detected light intensity value is subtracted from the second reference light intensity value to obtain the second intensity deviation value. The intensity deviation value can directly use the algebraic difference to retain the direction information of the intensity deviation, or it can take the absolute value to only focus on the magnitude of the intensity deviation. The controller stores the two calculated intensity deviation values ​​in a special deviation data buffer for subsequent judgment and analysis. The calculation process uses high-precision floating-point operations to ensure calculation accuracy.

[0035] S103, if the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, determining the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value; Among them, the preset first error range refers to the deviation range allowed for the measurement of high-intensity reference light signals; the preset second error range refers to the deviation range allowed for the measurement of low-intensity reference light signals; the environmental temperature influence coefficient refers to the degree of influence of environmental temperature changes on measurement accuracy; the environmental humidity influence coefficient refers to the degree of influence of environmental humidity changes on measurement accuracy; the environmental light intensity influence coefficient refers to the degree of influence of environmental light intensity on measurement accuracy; the environmental influence coefficient is a dimensionless value, usually between 0 and 1, and the larger the value, the more significant the influence of the environmental factor. For example, an environmental temperature influence coefficient of 0.8 means that the environmental temperature change has a strong influence on the measurement result, while an environmental temperature influence coefficient of 0.2 means that the environmental temperature change has a weak influence on the measurement result.

[0036] Specifically, the controller compares the first intensity deviation value with the preset first error range, and compares the second intensity deviation value with the preset second error range. If any intensity deviation value exceeds the preset error range, the controller starts the environmental impact analysis program. The environmental impact analysis program comprehensively considers the current ambient temperature value, ambient humidity value, ambient light intensity value and two intensity deviation values, and calculates the environmental impact coefficients of the three environmental factors through a preset environmental impact analysis model. The preset environmental impact analysis model can be based on a neural network algorithm or a multivariate regression analysis method. The preset environmental impact analysis model is obtained by training a large amount of historical data. The controller stores the three calculated environmental impact coefficients and waits for the subsequent comprehensive compensation parameter calculation program to be called. The entire analysis process is executed in real time to ensure that the impact of environmental changes on measurement accuracy can be reflected in a timely manner.

[0037] S104, determining a comprehensive compensation parameter according to the ambient temperature influence coefficient, the ambient humidity influence coefficient, the ambient light intensity influence coefficient, the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight, wherein the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight are determined by a preset environmental influence weight table; Among them, the environmental temperature influence coefficient refers to the influence of environmental temperature changes on the measurement results; the environmental humidity influence coefficient refers to the influence of environmental humidity changes on the measurement results; the environmental light intensity influence coefficient refers to the influence of environmental light intensity changes on the measurement results; the environmental temperature weight refers to the importance coefficient of the environmental temperature factor in the calculation of the comprehensive compensation parameters; the environmental humidity weight refers to the importance coefficient of the environmental humidity factor in the calculation of the comprehensive compensation parameters; the environmental light intensity weight refers to the importance coefficient of the environmental light intensity factor in the calculation of the comprehensive compensation parameters; the preset environmental influence weight table refers to the data comparison table storing the weight coefficients of each environmental factor; the comprehensive compensation parameter refers to the final correction parameter calculated according to the influence of each environmental factor. For example, when the environmental temperature influence coefficient is 0.8 and the environmental temperature weight is 0.5, the contribution value of the environmental temperature to the final comprehensive compensation parameter is 0.4.

[0038] Specifically, first, the controller searches the preset environmental impact weight table for the ambient temperature weight, ambient humidity weight, and ambient light intensity weight corresponding to the current environmental conditions. Then, the controller multiplies each environmental impact coefficient by its corresponding environmental weight value to obtain the weighted impact value of the environmental factor. Next, the controller comprehensively calculates the three weighted impact values ​​according to the preset mathematical calculation model to obtain the final comprehensive compensation parameters. The preset mathematical calculation model can be a simple linear superposition or a nonlinear model that considers the interaction between environmental factors. The controller needs to ensure the numerical stability of the calculation process and verify the validity of the calculation results.

[0039] S105: Apply the comprehensive compensation parameter to the photoelectric sensor.

[0040] Among them, the comprehensive compensation parameter refers to the calibration factor used to correct the measurement result of the photoelectric sensor; application refers to the process of writing the comprehensive compensation parameter into the control register or configuration area of ​​the photoelectric sensor; the photoelectric sensor refers to the photoelectric detection device that needs to be precision controlled. For example, the comprehensive compensation parameter can be a correction coefficient in the range of 0.8-1.2, which is directly multiplied by the original output value of the photoelectric sensor to obtain the corrected measurement result.

[0041] Specifically, first, the controller checks the current working state of the photoelectric sensor to ensure that the photoelectric sensor is in a state that can receive the configuration. Then, the controller writes the comprehensive compensation parameters into the specified storage area of ​​the photoelectric sensor through a predefined communication interface. After writing is completed, the controller requires the photoelectric sensor to read back the parameter values ​​for verification to ensure that the comprehensive compensation parameters are written correctly. If the comprehensive compensation parameters fail to be written or the read-back parameter values ​​do not match, it is necessary to retry the write operation or trigger the exception handling process. After the comprehensive compensation parameters are successfully applied, the controller notifies the photoelectric sensor to use the new comprehensive compensation parameters for subsequent measurements.

[0042] Optionally, under normal circumstances, if the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value, determining the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient can be achieved in the following manner, which is not limited here: searching in the first environmental influence coefficient table for the first ambient temperature influence coefficient, the first ambient humidity influence coefficient and the first ambient light intensity influence coefficient that best match the first intensity deviation value, wherein the first environmental influence coefficient table includes the first intensity The correspondence between the deviation value and the environmental influence coefficient; searching the second environmental temperature influence coefficient, the second environmental humidity influence coefficient and the second environmental light intensity influence coefficient that best match the second intensity deviation value in the second environmental influence coefficient table, wherein the second environmental influence coefficient table includes the correspondence between the second intensity deviation value and the environmental influence coefficient; based on the first environmental temperature influence coefficient, the first environmental humidity influence coefficient, the first environmental light intensity influence coefficient, the second environmental temperature influence coefficient, the second environmental humidity influence coefficient and the second environmental light intensity influence coefficient, determine the environmental temperature influence coefficient, the environmental humidity influence coefficient and the environmental light intensity influence coefficient.

[0043] By adopting the above technical solution, the controller obtains the detected light intensity value of the two reference light signals, high and low, collected by the photoelectric sensor under the current environmental data, and compares it with the reference light intensity value to obtain the intensity deviation value. When the intensity deviation value exceeds the preset error range, the controller determines each environmental impact coefficient based on the current environmental data (ambient temperature, ambient humidity, light intensity) and the intensity deviation value, and then determines the comprehensive compensation parameters based on each environmental impact coefficient and the preset environmental impact weight table and applies them to the photoelectric sensor. This solution realizes dynamic compensation adjustment of the measurement accuracy of the photoelectric sensor, which can effectively eliminate the interference of environmental factors on the measurement results and improve the accuracy and reliability of the precision control of the photoelectric sensor.

[0044] The following is a more detailed description of the process of the method provided by this implementation. Figure 2, is another flow chart of the photoelectric sensor accuracy control method in an embodiment of the present application.

[0045] S201, obtaining the working time of the photoelectric sensor; Among them, the working time refers to the continuous running time of the photoelectric sensor since the last calibration or reset; the photoelectric sensor refers to a sensing device used to convert light signals into electrical signals.

[0046] Specifically, the controller reads the operating time counter inside the photoelectric sensor, which starts counting after the last calibration or reset operation. If the photoelectric sensor supports power-off protection, the controller also needs to read the historical operating time saved in the non-volatile memory. The controller then adds the current count value to the historical operating time to obtain the total operating time of the photoelectric sensor. The total operating time can be recorded in hours, accumulated from the last calibration time, and the total operating time is 168 hours, indicating that the photoelectric sensor has been working for 7 consecutive days.

[0047] S202, if the working time exceeds a preset time threshold, obtaining a self-test parameter of the photoelectric sensor; Among them, the preset duration threshold refers to the working duration threshold that triggers the sensor self-test; the self-test parameter refers to the monitoring data set that reflects the functional status of the photoelectric sensor, including key parameters such as signal acquisition status, power supply voltage, and operating temperature; acquisition refers to the process of reading the internal status data of the photoelectric sensor. For example, the preset duration threshold can be set to 720 hours (i.e. 30 days), and the self-test parameters can include specific values ​​such as signal conversion accuracy, power supply voltage deviation, and chip temperature.

[0048] Specifically, first, the controller compares the acquired working time with the preset time threshold. If the working time exceeds the preset time threshold, the photoelectric sensor self-test program is triggered. The controller sends a self-test command to the photoelectric sensor through a predefined communication protocol, requiring the photoelectric sensor to perform internal state detection. Then, the controller reads the self-test data returned by the photoelectric sensor item by item to obtain the self-test parameters of the photoelectric sensor, including but not limited to: the working state of the signal acquisition channel, the accuracy index of the analog-to-digital converter, the voltage parameters of the power supply circuit, the temperature value of the sensor chip, etc.

[0049] S203, judging whether the photoelectric sensor is in a normal working state according to the self-test parameter; Among them, the self-test parameters are a set of multi-dimensional indicators that reflect the working status of the photoelectric sensor; the normal working status refers to the operating status in which all performance indicators of the photoelectric sensor meet the preset requirements; the state judgment refers to the process of comparing the self-test parameters with the normal range of the preset parameters; the judgment result refers to the Boolean value that determines whether the photoelectric sensor is in a normal working state. For example, when the power supply voltage is within the range of 4.8V-5.2V, the chip temperature is lower than 85℃, and the signal acquisition error is less than 1%, the photoelectric sensor is judged to be in a normal working state.

[0050] Specifically, first, the controller reads the normal value range of each self-test parameter. Then, the controller compares each self-test parameter obtained with the corresponding normal range of the preset parameter: check whether the status flag of the signal acquisition channel is normal, whether the power supply voltage is within the allowable deviation range, whether the chip temperature is lower than the warning value, whether the analog-to-digital conversion accuracy meets the requirements, etc. If all self-test parameters are within the normal range of the preset parameters, it is determined that the photoelectric sensor is in a normal working state, otherwise it is determined that it is not in a normal working state. The controller records the judgment results and specific abnormal items in the status log to provide a basis for subsequent processing.

[0051] S204, if the photoelectric sensor is in the normal working state, executing the step of obtaining a first detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and a second detection light intensity value generated by the photoelectric sensor collecting the second reference light signal under the current environmental data; Specifically, when the controller determines that the photoelectric sensor is in a normal working state, it starts to perform precision control on the photoelectric sensor. For details, please refer to step S101, which will not be described in detail here.

[0052] S205, if the photoelectric sensor is not in the normal working state, determine the self-test abnormality type of the photoelectric sensor, the self-test abnormality type includes at least one of signal acquisition abnormality, voltage abnormality and temperature abnormality; determine and execute the processing strategy corresponding to the self-test abnormality type from the preset abnormality processing strategy library; Among them, the self-test abnormality type refers to the specific classification of the abnormal working state of the photoelectric sensor; the signal acquisition abnormality refers to the failure of the photoelectric conversion or signal processing circuit of the photoelectric sensor; the voltage abnormality refers to the power supply voltage of the photoelectric sensor exceeding the preset voltage working range; the temperature abnormality refers to the chip temperature of the photoelectric sensor exceeding the preset temperature threshold; the preset abnormality processing strategy library refers to the database storing the corresponding processing strategies of various self-test abnormality types; the processing strategy refers to the repair or remedial measures for specific self-test abnormality types. For example, when a voltage abnormality is detected, the corresponding processing strategy may include specific operation steps such as resetting the power supply and adjusting the power supply parameters.

[0053] Specifically, first, the controller analyzes the abnormal items of the self-test parameters and determines the specific self-test abnormality type: if the signal acquisition channel state is abnormal or the conversion accuracy is out of tolerance, it is determined as a signal acquisition abnormality; if the power supply voltage exceeds the range of 4.5V-5.5V, it is determined as a voltage abnormality; if the chip temperature exceeds 90°C, it is determined as a temperature abnormality. Then, the controller searches for a matching processing strategy from the preset exception processing strategy library based on the identified self-test abnormality type. Finally, the processing operation is performed in the order of steps defined by the processing strategy, such as restarting the photoelectric sensor, adjusting parameters, switching working modes, etc. The entire processing process needs to record the content and results of the executed processing strategy to provide a basis for subsequent analysis.

[0054] S206, if the number of times the processing strategy is executed exceeds the preset number threshold and the photoelectric sensor is not in the normal working state, generating a photoelectric sensor abnormality report, the photoelectric sensor abnormality report including the self-test abnormality type and the historical processing strategy; and sending the photoelectric sensor abnormality report to the management end; Among them, the preset number threshold refers to the maximum number of times the processing strategy is allowed to be repeatedly executed; the number of executions refers to the cumulative number of times the processing strategy has been executed for the same self-test exception type; the photoelectric sensor exception report refers to the data document that records the photoelectric sensor fault information; the historical processing strategy refers to the record of all processing methods that have been attempted before; the management end refers to the upper-level management system used to receive and process the photoelectric sensor exception report. For example, the preset number threshold is 3 times. If the restart operation is performed three times in a row and still does not return to normal, a photoelectric sensor exception report needs to be generated and reported.

[0055] Specifically, first, the controller counts the number of executions of the current self-test exception type processing strategy and compares it with the preset number threshold. When the number of executions exceeds the preset number threshold, the controller collects all exception information, including the exception type, occurrence time, environmental conditions, self-test parameters, etc., and organizes the execution records of the historical processing strategies, including the content of the strategy, execution time and execution results of each execution. Then, the controller organizes this information into a photoelectric sensor exception report in a predetermined format. Finally, the photoelectric sensor exception report is sent to the management end through the network communication interface. The entire photoelectric sensor exception report generation and transmission process needs to ensure the integrity and security of the data, and data encryption and transmission confirmation are required when necessary.

[0056] S207, obtaining a first detection light intensity value generated by the photoelectric sensor collecting a first reference light signal and a second detection light intensity value generated by the photoelectric sensor collecting a second reference light signal under current environmental data, wherein the current environmental data includes an environmental temperature value, an environmental humidity value, and an environmental light intensity value, the first reference light signal corresponds to a first reference light intensity value, the second reference light signal corresponds to a second reference light intensity value, and the intensity of the first reference light signal is higher than that of the second reference light signal; For details, please refer to step S101, which will not be described in detail here.

[0057] S208, respectively comparing the first detected light intensity value with the first reference light intensity value, and the second detected light intensity value with the second reference light intensity value, to obtain a first intensity deviation value and a second intensity deviation value; For details, please refer to step S102, which will not be described in detail here.

[0058] S209, if the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, determining the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value; For details, please refer to step S103, which will not be described in detail here.

[0059] S210, determining a comprehensive compensation parameter according to the ambient temperature influence coefficient, the ambient humidity influence coefficient, the ambient light intensity influence coefficient, the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight, wherein the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight are determined by a preset environmental influence weight table; For details, please refer to step S104, which will not be described in detail here.

[0060] S211. Apply the comprehensive compensation parameter to the photoelectric sensor.

[0061] For details, please refer to step S105, which will not be described in detail here.

[0062] S212, obtaining a third detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and a fourth detection light intensity value generated by the photoelectric sensor collecting the second reference light signal; Among them, the first reference light signal refers to the reference light signal emitted by the standard light source with higher intensity; the second reference light signal refers to the reference light signal emitted by the standard light source with lower intensity; the third detection light intensity value refers to the measured output value of the photoelectric sensor for the first reference light signal after applying the comprehensive compensation parameters; the fourth detection light intensity value refers to the measured output value of the photoelectric sensor for the second reference light signal after applying the comprehensive compensation parameters. For example, after applying the comprehensive compensation parameters, the third detection light intensity value of 4.95V is measured for the first reference light signal of 100cd, and the fourth detection light intensity value of 2.48V is measured for the second reference light signal of 50cd.

[0063] Specifically, first, the controller waits for the photoelectric sensor to complete the loading of the comprehensive compensation parameters and the update of the internal state. Then, the controller controls the light source device to send out two reference light signals again in a predetermined order, and each reference light signal is sent for a long enough time to ensure the stability of the measurement. The controller records the measured output of the photoelectric sensor for the two reference light signals after compensation, and obtains the third detection light intensity value and the fourth detection light intensity value respectively. To ensure the reliability of the measurement data, each reference light signal is repeatedly measured multiple times and the data is screened, and the average value is taken as the final result after removing the abnormal values.

[0064] S213, if the deviation value between the third detected light intensity value and the first reference light intensity value is within the preset first error range and the deviation value between the fourth detected light intensity value and the second reference light intensity value is within the preset second error range, storing the current environment data and the comprehensive compensation parameter; Among them, the deviation value refers to the difference between the detected light intensity value and the reference light intensity value; the preset first error range refers to the allowable deviation range for high-intensity light signal measurement; the preset second error range refers to the allowable deviation range for low-intensity light signal measurement; the current environmental data refers to the ambient temperature, ambient humidity and ambient light intensity during measurement; the comprehensive compensation parameter is the calibration factor used to correct the photoelectric sensor. For example, when the third detected light intensity value is 4.95V, the first reference light intensity value is 5.0V, and the preset first error range is ±0.1V, the deviation value -0.05V is within the allowable range.

[0065] Specifically, first, the controller calculates the difference between the third detection light intensity value and the first reference light intensity value, and the difference between the fourth detection light intensity value and the second reference light intensity value. Then, the controller compares the two deviation values ​​with their corresponding preset error ranges. When the two deviation values ​​are both within their respective preset error ranges, it means that the current comprehensive compensation parameters can effectively improve the measurement accuracy. At this time, the controller writes the current environmental data and the corresponding comprehensive compensation parameters as a valid data pair into the parameter storage area of ​​the photoelectric sensor.

[0066] S214. If the deviation value between the third detected light intensity value and the first reference light intensity value is not within the preset first error range or the deviation value between the fourth detected light intensity value and the second reference light intensity value is not within the preset second error range, adjust the preset environmental impact weight table to obtain an optimized environmental impact weight table; based on the optimized environmental impact weight table, calculate the comprehensive compensation parameter and apply it to the photoelectric sensor.

[0067] Among them, the preset environmental impact weight table is the environmental factor weight data set used to calculate the comprehensive compensation parameters; the optimized environmental impact weight table refers to the new environmental factor weight data set adjusted according to the verification results; the weight adjustment refers to the process of re-evaluating the impact of each environmental factor according to the verification results. For example, when the impact of ambient temperature is underestimated, the preset temperature weight can be appropriately increased from 0.3 to 0.4, and the weights of other environmental factors can be adjusted accordingly.

[0068] Specifically, first, the controller analyzes the specific situation of the deviation exceeding the limit, including the magnitude of the exceeding value and the measurement range in which it occurs. Then, the controller evaluates whether the weights of each environmental factor are reasonable based on the deviation characteristics and the current environmental data. Based on the evaluation results, the controller optimizes the preset environmental impact weight table: appropriately increase the weights of environmental factors whose impact is underestimated, and reduce the weights of factors whose impact is overestimated, while ensuring that the sum of all weights remains 1. The controller uses the adjusted optimized environmental impact weight table to recalculate the comprehensive compensation parameters, and finally applies the new comprehensive compensation parameters to the photoelectric sensor and performs verification tests again. The entire optimization process may require multiple iterations until a suitable weight configuration is found.

[0069] The controller in the embodiment of the present invention is described below from the perspective of hardware processing. Figure 3 , which is a schematic diagram of a physical device structure of a controller in an embodiment of the present application.

[0070] It should be noted that Figure 3 The structure of the controller shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0071] like Figure 3As shown, the controller includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, the ROM 302 and the RAM 303 are connected to each other through the bus 304. The input / output (I / O) interface 305 is also connected to the bus 304.

[0072] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0073] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.

[0074] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0075] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.

[0076] Specifically, the controller of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the method for controlling the accuracy of the photoelectric sensor provided in the above embodiment is implemented.

[0077] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the controller described in the above embodiment; or may exist independently without being assembled into the controller. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the controller, the controller implements the photoelectric sensor accuracy control method provided in the above embodiment.

[0078] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0079] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0080] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A method for controlling the accuracy of a photoelectric sensor, characterized in that: Applied to a controller, the method comprises: Acquire a first detection light intensity value generated by the photoelectric sensor collecting a first reference light signal and a second detection light intensity value generated by the photoelectric sensor collecting a second reference light signal under current environmental data, wherein the current environmental data includes an environmental temperature value, an environmental humidity value, and an environmental light intensity value, the first reference light signal corresponds to a first reference light intensity value, the second reference light signal corresponds to a second reference light intensity value, and the intensity of the first reference light signal is higher than that of the second reference light signal; Respectively comparing the first detected light intensity value with the first reference light intensity value, and the second detected light intensity value with the second reference light intensity value, to obtain a first intensity deviation value and a second intensity deviation value; If the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, determining the ambient temperature influence coefficient, the ambient humidity influence coefficient, and the ambient light intensity influence coefficient based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value; Determine a comprehensive compensation parameter according to the ambient temperature influence coefficient, the ambient humidity influence coefficient, the ambient light intensity influence coefficient, the ambient temperature weight, the ambient humidity weight and the ambient light intensity weight, wherein the ambient temperature weight, the ambient humidity weight and the ambient light intensity weight are determined by a preset environmental influence weight table; The comprehensive compensation parameters are applied to the photosensor.

2. The method according to claim 1, characterized in that If the first intensity deviation value is not within a preset first error range or the second intensity deviation value is not within a preset second error range, determining the ambient temperature influence coefficient, the ambient humidity influence coefficient, and the ambient light intensity influence coefficient based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value, specifically includes: Searching for a first environment temperature influence coefficient, a first environment humidity influence coefficient, and a first environment light intensity influence coefficient that best match the first intensity deviation value in a first environment influence coefficient table, wherein the first environment influence coefficient table includes a correspondence between the first intensity deviation value and the environment influence coefficient; Searching for a second environment temperature influence coefficient, a second environment humidity influence coefficient, and a second environment light intensity influence coefficient that best match the second intensity deviation value in a second environment influence coefficient table, wherein the second environment influence coefficient table includes a correspondence between the second intensity deviation value and the environment influence coefficient; Based on the first ambient temperature influence coefficient, the first ambient humidity influence coefficient, the first ambient light intensity influence coefficient, the second ambient temperature influence coefficient, the second ambient humidity influence coefficient and the second ambient light intensity influence coefficient, the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient are determined.

3. The method according to claim 1, characterized in that Before the step of acquiring the first detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and the step of acquiring the second detection light intensity value generated by the photoelectric sensor collecting the second reference light signal under the current environmental data, the method further includes: Obtaining the working time of the photoelectric sensor; If the working time exceeds a preset time threshold, obtaining a self-test parameter of the photoelectric sensor; Determine whether the photoelectric sensor is in a normal working state according to the self-test parameters; If the photoelectric sensor is in the normal working state, the steps of obtaining a first detection light intensity value generated by the photoelectric sensor collecting a first reference light signal and a second detection light intensity value generated by the photoelectric sensor collecting a second reference light signal under the current environmental data are performed.

4. The method according to claim 3, characterized in that After the step of determining whether the photoelectric sensor is in a normal working state according to the self-test parameter, the method further includes: If the photoelectric sensor is not in the normal working state, determining a self-test abnormality type of the photoelectric sensor, wherein the self-test abnormality type includes at least one of a signal acquisition abnormality, a voltage abnormality, and a temperature abnormality; Determine and execute a processing strategy corresponding to the self-check exception type from a preset exception processing strategy library.

5. The method according to claim 4, characterized in that After the step of determining the processing strategy corresponding to the self-check exception type from the preset exception processing strategy library, the method further includes: If the number of times the processing strategy is executed exceeds a preset number threshold and the photoelectric sensor is not in the normal working state, a photoelectric sensor abnormality report is generated, and the photoelectric sensor abnormality report includes the self-test abnormality type and the historical processing strategy; The photoelectric sensor abnormality report is sent to the management end.

6. The method according to claim 1, characterized in that After the step of applying the comprehensive compensation parameter to the photoelectric sensor, the method further comprises: Acquire a third detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and a fourth detection light intensity value generated by the photoelectric sensor collecting the second reference light signal; If the deviation between the third detected light intensity value and the first reference light intensity value is within the preset first error range and the deviation between the fourth detected light intensity value and the second reference light intensity value is within the preset second error range, the current environment data and the comprehensive compensation parameter are stored.

7. The method according to claim 6, characterized in that After the step of obtaining a third detection light intensity value generated by the photoelectric sensor collecting the first reference light signal and a fourth detection light intensity value generated by the photoelectric sensor collecting the second reference light signal, the method further includes: If the deviation value between the third detected light intensity value and the first reference light intensity value is not within the preset first error range or the deviation value between the fourth detected light intensity value and the second reference light intensity value is not within the preset second error range, adjusting the preset environmental impact weight table to obtain an optimized environmental impact weight table; Based on the optimized environmental impact weight table, the comprehensive compensation parameter is calculated and applied to the photoelectric sensor.

8. A controller, characterized in that: The controller includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the controller to execute the method described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a controller, the controller is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product runs on a controller, the controller is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, device and mobile terminal for calibrating light sensor

    CN109059987A

  • Motor control method, device and system based on sensor deviation self-correction

    CN112910353A

  • Temperature compensation method and system based on NDIR gas sensor and computer readable storage medium

    CN114076743A

  • Method, system and device for resisting ambient light interference and storage medium

    CN117687110A

  • Adaptive compensation photoelectric sensor optimization method and system, and storage medium

    CN117972457A

Cited By

  • Photoelectric sensor and mounting structure

    CN121067924A

  • Photoelectric sensor and mounting structure

    CN121067924B