Black mark positioning detection method of thermal printer and thermal printer
By adopting the black standard positioning detection method of a single sensor in thermal printer, the function of paper detection, lack of paper detection and black standard positioning detection is realized, and the problem of high cost and low reliability in existing technology has been solved. Equipment complexity and difficulty in maintenance have improved printing accuracy and reliability.
Patent Information
- Application Number
- CN202411788153.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-01-24
AI Technical Summary
Existing thermal printers are costly and have low reliability in black mark positioning detection, and the need to set up multiple sensors increases the complexity of the equipment and maintenance difficulty.
A thermal printer black mark positioning detection method is used to realize paper presence detection, paper lack detection and black mark positioning detection functions through a single sensor. The method includes the stepwise movement of the printing paper, the sensor sensing the paper area, identifying the white paper area or the area to be identified, and judging whether it is a black mark area or a paper-out area according to preset conditions.
Reduce the hardware costs of thermal printer, improve the reliability of printing accuracy and print quality, simplify the installation and maintenance process, and improve the stability and positioning accuracy of the sensor.
Smart Images

Figure CN119348309A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of thermal printers, and in particular to a black mark positioning detection method of a thermal printer and a thermal printer. Background Art
[0002] Thermal printing refers to a method of applying a heat-sensitive agent to paper to make it into thermal printing paper. Under the action of heat, the thermal printing paper causes the physical or chemical properties of the substance (developer) to change to obtain an image. Thermal printing technology has high printing efficiency and compact equipment size, and is widely used in POS products, invoice printers, logistics printers and other printing equipment. Existing thermal printers need to be equipped with two types of sensors, paper out sensor and black mark sensor. The paper out sensor is used to detect the paper status or paper out status of the thermal printer, and the black mark sensor is used to detect the black mark on the thermal printing paper to locate the printing start position according to the position of the black mark.
[0003] However, setting up two types of sensors on the printing device will increase the manufacturing cost of the printer; in addition, the installation and maintenance of the sensors also require extra work, and the increase in the number of sensors will correspondingly increase the use cost and maintenance cost of the printer; in addition, the accuracy and stability of the black mark sensor used in the thermal printer may be affected by the operating environment, which can easily cause the reliability of the thermal printer's printing quality and printing efficiency to be low. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a black mark positioning detection method for a thermal printer and a thermal printer, so as to solve the problems of high cost and low reliability of black mark positioning of existing thermal printers.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a black mark positioning detection method for a thermal printer, comprising the following steps: S1, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to identify the white paper area or the area to be identified of the printing paper; when the sensor identifies the white paper area, execute step S2; when the sensor identifies the area to be identified, execute step S3; S2, the printing paper continues to move step by step, so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor recognizes the area to be identified, and step S3 is executed; if not, return to step S1; S3, identifying the area to be identified as a black mark area or a paper-out area; when the area to be identified is the black mark area, outputting a black mark found instruction; when the area to be identified is the paper-out area, outputting a paper-out instruction.
[0006] Furthermore, the step S1 specifically includes: S101, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to generate a first signal or a second signal; when the sensor generates the first signal, step S102 is executed; when the sensor generates the second signal, step S103 is executed; S102, determining that the sensing area currently sensed by the sensor is a white paper area, and executing step S2; S103, judging whether the preset conditions of the area to be identified are met; if so, determining that the sensor senses the area to be identified, and executing step S3; if not, returning to executing step S101.
[0007] Furthermore, the step S2 specifically includes: S201, obtaining a first moving step number of the printing paper when the sensor continuously generates the first signal, and determining whether the first moving step number is greater than a first preset step number; if so, outputting a black mark not found instruction; if not, executing step S202; S202, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor has identified the area to be identified, and step S3 is executed; if not, return to step S1.
[0008] Furthermore, before step S1, the method further includes the following steps: The printing paper is provided with a plurality of printing areas in sequence along the stepping moving direction thereof, and the printing areas include the white paper area and the black mark area which are arranged in sequence along the stepping moving direction of the printing paper; A first identification step number is acquired according to the step distance of the printing paper and the width of the printing area, and the first identification step number is set as the first preset step number.
[0009] Furthermore, the step S3 specifically includes: S301, obtaining a second moving step number of the printing paper when the sensor continuously generates the second signal, and determining whether the second moving step number is greater than a second preset step number; if so, determining that the area to be identified is a paper-out area, and outputting a paper-out instruction; if not, executing step S302; S302, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper, and determines whether a second signal is generated when the sensor senses the next sensing area; if so, the area to be identified is determined to be a black mark area, and the black mark found instruction is output; if not, return to execute step S1.
[0010] Furthermore, before step S1, the method further includes the following steps: The number of black mark recognition steps is acquired according to the stepping distance of the printing paper and the width of the black mark area, and the number of black mark recognition steps is set as the second preset number of steps.
[0011] Furthermore, in step S302, determining that the area to be identified is a black mark area specifically includes: The printing paper continues to move in steps, and a third moving step number of the printing paper when the sensor continuously generates the first signal is obtained, and it is determined whether the third moving step number is greater than a third preset step number; if so, it is determined that the area to be identified is a black mark area, and a black mark found instruction is output; if not, return to execute step S1.
[0012] Furthermore, the preset condition of the area to be identified includes: a second moving step number of the printing paper when the sensor continuously generates the second signal is greater than a fourth preset step number.
[0013] Furthermore, before step S1, the method further includes the following steps: The black mark area is provided on the printing paper, and the black mark area includes a rear end area, a middle area and a front end area which are sequentially arranged along the stepping moving direction of the printing paper; A second identification step number is obtained according to the step movement distance of the printing paper and the width of the front end area, and the second identification step number is set as the fourth preset step number.
[0014] Another object of the present invention is to provide a thermal printer, which is used to print on printing paper, and the thermal printer applies the black mark positioning detection method described in any one of claims 1 to 9 to identify the black mark area on the printing paper; the thermal printer includes a sensor, a main controller, a stepper motor and a thermal printing module; the stepper motor is used to drive the printing paper to move step by step; the sensor is used to sense the sensing area of the printing paper; the main controller is used to control the start and stop of the stepper motor according to the sensing signal of the sensor and control the thermal printing module to print on the printing paper.
[0015] The beneficial effects of the present invention are as follows: when the black mark positioning detection method provided by the present invention is applied to thermal printing paper, only one sensor can be provided, and the sensor can realize the functions of paper presence detection, paper shortage detection and black mark positioning detection, and the black mark positioning detection method has high positioning efficiency, high positioning accuracy and high sensor stability, and the black mark positioning detection method can reduce the hardware cost of the thermal printer and improve the printing accuracy and printing quality reliability of the thermal printer; in addition, the black mark positioning detection method can reduce the installation cost and later maintenance difficulty of the thermal printer. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a process flow of the black mark positioning detection method provided by the present invention; Figure 2 Another schematic diagram of the process of the black mark positioning detection method provided by the present invention; Figure 3 The printing paper of the present invention is schematically shown.
[0017] Description of labels: 1. Front end area; 2. Middle area; 3. Back end area; 4. Black mark area; 5. White paper area; 6. Printing area. DETAILED DESCRIPTION
[0018] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0019] Please refer to Figure 1 as well as Figure 2 , a black mark positioning detection method for a thermal printer, comprising the following steps: S1, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to identify the white paper area or the area to be identified of the printing paper; when the sensor identifies the white paper area, execute step S2; when the sensor identifies the area to be identified, execute step S3; S2, the printing paper continues to move step by step, so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor recognizes the area to be identified, and step S3 is executed; if not, return to step S1; S3, identifying the area to be identified as a black mark area or a paper-out area; when the area to be identified is the black mark area, outputting a black mark found instruction; when the area to be identified is the paper-out area, outputting a paper-out instruction.
[0020] From the above description, it can be seen that the beneficial effects of the present invention are: when the black mark positioning detection method provided by the present invention is applied to thermal printing paper, only one sensor can be set, and the paper detection, paper out detection and black mark positioning detection functions can be realized through the sensor, and the black mark positioning detection method has high positioning efficiency, high positioning accuracy and high sensor stability. The black mark positioning detection method can reduce the hardware cost of the thermal printer and improve the printing accuracy and printing quality reliability of the thermal printer; in addition, the black mark positioning detection method can reduce the installation cost and subsequent maintenance difficulty of the thermal printer.
[0021] Furthermore, the step S1 specifically includes: S101, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to generate a first signal or a second signal; when the sensor generates the first signal, step S102 is executed; when the sensor generates the second signal, step S103 is executed; S102, determining that the sensing area currently sensed by the sensor is a white paper area, and executing step S2; S103, judging whether the preset conditions of the area to be identified are met; if so, determining that the sensor senses the area to be identified, and executing step S3; if not, returning to executing step S101.
[0022] From the above description, it can be seen that a thermal printer using the black mark positioning detection method provided by the present invention can be equipped with only one sensor, which can generate a first signal when sensing a white paper area, and can generate a second signal when sensing a paper-out area or a black mark area. The black mark positioning detection method provided by the present invention can identify the white paper area or the area to be identified based on the first signal and the second signal generated by the sensor.
[0023] Furthermore, the step S2 specifically includes: S201, obtaining a first moving step number of the printing paper when the sensor continuously generates the first signal, and determining whether the first moving step number is greater than a first preset step number; if so, outputting a black mark not found instruction; if not, executing step S202; S202, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor has identified the area to be identified, and step S3 is executed; if not, return to step S1.
[0024] From the above description, it can be seen that the black mark positioning detection method provided by the present invention can prevent the thermal printer from feeding paper when the black mark area does not exist or cannot be found by setting the first preset number of steps. The black mark positioning detection method provided by the present invention can optimize the printing process and improve printing efficiency.
[0025] Furthermore, before step S1, the method further includes the following steps: The printing paper is provided with a plurality of printing areas in sequence along the stepping moving direction thereof, and the printing areas include the white paper area and the black mark area which are arranged in sequence along the stepping moving direction of the printing paper; A first identification step number is acquired according to the step distance of the printing paper and the width of the printing area, and the first identification step number is set as the first preset step number.
[0026] From the above description, it can be seen that in some preferred embodiments of the present invention, when the sensor still fails to identify the area to be identified during the process of the printing paper stepping and moving a complete printing area, it outputs that the black mark area is not found and stops feeding the paper.
[0027] Furthermore, the step S3 specifically includes: S301, obtaining a second moving step number of the printing paper when the sensor continuously generates the second signal, and determining whether the second moving step number is greater than a second preset step number; if so, determining that the area to be identified is a paper-out area, and outputting a paper-out instruction; if not, executing step S302; S302, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper, and determines whether a second signal is generated when the sensor senses the next sensing area; if so, the area to be identified is determined to be a black mark area, and the black mark found instruction is output; if not, return to execute step S1.
[0028] Furthermore, before step S1, the method further includes the following steps: The number of black mark recognition steps is acquired according to the stepping distance of the printing paper and the width of the black mark area, and the number of black mark recognition steps is set as the second preset number of steps.
[0029] From the above description, it can be seen that during the stepping movement of the printing paper, when it is detected that the width of the area to be identified is greater than the width of the black mark area, the area to be identified is considered to be a paper-out area, and a paper-out instruction is output to prevent the printing paper from continuing to feed in the paper-out state.
[0030] Furthermore, in step S302, determining that the area to be identified is a black mark area specifically includes: The printing paper continues to move in steps, and a third moving step number of the printing paper when the sensor continuously generates the first signal is obtained, and it is determined whether the third moving step number is greater than a third preset step number; if so, it is determined that the area to be identified is a black mark area, and a black mark found instruction is output; if not, return to execute step S1.
[0031] From the above description, it can be seen that in the process of preparing printing paper, the color of the black mark area may be printed as a color between black and white, so that there is an identification error in the black mark area. The black mark positioning detection method provided by the present invention is that after the sensor completes the identification of the area to be identified, the sensor generates a first signal during the process of the printing paper moving for a third preset number of steps. It can be considered that the sensor does sense the white paper area from the black mark area, rather than detecting an identification error. It can avoid the interference of white dots in the black mark positioning of the printing paper. The black mark positioning detection method provided by the present invention optimizes the printing process and improves printing efficiency.
[0032] Furthermore, the preset condition of the area to be identified includes: a second moving step number of the printing paper when the sensor continuously generates the second signal is greater than a fourth preset step number.
[0033] Furthermore, before step S1, the method further includes the following steps: The black mark area is provided on the printing paper, and the black mark area includes a rear end area, a middle area and a front end area which are sequentially arranged along the stepping moving direction of the printing paper; A second identification step number is obtained according to the step movement distance of the printing paper and the width of the front end area, and the second identification step number is set as the fourth preset step number.
[0034] From the above description, it can be seen that after finding the black mark area, at least the front end area of the black mark area needs to be fully identified in order to locate the position of the head of the printing area; the sensor will only determine that there is no paper when it senses that the width of the area to be identified is greater than the black mark area. Therefore, setting the fourth preset step number in the black mark positioning detection method provided by the present invention can ensure the accuracy and reliability of black mark positioning.
[0035] Another object of the present invention is to provide a thermal printer, which is used to print on printing paper. The thermal printer applies the above-mentioned black mark positioning detection method to identify the black mark area on the printing paper; the thermal printer includes a sensor, a main controller, a stepper motor and a thermal printing module; the stepper motor is used to drive the printing paper to move step by step; the sensor is used to sense the sensing area of the printing paper; the main controller is used to control the start and stop of the stepper motor according to the sensing signal of the sensor and control the thermal printing module to print on the printing paper.
[0036] Embodiment 1 Please refer to Figure 1 to Figure 2 In the first embodiment of the present invention, a black mark positioning detection method is provided, which can be applied to a thermal printer to identify the black mark area of the printing paper of the thermal printer, and to perform printing positioning on the printing paper through the black mark area.
[0037] Among them, the thermal printer that uses the black mark positioning detection method provided in this embodiment includes a sensor, a main controller, a stepper motor and a thermal printing module; the stepper motor is used to drive the printing paper to move step by step; the sensor is used to sense the sensing area of the printing paper; the main controller is used to control the start and stop of the stepper motor according to the sensing signal of the sensor and control the thermal printing module to print on the printing paper.
[0038] The thermal printer uses the black mark positioning detection method provided in this embodiment, including the following steps: S1, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to identify the white paper area or the area to be identified of the printing paper; when the sensor identifies the white paper area, execute step S2; when the sensor identifies the area to be identified, execute step S3; S2, the printing paper continues to move step by step, so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor recognizes the area to be identified, and step S3 is executed; if not, return to step S1; S3, identifying the area to be identified as a black mark area or a paper-out area; when the area to be identified is the black mark area, outputting a black mark found instruction; when the area to be identified is the paper-out area, outputting a paper-out instruction.
[0039] Traditional thermal printers need to be equipped with a paper out sensor and a black mark sensor respectively to realize the paper out detection function and the black mark positioning detection function respectively. However, a thermal printer using the black mark positioning detection method provided in this embodiment can omit the setting of a sensor compared to traditional thermal printers, and only use one sensor to realize the paper out detection function and the black mark detection function.
[0040] As an example, the sensor of a thermal printer that uses the black mark positioning detection method provided in this embodiment can be a photoelectric sensor. When the sensor senses the white paper area of the printing paper, the light emitted by the photoelectric sensor can be reflected by the paper and received by the receiving tube of the photoelectric sensor, so that the photoelectric sensor outputs a first signal accordingly; when the sensor senses the black mark area or the paper-out area of the printing paper, the light will be absorbed by the black mark area or the light cannot be reflected by the paper-out area, and the photoelectric sensor will output a second signal accordingly.
[0041] Based on the above principle, the to-be-identified area and the blank paper area of the printing paper can be identified according to the output signal of the sensor and the sensing area sensed by the sensor during the stepping movement of the printing paper.
[0042] Please refer to Figure 2 Specifically, the above step S1 specifically includes: S101, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to generate a first signal or a second signal; when the sensor generates the first signal, step S102 is executed; when the sensor generates the second signal, step S103 is executed; S102, determining that the sensing area currently sensed by the sensor is a white paper area, and executing step S2; S103, judging whether the preset conditions of the area to be identified are met; if so, determining that the sensor senses the area to be identified, and executing step S3; if not, returning to executing step S101.
[0043] The above step S2 specifically includes: S201, obtaining a first moving step number of the printing paper when the sensor continuously generates the first signal, and determining whether the first moving step number is greater than a first preset step number; if so, outputting a black mark not found instruction; if not, executing step S202; S202, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor has identified the area to be identified, and step S3 is executed; if not, return to step S1.
[0044] The black mark positioning detection method provided in this embodiment can prevent the thermal printer from continuously feeding paper when the black mark area does not exist or cannot be found by setting the first preset number of steps. The black mark positioning detection method provided by the present invention can optimize the printing process and improve printing efficiency.
[0045] Please refer to Figure 3 , the printing paper moves along its stepping direction ( Figure 3 The arrow on the right side points to the stepping moving direction) and a plurality of printing areas 6 are sequentially arranged, and the printing area 6 includes a white paper area 5 and a black mark area 4 sequentially arranged along the stepping moving direction of the printing paper.
[0046] In this embodiment, the first preset number of steps can be set according to the following steps: A first identification step number is acquired according to the step distance of the printing paper and the width of the printing area, and the first identification step number is set as the first preset step number.
[0047] It is easy to understand that in this embodiment, according to the stepping distance of the printing paper, the first number of identification steps required for the sensing area sensed by the sensor during the stepping movement of the printing paper to be a complete printing area is obtained. When the sensor still fails to obtain the area to be identified during the process of the printing paper stepping and moving a complete printing area, it outputs that the black mark area is not found and stops feeding the paper.
[0048] In this embodiment, the above step S3 specifically includes: S301, obtaining a second moving step number of the printing paper when the sensor continuously generates the second signal, and determining whether the second moving step number is greater than a second preset step number; if so, determining that the area to be identified is a paper-out area, and outputting a paper-out instruction; if not, executing step S302; S302, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper, and determines whether a second signal is generated when the sensor senses the next sensing area; if so, the area to be identified is determined to be a black mark area, and the black mark found instruction is output; if not, return to execute step S1.
[0049] The second preset number of steps may be set according to the following steps: obtaining the number of black mark recognition steps according to the stepping distance of the printing paper and the width of the black mark area, and setting the number of black mark recognition steps to the second preset number of steps.
[0050] It is easy to understand that during the stepping movement of the printing paper, when it is detected that the width of the area to be identified is greater than the width of the black mark area, the area to be identified is considered to be a paper-out area, and a paper-out instruction is output to prevent the printing paper from continuing to feed in the paper-out state.
[0051] Preferably, in the above step S302, determining that the area to be identified is a black mark area specifically includes: The printing paper continues to move in steps, and a third moving step number of the printing paper when the sensor continuously generates the first signal is obtained, and it is determined whether the third moving step number is greater than a third preset step number; if so, it is determined that the area to be identified is a black mark area, and a black mark found instruction is output; if not, return to execute step S1.
[0052] In the process of preparing printing paper, the color of the black mark area may be printed as a color between black and white, which may cause recognition errors in the black mark area.
[0053] In the black mark positioning detection method provided by the present invention, after the sensor completes the identification of the area to be identified, if the sensor generates the first signal during the process of the printing paper moving for the third preset number of steps, it can be considered that the sensor does sense the white paper area from the black mark area, rather than detecting an erroneous identification area. This can avoid the interference of white dots in the black mark positioning of the printing paper, which may cause the detected black mark area to be incomplete.
[0054] Please refer to Figure 3 The black mark area 4 includes a rear end area 3, a middle area 2 and a front end area 1 which are sequentially arranged along the stepping movement direction of the printing paper; during the printing process, at least the front end area 1 of the black mark area 4 needs to be fully identified to be able to locate the head position of the printed page of the printing paper; therefore, in the black mark positioning detection method provided by the present invention, setting the front end area according to at least the front end area of the black mark area to ensure that the accuracy and reliability of the black mark positioning can be ensured.
[0055] Therefore, in this embodiment, the above-mentioned preset condition of the area to be identified includes: the second moving step number of the printing paper when the sensor continuously generates the second signal is greater than a fourth preset step number.
[0056] Specifically, the fourth preset number of steps may be set according to the following steps: obtaining a second identification number of steps according to the step movement distance of the printing paper and the width of the front end area, and setting the second identification number of steps as the fourth preset number of steps.
[0057] The black mark positioning method provided by the present invention can avoid misidentifying stains and the like as black mark areas for positioning, so as to ensure the positioning accuracy and reliability of the black mark positioning method.
[0058] To sum up, when applying the black mark positioning detection method provided by the present invention, thermal printing paper only needs to be provided with one sensor, and the sensor can be used to realize paper presence detection, paper shortage detection and black mark positioning detection functions, and the black mark positioning detection method has high positioning efficiency, high positioning accuracy and high sensor stability. The black mark positioning detection method can reduce the hardware cost of the thermal printer and improve the printing accuracy and printing quality reliability of the thermal printer; in addition, the black mark positioning detection method can reduce the installation cost and subsequent maintenance difficulty of the thermal printer.
[0059] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting black mark positioning of a thermal printer, characterized in that: The following steps are involved: S1, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to identify the white paper area or the area to be identified of the printing paper; when the sensor identifies the white paper area, execute step S2; when the sensor identifies the area to be identified, execute step S3; S2, the printing paper continues to move step by step, so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor recognizes the area to be identified, and step S3 is executed; if not, return to step S1; S3, identifying the area to be identified as a black mark area or a paper-out area; when the area to be identified is the black mark area, outputting a black mark found instruction; when the area to be identified is the paper-out area, outputting a paper-out instruction.
2. The black mark positioning detection method according to claim 1, characterized in that: The step S1 specifically includes: S101, the printing paper moves step by step, and the sensor senses the sensing area of the printing paper to generate a first signal or a second signal; when the sensor generates the first signal, step S102 is executed; when the sensor generates the second signal, step S103 is executed; S102, determining that the sensing area currently sensed by the sensor is a white paper area, and executing step S2; S103, judging whether the preset conditions of the area to be identified are met; if so, determining that the sensor senses the area to be identified, and executing step S3; if not, returning to executing step S101.
3. The black mark positioning detection method according to claim 2, characterized in that: The step S2 specifically includes: S201, obtaining a first moving step number of the printing paper when the sensor continuously generates the first signal, and determining whether the first moving step number is greater than a first preset step number; if so, outputting a black mark not found instruction; if not, executing step S202; S202, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper to determine whether the preset conditions of the area to be identified are met; if so, it is determined that the sensor has identified the area to be identified, and step S3 is executed; if not, return to step S1.
4. The black mark positioning detection method according to claim 3, characterized in that: Before step S1, the method further includes the following steps: The printing paper is provided with a plurality of printing areas in sequence along the stepping moving direction thereof, and the printing areas include the white paper area and the black mark area which are arranged in sequence along the stepping moving direction of the printing paper; A first identification step number is acquired according to the step distance of the printing paper and the width of the printing area, and the first identification step number is set as the first preset step number.
5. The black mark positioning detection method according to claim 2, characterized in that: The step S3 specifically includes: S301, obtaining a second moving step number of the printing paper when the sensor continuously generates the second signal, and determining whether the second moving step number is greater than a second preset step number; if so, determining that the area to be identified is a paper-out area, and outputting a paper-out instruction; if not, executing step S302; S302, the printing paper continues to move step by step so that the sensor senses the next sensing area of the printing paper, and determines whether a second signal is generated when the sensor senses the next sensing area; if so, the area to be identified is determined to be a black mark area, and the black mark found instruction is output; if not, return to execute step S1.
6. The black mark positioning detection method according to claim 5, characterized in that: Before step S1, the method further includes the following steps: The number of black mark recognition steps is acquired according to the stepping distance of the printing paper and the width of the black mark area, and the number of black mark recognition steps is set as the second preset number of steps.
7. The black mark positioning detection method according to claim 5, characterized in that: In the step S302, determining that the area to be identified is a black mark area specifically includes: The printing paper continues to move in steps, and a third moving step number of the printing paper when the sensor continuously generates the first signal is obtained, and it is determined whether the third moving step number is greater than a third preset step number; if so, it is determined that the area to be identified is a black mark area, and a black mark found instruction is output; if not, return to execute step S1.
8. The black mark positioning detection method according to claim 2, characterized in that: The preset condition of the area to be identified includes: a second moving step number of the printing paper when the sensor continuously generates the second signal is greater than a fourth preset step number.
9. The black mark positioning detection method according to claim 8, characterized in that: Before step S1, the method further includes the following steps: The black mark area is provided on the printing paper, and the black mark area includes a rear end area, a middle area and a front end area which are sequentially arranged along the stepping moving direction of the printing paper; A second identification step number is obtained according to the step movement distance of the printing paper and the width of the front end area, and the second identification step number is set as the fourth preset step number.
10. A thermal printer, used for printing on printing paper, characterized in that: The thermal printer applies the black mark positioning detection method described in any one of claims 1 to 9 to identify the black mark area on the printing paper; the thermal printer includes a sensor, a main controller, a stepper motor and a thermal printing module; the stepper motor is used to drive the printing paper to move step by step; the sensor is used to sense the sensing area of the printing paper; the main controller is used to control the start and stop of the stepper motor according to the sensing signal of the sensor and control the thermal printing module to print on the printing paper.