Label paper gap positioning method and device, storage medium and electronic equipment
By monitoring the movement distance and gap signal of the label paper, the gap of the label paper can be accurately located, solving the problem of unstable gap detection by photoelectric sensors, ensuring accurate printing of label content, and improving print quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, inaccurate positioning of label paper gaps leads to offset or missing printed content, and unstable detection results from photoelectric sensors result in false or missed detections.
By determining the size of the label sheet, calculating the preset sheet movement distance, monitoring the label sheet movement distance and gap signal, and ensuring that the movement distance is greater than or equal to the preset distance and a gap signal exists, the gap position is confirmed as the actual gap position.
It improves the accuracy of label printing, avoids printing offset and missing parts, and enhances printing precision.
Smart Images

Figure CN120029567B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of printing technology, and in particular to a method, apparatus, storage medium, and electronic device for positioning the gaps in label paper. Background Technology
[0002] In the label printing process, accurately positioning the gaps in the label paper is crucial for the printing task. Inaccurate gap positioning can lead to misalignment or missing content, affecting the quality of the printed labels. Related technologies typically rely on photoelectric sensors for gap positioning, aiming to identify the gap location by detecting the light transmission characteristics of the label paper gaps. However, the light transmission properties of the gaps can be affected by instability in the label paper manufacturing process or material variations, leading to unstable gap detection results from photoelectric sensors. This can result in false or missed detections, causing misalignment of the printed content. Therefore, accurately positioning the label paper gaps is a critical technical problem that urgently needs to be solved. Summary of the Invention
[0003] This application provides a method, apparatus, computer storage medium, and electronic device for locating gaps in label paper. The technical solution is as follows:
[0004] In a first aspect, embodiments of this application provide a method for locating the gap in a label paper, the method comprising:
[0005] Determine the size of the label sheet's face paper, and determine a preset face paper movement distance based on the face paper size;
[0006] The label paper is moved based on the paper transport path, and the moving distance of the label paper is calculated based on the position of the label paper's face paper.
[0007] Determine whether the moving distance is greater than or equal to the preset paper moving distance, and detect whether there is a gap signal corresponding to the label paper;
[0008] If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0009] Secondly, embodiments of this application provide a positioning device for label paper gaps, the device comprising:
[0010] The size determination module is used to determine the size of the label paper's face sheet and, based on the face sheet size, determine a preset face sheet movement distance.
[0011] The movement control module is used to move the label paper based on the paper transport path and calculate the moving distance of the label paper based on the position of the label paper's face paper.
[0012] The gap detection module is used to determine whether the moving distance is greater than or equal to the preset paper moving distance, and to detect whether there is a gap signal corresponding to the label paper;
[0013] The gap confirmation module is used to determine the gap position indicated by the gap signal as the actual gap position if the moving distance is greater than or equal to the preset paper moving distance and the gap signal exists.
[0014] Thirdly, embodiments of this application provide a computer storage medium having multiple instructions adapted for loading and executing the methods described above by a processor.
[0015] Fourthly, embodiments of this application provide an electronic device, which may include: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the memory and to execute the above-described method.
[0016] The beneficial effects of the technical solutions provided in this application include at least the following:
[0017] The label paper gap positioning method provided in this application first determines the size of the label paper's face paper, then determines a preset face paper moving distance based on the face paper size. Next, the label paper is moved according to the paper transport path, and the moving distance is calculated based on the face paper position. It is then determined whether the moving distance is greater than or equal to the preset face paper moving distance, and whether a gap signal corresponding to the label paper exists. If the moving distance is greater than or equal to the preset face paper moving distance and a gap signal exists, the gap position indicated by the gap signal is determined to be the actual gap position. Thus, by monitoring the magnitude of the label paper moving distance and the preset face paper moving distance, and by monitoring the presence or absence of a gap signal, the actual gap position of the face paper can be accurately detected. This avoids the problems of false and missed gap detection caused by the unstable light transmission characteristics of the face paper when using photoelectric sensors in related technologies. This reduces printing offset and missing parts in label printing, ensuring that the label content is accurately printed on the face paper, thereby improving the printing accuracy of the label. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1This is a flowchart illustrating a method for locating the gap in a label paper according to an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of a base paper and a face paper provided in an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of a gap location provided in an embodiment of this application;
[0022] Figure 4 This is a flowchart illustrating another method for locating the gap in a label paper provided in an embodiment of this application;
[0023] Figure 5 This is a flowchart illustrating another method for locating the gap in a label paper provided in an embodiment of this application;
[0024] Figure 6 This is a flowchart illustrating another method for locating the gap in a label paper provided in an embodiment of this application;
[0025] Figure 7 This is a flowchart illustrating another method for locating the gap in a label paper provided in an embodiment of this application;
[0026] Figure 8 This is a schematic diagram of the structure of a label paper gap positioning device provided in an embodiment of this application;
[0027] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0028] To make the inventive objectives, features, and advantages of the embodiments of this application more apparent and understandable, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this application, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0030] In one embodiment, such as Figure 1 As shown, a method for locating label paper gaps is proposed. This method can be implemented using a computer program and can run on label paper gap positioning devices based on the von Neumann architecture. This computer program can be integrated into applications or run as a standalone utility application.
[0031] Specifically, the method for locating the gaps in the label paper includes:
[0032] S101, Determine the label paper's face paper size, and determine the preset face paper movement distance based on the face paper size.
[0033] Label paper refers to the consumables used in label printers to print various label contents, such as text, numbers, images, one-dimensional barcodes, and two-dimensional barcodes.
[0034] Label paper typically consists of three parts: release liner (backing paper), face paper, and adhesive. The release liner has an oily surface, which acts as a barrier against the adhesive, ensuring the face paper can be easily peeled off from the backing paper. Face paper comes in various materials, including coated paper, thermal paper, PET, and PVC, each with its specific applications and characteristics. Label paper is wound onto a spool, which is then installed inside a label printer for printing the label content.
[0035] The face paper size refers to the dimensions of the face paper in the paper output direction. Specifically, the face paper size can be the face paper height or the face paper width. When the face paper height is the face paper dimension in the paper output direction, the face paper width can be the face paper dimension in the vertical direction of the paper output direction. When the face paper width is the face paper dimension in the paper output direction, the face paper height can be the face paper dimension in the vertical direction of the paper output direction.
[0036] The preset tissue paper movement distance refers to a fixed distance value set based on the tissue paper size.
[0037] In some embodiments, after receiving a print command from a user terminal, the label printer can obtain the label paper size, set the paper size value as a preset paper movement distance value, and set the unit of the paper size to the unit of the preset paper movement distance. For example, if the paper size is 30 mm, the preset paper movement distance is also set to 30 mm.
[0038] S102, perform label paper movement processing based on the paper transport path, and calculate the movement distance of the label paper based on the position of the label paper's face paper.
[0039] As is understandable, the paper transport path refers to the preset paper path within the label printer, where the label paper can be transported or moved. The paper transport path has a specific paper transport direction, and the label paper moves along the paper transport path in accordance with the paper transport direction.
[0040] The face paper position can be understood as a reference position used to calculate the movement distance of the label. Specifically, the beginning position of the face paper can be configured as the face paper position, or the beginning position of the backing paper can be configured as the face paper position. For example, see [link to relevant documentation]. Figure 2 The diagram shows the base paper and the face paper. Figure 2 The width of the base paper is 'a', and the height is 'b'. The beginning position of the base paper is its top edge. The width of the top paper is 'a', and the height is 'c'. The beginning position of the top paper is its top edge. Figure 2 As shown, when b is greater than c, after bonding the face paper and backing paper, the beginning position of the face paper does not coincide with the beginning position of the bottom, but the bottom edge of the face paper coincides with the bottom edge of the backing paper. In this case, the beginning positions of the face paper and the backing paper are not the same. However, when b and c are equal (… Figure 2 (Not shown) After the face paper and backing paper are glued together, the beginning position of the face paper coincides with the beginning position of the bottom, and the bottom edge of the face paper coincides with the bottom edge of the backing paper. At this time, the beginning position of the face paper and the beginning position of the backing paper are in the same position.
[0041] The travel distance refers to the total distance the label paper travels along the paper transport path from the moment it begins to move until the current moment.
[0042] In some embodiments, label paper movement based on the paper transport path can be understood as the label printer controlling the movement of the label paper along the paper transport path via a transmission mechanism. Specifically, the transmission mechanism may include several key components, such as a feed roller, a guide roller, a drive belt, a stepper motor, a tension controller, a photoelectric sensor, etc.
[0043] Calculating the label paper's movement distance based on the label paper's face paper position can be understood as follows: during the process of controlling the label paper's movement, determine the moment when the gap detector detects the face paper's position, detect the total number of movement steps of the label paper after that moment, and determine the label paper's movement distance based on this total number of movement steps.
[0044] S103, determine whether the moving distance is greater than or equal to the preset paper moving distance, and detect whether there is a gap signal corresponding to the label paper.
[0045] It is understood that, as can be seen from step S103, the tissue paper position can be either the beginning position of the tissue paper or the beginning position of the backing paper. For ease of description, in the scenario where the beginning position of the backing paper is configured as the tissue paper position, the preset tissue paper movement distance is recorded as the first preset distance. In the scenario where the beginning position of the tissue paper is configured as the tissue paper position, the preset tissue paper movement distance is recorded as the second preset distance. When the beginning position of the tissue paper and the beginning position of the backing paper are the same, the first preset distance is equal to the second preset distance. When the beginning position of the tissue paper and the beginning position of the backing paper are different, the first preset distance is greater than the second preset distance.
[0046] Specifically, the detection of the presence of a gap signal corresponding to the label paper can be implemented as follows: A gap detection sensor detects the light transmittance of the label paper, obtains a preset gap detection threshold, and determines whether the light transmittance is less than the preset threshold. If the light transmittance is less than the preset threshold, a gap signal corresponding to the label paper exists; if the light transmittance is greater than or equal to the preset threshold, no gap signal corresponding to the label paper exists. The preset gap detection threshold can be set according to the light transmittance characteristics of the label paper. Different types of label paper have different light transmittance characteristics, so different preset gap detection thresholds can be set for different types of label paper to improve the detection accuracy of the gap signal. Optionally, the gap detection sensor can be a photoelectric sensor.
[0047] S104, if the moving distance is greater than or equal to the preset paper moving distance and there is a gap signal, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0048] The actual gap location refers to the actual gap location at the joint of the two sheets of paper.
[0049] It is understandable that if both conditions are met simultaneously—the moving distance is greater than or equal to the preset tissue paper moving distance, and a gap signal exists—the gap position indicated by the gap signal will be confirmed as the actual gap position. However, if either of these two conditions is met, or if neither condition is met, the gap position indicated by the gap signal will not be confirmed as the actual gap position. For example, if the moving distance is greater than or equal to the preset tissue paper moving distance but no gap signal exists, the gap position indicated by the gap signal will not be confirmed as the actual gap position. Similarly, if the moving distance is less than the preset tissue paper moving distance but a gap signal exists, the gap position indicated by the gap signal will not be confirmed as the actual gap position. Again, if the moving distance is less than the preset tissue paper moving distance but no gap signal exists, the gap position indicated by the gap signal will not be confirmed as the actual gap position.
[0050] Understandably, if the moving distance is greater than or equal to the preset sheet movement distance, it means that the label's movement distance along the paper transport path is greater than or equal to the sheet's dimension in the output direction. At this point, or subsequently, as the label continues to move, the actual gap position of the label will be detected. Therefore, if both the moving distance is greater than or equal to the preset sheet movement distance and a gap signal exists, it can be confirmed that the gap position indicated by the gap signal is the actual gap position, rather than a false gap position detected due to dirt on the label.
[0051] For example, see Figure 3 The diagram shown illustrates the location of a gap. Figure 3 In the diagram, the black rectangle represents the gap, the two white rectangles separated by the black rectangle represent the face paper, and the black curved frame represents the dirt on the label. When the light transmittance at the dirt location detected by the gap detection sensor is less than the preset gap detection threshold, the existence of the first gap signal can be confirmed. When the light transmittance at the gap location detected by the gap detection sensor is less than the preset gap detection threshold, the existence of the second gap signal can also be confirmed. Obviously, when the first gap signal is detected, the moving distance is less than the preset face paper moving distance, and the gap location indicated by the first gap signal is not the actual gap location. However, when the second gap signal is detected, the moving distance is greater than or equal to the preset face paper moving distance, and the gap location indicated by the second gap signal is the actual gap location.
[0052] In the label paper gap positioning method provided in this application embodiment, the size of the label paper's face paper is first determined, and a preset face paper moving distance is determined based on the face paper size. Then, the label paper is moved based on the paper transport path, and the moving distance of the label paper is calculated based on the face paper position. It is determined whether the moving distance is greater than or equal to the preset face paper moving distance, and whether a gap signal corresponding to the label paper exists. If the moving distance is greater than or equal to the preset face paper moving distance and a gap signal exists, the gap position indicated by the gap signal is determined to be the actual gap position. In this way, by monitoring the magnitude of the label paper moving distance and the preset face paper moving distance, and monitoring the presence or absence of a gap signal, the actual gap position of the face paper can be accurately detected. This avoids the problem of false detection and missed detection of gaps caused by the unstable light transmission characteristics of the face paper detected by photoelectric sensors in related technologies. This reduces the problem of printing offset and missing parts in label printing, enabling the label content to be accurately printed on the face paper and improving the printing accuracy of label printing.
[0053] Please see Figure 4 This provides a flowchart illustrating another method for locating the gaps in label paper in this application embodiment.
[0054] Specifically, the method for locating the gaps in the label paper includes:
[0055] S401 uses an RFID module to identify the RFID chip integrated within the label paper roll to obtain the label paper's face paper size.
[0056] Understandably, the RFID module is installed inside the label printer to read the label paper's face size from the RFID chip. During the label paper production process, the RFID chip can be integrated into the roll, and the face size of the label paper wound on that roll can be written into the chip.
[0057] Specifically, after the label printer receives the printing command sent by the user terminal, it can read the face paper size of the label paper from the RFID chip inside the label paper roll through the RFID module.
[0058] S402 receives the label paper parameter transmission instruction sent by the user terminal and obtains the label paper face paper size from the label paper parameter transmission instruction.
[0059] In some embodiments, after the label printer receives a print instruction sent by the user terminal, it can send a label paper parameter query instruction to the user terminal. In response to the label paper parameter query instruction, the user terminal generates a label paper parameter transmission instruction including the face paper size of the label paper. The user terminal sends the label paper parameter transmission instruction to the label printer, and the label printer parses the label paper parameter transmission instruction to obtain the face paper size of the label paper.
[0060] In some other embodiments, the label printer simultaneously receives a print command and a label paper parameter transmission command sent by the user terminal. In response to the print command, the label printer parses the label paper parameter transmission command to obtain the label paper face size.
[0061] S403, determine the label paper face stock type, and determine the label paper face stock size based on the face stock type.
[0062] Specifically, the label printer can store a mapping relationship between label paper type and label paper size. This mapping relationship can include at least one reference label paper type and its corresponding reference size. The label printer can be equipped with an RFID module, and an RFID chip can be integrated within the label paper roll. This RFID chip stores the label paper type. The label printer reads the label paper type from the RFID chip via the RFID module and queries the mapping relationship for the corresponding label paper size.
[0063] It is understood that steps S401, S402, and S403 are three implementation methods for determining the face paper size of the label paper. When performing the label paper gap positioning method of this application, any one of steps S401, S402, and S403 can be selected to obtain the face paper size of the label paper.
[0064] S404, determine the preset face paper movement distance based on the face paper size.
[0065] For details on how step S404 is implemented, please refer to [link / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0066] S405 controls the movement of the label paper based on the paper transport path and determines the first moment when the gap detection sensor detects the beginning position of the face paper.
[0067] The "starting position of the face paper" refers to the top edge of the face paper in the paper feeding direction. For details on the paper feeding direction, please refer to [link / reference needed]. Figure 3 The schematic diagram shown will not be described in detail here.
[0068] Specifically, label paper movement based on the paper transport path can be understood as the label printer controlling the movement of the label paper along the paper transport path through a transmission mechanism. This transmission mechanism can include several key components, such as feed rollers, guide rollers, drive belts, stepper motors, tension controllers, photoelectric sensors, etc.
[0069] The method for determining the first moment when the gap detection sensor detects the beginning position of the label paper can be as follows: Obtain a preset gap detection threshold; detect the light transmittance of the label paper using the gap detection sensor; determine the moment when the light transmittance first exceeds the preset gap detection threshold; and use this moment as the first moment when the beginning position of the label paper is detected. It can be understood that since the light transmittance values at gap and non-gap positions on the label paper differ, by comparing the preset gap detection threshold with the light transmittance value, it can be determined whether the label paper position detected by the gap sensor is a gap position. When the light transmittance value is greater than or equal to the preset gap detection threshold, it can be confirmed that the label paper position detected by the gap detection sensor is a non-gap position; when the light transmittance value is less than the preset gap detection threshold, it can be confirmed that the label paper position detected by the gap detection sensor is a gap position. As the label paper moves along the paper transport path, the gap detection sensor can continuously detect the light transmittance at the position of the label paper passing through the gap sensor. When the label paper passes through the gap sensor at the gap position, the gap detection sensor can detect that the light transmittance at the gap position is less than the preset gap detection threshold. However, after the label paper passes through the gap sensor, the gap detection sensor can detect that the light transmittance at the position of the label paper is greater than the preset gap detection threshold. The beginning position of the face paper is the end position of the face paper that is immediately adjacent to the gap position. Therefore, the beginning position of the face paper is the position where the gap detection sensor detects the first light transmittance value that is greater than the preset gap detection threshold.
[0070] It is understandable that the above-mentioned method of taking the moment when the light transmittance first exceeds the preset gap detection threshold as the first moment of detecting the beginning position of the face paper can be implemented in a scenario where the beginning position of the face paper coincides with the beginning position of the back paper. However, in a scenario where the beginning positions of the face paper and the back paper do not coincide, the light transmittance values of the face paper and the back paper may be different, and the light transmittance value of the face paper may be less than that of the back paper. Therefore, the implementation method for determining the first moment when the gap detection sensor detects the beginning position of the face paper can be: obtaining a preset gap detection threshold, obtaining a first preset gap detection threshold, the first preset gap detection threshold being greater than the preset gap detection threshold, detecting the light transmittance value of the label paper through the gap detection sensor, determining the moment when the light transmittance first exceeds the preset gap detection threshold and is less than the first preset gap detection threshold, and taking the moment when the light transmittance first exceeds the preset gap detection threshold and is less than the first preset gap detection threshold as the first moment of detecting the beginning position of the face paper.
[0071] S406, monitor the total number of steps the label has moved after the first moment, and determine the distance the label has moved based on the total number of steps.
[0072] Specifically, the implementation method of step S406 can be as follows: continuously detect the total number of steps the label has moved after the first moment, obtain the preset moving step length, and calculate the product of the preset moving step length and the total number of moving steps to obtain the moving distance of the label.
[0073] S407, determine whether the moving distance is greater than or equal to the preset paper moving distance, and obtain the target material type of the label paper. Determine the gap detection threshold corresponding to the target material type from the preset gap detection mapping relationship, and use the gap detection threshold to detect whether there is a gap signal corresponding to the label paper.
[0074] In some embodiments, obtaining the target material type of the label paper may include the following steps: A1: Identifying the RFID chip integrated in the label paper roll using an RFID module to obtain the target material type of the label paper; or, A2: Receiving a label paper parameter transmission instruction sent by a user terminal and obtaining the target material type of the label paper from the label paper parameter transmission instruction; or, A3: Determining the label paper face paper model and determining the target material type of the label paper based on the face paper model.
[0075] When performing step A1, the following steps can be taken: After the label printer receives the printing instruction sent by the user terminal, it reads the target material type of the label paper from the RFID chip inside the label paper roll through the RFID module.
[0076] When performing step A2, it can be as follows: After the label printer receives the print command sent by the user terminal, it can send a label paper parameter query command to the user terminal. The user terminal, in response to the label paper parameter query command, generates a label paper parameter transmission command including the target material type of the label paper. The user terminal sends the label paper parameter transmission command to the label printer, and the label printer parses the label paper parameter transmission command to obtain the target material type of the label paper. Alternatively, step A2 can also be performed as follows: The label printer simultaneously receives both the print command and the label paper parameter transmission command sent by the user terminal. In response to the print command, the label printer parses the label paper parameter transmission command to obtain the target material type of the label paper.
[0077] When performing step A3, the label printer can store a mapping relationship between label paper type and material type. This mapping relationship can include at least one reference label paper type and a corresponding reference material type for each reference label paper type. The label printer can be equipped with an RFID module, and an RFID chip can be integrated within the label paper roll. The RFID chip can store the label paper type. The label printer reads the label paper type from the RFID chip via the RFID module and then queries the mapping relationship to find the target material type corresponding to that label paper type.
[0078] Understandably, the label printer can store preset gap detection mapping relationships. These preset mapping relationships include at least one reference material type and a corresponding reference gap detection threshold for each reference material type. The reference gap detection threshold for each reference material type can be set according to the light transmission characteristics of the label paper for each reference material type. Within the preset gap detection mapping relationship, the printer queries the reference gap detection threshold corresponding to the target material type when the reference material type is the target material type, and uses this reference gap detection threshold as the gap detection threshold for the target material type.
[0079] Specifically, the method of detecting whether there is a gap signal corresponding to the label paper by using a gap detection threshold can be implemented as follows: the light transmittance of the label paper is detected by a gap detection sensor, and it is determined whether the light transmittance is less than the gap detection threshold. If the light transmittance is less than the preset gap detection threshold, then there is a gap signal corresponding to the label paper. If the light transmittance is greater than or equal to the preset gap detection threshold, then there is no gap signal corresponding to the label paper.
[0080] S408, if the moving distance is greater than or equal to the preset paper moving distance and a gap signal exists, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0081] For details on how step S408 is implemented, please refer to [link / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0082] S409 performs label paper movement processing based on the paper transport path. When the actual gap position matches the sensor position corresponding to the gap detection sensor, the label paper is printed.
[0083] Specifically, the label paper movement based on the paper transport path can be understood as continuing to control the label paper to move along the paper transport path via a transmission mechanism. When the actual gap position matches the sensor position corresponding to the gap detection sensor, the label paper is printed. This can be understood as detecting whether the actual gap position is the end gap position corresponding to the preset paper movement distance. If the actual gap position is the end gap position corresponding to the preset paper movement distance, then it is determined that the actual gap position matches the sensor position corresponding to the gap detection sensor, and the label paper is printed. The end gap position corresponding to the preset paper movement distance refers to the last actual gap position detected by the gap detection sensor during the time period when the label paper's movement distance is greater than or equal to the preset paper movement distance, from the detection of one paper start position to the next. Because there is a certain width between any two face sheets in the label paper, during the movement of the label paper, within a time period when the moving distance of the label paper is greater than or equal to the preset moving distance of the face sheets, the gap detection sensor may detect multiple gap signals. This allows the determination of multiple actual gap positions indicated by multiple gap signals. When the last actual gap position is detected, it means that the actual gap position corresponding to the current face sheet has completely passed the sensor position corresponding to the gap detection sensor, indicating that the movement processing of the current face sheet has been completed, and the printing task for the content of the current face sheet can be started.
[0084] S410, after the printer is paused, performs label paper retraction based on the paper transport path and locates the beginning position of the label paper's face paper using a gap detection sensor.
[0085] In some embodiments, after the printer is paused, the label paper can be controlled to retract in the opposite direction of the paper transport path via a transmission mechanism, and the opening position of the label paper's face sheet can be repositioned by a gap detection sensor to ensure the accuracy of the detected face sheet opening position. The implementation method of locating or detecting the opening position of the label paper's face sheet using a gap detection sensor can be found in the description of the relevant part in step S405, and will not be detailed here.
[0086] In the label paper gap positioning method provided in this application embodiment, the RFID module identifies the RFID chip integrated in the label paper roll to obtain the label paper's face paper size. Alternatively, it receives a label paper parameter transmission command sent by a user terminal, obtains the label paper's face paper size from the command, determines the label paper's face paper model, and determines the face paper size based on the face paper model. Thus, this application provides multiple methods for obtaining the face paper size, increasing the convenience of obtaining the face paper size. Then, a preset face paper movement distance is determined based on the face paper size. The label paper is controlled to move based on the paper transport path, and the first moment when the gap detection sensor detects the beginning position of the face paper is determined. The total number of movement steps of the label paper after the first moment is monitored, and the movement distance of the label paper is determined based on the total number of movement steps. It is then determined whether the movement distance is greater than or equal to the preset face paper movement distance, and the target material type of the label paper is obtained. A gap detection threshold corresponding to the target material type is determined from a preset gap detection mapping relationship, and the gap detection threshold is used for detection. The system detects the presence of a gap signal corresponding to the label paper. If the movement distance is greater than or equal to the preset paper movement distance and a gap signal exists, the gap position indicated by the gap signal is determined as the actual gap position. Multiple corresponding gap detection thresholds are set for different types of label paper, improving the accuracy of gap signal detection for different materials. Next, the label paper is moved along the paper transport path. When the actual gap position matches the sensor position corresponding to the gap detection sensor, the label paper is printed. This ensures that the printing content is accurately printed on the paper after the actual gap position has completely passed the sensor position corresponding to the gap detection sensor. Subsequently, when the printer is paused, the label paper is retracted along the paper transport path. The gap detection sensor locates the beginning position of the label paper's surface. This retraction process ensures the accuracy of detecting the beginning position of the surface. In summary, this application, by monitoring the distance the label paper moves relative to the preset distance the face paper moves, and by monitoring for gap signals, can accurately detect the actual gap position of the face paper. This avoids the problems of false detection and missed detection of gaps caused by the unstable light transmission characteristics of the face paper when using photoelectric sensors in related technologies. As a result, it can reduce printing offset and missing parts in label printing, and ensure that the label content is accurately printed on the face paper, thus improving the printing accuracy of label printing.
[0087] Please see Figure 5 This provides a flowchart illustrating another method for locating the gaps in label paper in this application embodiment.
[0088] Specifically, the method for locating the gaps in the label paper includes:
[0089] S501, determine the size of the label paper's face sheet, and determine the preset face sheet movement distance based on the face sheet size.
[0090] S502, the label paper is moved based on the paper transport path, and the moving distance of the label paper is calculated based on the position of the label paper's face paper.
[0091] For details on the implementation of steps S501-S502, please refer to [link / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0092] S503, determine whether the moving distance is greater than or equal to the preset paper moving distance.
[0093] S504, if the moving distance is greater than or equal to the preset paper moving distance, start detecting whether there is a gap signal corresponding to the label paper.
[0094] S505, if a gap signal corresponding to the label is detected, the gap position indicated by the gap signal is determined to be the actual gap position.
[0095] Specifically, after calculating the label paper's movement distance, it first checks if the movement distance is greater than or equal to the preset face paper movement distance. If the movement distance is greater than or equal to the preset face paper movement distance, it then starts detecting whether a gap signal corresponding to the label paper exists. When a gap signal corresponding to the label paper is detected, the gap position indicated by the gap signal can be determined as the actual gap position. For details on how to detect whether a gap signal corresponding to the label paper exists, please refer to [link to documentation / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0096] S506, if no gap signal corresponding to the label paper is found after the moving distance is greater than or equal to the preset paper moving distance, then stop executing the step of controlling the label paper movement based on the paper transport path, and / or issue a preset alarm.
[0097] Specifically, if there is no corresponding gap signal for the label paper after the moving distance is greater than or equal to the preset paper moving distance, it can be understood that the value of the moving distance of the label paper on the paper transport path is greater than or equal to the value of the paper size in the paper output direction, and no corresponding gap signal for the label paper is detected. This indicates that the label printer may be malfunctioning and is not suitable to continue the current printing task. The step of controlling the label paper movement based on the paper transport path can be stopped, and / or a preset alarm can be issued to remind the user that the printer is malfunctioning.
[0098] In the label paper gap positioning method provided in this application embodiment, by first determining that the moving distance is greater than or equal to a preset paper moving distance, and then starting to detect whether there is a gap signal corresponding to the label paper when the moving distance is greater than or equal to the preset paper moving distance, the data processing load of the label printer's processor can be reduced, thereby reducing the power consumption of the label printer. In addition, by monitoring the magnitude of the label paper moving distance and the preset paper moving distance, as well as monitoring the presence or absence of gap signals, the actual gap position of the paper can be accurately detected, avoiding the problem of false detection and missed detection of gaps caused by the unstable light transmission characteristics of the paper when using photoelectric sensors in related technologies. This can reduce the problems of printing offset and missing parts in label printing, and ensure that the label content is accurately printed on the paper, improving the printing accuracy of label printing. By monitoring the magnitude of the label paper moving distance and the preset paper moving distance, as well as monitoring the presence or absence of gap signals, it is also possible to detect whether the printer is malfunctioning. When a malfunction occurs (i.e., after the moving distance is greater than or equal to the preset paper moving distance, there is no gap signal corresponding to the label paper), corresponding measures can be taken to avoid printing incorrect content in the event of a malfunction.
[0099] Please see Figure 6 This provides a flowchart illustrating another method for locating the gaps in label paper in this application.
[0100] Specifically, the method for locating the gaps in the label paper includes:
[0101] S601, determine the size of the label paper's face sheet, and determine the preset face sheet movement distance based on the face sheet size.
[0102] S602, the label paper is moved based on the paper transport path, and the moving distance of the label paper is calculated based on the position of the label paper's face paper.
[0103] For details on the implementation of steps S601-S602, please refer to [link / reference]. Figure 1 The relevant parts described in the illustrated embodiments will not be repeated here.
[0104] S603, determine whether the moving distance is greater than or equal to the preset paper moving distance, and start detecting whether there is a gap signal corresponding to the label paper.
[0105] S604, if the moving distance is greater than or equal to the preset paper moving distance, and a gap signal exists, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0106] Specifically, after calculating the label's movement distance, it is determined whether the movement distance is greater than or equal to the preset face paper movement distance. Simultaneously, the system begins detecting the presence of a gap signal corresponding to the label. When the movement distance is greater than or equal to the preset face paper movement distance, and a gap signal corresponding to the label exists, the gap position indicated by the gap signal can be determined as the actual gap position. For details on how to detect the presence of a gap signal corresponding to the label, please refer to [link to documentation / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0107] S605, if no gap signal corresponding to the label paper is found after the moving distance is greater than or equal to the preset paper moving distance, then stop executing the step of controlling the label paper movement based on the paper transport path, and / or issue a preset alarm.
[0108] Specifically, if there is no corresponding gap signal for the label paper after the moving distance is greater than or equal to the preset paper moving distance, it can be understood that the value of the moving distance of the label paper on the paper transport path is greater than or equal to the value of the paper size in the paper output direction, and no corresponding gap signal for the label paper is detected. This indicates that the label printer may be malfunctioning and is not suitable to continue the current printing task. The step of controlling the label paper movement based on the paper transport path can be stopped, and / or a preset alarm can be issued to remind the user that the printer is malfunctioning.
[0109] It is understandable that, since the detection of the presence of a gap signal corresponding to the label paper begins simultaneously with determining whether the moving distance is greater than or equal to the preset moving distance of the face paper, a gap signal corresponding to the label paper may be detected during the process of the label paper moving along the paper transport path and the moving distance being less than the preset moving distance of the face paper. The detection of a gap signal during this process can be considered a false detection, and therefore the gap signal can be ignored.
[0110] In the label paper gap positioning method provided in this application embodiment, the magnitude of the moving distance, the preset moving distance of the face paper, and the presence or absence of a gap signal corresponding to the label paper are simultaneously monitored. This ensures that the actual gap position is detected as early as possible and guarantees the accuracy of the actual gap position detection. It avoids the problem of false detection and missed detection of gaps caused by the unstable light transmission characteristics of the face paper when using photoelectric sensors in related technologies. This reduces printing offset and missing issues in label printing, allowing the label content to be accurately printed on the face paper, thus improving the printing accuracy of label printing. By monitoring the magnitude of the label paper moving distance and the preset moving distance of the face paper, as well as monitoring the presence or absence of a gap signal, printer malfunctions can also be detected. When a malfunction occurs (i.e., after the moving distance is greater than or equal to the preset moving distance of the face paper, there is no gap signal corresponding to the label paper), corresponding measures can be taken to avoid printing incorrect content in the event of a malfunction.
[0111] Please see Figure 7 This provides a flowchart illustrating another method for locating the gaps in label paper in this application.
[0112] Specifically, the method for locating the gaps in the label paper includes:
[0113] S701, determine the size of the label paper's face sheet, and determine the preset face sheet movement distance based on the face sheet size.
[0114] S702, performs label paper movement processing based on the paper transport path, and calculates the movement distance of the label paper based on the position of the label paper's face paper.
[0115] For details on the implementation of steps S701-S702, please refer to [link / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0116] S703 detects whether there is a gap signal corresponding to the label paper.
[0117] S704 If a gap signal corresponding to the label paper is detected, determine whether the moving distance is greater than or equal to the preset paper moving distance.
[0118] S705, if the moving distance is greater than or equal to the preset paper moving distance, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0119] Specifically, after calculating the label's movement distance, the system detects whether a corresponding gap signal exists. If a gap signal is detected, it checks if the movement distance is greater than or equal to a preset sheet movement distance. Furthermore, if the movement distance is greater than or equal to the preset sheet movement distance, the gap position indicated by the gap signal is confirmed as the actual gap position. For details on how to detect the presence of a corresponding gap signal, please refer to [link to documentation / reference]. Figure 1 The descriptions of the relevant parts in the illustrated embodiments will not be repeated here.
[0120] S706, if the moving distance is less than the preset paper moving distance, the gap signal is ignored.
[0121] Specifically, after executing step S706, the process can return to executing step S702: controlling the label paper movement based on the paper transport path and calculating the movement distance of the label paper based on the position of the label paper's face paper.
[0122] Understandably, when a gap signal corresponding to the label paper is detected, if the moving distance is less than the preset face paper moving distance, it means that the gap signal is not an actual gap signal and can be considered a false detection. In this case, the gap signal can be ignored, and the label paper can continue to be controlled to move along the paper transport path. The moving distance of the label paper can continue to be calculated. That is, the steps of controlling the label paper to move based on the paper transport path and calculating the moving distance of the label paper based on the face paper position can continue to be executed.
[0123] In the label paper gap positioning method provided in this application, the presence or absence of a gap signal corresponding to the label paper is first detected. Then, when a gap signal is detected, the magnitude of the moving distance and the preset face paper moving distance are determined. This reduces the data processing load of the label printer's processor, thereby reducing the power consumption of the label printer. In addition, by monitoring the magnitude of the label paper moving distance and the preset face paper moving distance, as well as monitoring the presence or absence of a gap signal, the actual gap position of the face paper can be accurately detected. This avoids the problem of false detection and missed detection of gaps caused by the unstable light transmission characteristics of the face paper detected by photoelectric sensors in related technologies. This reduces the problem of printing offset and missing parts in label printing, and ensures that the label content is accurately printed on the face paper, thus improving the printing accuracy of label printing.
[0124] The following will combine Figure 8 This application provides a detailed description of the label paper gap positioning device provided in its embodiments. It should be noted that... Figure 8 The label paper gap positioning device shown is used to perform the present application. Figures 1-7The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figures 2-8 The example shown.
[0125] Please see Figure 8 This diagram illustrates the structure of a label paper gap positioning device according to an embodiment of this application. The label paper gap positioning device 1 can be implemented as all or part of a device through software, hardware, or a combination of both. According to some embodiments, the label paper gap positioning device 1 includes a size determination module 11, a movement control module 12, a gap detection module 13, and a gap confirmation module 14, specifically used for:
[0126] Size determination module 11 is used to determine the size of the label paper's face paper and determine a preset face paper moving distance based on the face paper size;
[0127] The movement control module 12 is used to move the label paper based on the paper transport path and calculate the moving distance of the label paper based on the position of the label paper's face paper.
[0128] The gap detection module 13 is used to determine whether the moving distance is greater than or equal to the preset paper moving distance, and to detect whether there is a gap signal corresponding to the label paper;
[0129] The gap confirmation module 14 is used to determine the gap position indicated by the gap signal as the actual gap position if the moving distance is greater than or equal to the preset paper moving distance and the gap signal exists.
[0130] Optional, the motion control module 12 is specifically used for:
[0131] The label paper is moved based on the paper transport path control, and the first moment when the gap detection sensor detects the opening position of the face paper is determined.
[0132] The total number of steps the label paper moves after the first moment is monitored, and the moving distance of the label paper is determined based on the total number of steps.
[0133] Optional, gap detection module 13, specifically used for:
[0134] Determine whether the moving distance is greater than or equal to the preset paper moving distance;
[0135] If the moving distance is greater than or equal to the preset paper moving distance, then the detection of whether there is a gap signal corresponding to the label paper begins.
[0136] If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then determining the gap position indicated by the gap signal as the actual gap position includes:
[0137] If a gap signal corresponding to the label is detected, the gap position indicated by the gap signal is determined to be the actual gap position.
[0138] Optional, gap detection module 13, specifically used for:
[0139] Determine whether the moving distance is greater than or equal to the preset paper moving distance, and start detecting whether there is a gap signal corresponding to the label paper.
[0140] Optionally, the gap detection module 13 is also used for:
[0141] If, after the moving distance is greater than or equal to the preset paper moving distance, there is no gap signal corresponding to the label paper, then the step of controlling the label paper movement based on the paper transport path is stopped, and / or a preset alarm is issued.
[0142] Optional, gap detection module 13, specifically used for:
[0143] Detect whether there is a gap signal corresponding to the label paper;
[0144] If a gap signal corresponding to the label paper is detected, it is determined whether the moving distance is greater than or equal to the preset paper moving distance;
[0145] If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then determining the gap position indicated by the gap signal as the actual gap position includes:
[0146] If the moving distance is greater than or equal to the preset paper moving distance, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0147] Optionally, the gap detection module 13 is also used for:
[0148] If the moving distance is less than the preset face paper moving distance, the gap signal is ignored, and the step of controlling the label paper to move based on the paper transport path and calculating the moving distance of the label paper based on the face paper position is executed.
[0149] Optional, the size determination module 11 is specifically used for:
[0150] The RFID module identifies the RFID chip integrated within the label roll to obtain the label's face paper size; or,
[0151] Receive a label paper parameter transmission instruction sent by a user terminal, and obtain the label paper face paper size from the label paper parameter transmission instruction; or,
[0152] Determine the label paper's face paper model, and determine the label paper's face paper size based on the face paper model.
[0153] Optionally, the gap detection module 13 includes:
[0154] A material acquisition unit is used to acquire the target material type of the label paper;
[0155] A threshold determination unit is used to determine the gap detection threshold corresponding to the target material type from a preset gap detection mapping relationship;
[0156] A gap detection unit is used to detect whether a gap signal corresponding to the label paper exists using the gap detection threshold.
[0157] Optional, material acquisition unit, specifically used for:
[0158] The target material type of the label paper is determined by identifying the RFID chip integrated within the label paper roll using an RFID module; or,
[0159] Receive a label paper parameter transmission instruction sent by a user terminal, and obtain the target material type of the label paper from the label paper parameter transmission instruction; or,
[0160] Determine the label paper's face paper model, and based on the face paper model, determine the target material type of the label paper.
[0161] Optionally, the label paper gap positioning device 1 further includes:
[0162] The retraction processing module is used to retract the label paper based on the paper transport path after the printer is paused, and to locate the beginning position of the label paper's face paper using a gap detection sensor.
[0163] Optionally, the label paper gap positioning device 1 further includes:
[0164] The printing processing module is used to: move the label paper according to the paper transport path; and print the label paper when the actual gap position matches the sensor position corresponding to the gap detection sensor.
[0165] The label paper gap positioning device provided in this application first determines the size of the label paper's face paper, determines a preset face paper moving distance based on the face paper size, then moves the label paper based on the paper transport path, calculates the moving distance based on the face paper position, determines whether the moving distance is greater than or equal to the preset face paper moving distance, and detects whether a gap signal corresponding to the label paper exists. If the moving distance is greater than or equal to the preset face paper moving distance and a gap signal exists, the gap position indicated by the gap signal is determined to be the actual gap position. Thus, by monitoring the magnitude of the label paper moving distance and the preset face paper moving distance, and by monitoring the presence or absence of a gap signal, the actual gap position of the face paper can be accurately detected. This avoids the problem of false or missed gap detection caused by the unstable light transmission characteristics of the face paper when using photoelectric sensors in related technologies. This reduces printing offset and missing parts in label printing, ensuring that the label content is accurately printed on the face paper, and improving the printing accuracy of the label.
[0166] Please refer to Figure 9 This document provides a schematic diagram of the structure of an electronic device according to an embodiment of this application. For example, the electronic device in this embodiment may specifically be a label printer. The electronic device may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 can be connected via the bus 150.
[0167] Processor 110 may include one or more processing cores. Processor 110 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 110 may integrate one or more of a central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.
[0168] The memory 120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 120 may include a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described below, etc. The operating system may be the Android system, including systems deeply developed based on the Android system, the iOS system developed by Apple Inc., including systems deeply developed based on the iOS system, or other systems.
[0169] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to establish data communication between the third-party applications and the operating system. This would allow the operating system to obtain the current scenario information of the third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0170] The input device 130 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 140 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 can be a touch display screen.
[0171] The touch display screen can be designed as a full-screen, curved screen, or irregularly shaped screen. It can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen; however, this application does not limit the specific design of the touch display screen.
[0172] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, Wireless Fidelity (WiFi) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0173] In some embodiments, the processor 110 may be used to call a program stored in the memory 120 for a method of locating the gap in a label paper, and specifically perform the following operations:
[0174] Determine the size of the label sheet's face paper, and determine a preset face paper movement distance based on the face paper size;
[0175] The label paper is moved based on the paper transport path, and the moving distance of the label paper is calculated based on the position of the label paper's face paper.
[0176] Determine whether the moving distance is greater than or equal to the preset paper moving distance, and detect whether there is a gap signal corresponding to the label paper;
[0177] If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0178] Optionally, when performing the step of determining the data storage area of the target difference print data, the processor 110 specifically performs the following operations:
[0179] Obtain the target printing instruction corresponding to the target difference printing data;
[0180] If the target difference print data is determined to be of the data integrity type based on the target print instruction, then the integrity data cache area is determined as the data storage area of the target difference print data;
[0181] If the target difference print data is determined to be of incomplete data type based on the target print instruction, then a partial data cache area is determined as the data storage area for the target difference print data.
[0182] Optionally, when the processor 110 performs the step of moving the label paper based on the paper transport path and calculating the moving distance of the label paper based on the position of the label paper, including the beginning position of the label paper, the processor 110 specifically performs the following operations:
[0183] The label paper is moved based on the paper transport path control, and the first moment when the gap detection sensor detects the opening position of the face paper is determined.
[0184] The total number of steps the label paper moves after the first moment is monitored, and the moving distance of the label paper is determined based on the total number of steps.
[0185] Optionally, when the processor 110 performs the steps of determining whether the moving distance is greater than or equal to the preset paper moving distance and detecting whether there is a gap signal corresponding to the label paper, it specifically performs the following operations:
[0186] Determine whether the moving distance is greater than or equal to the preset paper moving distance;
[0187] If the moving distance is greater than or equal to the preset paper moving distance, then the detection of whether there is a gap signal corresponding to the label paper begins.
[0188] If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then determining the gap position indicated by the gap signal as the actual gap position includes:
[0189] If a gap signal corresponding to the label is detected, the gap position indicated by the gap signal is determined to be the actual gap position.
[0190] Optionally, when the processor 110 performs the steps of determining whether the moving distance is greater than or equal to the preset paper moving distance and detecting whether there is a gap signal corresponding to the label paper, it specifically performs the following operations:
[0191] Determine whether the moving distance is greater than or equal to the preset paper moving distance, and start detecting whether there is a gap signal corresponding to the label paper.
[0192] Optionally, the processor 110 also performs the following operations:
[0193] If, after the moving distance is greater than or equal to the preset paper moving distance, there is no gap signal corresponding to the label paper, then the step of controlling the label paper movement based on the paper transport path is stopped, and / or a preset alarm is issued.
[0194] Optionally, when the processor 110 performs the steps of determining whether the moving distance is greater than or equal to the size of the face paper and detecting whether there is a gap signal corresponding to the label paper, it specifically performs the following operations:
[0195] Detect whether there is a gap signal corresponding to the label paper;
[0196] If a gap signal corresponding to the label paper is detected, it is determined whether the moving distance is greater than or equal to the preset paper moving distance;
[0197] If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then determining the gap position indicated by the gap signal as the actual gap position includes:
[0198] If the moving distance is greater than or equal to the preset paper moving distance, then the gap position indicated by the gap signal is determined to be the actual gap position.
[0199] Optionally, the processor 110 also performs the following operations:
[0200] If the moving distance is less than the preset face paper moving distance, the gap signal is ignored, and the step of controlling the label paper to move based on the paper transport path and calculating the moving distance of the label paper based on the face paper position is executed.
[0201] Optionally, when performing the step of determining the face paper size of the label paper, the processor 110 specifically performs the following operations:
[0202] The RFID module identifies the RFID chip integrated within the label roll to obtain the label's face paper size; or,
[0203] Receive a label paper parameter transmission instruction sent by a user terminal, and obtain the label paper face paper size from the label paper parameter transmission instruction; or,
[0204] Determine the label paper's face paper model, and determine the label paper's face paper size based on the face paper model.
[0205] Optionally, when performing the step of detecting whether a gap signal corresponding to the label paper exists, the processor 110 specifically performs the following operations:
[0206] Obtain the target material type of the label paper;
[0207] The gap detection threshold corresponding to the target material type is determined from the preset gap detection mapping relationship;
[0208] The gap detection threshold is used to detect whether there is a gap signal corresponding to the label paper.
[0209] Optionally, when performing the step of obtaining the target material type of the label paper, the processor 110 specifically performs the following operations:
[0210] The target material type of the label paper is determined by identifying the RFID chip integrated within the label paper roll using an RFID module; or,
[0211] Receive a label paper parameter transmission instruction sent by a user terminal, and obtain the target material type of the label paper from the label paper parameter transmission instruction; or,
[0212] Determine the label paper's face paper model, and based on the face paper model, determine the target material type of the label paper.
[0213] Optionally, the processor 110 also performs the following operations:
[0214] After the printer is paused, the label paper is retracted based on the paper transport path, and the opening position of the label paper's face paper is located by a gap detection sensor.
[0215] Optionally, after executing the statement "If the moving distance is greater than or equal to the preset paper moving distance and the gap signal exists, then determine that the gap position indicated by the gap signal is the actual gap position", the processor 110 further performs the following operations:
[0216] The label paper is moved based on the paper transport path;
[0217] When the actual gap location matches the sensor location corresponding to the gap detection sensor, the label paper is printed.
[0218] This application also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor to implement the label paper gap positioning method as described in the above embodiments.
[0219] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the label paper gap positioning method as described in the above embodiments.
[0220] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0221] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for locating the gaps in label paper, characterized in that, The method includes: Determine the size of the label sheet's face paper, and determine a preset face paper movement distance based on the face paper size; The label paper is moved based on the paper transport path, and the moving distance of the label paper is calculated based on the position of the face paper. The face paper position includes the beginning position of the face paper. The process of moving the label paper based on the paper transport path and calculating the moving distance based on the face paper position includes: controlling the label paper to move based on the paper transport path, and determining the first moment when the gap detection sensor detects the beginning position of the face paper; monitoring the total number of movement steps of the label paper after the first moment, and determining the moving distance of the label paper based on the total number of movement steps. Determine whether the moving distance is greater than or equal to the preset paper moving distance, and detect whether there is a gap signal corresponding to the label paper; If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then the gap position indicated by the gap signal is determined to be the actual gap position.
2. The method according to claim 1, characterized in that, The steps of determining whether the moving distance is greater than or equal to the preset paper moving distance and detecting whether there is a gap signal corresponding to the label paper include: Determine whether the moving distance is greater than or equal to the preset paper moving distance; If the moving distance is greater than or equal to the preset paper moving distance, then the detection of whether there is a gap signal corresponding to the label paper begins. If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then determining the gap position indicated by the gap signal as the actual gap position includes: If a gap signal corresponding to the label is detected, the gap position indicated by the gap signal is determined to be the actual gap position.
3. The method according to claim 1, characterized in that, The steps of determining whether the moving distance is greater than or equal to the preset paper moving distance and detecting whether there is a gap signal corresponding to the label paper include: Determine whether the moving distance is greater than or equal to the preset paper moving distance, and start detecting whether there is a gap signal corresponding to the label paper.
4. The method according to claim 2 or 3, characterized in that, The method further includes: If, after the moving distance is greater than or equal to the preset paper moving distance, there is no gap signal corresponding to the label paper, then the step of controlling the label paper movement based on the paper transport path is stopped, and / or a preset alarm is issued.
5. The method according to claim 1, characterized in that, The steps of determining whether the moving distance is greater than or equal to the size of the face paper and detecting whether there is a gap signal corresponding to the label paper include: Detect whether there is a gap signal corresponding to the label paper; If a gap signal corresponding to the label paper is detected, it is determined whether the moving distance is greater than or equal to the preset paper moving distance; If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then determining the gap position indicated by the gap signal as the actual gap position includes: If the moving distance is greater than or equal to the preset paper moving distance, then the gap position indicated by the gap signal is determined to be the actual gap position.
6. The method according to claim 5, characterized in that, The method further includes: If the moving distance is less than the preset face paper moving distance, the gap signal is ignored, and the step of controlling the label paper to move based on the paper transport path and calculating the moving distance of the label paper based on the face paper position is executed.
7. The method according to claim 1, characterized in that, Determining the face paper size of the label includes: The RFID module identifies the RFID chip integrated within the label roll to obtain the label's face paper size; or, Receive a label paper parameter transmission instruction sent by a user terminal, and obtain the label paper face paper size from the label paper parameter transmission instruction; or, Determine the label paper's face paper model, and determine the label paper's face paper size based on the face paper model.
8. The method according to claim 1, characterized in that, The detection of whether a gap signal corresponding to the label paper exists includes: Obtain the target material type of the label paper; The gap detection threshold corresponding to the target material type is determined from the preset gap detection mapping relationship; The gap detection threshold is used to detect whether there is a gap signal corresponding to the label paper.
9. The method according to claim 8, characterized in that, The process of obtaining the target material type of the label paper includes: The target material type of the label paper is determined by identifying the RFID chip integrated within the label paper roll using an RFID module; or, Receive a label paper parameter transmission instruction sent by a user terminal, and obtain the target material type of the label paper from the label paper parameter transmission instruction; or, Determine the label paper's face paper model, and based on the face paper model, determine the target material type of the label paper.
10. The method according to claim 1, characterized in that, The method further includes: After the printer is paused, the label paper is retracted based on the paper transport path, and the opening position of the label paper's face paper is located by a gap detection sensor.
11. The method according to claim 1, characterized in that, If the moving distance is greater than or equal to the preset paper moving distance, and the gap signal exists, then after determining that the gap position indicated by the gap signal is the actual gap position, the method further includes: The label paper is moved based on the paper transport path; When the actual gap location matches the sensor location corresponding to the gap detection sensor, the label paper is printed.
12. A positioning device for the gaps in label paper, characterized in that, The device includes: The size determination module is used to determine the size of the label paper's face sheet and, based on the face sheet size, determine a preset face sheet movement distance. A movement control module is used to move the label paper based on the paper transport path and calculate the movement distance of the label paper based on the position of the face paper. The face paper position includes the beginning position of the face paper. Specifically, the movement control module is used to: control the movement of the label paper based on the paper transport path and determine the first moment when the gap detection sensor detects the beginning position of the face paper; monitor the total number of movement steps of the label paper after the first moment, and determine the movement distance of the label paper based on the total number of movement steps. The gap detection module is used to determine whether the moving distance is greater than or equal to the preset paper moving distance, and to detect whether there is a gap signal corresponding to the label paper; The gap confirmation module is used to determine the gap position indicated by the gap signal as the actual gap position if the moving distance is greater than or equal to the preset paper moving distance and the gap signal exists.
13. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 11.
14. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Label initial positioning method, computer storage medium and label printer
CN118144448A
Label printing device
CN206653758U