CN116653447A - Label printing initial position identification circuit, method and printer - Google Patents

Label printing initial position identification circuit, method and printer Download PDF

Info

Publication number
CN116653447A
CN116653447A CN202310735056.0A CN202310735056A CN116653447A CN 116653447 A CN116653447 A CN 116653447A CN 202310735056 A CN202310735056 A CN 202310735056A CN 116653447 A CN116653447 A CN 116653447A
Authority
CN
China
Prior art keywords
state
voltage difference
initial position
paper
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310735056.0A
Other languages
Chinese (zh)
Inventor
杨雄
王志明
罗山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pushi Technology Co ltd
Original Assignee
Shenzhen Pushi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Pushi Technology Co ltd filed Critical Shenzhen Pushi Technology Co ltd
Priority to CN202310735056.0A priority Critical patent/CN116653447A/en
Publication of CN116653447A publication Critical patent/CN116653447A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/1205Multiplexed conversion systems
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J11/00Devices or arrangements  of selective printing mechanisms, e.g. ink-jet printers or thermal printers, for supporting or handling copy material in sheet or web form
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/407Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for marking on special material
    • B41J3/4075Tape printers; Label printers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Handling Of Sheets (AREA)

Abstract

The application provides a label printing initial position identification circuit, a label printing initial position identification method and a printer, and relates to the field of label printing. The circuit comprises an infrared light emitting diode, an infrared phototriode, an MCU, a first resistor R1, a second resistor R2 and a third resistor R3. And acquiring voltage difference values of the first interface and the second interface through the MCU, and searching the label paper state corresponding to the voltage difference values from a preset position identification library according to the voltage difference values, wherein the initial position state comprises a gap state, a continuous state, a positioning hole state and a black mark state. And confirming the initial position of label printing according to the label paper state. By adopting the circuit and the method, the application solves the problem that the application circuit of the photoelectric switch in the label printing identification circuit in the traditional method has a plurality of loops and the circuit structure is complex, and achieves the effect of simplifying the circuit.

Description

