Search

CN-116086373-B - Lock pin position detection method and device and computer equipment

CN116086373BCN 116086373 BCN116086373 BCN 116086373BCN-116086373-B

Abstract

The application relates to a lock pin position detection method. The method comprises the steps of obtaining time from an open position to a closed position of a lock pin, time from the closed position to the open position, response time of an open position sensor and response time of a closed position sensor, obtaining response time of the sensor according to average value of the response time of the open position sensor and the response time of the closed position sensor, obtaining expected output data of the lock pin from the open position to the closed position according to the response time of the sensor and the time from the open position to the closed position, obtaining expected output data of the lock pin from the closed position to the open position according to the response time of the sensor and the time from the closed position to the open position, obtaining actual output data of the lock pin from the open position to the closed position or from the closed position to the open position, comparing the actual output data with the expected output data, and outputting the position of the lock pin according to the comparison result. The method can avoid the situation that the position of the lock pin cannot be detected due to the sensor fault.

Inventors

  • WANG TAO

Assignees

  • 苏州光格科技股份有限公司

Dates

Publication Date
20260508
Application Date
20221228

Claims (10)

  1. 1. A method of detecting a position of a lock pin, the method comprising: Acquiring the time from an open position to a closed position and the time from the closed position to the open position of a lock pin, wherein the response time of an open position sensor and the response time of a closed position sensor are from a free state to an effective detection state, the response time of the open position sensor is from the effective detection state to the free state, the response time of the closed position sensor is from the free state to the effective detection state, and the response time of the closed position sensor is from the effective detection state to the free state, the effective detection state indicates that the sensor detects the passing of the lock pin, and the free state indicates that the sensor does not detect the position of the lock pin; Obtaining the response time of the sensor according to the response time of the open position sensor and the average value of the response time of the closed position sensor; Summing the response time of the sensor with the time from the open position to the closed position to obtain expected output data of the lock pin from the open position to the closed position, and summing the response time of the sensor with the time from the closed position to the open position to obtain expected output data of the lock pin from the closed position to the open position; Acquiring actual output data of the lock pin from the open position to the closed position or from the closed position to the open position; If the actual output data is the same as the expected output data, the actual output data comprises the position of the current lock pin; if the actual output data is different from the expected output data, judging through the state of the sensor, if the current sensor is damaged, acquiring the position of the lock pin according to the expected output time, and if the current sensor is aged, recalculating the expected output data to acquire the position of the lock pin.
  2. 2. The method according to claim 1, characterized in that the method comprises: And controlling the lock pin to run at least once from the open position to the closed position or from the closed position to the open position, and determining the position of the fault sensor according to the state of the sensor.
  3. 3. The method according to claim 2, wherein the method further comprises: And determining that the lock pin is at an open position or an open position according to the position of the fault sensor, and controlling the lock pin to move to the open position or the closed position according to the position of the lock pin and expected output data of the lock pin from the open position to the closed position or expected output data of the lock pin from the closed position to the open position.
  4. 4. The method of claim 1, wherein the state of the sensor comprises a detected state or an undetected state, and the type of the sensor comprises a contact type or a non-contact type.
  5. 5. A lock pin position detection device, the device comprising: The detection module is used for acquiring the time from the open position to the closed position and the time from the closed position to the open position of the lock pin, the response time of the open position sensor and the response time of the closed position sensor, wherein the response time of the open position sensor is from a free state to an effective detection state, the response time of the closed position sensor is from the effective detection state to the free state, the response time of the closed position sensor is from the free state to the effective detection state, and the response time of the closed position sensor is from the effective detection state to the free state, the effective detection state indicates that the sensor detects the lock pin passing, and the free state indicates that the sensor does not detect the lock pin position; the first calculation module is used for obtaining the response time of the sensor according to the response time of the open position sensor and the average value of the response time of the closed position sensor; A second calculation module for summing the response time of the sensor with the time from the on position to the off position to obtain expected output data of the lock pin from the on position to the off position, and summing the response time of the sensor with the time from the off position to the on position to obtain expected output data of the lock pin from the off position to the on position; The data acquisition module is used for acquiring actual output data of the lock pin from the open position to the closed position or from the closed position to the open position; The comparison module is used for including the position of the current lock pin in the actual output data if the actual output data is the same as the expected output data; if the actual output data is different from the expected output data, judging through the state of the sensor, if the current sensor is damaged, acquiring the position of the lock pin according to the expected output time, and if the current sensor is aged, recalculating the expected output data to acquire the position of the lock pin.
  6. 6. The apparatus of claim 5, wherein the apparatus comprises: And controlling the lock pin to run at least once from the open position to the closed position or from the closed position to the open position, and determining the position of the fault sensor according to the state of the sensor.
  7. 7. The apparatus of claim 6, wherein the apparatus further comprises: And determining that the lock pin is at an open position or an open position according to the position of the fault sensor, and controlling the lock pin to move to the open position or the closed position according to the position of the lock pin and expected output data of the lock pin from the open position to the closed position or expected output data of the lock pin from the closed position to the open position.
  8. 8. The device of claim 5, wherein the state of the sensor comprises a detected state or an undetected state, and the type of the sensor comprises a contact type or a non-contact type.
  9. 9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 4 when the computer program is executed.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.

