Encoder life warning method and encoder
By analyzing the feedback electrical signal and running time data of the photoelectric encoder, calculating the light attenuation value, and using the light attenuation curve to determine the life warning result, the problem of sudden damage to the photoelectric encoder is solved, early warning and life extension are achieved, and production efficiency is improved. and cost savings.
Patent Information
- Application Number
- CN202211293467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-10-21
AI Technical Summary
Photoelectric encoders are prone to sudden damage during the intelligent manufacturing process, resulting in damage to production interests. It is difficult to effectively warn and prevent with existing technology.
By obtaining the feedback electrical signal of the encoder, analyzing the signal outside the light quantity reference range, obtaining the running time data, calculating the light attenuation value, and determining the life warning result based on the light attenuation curve, an early warning is issued to the customer in advance to prevent damage.
It achieves early warning of the life of the photoelectric encoder, avoids production losses caused by sudden damage, extends the service life of the equipment, improves production efficiency and user cost savings.
Smart Images

Figure CN115628768B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of encoders, and in particular to an encoder life warning method and an encoder. Background Art
[0002] At present, with the in-depth development of intelligent manufacturing, the demand for intelligence in various production links is getting higher and higher. As an important part of intelligent manufacturing, photoelectric encoders are used in many scenarios. However, during the operation process, photoelectric encoders may be suddenly damaged, which will cause damage to production interests. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiments of the present invention provide a life warning method for an encoder and an encoder, which can avoid the problem of loss of production benefits caused by sudden damage to the encoder.
[0005] An embodiment of the first aspect of the present invention provides a life warning method for an encoder, which is applied to an encoder, wherein the encoder includes a light source and a photocell module, and the method includes:
[0006] Acquire a feedback electrical signal of the encoder, wherein the feedback electrical signal is an electrical signal converted by the photocell module according to the received light information output by the light source;
[0007] When the feedback electrical signal is outside the light quantity reference range, acquiring operation time data;
[0008] Obtaining a light attenuation value according to the feedback electrical signal and a preset light quantity reference value;
[0009] A life warning result is determined according to the light attenuation value, the operating time data and a preset light attenuation curve.
[0010] The life warning method of the encoder according to the embodiment of the first aspect of the present invention has at least the following beneficial effects: during the operation of the encoder, the feedback electrical signal sent by the encoder is obtained. When the obtained feedback electrical signal is outside the light reference range, it indicates that there is a problem with the encoder. At this time, it is necessary to further detect and judge the actual problem of the encoder, then obtain the running time data of the encoder, and obtain the light attenuation value according to the feedback electrical signal and the preset light reference value, and determine the life warning result according to the light attenuation value, the running time data and the preset light attenuation curve. In the technical solution of this embodiment, according to the light attenuation curve and the relevant operating data, the life warning result of the encoder detected by the target is issued to the customer, so as to achieve early warning of the life of the encoder to the customer, and prevent the problem of sudden damage to the encoder during the operation and loss of benefits.
[0011] In some embodiments, when the feedback electrical signal is outside the light quantity reference range, the method further includes:
[0012] Adjusting the brightness of the encoder's light source so that the feedback electrical signal is within a light quantity reference range;
[0013] The running time data and the number of brightness adjustments corresponding to the current brightness adjustment of the light source are recorded.
[0014] In some embodiments, determining the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes:
[0015] When a first point formed by the light attenuation value and the operating time data coincides with a second point in the light attenuation curve, obtaining an adjustable brightness amount of the light source;
[0016] A life warning result is determined according to the adjustable brightness amount and a preset maximum adjustment amount.
[0017] In some embodiments, the method further comprises:
[0018] When the adjustable brightness reaches a maximum adjustment value, the life warning result is determined to be a first warning result, and the first warning result indicates that the encoder with an aging problem needs to be replaced.
[0019] In some embodiments, determining the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes:
[0020] In a case where a first point formed by the light attenuation value and the operating time data does not coincide with a second point in the light attenuation curve, obtaining an adjustable brightness amount of the light source;
[0021] When the adjustable brightness reaches the maximum value of the adjustment value, obtaining the recorded number of brightness adjustments and the running time data corresponding to the number of brightness adjustments;
[0022] A life warning result is determined according to the brightness adjustment times and the operating time data corresponding to the brightness adjustment times.
[0023] In some embodiments, determining the life warning result according to the number of brightness adjustments and the operating time data corresponding to the number of brightness adjustments includes:
[0024] The brightness adjustment times and the running time data corresponding to the brightness adjustment times, to obtain the adjustment time intervals of the running time data corresponding to a plurality of adjacent brightness adjustment times;
[0025] The life warning result is determined according to the adjustment time interval and the preset interval uniformity condition.
[0026] In some embodiments, determining the life warning result according to the adjustment time interval and the preset interval uniformity condition includes:
[0027] In the case where the adjustment time interval meets the preset interval uniformity condition, determining that the life warning result is a second warning result, the second warning result indicates that there is a contamination problem in the encoder; and / or,
[0028] When the adjustment time interval does not meet the preset interval uniformity condition, the life warning result is determined to be a third warning result, and the third warning result indicates that the motor of the encoder has a shaft jump problem.
[0029] In some embodiments, determining the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes:
[0030] When a first point formed by the light attenuation value and the operating time data coincides with a second point in the light attenuation curve, the life warning result is determined to be a fourth warning result, and the fourth warning result indicates that the light source of the encoder has an aging problem.
[0031] In some embodiments, determining the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes:
[0032] When the first point formed by the light attenuation value and the operating time data does not coincide with the second point in the light attenuation curve, the life warning result is determined to be the fifth warning result, and the fifth warning result indicates that there is a contamination problem with the encoder or a shaft jump problem with the motor of the encoder.
[0033] A second aspect of the present invention provides an encoder, comprising:
[0034] A light source for emitting light information;
[0035] A photocell module, used for converting the received light information output by the light source into a feedback electrical signal;
[0036] The controller is used to obtain the feedback electrical signal; when the feedback electrical signal is outside the light quantity reference range, obtain the operating time data; obtain the light attenuation value according to the feedback electrical signal and the preset light quantity reference value; and determine the life warning result according to the light attenuation value, the operating time data and the preset light attenuation curve.
[0037] In some embodiments, a light source driving module is further included, and the light source driving module is used to adjust the brightness of the light source of the encoder according to the instruction of the controller so that the feedback electrical signal is within the light quantity reference range.
[0038] In some embodiments, a data storage module connected to the controller is further included, and the data storage module is used to record the running time data and the number of brightness adjustments corresponding to the current brightness adjustment of the light source.
[0039] In some embodiments, the life warning result is determined according to the light attenuation value, the operating time data and the light attenuation curve; and the controller is further configured to:
[0040] When a first point formed by the light attenuation value and the operating time data coincides with a second point in the light attenuation curve, obtaining an adjustable brightness amount of the light source, and determining a life warning result according to the adjustable brightness amount and a preset maximum adjustment amount;
[0041] Alternatively, when a first point formed by the light attenuation value and the operating time data does not coincide with a second point in the light attenuation curve, the adjustable brightness amount of the light source is obtained, and when the adjustable brightness amount reaches a maximum adjustment amount, the recorded number of brightness adjustments and the operating time data corresponding to the number of brightness adjustments are obtained, and a life warning result is determined based on the number of brightness adjustments and the operating time data corresponding to the number of brightness adjustments.
[0042] The third aspect of the present invention provides a controller, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the life warning method for the encoder described in the first aspect when executing the computer program.
[0043] A fourth aspect of the present invention provides an encoder, comprising the controller described in the third aspect.
[0044] A fifth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the life warning method of the encoder as described in the first aspect.
[0045] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a schematic diagram of a system architecture platform for executing a life warning method for an encoder provided by an embodiment of the present invention;
[0047] Figure 2 is a schematic diagram of an encoder for implementing a life warning method of an encoder provided by an embodiment of the present invention;
[0048] Figure 3 It is a flow chart of a life warning method of an encoder provided by an embodiment of the present invention;
[0049] Figure 4 is a schematic diagram of a light attenuation curve of an encoder provided by an embodiment of the present invention;
[0050] Figure 5 is a flow chart of a life warning method for an encoder provided by another embodiment of the present invention;
[0051] Figure 6 is a flow chart of a life warning method for an encoder provided by another embodiment of the present invention;
[0052] Figure 7 is a flow chart of a life warning method for an encoder provided by another embodiment of the present invention;
[0053] Figure 8 This is a flow chart of a life warning method for an encoder provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the characteristics, operations or features described in the specification can be combined in any appropriate manner to form various implementation methods. At the same time, the steps or actions in the method description can also be replaced or adjusted in order in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the accompanying drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a necessary sequence, unless otherwise specified that a certain sequence must be followed.
[0055] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0056] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0057] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0058] At present, with the in-depth development of intelligent manufacturing, the demand for intelligence in various production links is getting higher and higher. As an important part of intelligent manufacturing, photoelectric encoders are used in many scenarios. However, during the operation process, photoelectric encoders may be suddenly damaged, which will cause damage to production interests.
[0059] Based on the above situation, an embodiment of the present invention provides a life warning method for an encoder, a controller, an encoder, and a computer-readable storage medium. The life warning method for the encoder includes but is not limited to the following steps:
[0060] Obtaining a feedback electrical signal from the encoder, where the feedback electrical signal is an electrical signal converted by the photocell module according to the light information output by the received light source;
[0061] When the feedback electrical signal is outside the light quantity reference range, acquiring the running time data;
[0062] The light attenuation value is obtained according to the feedback electrical signal and the preset light quantity reference value;
[0063] The life warning result is determined based on the light attenuation value, operating time data and the preset light attenuation curve.
[0064] According to the technical solution of the embodiment of the present invention, in the embodiment of the present invention, during the operation of the encoder, the feedback electrical signal sent by the encoder is obtained. When the obtained feedback electrical signal is outside the light reference range, it indicates that there is a problem with the encoder. At this time, it is necessary to further detect and judge the actual problem of the encoder, then obtain the running time data of the encoder, obtain the light attenuation value according to the feedback electrical signal and the preset light reference value, and determine the life warning result according to the light attenuation value, the running time data and the preset light attenuation curve. In the technical solution of this embodiment, according to the light attenuation curve and related operating data, the life warning result of the target detected encoder is issued to the customer, so as to achieve early warning of the life of the encoder to the customer, and prevent the problem of sudden damage to the encoder during the operation and loss of interests.
[0065] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0066] like Figure 1 As shown, Figure 1 It is a schematic diagram of a system architecture platform for executing a life warning method for an encoder provided by an embodiment of the present invention.
[0067] The system architecture platform 1000 of the embodiment of the present invention includes one or more processors 1001 and a memory 1002. Figure 1 In the figure, a processor 1001 and a memory 1002 are taken as an example.
[0068] The processor 1001 and the memory 1002 may be connected via a bus or other means. Figure 1 The example of connecting through bus is taken in the following.
[0069] The memory 1002, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1002 may optionally include a memory 1002 remotely arranged relative to the processor 1001, and these remote memories may be connected to the system architecture platform 1000 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0070] It should be noted that the system architecture platform 1000 may be a controller, or may be the controller of the encoder itself, which is not specifically limited in this embodiment.
[0071] It should be noted that the system architecture platform 1000 may have multi-threaded computing capabilities, or may have single-threaded computing capabilities, which is not specifically limited in this embodiment.
[0072] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the system architecture platform 1000, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0073] exist Figure 1 In the system architecture platform 1000 shown, the processor 1001 can be used to call the life warning program of the encoder stored in the memory 1002, so as to implement the life warning method of the encoder.
[0074] like Figure 2 As shown, Figure 2 Schematic diagram of an encoder for implementing an encoder life warning method provided by an embodiment of the present invention. The encoder includes a microcontroller unit 210 (equivalent to Figure 1 ), a light source driving module 220 , a light source 230 , a photocell module 240 , a data storage module 250 , a code disk 260 , and a temperature sensor 270 .
[0075] Among them, the microcontroller unit 210 includes a DAC output terminal 211 (which can also be a PWM signal output terminal), an ADC input terminal 212 (which can also be an external device), a counter 213 (TIMER), etc. The ADC input terminal 212 is used to collect the feedback electrical signal output by the photocell module 240, and perform analog-to-digital conversion on the feedback electrical signal. The data after analog-to-digital conversion can be used to compare with preset data. The DAC output terminal 211 is used to convert the required voltage value into digital-to-analog value and output it to the light source driving module 220, so as to control the brightness of the light source 230. The counter 213 (TIMER) is used to record the running time data of the encoder.
[0076] The light source driving module 220 is connected to the microcontroller unit 210 and the light source 230 respectively, and adjusts the brightness of the light source 230 according to the voltage value given by the microcontroller unit 210. The light source 230 is used to generate a light signal according to the instruction of the light source driving module 220, and transmit the light signal to the code disk 260. The code disk 260 is designed with grid lines, and the code disk 260 is connected to the motor. As the motor rotates, the light signal emitted by the light source 230 is irradiated to the photocell module 240 through the code disk 260. The photocell module 240 is used to convert the received light signal into an electrical signal.
[0077] It should be noted that the light source 230 , the code disk 260 and the photocell module 240 may be arranged in a directed-beam manner, a reflective manner or other forms, which are not specifically limited in this embodiment.
[0078] The data storage module 250 is used to store the DAC output value when the photocell signal benchmark is met, the attenuation curve data of the light source 230 attenuating over time, and the signal variation range of the photocell signal caused by the motor shaft jump. The data storage module 250 is a memory that does not lose data type when power is off.
[0079] The temperature sensor 270 is used to detect the temperature of the operating environment of the encoder. The attenuation rate of the light source 230 is strongly correlated with the operating environment temperature of the encoder.
[0080] The encoder may further include a signal processing module 280, which is used to amplify or combine the electrical signals emitted by the photocells.
[0081] The microcontroller unit 210 outputs an analog voltage signal through the DAC output terminal 211 to drive the light source driving module 220 so that the light source 230 emits a light signal, and collects the feedback electrical signal of the photocell module 240 after signal processing. The microcontroller unit 21 reads the data in the memory, and compares it with the collected data through the processing unit in the microcontroller unit 210, and performs corresponding output when the preset logical conditions are met.
[0082] It is understandable that Figure 1 The system architecture platform can be integrated into Figure 2 The encoder in the Figure 2 The various units in the embodiment are not specifically limited in this embodiment.
[0083] Based on the hardware structure of the above system architecture platform and various modules in the encoder, various embodiments of the life warning method of the encoder of the present invention are proposed.
[0084] like Figure 3 As shown, Figure 3 The flowchart of the life warning method of the encoder provided by an embodiment of the present invention includes but is not limited to step S100, step S200, step S300 and step S400.
[0085] Step S100, obtaining a feedback electrical signal of the encoder, where the feedback electrical signal is an electrical signal converted by a photocell according to light information output by a light source.
[0086] Specifically, when the encoder is inspected at the exit, the feedback electrical signal output by the encoder photocell is a sine signal or a cosine signal. The microprocessor unit calculates the peak value and peak-to-peak value of the feedback electrical signal through the peak value algorithm. Then, the microcontroller unit needs to collect the feedback electrical signal of the photocell while adjusting the brightness of the light source through the light source driving module. When the feedback electrical signal of the photocell meets the preset reference value, the adjustment of the light source brightness is stopped and the output value of the current DAC output terminal is stored in the memory. At the same time, the attenuation curve data of the light source and the data on the influence of the motor shaft jump on the photocell signal are stored in the data storage module. During the normal operation of the encoder, the photocell signal (i.e., the feedback electrical signal) collected by the microcontroller unit meets the preset light reference range. Therefore, it is necessary to monitor the feedback electrical signal generated by the encoder during the working process to determine whether there is a problem with the encoder based on the feedback electrical signal.
[0087] It should be noted that the feedback electrical signal is a sine signal or a cosine signal output by the photovoltaic module, and the microprocessor unit calculates the peak value or the peak-to-peak value of the feedback electrical signal through a peak value algorithm for subsequent judgment and analysis.
[0088] Step S200 , when the feedback electrical signal is outside the light quantity reference range, acquiring the running time data.
[0089] Specifically, when the feedback electrical signal obtained from the photocell is outside the light reference range, it indicates that there is a problem with the encoder, and it is necessary to detect, analyze and judge the problem with the encoder. At this time, it is also necessary to obtain data such as the running time data of the encoder, the preset light reference value, and the preset light attenuation curve.
[0090] It should be noted that the running time data refers to the length of time the encoder has been running since it started working. The relationship between the running time data and the preset light attenuation curve is as follows: Figure 4 As shown, Figure 4 The vertical axis is the light attenuation value and the horizontal axis is the running time data.
[0091] It should be noted that the preset light attenuation curve is different for different encoder models. The light attenuation curve corresponds to the temperature of the operating environment of the encoder. The light attenuation curve of the same encoder is different at different temperatures or different temperature ranges.
[0092] It should be noted that the preset light reference value refers to the reference value that the value of the feedback electrical signal output by the photocell of the encoder needs to meet during operation. The light reference value is set according to actual conditions and is not specifically limited in this embodiment.
[0093] It should be noted that the light reference range is a range value set based on the light reference value. The size of the range can be set according to actual conditions, and this implementation does not specifically limit it.
[0094] Step S300, obtaining a light attenuation value according to the feedback electrical signal and a preset light quantity reference value;
[0095] Step S400, determining a life warning result according to the light attenuation value, the operating time data and the light attenuation curve.
[0096] Specifically, when the obtained feedback electrical signal is outside the light reference range, it indicates that there is a problem with the encoder. At this time, it is necessary to further detect and judge the actual problem of the encoder, so the running time data of the encoder, the preset light reference value and the preset light attenuation curve are obtained, and the life warning result is determined based on the feedback electrical signal, the running time data, the preset light reference value and the light attenuation curve corresponding to the encoder. In the technical solution of this embodiment, according to the light attenuation curve and related operating data, the life warning result of the target detected encoder is issued to the customer, so as to achieve early warning of the life of the encoder to the customer, and prevent the encoder from being damaged suddenly during the operation and causing loss of interests.
[0097] In some embodiments, the peak value or peak-to-peak value of the feedback electrical signal is calculated through a peak algorithm, and the peak value or peak-to-peak value of the feedback electrical signal is divided by a light reference value to obtain a light attenuation value. The light attenuation value and the operating time data can be compared with each point in the light attenuation curve, so that the life warning result can be determined based on the comparison result.
[0098] In some embodiments, when the first point formed by the light attenuation value and the operating time data coincides with the second point in the light attenuation curve, it can be seen that although the feedback electrical signal of the encoder is outside the light quantity reference range, it conforms to the normal attenuation of the encoder. Then, it can be determined that the life warning result is the fourth warning result, and the fourth warning result indicates that the light source of the encoder has an aging problem.
[0099] In some embodiments, when the first point formed by the light attenuation value and the operating time data does not coincide with the second point in the light attenuation curve, it can be seen that the feedback electrical signal of the encoder is outside the light quantity reference range and does not meet the normal attenuation condition of the encoder. Then, it can be determined that the life warning result is the fifth warning result, which indicates that there is a contamination problem with the encoder or a shaft jump problem with the encoder's motor.
[0100] It should be noted that the life warning result may be that the light source of the encoder has an aging problem, or that there is a contamination problem with the encoder, or that there is a shaft jump problem with the motor of the encoder, or that the encoder with an aging problem has aged and needs to be replaced. This embodiment does not make any specific limitations on this.
[0101] Reference Figure 5 When the feedback electrical signal is outside the light reference range, the life warning method of the encoder may also include but is not limited to the following steps S510 and S520:
[0102] Step S510: adjusting the brightness of the encoder's light source so that the feedback electrical signal is within a light reference range;
[0103] Step S520: recording the running time data and the number of brightness adjustment times corresponding to the brightness adjustment of the current light source.
[0104] Specifically, when the encoder is operating normally, the microcontroller unit periodically determines the peak value of the feedback electrical signal of the collected photocell. When the peak value of the feedback electrical signal of the photocell does not meet the preset light reference range, the output signal of the DAC output end is adjusted until the peak value of the feedback electrical signal of the photocell meets the preset light reference range, and the operating time data and the number of brightness adjustments corresponding to the brightness adjustment of the current light source are recorded. In the technical solution of this embodiment, by controlling the output signal of the DAC output end so that the encoder works within the light reference range, the life of the encoder can be effectively extended.
[0105] It should be noted that when judging whether the feedback electrical signal of the photocell meets the preset light reference range, the peak value of the feedback electrical signal or the peak-to-peak value of the feedback electrical signal can be used for judgment, which is not specifically limited in this embodiment.
[0106] Reference Figure 6 ,based on Figure 5 The life warning method of the encoder, step S400 includes but is not limited to the following steps S610 and S620.
[0107] Step S610, when a first point formed by the light attenuation value and the running time data coincides with a second point in the light attenuation curve, obtaining an adjustable brightness value of the light source;
[0108] Step S620, determining a life warning result according to the adjustable brightness amount and a preset maximum adjustment amount.
[0109] Specifically, when the first point formed by the light attenuation value and the operating time data coincides with the second point in the light attenuation curve, it can be seen that although the feedback electrical signal of the encoder is outside the light quantity reference range, it conforms to the normal attenuation of the encoder. Then, it can be determined that the encoder has an aging problem with the light source. At this time, the aging degree of the light source of the encoder can be further determined. First, the adjustable brightness of the light source of the encoder is obtained, and then the adjustable brightness is compared with the preset maximum adjustment amount. According to the comparison result, it is determined whether the brightness of the light source can continue to be adjusted, thereby determining the life warning result.
[0110] In one embodiment, when the adjustable brightness has reached the maximum adjustment value, it indicates that the aging degree of the light source of the encoder is serious, and the life warning result is determined to be the first warning result. The first warning result indicates that the encoder with aging problems needs to be replaced.
[0111] In one embodiment, when the adjustable brightness amount has not reached the maximum adjustment amount, it indicates that the aging degree of the light source of the encoder has not reached a serious level, and the life warning result is determined to be the fourth warning result. The fourth warning result indicates that the light source of the encoder has an aging problem, and the encoder does not need to be replaced. The encoder can be controlled through step S610.
[0112] Reference Figure 7 ,based on Figure 5 The life warning method of the encoder, step S400 includes but is not limited to the following steps S710, S720 and S730.
[0113] Step S710, obtaining an adjustable brightness value of the light source when a first point formed by the light attenuation value and the running time data does not coincide with a second point in the light attenuation curve;
[0114] Step S720, when the adjustable brightness reaches the maximum value of the adjustment, obtaining the recorded number of brightness adjustments and the running time data corresponding to the number of brightness adjustments;
[0115] Step S730, determining a life warning result according to the number of brightness adjustment times and the operating time data corresponding to the number of brightness adjustment times.
[0116] Specifically, when the first point formed by the light attenuation value and the operating time data does not coincide with the second point in the light attenuation curve, it can be seen that the feedback electrical signal of the encoder is outside the light reference range and does not conform to the normal attenuation of the encoder. It can be judged that the encoder may have a contamination problem or the motor has a shaft jump problem. In order to further determine the specific problem, the operating time data and the number of brightness adjustments corresponding to the recorded number of brightness adjustments can be obtained when the adjustable brightness reaches the maximum adjustment amount, so as to determine the life warning result based on the operating time data and the number of brightness adjustments corresponding to the brightness adjustment times.
[0117] In some embodiments, after obtaining the operating time data and the number of brightness adjustments corresponding to the recorded number of brightness adjustments, the adjustment time intervals of the operating time data corresponding to multiple adjacent brightness adjustment times are obtained according to the number of brightness adjustments and the operating time data corresponding to the number of brightness adjustments, that is, it can be obtained whether the time intervals of the brightness of the light source of the encoder adjusted during the aging process are uniform, and then the life warning result is determined according to the uniformity of the time intervals for adjusting the brightness. For example: when multiple adjustment time intervals meet the preset interval uniformity condition, the life warning result is determined to be the second warning result, and the second warning result indicates that the encoder has a contamination problem. For another example: when multiple adjustment time intervals do not meet the preset interval uniformity condition, the life warning result is determined to be the third warning result, and the third warning result indicates that the encoder's motor has a shaft jump problem.
[0118] It should be noted that the preset interval uniformity condition may be that each adjustment time interval is less than the interval threshold, or that the variance of all adjustment time intervals and the interval threshold is less than a preset value. The interval threshold and the preset value may be set according to actual conditions, and this embodiment does not specifically limit them.
[0119] Reference Figure 8 , a flowchart of a life warning method for an encoder provided by another embodiment of the present invention, the method includes but is not limited to the following steps S801, step S802, step S803, step 804, step 805, step 806, step 807, step 808, step 809, step 810, step 811, step 812, step 813, step 814, step 815, step 816 and step 817:
[0120] Step S801, presetting the light attenuation curve data of the light source and the shaft jump impact data of the motor in the data storage module;
[0121] Step S802, obtaining a driving reference value of a DAC output value for driving a light source and a light quantity reference value of a feedback electrical signal fed back by a photocell;
[0122] Step S803, storing the acquired data in a data storage module;
[0123] Step S804, the counter records and stores the running time of the encoder;
[0124] Step S805, obtaining a feedback electrical signal from the photocell;
[0125] Step S806, determining whether the feedback electrical signal meets the light quantity reference range, if yes, executing step S804, if no, executing step S807;
[0126] Step S807, reading the running time data of the encoder;
[0127] Step S808, reading the light attenuation curve data of the light source;
[0128] Step S809, determining whether the feedback electrical signal and the running time data meet the light attenuation curve data, if so, executing step S810, if not, executing step S814;
[0129] Step S810, determining whether the adjustable brightness of the light source reaches the maximum adjustment value, if so, executing step S811, if not, executing step S813;
[0130] Step S811, increase the brightness of the light source, and execute step S812 and step S802;
[0131] Step S812, record the current encoder running time data and the number of brightness adjustment times for the light source, and execute step S803;
[0132] Step S813: Determine if the life warning result is that the encoder has an aging problem and needs to be replaced.
[0133] Step S814, determining whether the adjustable brightness of the light source reaches the maximum adjustment value, if so, executing step S815, if not, executing step 811;
[0134] Step S815, determining whether the adjustment time interval of the light source brightness meets the preset interval uniformity condition, if yes, executing step S816, if no, executing step S817;
[0135] Step S816, determining that the life warning result is that there is a contamination problem in the encoder;
[0136] Step S817, determining that the life warning result is that the encoder motor has a shaft jump problem.
[0137] The amount of light of the encoder in the technical solution in this embodiment can be adjusted, which can increase the service life and anti-pollution ability of the photoelectric encoder and save user costs; and the encoder can predict the encoder life through data analysis such as light decay curve data and operating time data, thereby improving customer work efficiency, and can also issue environmental information warnings when the environmental pollution level is high to remind customers to maintain the cleanliness of the environment, thereby extending the encoder life and saving user costs.
[0138] During the operation of the encoder, the feedback electrical signal sent by the encoder is obtained. When the obtained feedback electrical signal is outside the light reference range, it indicates that there is a problem with the encoder. At this time, it is necessary to further detect and judge the actual problem of the encoder. Then, the running time data of the encoder, the preset light reference value and the preset light attenuation curve are obtained, and the life warning result is determined based on the feedback electrical signal, the running time data, the preset light reference value and the light attenuation curve corresponding to the encoder. In the technical solution of this embodiment, the life warning result of the encoder of the target detection is issued to the customer based on the analysis and judgment of the light attenuation curve and the relevant operation data, so as to achieve early warning of the life of the encoder to the customer, and prevent the problem of sudden damage to the encoder during the operation and loss of interests.
[0139] Each step in the technical solution of this embodiment has the same beneficial effects as the corresponding steps in the above embodiment. It should be noted that this embodiment is only a specific embodiment of the life warning method of the encoder, and is not the only embodiment of the life warning method of the encoder. It can also be changed according to actual conditions. Figure 3-Figure 7 The various steps of the embodiments are combined to obtain another embodiment of the encoder life warning method.
[0140] Based on the above-mentioned life warning method of the encoder, various embodiments of the controller, encoder and computer-readable storage medium of the present invention are respectively proposed below.
[0141] An embodiment of the present invention provides a controller, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor.
[0142] The processor and the memory may be connected via a bus or other means.
[0143] It should be noted that the controller in this embodiment may include: Figure 1 The processor and memory in the illustrated embodiment both belong to the same inventive concept, and therefore both have the same implementation principles and beneficial effects, which will not be described in detail here.
[0144] The non-transient software program and instructions required to implement the life warning method of the encoder of the above embodiment are stored in the memory, and when executed by the processor, the life warning method of the encoder of the above embodiment is executed.
[0145] An embodiment of the present invention provides an encoder, which includes the controller of the above embodiment. The technical problems solved, technical means and technical effects achieved by the encoder are consistent with those of the controller of the above embodiment, and will not be described in detail here.
[0146] The embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the above-mentioned encoder life warning method, for example, Figure 1 The processor 1001 in the embodiment of the present invention is executed, so that the one or more processors can execute the life warning method of the encoder in the embodiment of the method, for example, execute the above-described Figure 3 Steps S100 to S400 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6 Steps S610 to S620 of the method, Figure 7 Steps S710 to S730 of the method and Figure 8 Method steps S801 to S817.
[0147] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer-readable storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0148] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present application. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A life warning method for an encoder, applied to an encoder, wherein the encoder comprises a light source and a photocell module, characterized in that: The method comprises: Acquire a feedback electrical signal of the encoder, wherein the feedback electrical signal is an electrical signal converted by the photocell module according to the received light information output by the light source; When the feedback electrical signal is outside the light quantity reference range, acquiring operation time data; Obtaining a light attenuation value according to the feedback electrical signal and a preset light quantity reference value; In a case where a first point formed by the light attenuation value and the operating time data does not coincide with a second point in the light attenuation curve, obtaining an adjustable brightness amount of the light source; When the adjustable brightness reaches the maximum value of the adjustment value, obtaining the recorded number of brightness adjustments and the running time data corresponding to the number of brightness adjustments; According to the brightness adjustment times and the running time data corresponding to the brightness adjustment times, obtaining adjustment time intervals of the running time data corresponding to a plurality of adjacent brightness adjustment times; The life warning result is determined according to the adjustment time interval and the preset interval uniformity condition.
2. The method according to claim 1, characterized in that In the case where the feedback electrical signal is outside the light quantity reference range, the method further includes: Adjusting the brightness of the encoder's light source so that the feedback electrical signal is within a light quantity reference range; The running time data and the number of brightness adjustments corresponding to the current brightness adjustment of the light source are recorded.
3. The method according to claim 2, characterized in that The determining of the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes: When a first point formed by the light attenuation value and the operating time data coincides with a second point in the light attenuation curve, obtaining an adjustable brightness amount of the light source; A life warning result is determined according to the adjustable brightness amount and a preset maximum adjustment amount.
4. The method according to claim 3, characterized in that The method further comprises: When the adjustable brightness reaches a maximum adjustment value, the life warning result is determined to be a first warning result, and the first warning result indicates that the encoder with an aging problem needs to be replaced.
5. The method according to claim 1, characterized in that The determining of the life warning result according to the adjustment time interval and the preset interval uniformity condition includes: In the case where the adjustment time interval meets the preset uniform interval condition, determining the life warning result as a second warning result, the second warning result indicates that there is a contamination problem in the encoder; and / or, When the adjustment time interval does not meet the preset interval uniformity condition, the life warning result is determined to be a third warning result, and the third warning result indicates that the motor of the encoder has a shaft jump problem.
6. The method according to claim 1, characterized in that The determining of the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes: When a first point formed by the light attenuation value and the operating time data coincides with a second point in the light attenuation curve, the life warning result is determined to be a fourth warning result, and the fourth warning result indicates that the light source of the encoder has an aging problem.
7. The method according to claim 1, characterized in that The determining of the life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve includes: When the first point formed by the light attenuation value and the operating time data does not coincide with the second point in the light attenuation curve, the life warning result is determined to be the fifth warning result, and the fifth warning result indicates that there is a contamination problem with the encoder or a shaft jump problem with the motor of the encoder.
8. An encoder, characterized in that include: A light source for emitting light information; A photocell module, used for converting the received light information output by the light source into a feedback electrical signal; A controller, used for obtaining the feedback electrical signal; When the feedback electrical signal is outside the light quantity reference range, acquiring operation time data; Obtaining a light attenuation value according to the feedback electrical signal and a preset light quantity reference value; determining a life warning result according to the light attenuation value, the operating time data and a preset light attenuation curve; The controller is further used to obtain the adjustable brightness amount of the light source when a first point formed by the light attenuation value and the running time data does not coincide with a second point in the light attenuation curve; When the adjustable brightness reaches the maximum value of the adjustment amount, obtain the recorded number of brightness adjustments and the operating time data corresponding to the number of brightness adjustments; obtain the adjustment time interval of the operating time data corresponding to multiple adjacent numbers of brightness adjustment times based on the number of brightness adjustments and the operating time data corresponding to the number of brightness adjustments; determine the life warning result based on the adjustment time interval and the preset interval uniformity condition.
9. The encoder according to claim 8, characterized in that It also includes a light source driving module, which is used to adjust the brightness of the light source of the encoder according to the instruction of the controller so that the feedback electrical signal is within the light quantity reference range.
10. The encoder according to claim 9, characterized in that It also includes a data storage module connected to the controller, and the data storage module is used to record the running time data and the number of brightness adjustments corresponding to the current brightness adjustment of the light source.
Citation Information
Patent Citations
Encoder home position signal processing method and system
CN101614558A
Fluorescence lifetime estimation method and device and storage medium
CN110826238A
Optical module selected key attribute value adjustment method and device, equipment and medium
CN112436888A
Luminescent device service life test method and system, terminal equipment and storage medium
CN114117711A
Photoelectric encoder
JP2003065803A