Label printing initial position identification circuit, method and printer
Technical Field
The application relates to the field of printing, in particular to an initial position identification circuit of a label printer.
Background
With the development of science and technology, the demand for printing is increasing, and printing technology is also throughout each industry. The label printer can print various labels of different types, so that the label printer is suitable for label printing requirements of different industries and fields.
At present, in order to enable a label machine to adapt to different printing consumables and determine a correct initial position of printing contents, basically, a photoelectric switch is used for identifying consumable parts and initial positions of the printing contents, in the positioning process, a plurality of different loops are needed to be selected in sequence by a program, and then the optimal loop is selected for identifying the initial position of the printing contents by comparison, so that the circuit structure of the method is complex.
Therefore, there is a need for a label printing initial position recognition circuit, method, and printer.
Disclosure of Invention
The application provides a label printing initial position identification circuit, a label printing initial position identification method and a label printer, and solves the problem that a circuit structure is complex due to the fact that a photoelectric switch application circuit of the label printer is provided with a plurality of loops in the traditional method.
In a first aspect, the present application provides a label printing initial position identification circuit, which includes a photoelectric switch, a microprocessor, a first resistor R1, a second resistor R2, and a third resistor R3. The photoelectric switch comprises an infrared light emitting diode and an infrared phototriode. Wherein the first interface of the microprocessor is coupled with the first end of the third resistor R3, and the second interface of the microprocessor is coupled with the first end of the second resistor R2; the second end of the second resistor R2 is coupled to the first end of the third resistor R3; the second end of the third resistor R3 is coupled with the power end; a first end of the first resistor R1 is coupled with the anode of the infrared light emitting diode, and a second end of the first resistor R1 is coupled with a power supply; the collector electrode of the infrared phototriode is coupled with the first end of the second resistor R2, and the base and the emitting stages of the infrared phototriode are grounded; the negative electrode of the infrared light-emitting diode is grounded.
By adopting the circuit, the application solves the problem of complex circuit when the application circuit of the photoelectric switch in the label printer adopts a plurality of loops.
Optionally, in the above circuit, the ratio of the resistances of the second resistor R2 and the third resistor R3 is 1:100.
By adopting the technical scheme, the problem of resistance error of the third resistor R3 element is solved, the resistance error range of the third resistor R3 is 1%, the resistance ratio of the second resistor R2 to the third resistor R3 is also 1%, and the resistance error of the third resistor R3 element is reduced by connecting the second resistor R2 with the third resistor R3 in series.
Optionally, in the above circuit, the tag paper is located between the transmitting end and the receiving end, the photoelectric switch includes a transmitting end and a receiving end, the transmitting end of the photoelectric switch is formed by an infrared light emitting diode, and the receiving end of the photoelectric switch is formed by an infrared phototriode.
By adopting the technical scheme, the currents in the loops are different in size, and the intensity of the light is detected and judged based on the induction and the reception of the infrared light by utilizing the sensitivity of the infrared phototriode to the infrared light. In this method, an infrared light emitting diode is a light source that generates infrared light by control of an electric circuit for sensing the state of the label paper. When current passes through the circuit, the infrared light emitting diode emits infrared light to irradiate the paper, and the infrared light can penetrate the paper and be recognized by the photosensitive area of the infrared phototriode at the receiving end. Since the infrared light has a strong penetrating ability, even if the state of the label paper is different, the infrared light can be induced through the paper. When infrared light penetrates through paper, current is generated after the infrared light is recognized by a photosensitive area of an infrared phototransistor at a receiving end, and the current varies with different illumination intensities.
A second aspect of the present application provides a label printing initial position recognition method applied to a microprocessor in an initial position recognition circuit as above, the method comprising:
acquiring a voltage difference value of a first interface and a second interface;
according to the voltage difference value, searching a label paper initial position state corresponding to the voltage difference value from a preset position identification library so that a label printer can execute subsequent printing operation according to the label paper initial position; the preset position identification library comprises a corresponding relation between voltage difference values and initial position states of the label paper, and one voltage difference value corresponds to one initial position state of the label paper.
Through adopting above-mentioned technical scheme, can realize the initial position discernment that the label printed, the illumination intensity that different label papers correspond is different to lead to the electric current size in the return circuit different, the voltage difference of first interface and second interface also is different, consequently can judge different label paper states according to different voltage difference, thereby ensured the degree of accuracy and the stability when printing.
Optionally, the label paper initial position state comprises a paper-free state and a paper-on state, wherein the paper-on state comprises a gap state, a continuous state, a positioning hole state and a black mark state; according to the voltage difference value, searching the initial position state of the label paper corresponding to the voltage difference value from a preset position identification library, wherein the initial position state specifically comprises any one of the following steps:
When the voltage difference value is a first voltage difference value and the duration time of the first voltage difference value is smaller than or equal to the preset time, determining the initial position state of the label paper as a positioning hole state; the positioning hole state is a state when a positioning hole is formed between adjacent base papers;
when the voltage difference value is the first voltage difference value and the duration time of the first voltage value is longer than the preset time, determining that the initial position of the label is in a paper-free state, wherein the paper-free state is a state without consumable paper and base paper;
when the voltage difference value is the second voltage difference value, determining that the initial position state of the label paper is a gap state; the gap state is a discontinuous state between adjacent consumable papers;
when the voltage difference value is the third voltage difference value, determining that the initial position state of the label paper is a continuous state; the continuous state is a continuous state between adjacent consumable papers;
when the voltage difference value is the fourth voltage difference value, determining that the initial position state of the label paper is a black label state; the black mark state is a state that black marks are arranged between adjacent base papers.
By adopting the technical scheme, the paper states of the label paper are in one-to-one correspondence with the voltage difference values, so that the state of the current label paper can be identified more quickly and accurately.
Optionally, the magnitude relation among the first, second, third and fourth voltage differences is that the first voltage difference is larger than the second voltage difference, the second voltage difference is larger than the third voltage difference, and the third voltage difference is larger than the fourth voltage difference.
By adopting the technical scheme, the magnitude of the first voltage difference value, the second voltage difference value, the third voltage difference value and the fourth voltage difference value is limited, so that the machine is ensured not to have erroneous judgment in the identification process.
Optionally, the state of the positioning hole is that the transmitting end transmits infrared light to be emitted from the positioning hole of the label paper and the receiving end receives the infrared light;
the gap state is a state that the transmitting end transmits infrared light to penetrate through the base paper and the receiving end receives the infrared light;
the continuous state is a state that the transmitting end transmits infrared light to penetrate through the base paper and the consumable paper and the receiving end receives the infrared light;
the black mark state is a state that the transmitting end transmits infrared light to penetrate through the black mark and the receiving end receives the infrared light.
By adopting the technical scheme, the states of various label papers and the corresponding illumination states are explicitly described, and the judgment of the machine on the states of the papers in the subsequent operation is more convenient.
In a third aspect of the present application, there is provided a label printing initial position recognition apparatus including an acquisition unit and a label paper position recognition unit. The acquisition unit is used for acquiring the voltage difference value of the first interface and the second interface; the label paper initial position recognition unit is used for searching the corresponding label paper initial position state from the preset position recognition library according to the voltage difference value, so that the label machine can execute subsequent printing operation according to the label paper initial position.
This method will be described in more detail below. First, the acquisition unit is one of the important components of the method. The function of the method is to obtain the voltage difference value of the first interface and the second interface. Different voltage differences correspond to different paper conditions.
By the acquiring unit, the voltage difference between the first interface and the second interface can be acquired, thereby determining the position state of the label paper. The label paper initial position identification unit is used for searching the corresponding label paper initial position state from the preset position identification library according to the voltage difference value.
The preset position identification library comprises a corresponding relation between the voltage difference value and the initial position state of the label paper. In practical application, different voltage difference values and different initial position states of the label paper need to be corresponding in advance, and a complete preset position identification library is established.
When the acquiring unit acquires the voltage difference, the label paper initial position identifying unit queries in the preset position identifying library according to the voltage difference, and finds the corresponding label paper initial position state, so that the label printer can perform subsequent printing operation according to the position state.
By adopting the device, the identification of the initial printing position of the label is realized, and the accuracy and stability of printing are improved.
Optionally, the label paper initial position state comprises a paper-free state and a paper-on state, wherein the paper-on state comprises a gap state, a continuous state, a positioning hole state and a black mark state; the label paper initial position identification unit searches the label paper initial position state corresponding to the voltage difference value from the preset position identification library according to the voltage difference value, and specifically comprises any one of the following steps:
when the voltage difference is a first voltage difference and the duration of the first voltage difference is smaller than or equal to the preset time, the label paper position identification unit determines that the label paper initial position state is a positioning hole state; the positioning hole state is a state when a positioning hole is formed between adjacent base papers;
when the voltage difference value is a first voltage difference value and the duration time of the first voltage value is longer than a preset time, the label paper position identification unit determines that the label initial position is in a paper-free state, and the paper-free state is a state without consumable paper and base paper;
when the voltage difference is the second voltage difference, the label paper position recognition unit determines that the label paper initial position state is a gap state; the gap state is a discontinuous state between adjacent consumable papers;
when the voltage difference is the third voltage difference, the label paper position recognition unit determines that the initial position state of the label paper is a continuous state; the continuous state is a continuous state between adjacent consumable papers;
When the voltage difference is the fourth voltage difference, the label paper position identification unit determines that the initial position state of the label paper is a black label state; the black mark state is a state that black marks are arranged between adjacent base papers.
By adopting the technical scheme, the paper states of the label paper are in one-to-one correspondence with the voltage difference values, so that the state of the current label paper can be identified more quickly and accurately.
A fourth aspect of the application provides an electronic device comprising a processor, a memory, a user interface and a network interface, the memory for storing instructions, the user interface and the network interface for communicating with other devices, the processor for executing instructions stored in the memory to cause the electronic device to perform a method according to any one of the preceding claims.
A fifth aspect of the present application provides a label printer comprising any one of the label printing initial position recognition circuits described above.
In summary, one or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
1. the problems that an application circuit of a photoelectric switch in a label printing identification circuit in the traditional method is provided with a plurality of loops and the circuit structure is complex are solved, and the circuit is simplified.
2. The label printing accuracy is improved, the position state of the label paper is detected in real time, the printing operation can be carried out according to the state, and printing errors and quality problems are avoided, so that the label printing accuracy is improved.
3. Label printing efficiency is improved: the method can rapidly carry out subsequent printing operation by rapidly identifying the position state of the label paper, thereby improving the label printing efficiency.
Drawings
Fig. 1 is a schematic structural diagram of a label printing initial position identification circuit according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a label printing initial position recognition circuit according to an embodiment of the present application.
Fig. 3 is a flowchart of a label printing initial position recognition method according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a label paper gap state of a label printing initial position recognition method according to an embodiment of the present application.
Fig. 5 is a schematic diagram showing a continuous state of label paper in a label printing initial position recognition method according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a label paper positioning hole state of a label printing initial position recognition method according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a black label state of label paper in a label printing initial position recognition method according to an embodiment of the present application.
Fig. 8 is a schematic structural view of a label printing initial position recognition device according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of an electronic device according to the disclosure.
In fig. 1-9: r1, a first resistor; r2, a second resistor; r3, a third resistor; 900. an electronic device; 901. a processor; 902. a communication bus; 903. a user interface; 904. a network interface; 906. a memory.
Detailed Description
In order that those skilled in the art will better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
In describing embodiments of the present application, words such as "for example" or "for example" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "such as" or "for example" in embodiments of the application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "or" for example "is intended to present related concepts in a concrete fashion.
In the description of embodiments of the application, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating an indicated technical feature. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The technical scheme provided by the application can be applied to a scene of determining the initial position state of the label paper when the label printer prints.
Before describing embodiments of the present application, some terms involved in the embodiments of the present application will be first defined and described.
Label paper: is a special printing medium, which consists of two parts, namely consumable paper and base paper, as shown in fig. 4. The consumable paper is a material for printing bar codes, files or patterns and other information, and the material can be thermosensitive paper, thermal transfer paper, direct heating paper, carbon strips and the like; the base paper is a back support material of the label paper and is used for supporting the stability and flatness of the label paper, and the base paper can be paper, plastic film and the like.
MCU: MCU is an English abbreviation of microcontroller (Microcontroller Unit), which is a chip integrated with microprocessor, memory, input/output interface and other peripherals.
Fig. 1 is a schematic structural diagram of a label printing position identifying circuit according to an embodiment of the present application.
As shown in fig. 1, the circuit includes a photo switch, a microprocessor, a first resistor R1, a second resistor R2, and a third resistor R3. The photoelectric switch comprises an infrared diode and an infrared phototriode. Wherein the first interface of the microprocessor is coupled with the first end of the third resistor R3, and the second interface of the microprocessor is coupled with the first end of the second resistor R2; the second end of the second resistor R2 is coupled to the first end of the third resistor R3; the second end of the third resistor R3 is coupled with the power end; a first end of the first resistor R1 is coupled with the anode of the infrared light emitting diode, and a second end of the first resistor R1 is coupled with a power supply; the collector electrode of the infrared phototriode is coupled with the first end of the second resistor R2, and the base and the emitting stages of the infrared phototriode are grounded; the negative electrode of the infrared light-emitting diode is grounded.
In particular, in the present circuit, the type of opto-electronic switch used is DS-GP2S700-SMD. The DS-GP2S700-SMD photoelectric switch has the characteristics of high-precision detection and quick response. The high-precision detection means that the photoelectric switch of the model can accurately detect the existence and the position of an object, the maximum detection distance is 7mm, the minimum detection object diameter is 0.3mm, the quick response means that the photoelectric switch has higher response speed and response frequency, high-speed detection and output can be realized, and the photoelectric switch of the model can be better applied to a scene identified by the initial position of label printing. Meanwhile, the photoelectric switch of the model adopts an infrared light source and an infrared phototriode receiver, wherein the infrared light source can realize detection of wireless beam interference, so that the detection precision and stability are improved, and meanwhile, the infrared light source can penetrate a certain object, and the photoelectric switch is embodied as a scene which can penetrate paper and is suitable for identifying the initial position of label printing in the application; the infrared phototriode has the characteristics of high sensitivity, high response speed and low noise, and can convert optical signals into electric signals at the same time, and is also suitable for the scene of identifying the initial position of label printing.
Fig. 2 is a schematic view of a scene of label printing initial position recognition according to the present embodiment. The scene diagram can be applied to the structure diagram shown in fig. 1. As shown in fig. 2, the paper is located right between the transmitting end and the receiving end of the photoelectric switch, the transmitting end transmits infrared light, and the infrared light is received by the receiving end through the paper.
The principle of a label printing initial position recognition circuit in the application is described below with reference to fig. 1 and 2, wherein a power supply is connected in the circuit in the figure, the power supply provides required electric energy for a photoelectric switch, and when current passes through the circuit, an infrared light emitting diode in the photoelectric switch senses the current and then generates infrared light to irradiate on paper.
In the application, the infrared light generated by the infrared light emitting diode is a small circle with the diameter of 1mm, the position of the paper is positioned between the transmitting end and the receiving end of the photoelectric switch, at the moment, the infrared light transmitted through the paper can be sensed by the infrared phototriode at the receiving end of the photoelectric switch, the photosensitive area of the infrared phototriode can generate electric charge, and the current generated at the collecting electrode flows through the second resistor R2 and the third resistor R3. The MCU converts the voltage signals on the first interface and the second interface into digital signals through the ADC module, so that the voltage values of the first interface and the second interface are obtained, the ADC module in the MCU can realize high-precision analog signal conversion, so that more accurate voltage values can be obtained, the state of the printing paper is judged according to the voltage values, and the detection and the positioning of the initial position of the printing paper are realized.
Fig. 3 is a flowchart of a label printing initial position recognition method according to an embodiment of the present application. Fig. 3 is a schematic flow chart of a label printing initial position recognition according to an embodiment of the present application. The method may include steps S301 to S302.
Step S301: and acquiring a voltage difference value of the first interface and the second interface.
In the above steps, when a current flows through the loop, the infrared light emitting diode emits infrared light to irradiate the paper after sensing the current, the infrared light can penetrate the paper, and after the infrared light penetrates the paper and is identified by the photosensitive area of the receiving end infrared phototriode, the collector of the infrared phototriode can generate different current according to different illumination intensities to flow through the second resistor R2 and the third resistor R3, so that the voltage values of the first interface and the second interface are different. When the label paper is in different paper states, the infrared light rays have different loss amounts when passing through the paper, the intensity of the infrared light rays received by the receiving end is different, the generated current is also different, and the voltage values of the first interface and the second interface are also different. Therefore, by detecting the voltage values of the first interface and the second interface, the paper state can be judged by the difference between the detected first voltage and the detected second voltage.
Step S302: and searching the initial position states of the label paper corresponding to the different voltage differences from the position identification library.
In the above steps, different voltage differences corresponding to different paper states are stored in the preset position identification library, the voltage difference corresponding to the positioning hole state of the printing paper is preset as a first voltage difference, the voltage difference corresponding to the gap state is preset as a second voltage difference, the voltage difference in the continuous state is preset as a third voltage difference, and the voltage difference in the black mark state is preset as a fourth voltage difference.
At this time, the first, second, third and fourth voltage differences are not specific values, and should be a voltage difference range in combination with errors that may occur in the actual use scenario; the numerical range of the specific voltage difference is a range obtained by continuous experimental comparison. In the experimental stage, the voltage difference value is detected by the label paper at a known position, and the voltage difference value is detected and recorded by repeated experiments to obtain the range of the voltage difference value as accurate as possible. For simplicity of description, in the specification of the present application, the ranges corresponding to the respective voltage differences are denoted by first, second, third, and fourth voltage differences, and the states of the printing papers matched with them are stored in the preset position recognition library in one-to-one correspondence.
When the MCU acquires the voltage difference value of the first interface and the second interface, the voltage difference value stored in the preset position identification library can be compared and the paper state at the moment can be confirmed. The magnitude of the voltage difference will float slightly due to the thickness of the paper, the ageing of the machine and the quality difference of the opto-electronic switch. Therefore, the present application is not limited to the numerical values of the specific ranges of the voltage difference values.
As shown in fig. 4, a schematic diagram of a printing paper in a gap state in a label printing initial position identification method according to an embodiment of the present application is shown, where the gap state refers to that consumable materials are not one continuous consumable material, but a specific width is provided between two adjacent consumable materials, and when the paper is in the gap state, infrared light of a transmitting end is emitted and then directly transmitted to a receiving end through base paper. At this time, the first interface and the second interface of the MCU may obtain a voltage difference, and match the voltage difference with a voltage value in the preset position identification library, so as to determine that the state of the printing paper is a gap state.
Fig. 5 is a schematic diagram of printing paper in a continuous state in the label printing initial position identification method according to an embodiment of the present application, where the continuous state refers to two parts of base paper and consumable paper, and when the paper is in the continuous state, infrared light at a transmitting end is transmitted to a receiving end through the base paper and the consumable paper after being emitted. The MCU compares the detected voltage difference value with the voltage difference value in the preset position identification library through the first interface and the second interface, and confirms that the paper state is a continuous state at the moment if the detected voltage difference value is in a fourth voltage difference value range.
The distinction between the registration hole state and the paperless state is discussed below. As shown in fig. 6, a tab sheet in a positioning hole state is shown.
The locating hole is located between two consecutive consumable papers, is fretwork. The infrared light can directly penetrate the positioning hole from the transmitting end and be received by the receiving end. At this time, in the positioning hole state, the infrared light received by the receiving end is identical to the infrared light in the paperless state, and it is necessary to distinguish the positioning hole state from the paperless state.
As shown in fig. 6, the positioning hole has a certain height h (for example: 3mm, by way of example only and not limitation), the infrared light is illustrated by using a 1mm diameter ray, and when the infrared light a moves in the positioning hole, the infrared light b is received after the infrared light a moves out of the positioning hole for a period of time; it is apparent that the infrared light a and the infrared light b received by the receiving end are different, so that the positioning hole state is determined. However, after a while, if the infrared light b received by the receiving end is the same as the infrared light a, it may be determined that the label paper sheet state is a paper-free state.
Next, the black mark state of the paper is determined, as shown in fig. 7, which is a schematic diagram of the black mark state of the label printing initial position identification method according to the embodiment of the application, where the black mark state refers to a state where a black mark exists between adjacent base papers. When the paper is in a black mark state, infrared light is projected to the receiving end of the photoelectric switch through the black mark by the transmitting end. At this time, the first interface and the second interface of the MCU may obtain a voltage difference, and match the voltage difference with a voltage value in the preset position identification library, so as to determine that the state of the printing paper is in the black mark state at this time.
In this embodiment, the base region of the infrared phototransistor integrates the photosensitive element, when infrared light irradiates the photosensitive element, current is generated at the collector of the infrared phototransistor, different illumination intensities correspond to different currents, the stronger the illumination intensity is, the larger the current generated at the collector end is, because the collector current values corresponding to the different illumination intensities are different, the collector current flows through the second resistor R2 and the third resistor R3, so that the first interface voltage value and the second interface voltage value of the MCU are different, and the voltage difference corresponding to the first interface voltage value and the second interface voltage value is different, so that the voltage difference can be used to judge the initial printing position state of the label paper.
When the label paper is in a paperless state, the infrared light is directly emitted to the receiving end from the emitting end, the illumination intensity is strongest, and the corresponding current is larger, and the corresponding voltage difference is larger.
When the label paper is in a locating hole state, the infrared light is directly emitted to the receiving end from the emitting end within a preset time range, and when the infrared light exceeds the preset time range, the infrared light can be changed, and the MCU can recognize the change of the voltage value, so that the situation that the label paper is in the locating hole state but not in the paper-free state is recognized.
When the label paper is in a gap state, the infrared light is received by the receiving end after passing through a layer of base paper by the transmitting end, at the moment, the illumination intensity is lost relative to that in a paper-free state, the current generated by the collecting electrode is smaller than that in the paper-free state, and the voltage difference value of the corresponding first interface and the corresponding second interface is smaller than that in the paper-free state.
When the printing paper is in a continuous state, the infrared light is received by the receiving end after penetrating through the base paper and the consumable paper by the transmitting end, and at the moment, one layer of consumable paper is added to the paper relative to the gap state, the illumination intensity received by the receiving end is smaller than that in the gap state, so that the current generated by the collecting electrode end is reduced, and the corresponding first voltage difference value and second voltage difference value are also reduced.
When the printing paper is in a black mark state, the infrared light is received by the receiving end through the black mark part by the transmitting end, and the infrared light is most lost when the infrared light passes through the black mark, at the moment, the infrared light obtained by the infrared receiving triode is least, and at the moment, the current passing through the collecting electrode is least. The voltage difference between the first interface and the second interface is also minimal.
As can be seen from the above discussion, the magnitude relationship between the first voltage difference, the second voltage difference, the third voltage difference and the fourth voltage difference is: the first voltage difference is greater than the second voltage difference by more than the third voltage difference by more than the fourth voltage difference. The first voltage difference, the second voltage difference, the third voltage difference and the fourth voltage difference are actually a range, and the ranges corresponding to the voltage differences are not overlapped. Therefore, the application can pre-construct the corresponding relation between the voltage difference value and the state of the label paper, and confirm the current state of the label paper by combining the voltage difference value obtained by the MCU by utilizing the corresponding relation.
The first interface voltage value is a voltage value detected by the ADC1 end, the second interface voltage value is a voltage value detected by the ADC2 end, the ADC1 end voltage value is a voltage difference between the power supply voltage and the voltages at the two ends of the third resistor R3, the ADC2 end voltage value is a difference between the power supply voltage and a sum of the voltages at the two ends of the second resistor R2 and the voltages at the two ends of the third resistor R3, the voltage difference between the first interface and the second interface is a difference between the ADC1 end voltage and the ADC2 end voltage, and the difference between the ADC1 end voltage and the ADC2 end voltage is a voltage at the two ends of the second resistor R2.
In the embodiment of the application, the ratio of the resistance values of the third resistor R3 and the second resistor R2 is 100:1. Because of the manufacturing error of the resistor element itself, the error range of the resistor element itself selected in the present application is 1% (the lower error range that can be used currently), and when only the third resistor R3 is selected, the difference between its own resistance value and the nominal value affects the accuracy of the whole circuit. And a second resistor R2 is introduced into the circuit, the resistance value of the second resistor R2 being also 1% of the resistance value of the third resistor R3. The second resistor R2 resistance serves to eliminate errors in the third resistor R3 resistance element itself. That is, by setting the resistance ratio between the second resistance value R2 and the third resistance value R3, an error of 1% is eliminated or further reduced, so that the voltage difference obtained by the MCU is more accurate.
For example, when the resistance of the third resistor R3 is set to 10KR, the error ratio thereof is 1%, the upper error limit is 10.1KR, and the lower error limit is 9.9KR; at this time, the resistance of the second resistor R2 is 100R, the upper error limit is 101R, and the lower error limit is 99R. Therefore, the sum of the resistance values of the second resistor R2 and the third resistor R3 has a lower limit of 9.999KR and an upper limit of 10.201KR. Here, the lower limit of the sum of the resistances is infinitely close to the nominal value of R2, minimizing the error in the selected state, where the error ratio is one thousandth.
Referring to fig. 8, the present application also provides a label printing initial position recognition apparatus including an acquisition unit and a label paper initial position recognition unit.
The acquiring unit 801 is configured to acquire a voltage difference value of the first interface and the second interface;
the label paper initial position identifying unit 802 is configured to search, according to the voltage difference value, a label paper initial position state corresponding to the voltage difference value from the preset position identifying library, so that the label printer performs a subsequent printing operation according to the label paper initial position; the preset position identification library comprises a corresponding relation between voltage difference values and initial position states of the label paper, and one voltage difference value corresponds to one initial position state of the label paper.
In one possible embodiment, the label paper comprises consumable paper and base paper, the initial position state of the label paper comprises a paper-free state and a paper-on state, and the paper-on state comprises a gap state, a continuous state, a positioning hole state and a black mark state; according to the voltage difference value, searching the initial position state of the label paper corresponding to the voltage difference value from a preset position identification library, wherein the initial position state specifically comprises any one of the following steps:
when the voltage difference is a first voltage difference and the duration of the first voltage difference is smaller than or equal to the preset time, the label paper initial position identification unit determines that the label paper initial position state is a positioning hole state, and the positioning hole state is a state when positioning holes are formed between adjacent base papers;
when the voltage difference value is the first voltage difference value and the duration time of the first voltage value is longer than the preset time, determining that the initial position of the label paper is in a paper-free state, wherein the paper-free state is a state without consumable paper and base paper;
when the voltage difference value is the second voltage difference value, determining that the initial position state of the label paper is a gap state; the gap state is a discontinuous state between adjacent consumable papers;
when the voltage difference value is the third voltage difference value, determining that the initial position state of the label paper is a continuous state; the continuous state is a continuous state between adjacent consumable papers;
When the voltage difference value is the fourth voltage difference value, determining that the initial position state of the label paper is a black label state; the black mark state is a state that black marks are arranged between adjacent base papers.
In one possible embodiment, the magnitude relation between the first, second, third and fourth voltage differences is such that the first voltage difference is greater than the second voltage difference, the second voltage difference is greater than the third voltage difference, and the third voltage difference is greater than the fourth voltage difference.
In one possible implementation manner, the state of the positioning hole is a state that the transmitting end transmits infrared light rays to be emitted from the tag paper positioning hole and the receiving end receives the infrared light rays; the black mark state is a state that the transmitting end transmits infrared light to penetrate through the black mark and the receiving end receives the infrared light; the gap state is a state that the transmitting end transmits infrared light to penetrate through the base paper and the receiving end receives the infrared light.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the embodiments of the method are detailed in the method embodiments, which are not repeated herein.
The application also discloses electronic equipment. Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to the disclosure in an embodiment of the present application. The electronic device 900 may include: at least one processor 901, at least one network interface 904, a user interface 903, memory 905, at least one communication bus 902.
Wherein the communication bus 906 is used to enable connected communications between these components.
The user interface 903 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 903 may further include a standard wired interface and a wireless interface.
The network interface 904 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 901 may include one or more processing cores, among other things. The processor 901 connects various portions of the overall server using various interfaces and lines, executing various functions of the server and processing data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 905, and invoking data stored in the memory 805. Alternatively, the processor 901 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 901 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 901 and may be implemented by a single chip.
The Memory 905 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 905 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 905 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 905 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like involved in the above respective method embodiments. The memory 905 may also optionally be at least one storage device located remotely from the processor 901. Referring to fig. 9, an operating system, a network communication module, a user interface module, and an application program for label printing initial position identification may be included in the memory 905 as a computer storage medium.
In the electronic device 900 shown in fig. 9, the user interface 903 is mainly used for providing an input interface for a user, and acquiring data input by the user; and processor 901 may be operable to invoke an application program in memory 905 that stores a label print initial location identification, which when executed by one or more processors 901, causes electronic device 900 to perform the method as described in one or more of the embodiments above. It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all of the preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as a division of units, merely a division of logic functions, and there may be additional divisions in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned memory includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a magnetic disk or an optical disk.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure.
This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (10)