Description

Lock pin position detection method and device and computer equipment Technical Field The present application relates to the field of position detection, and in particular, to a method, an apparatus, and a computer device for detecting a lock pin position. Background The electronic well lid is generally provided with a lock rod and lock pin two-stage lock structure, the lock pin can be used as a positioning part for accurately determining the mutual position between parts, and a micro switch or a travel switch can be used for detecting the position of the lock pin. In the related art, a micro switch is a contact mechanism having a minute contact interval and performing a switching operation with a predetermined stroke and a predetermined force. Different microswitches, travel switches and sensors have certain travel errors in the detection process, and finally accurate lock pin positions are difficult to obtain. Disclosure of Invention Based on this, it is necessary to provide a lock pin position detection that can determine whether the actual output data is correct or not based on the expected output data, and can obtain the position of the lock pin. In a first aspect, the present application provides a method of detecting a lock pin position. The method comprises the following steps: Acquiring the time from an open position to a closed position of the lock pin, the time from the closed position to the open position of the lock pin, the response time of an open position sensor and the response time of the closed position sensor; Obtaining the response time of the sensor according to the response time of the open position sensor and the average value of the response time of the closed position sensor; obtaining expected output data of the lock pin from the open position to the closed position according to the response time of the sensor and the time from the open position to the closed position, and obtaining expected output data of the lock pin from the closed position to the open position according to the response time of the sensor and the time from the closed position to the open position; Acquiring actual output data of the lock pin from the open position to the closed position or from the closed position to the open position; and comparing the actual output data with expected output data, and outputting the position of the lock pin according to the comparison result. In one embodiment, the method comprises: And controlling the lock pin to run at least once from the open position to the closed position or from the closed position to the open position, and determining the position of the fault sensor according to the state of the sensor. In one embodiment, the method further comprises: And determining that the lock pin is at an open position or an open position according to the position of the fault sensor, and controlling the lock pin to move to the open position or the closed position according to the position of the lock pin and expected output data of the lock pin from the open position to the closed position or expected output data of the lock pin from the closed position to the open position. In one embodiment, the comparing the actual output data with the expected output data, and outputting the position of the lock pin according to the comparison result includes: If the actual output data is the same as the expected output data, the actual output data comprises the position of the current lock pin; And if the actual output data is different from the expected output data, determining the actual position of the lock pin according to the expected output data and the current position of the lock pin contained in the actual output data. In one embodiment, the state of the sensor includes a detected state or an undetected state, and the type of the sensor includes a contact type or a non-contact type. In a second aspect, the present application also provides a lock pin position detection apparatus, the apparatus comprising: the detection module is used for acquiring the time from the open position to the closed position of the lock pin, the time from the closed position to the open position of the lock pin, the response time of the open position sensor and the response time of the closed position sensor; the first calculation module is used for obtaining the response time of the sensor according to the response time of the open position sensor and the average value of the response time of the closed position sensor; the second calculation module is used for obtaining expected output data of the lock pin from the open position to the closed position according to the response time of the sensor and the time from the open position to the closed position, and obtaining expected output data of the lock pin from the closed position to the open position according to the response time of the sensor and the time from the closed position to the open position; The data acquisition module is used for acquiring act