1. The label printing initial position identification circuit is characterized by comprising a photoelectric switch, a microprocessor, a first resistor (R1), a second resistor (R2) and a third resistor (R3), wherein the photoelectric switch comprises an infrared light emitting diode and an infrared phototriode; wherein,
a first interface of the microprocessor is coupled with a first end of the third resistor (R3); a second interface of the microprocessor is coupled with a first end of the second resistor (R2);
a second end of the second resistor (R2) is coupled to a first end of a third resistor (R3);
a second end of the third resistor (R3) is coupled with a power end;
a first end of the first resistor (R1) is coupled with the positive electrode of the infrared light emitting diode, and a second end of the first resistor is coupled with the power supply end;
The collector of the infrared phototransistor is coupled to a first end of the second resistor (R2); the base electrode and the emitter electrode of the infrared phototriode are grounded;
the negative electrode of the infrared light-emitting diode is grounded.
2. A label printing initial position recognition circuit according to claim 1, wherein the ratio of the resistance values of the second resistor (R2) and the third resistor (R3) is 1:100.
3. The label printing initial position recognition circuit according to claim 1, wherein the label paper is located between the transmitting end and the receiving end; the photoelectric switch comprises a transmitting end and a receiving end, wherein the transmitting end is composed of an infrared light emitting diode, and the receiving end is composed of an infrared phototriode.
4. A label printing initial position recognition method, wherein the method is applied to a microprocessor in the initial position recognition circuit according to claim 3, the method comprising:
acquiring a voltage difference value of the first interface and the second interface;
searching a label paper initial position state corresponding to the voltage difference value from a preset position identification library according to the voltage difference value, so that a label printer can execute subsequent printing operation according to the label paper initial position; wherein,
The preset position identification library comprises corresponding relations between the voltage difference values and the initial position states of the label paper, and one voltage difference value corresponds to one initial position state of the label paper.
5. The method of claim 4, wherein the label paper comprises consumable paper and base paper, the label paper initial position state comprises a paper-free state and a paper-on state, and the paper-on state comprises a gap state, a continuous state, a positioning hole state and a black mark state; searching the initial position state of the label paper corresponding to the voltage difference from a preset position identification library according to the voltage difference, wherein the initial position state specifically comprises any one of the following steps:
when the voltage difference value is a first voltage difference value and the duration time of the first voltage difference value is smaller than or equal to a preset time, determining that the initial position state of the label paper is a positioning hole state; the positioning hole is formed when a positioning hole is formed between adjacent base papers;
when the voltage difference value is the first voltage difference value and the duration time of the first voltage value is longer than the preset time, determining that the initial position of the label is in a paper-free state, wherein the paper-free state is a state without consumable paper and base paper;
When the voltage difference value is a second voltage difference value, determining that the initial position state of the label paper is a gap state; the gap state is a discontinuous state between adjacent consumable papers;
when the voltage difference value is a third voltage difference value, confirming that the initial position state of the label paper is a continuous state; the continuous state is a continuous state between adjacent consumable papers;
when the voltage difference value is a fourth voltage difference value, determining that the initial position state of the label paper is a black label state; the black mark state is a state that black marks are arranged between adjacent base papers.
6. The method of claim 5, wherein the first voltage difference is greater than the second voltage difference, the second voltage difference is greater than the third voltage difference, and the third voltage difference is greater than the fourth voltage difference.
7. The method according to claim 5, wherein the positioning hole state is a state in which the transmitting end transmits infrared light from the tag paper positioning hole and the receiving end receives the infrared light;
the gap state is a state that the transmitting end transmits infrared light rays to penetrate through the base paper and the receiving end receives the infrared light rays;
The continuous state is a state that the transmitting end transmits infrared light rays to penetrate through the base paper and the consumable paper and the receiving end receives the infrared light rays;
the black mark state is a state that the transmitting end transmits infrared light rays to penetrate through the black mark and the receiving end receives the infrared light rays.
8. A label printing initial position recognition apparatus characterized in that the apparatus is a microprocessor in the initial position recognition circuit as claimed in claim 3, the microprocessor comprising an acquisition unit (801) and a label paper initial position recognition unit (802); wherein,
the acquisition unit is used for acquiring the voltage difference value of the first interface and the second interface;
the label paper initial position identification unit is used for searching a label paper initial position state corresponding to the voltage difference value from a preset position identification library according to the voltage difference value so that a label printer can execute subsequent printing operation according to the label paper initial position; the preset position identification library comprises corresponding relations between the voltage difference values and the initial position states of the label paper, and one voltage difference value corresponds to one initial position state of the label paper.
9. An electronic device comprising a processor (901), a memory (905), a user interface (903) and a network interface (904), the memory (905) being configured to store instructions, the user interface (903) and the network interface (904) being configured to communicate to other devices, the processor (901) being configured to execute the instructions stored in the memory (905) to cause the electronic device (900) to perform a method according to any of claims 4-7.
10. A label printer, characterized in that the label printer comprises the label printing initial position recognition circuit of any one of claims 1 to 3.
CN202310735056.0A 2023-06-20 2023-06-20 Label printing initial position identification circuit, method and printer Pending CN116653447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310735056.0A CN116653447A (en) 2023-06-20 2023-06-20 Label printing initial position identification circuit, method and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310735056.0A CN116653447A (en) 2023-06-20 2023-06-20 Label printing initial position identification circuit, method and printer

Publications (1)

Publication Number Publication Date
CN116653447A true CN116653447A (en) 2023-08-29

Family

ID=87713735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310735056.0A Pending CN116653447A (en) 2023-06-20 2023-06-20 Label printing initial position identification circuit, method and printer

Country Status (1)

Country Link
CN (1) CN116653447A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117953764A (en) * 2024-03-26 2024-04-30 武汉精臣智慧标识科技有限公司 Continuous paper label, label printer and allowance measuring and calculating method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117953764A (en) * 2024-03-26 2024-04-30 武汉精臣智慧标识科技有限公司 Continuous paper label, label printer and allowance measuring and calculating method

Similar Documents

Publication Publication Date Title
CN116653447A (en) Label printing initial position identification circuit, method and printer
US7929811B2 (en) Handwritten information management system, handwritten information management method and recording medium storing handwritten information management program
JPH07160857A (en) Image sensor and image discriminating device using it
CN107584894A (en) Label machine and its control method, terminal device
JP2007122243A (en) Optical information verification device
JP2004025861A (en) Medium detecting method for imaging apparatus and system therefor
CN111813352B (en) Printing paper shortage detection method, device, equipment and storage medium
CN101844463A (en) Printing medium calibration control method
US20220413778A1 (en) Communication system, communication apparatus, and control method using wireless communication
CN112721466A (en) Label printing method and device and storage medium
JP6424506B2 (en) Data processing apparatus and data processing program
US20200117868A1 (en) Code reading device, method, and program
CN111174701A (en) Printer label positioning method and system
US9992354B2 (en) Media reflectance identifiers
US10699550B2 (en) Styli
CN110321975B (en) Label printer, label positioning method and device thereof, and storage medium
JPS5925670Y2 (en) Label position detection device in label printer
CN115027153A (en) Label printer, label specification automatic detection method, configuration method and device
US6207945B1 (en) Integral positioning and imaging device
JP6672239B2 (en) Sensor device and image forming device
JP2002361959A (en) Ticket printer
US20200160370A1 (en) Code reading device, method, and program
JP3186669B2 (en) Identification device
US7783792B2 (en) Enclosure slot identification by modules
KR100341783B1 (en) Apparatus for detecting of paper size

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination