CN112721466A - Label printing method and device and storage medium - Google Patents

Label printing method and device and storage medium Download PDF

Info

Publication number
CN112721466A
CN112721466A CN202011631642.3A CN202011631642A CN112721466A CN 112721466 A CN112721466 A CN 112721466A CN 202011631642 A CN202011631642 A CN 202011631642A CN 112721466 A CN112721466 A CN 112721466A
Authority
CN
China
Prior art keywords
label
paper
reflected light
printing paper
label printing
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
CN202011631642.3A
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202011631642.3A priority Critical patent/CN112721466A/en
Publication of CN112721466A publication Critical patent/CN112721466A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • 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
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns

Landscapes

  • Handling Of Sheets (AREA)

Abstract

The embodiment of the specification discloses a method and a device for printing a label and a storage medium, wherein light is irradiated onto label printing paper in a printer through a light source, a sensor receives reflected light reflected by the label printing paper, a photoelectric conversion circuit is used for converting the reflected light into an electric signal and obtaining voltage corresponding to the reflected light, the printing starting position of the label paper in the label printing paper is determined according to the voltage corresponding to the reflected light, and then the label paper is printed according to the printing starting position of the label paper. In the process, light emitted by the light source irradiates on the label printing paper, the label printing paper reflects the light back, and the sensor for receiving the reflected light needs to be arranged on the same side of the light source. The light source and the sensor on the same side can be driven by the same circuit, thus reducing the cost of the device.

Description

Label printing method and device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for printing a label, and a storage medium.
Background
Nowadays, with the development of economy, the phenomenon of labeling of commodities gradually appears. The contents of the product such as the identification, price, receipt and the like can be represented by a label, and the label needs to be printed by a printer, so that a label printer is produced. When the label printer prints labels, a label paper printing area of label printing paper is detected, and then label printing is performed in the label paper printing area according to printing contents. The label printing paper is divided into label paper and base paper. The label paper printing area is actually the position area where the label paper is located.
In the prior art, as shown in fig. 1. Fig. 1 is a schematic partial structure diagram of a prior art label printer, and in fig. 1, there are a light source S, a label printing paper L and a sensor a. Wherein the light source S is mounted on a paper compartment cover of the label printer, the sensor A is mounted at a relative position of the light source S, and the light source S and the sensor A are driven by different circuits. When the label printer prints labels, the light source S emits light 1, the light irradiates on the label printing paper L, the sensor A receives light 2 penetrating through the label printing paper L, and voltage corresponding to the light 2 is obtained. Since the label paper and the base paper have different light transmission degrees, the sensor obtains a voltage corresponding to the light 2 when the light 1 is irradiated on the label paper, and the voltage corresponding to the light 2 obtained by the sensor when the light 1 is irradiated on the base paper is also different. And then detecting the printing area of the label paper according to different voltages obtained by the sensor, and finally printing the label paper according to the printing content.
However, since the light source and the sensor are installed at different positions of the label printer, different circuits are required to drive the light source and the sensor, respectively, thereby increasing the cost of the apparatus.
Disclosure of Invention
The embodiments of the present specification provide a method, an apparatus and a storage medium for label printing, so as to partially solve the problems in the prior art.
The embodiment of the specification adopts the following technical scheme:
the present specification provides a method for printing a label, comprising:
illuminating label printing paper by a light source, wherein the label printing paper comprises label paper and base paper;
receiving reflected light reflected by the label printing paper;
converting the reflected light into an electric signal to obtain a voltage corresponding to the reflected light;
determining a printing starting position of label paper in the label printing paper according to the voltage corresponding to the reflected light;
and printing the label paper according to the printing starting position.
Optionally, converting the reflected light into an electrical signal to obtain a voltage corresponding to the reflected light, specifically including:
converting the reflected light into an electric signal according to a preset circuit, and obtaining a voltage output by the circuit; wherein the lower the intensity of the reflected light, the larger the value of the voltage, and the higher the intensity of the reflected light, the smaller the value of the voltage.
Optionally, determining a printing start position of the label paper in the label printing paper according to the voltage corresponding to the reflected light, specifically including:
and monitoring whether the voltage corresponding to the reflected light is continuously increased or not, and determining the printing starting position of the label paper in the label printing paper according to the position of the label printing paper irradiated by the light source when the voltage corresponding to the reflected light is continuously increased for the preset times.
Optionally, determining a printing start position of the label paper in the label printing paper according to the position of the label printing paper irradiated by the light source, specifically including:
determining the position of the light source irradiating the label printing paper as an initial printing starting position;
moving the label printing paper to a preset distance in a direction opposite to the conveying direction of the label printing paper from the initial printing starting position;
and after the label printing paper is moved in the opposite direction, the light source irradiates the position of the label printing paper, and the actual printing starting position of the label paper in the label printing paper is determined.
The present specification provides a printer including: a controller, a light source, a sensor, a photoelectric conversion circuit, and a printing element;
the controller is used for controlling the light source to be started, so that the light emitted by the light source irradiates label printing paper, wherein the label printing paper comprises label paper and base paper;
the sensor is used for receiving the reflected light reflected by the label printing paper;
the photoelectric conversion circuit is used for converting the reflected light into an electric signal to obtain a voltage corresponding to the reflected light;
the controller is further configured to determine a printing start position of label paper in the label printing paper according to the voltage output by the photoelectric conversion circuit, and control the printing element to print the label paper according to the printing start position.
Optionally, the printer further comprises: a drive circuit;
the light source and the sensor are arranged on the same side in a paper bin of the printer;
the driving circuit is used for driving the light source and the sensor.
Optionally, the printer comprises:
the light source and the sensor are arranged at other positions of the paper bin of the printer except the paper bin cover.
Optionally, the photoelectric conversion circuit includes: the light-emitting diode comprises a phototriode, a light-emitting diode, an inverting amplifier and a resistor;
the controller is specifically used for controlling the light emitted by the light emitting diode to irradiate the label printing paper;
the phototriode is used for receiving reflected light reflected by the label printing paper;
the resistor and the inverting amplifier are used for converting the reflected light received by the phototriode into an electric signal to obtain the voltage output by the photoelectric conversion circuit.
Optionally, the phototriode is connected in parallel with the light emitting diode;
the base electrode of the phototriode is used for receiving reflected light reflected by the label printing paper, the collector electrode of the phototriode is used for being connected with a power supply, and the emitter electrode of the phototriode is used for being connected with the inverting input end of the inverting amplifier;
the non-inverting input end of the inverting amplifier is used for grounding, and the output end of the inverting amplifier is used for outputting voltage.
The present specification provides a label printing apparatus including:
the starting module is used for controlling the starting of the light source and enabling the light emitted by the light source to irradiate the label printing paper, wherein the label printing paper comprises label paper and base paper;
the acquisition module is used for controlling the sensor to receive the reflected light reflected by the label printing paper;
the conversion module is used for controlling the photoelectric conversion circuit to convert the reflected light into an electric signal to obtain a voltage corresponding to the reflected light;
the determining module is used for determining the printing starting position of the label paper in the label printing paper according to the voltage output by the photoelectric conversion circuit;
and the printing module is used for controlling a printing element to print the label paper according to the printing starting position.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method of label printing described above.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
in the embodiment of the specification, light is irradiated onto label printing paper in a printer through a light source, a sensor receives reflected light reflected by the label printing paper, the reflected light is converted into an electric signal through a photoelectric conversion circuit, a voltage corresponding to the reflected light is obtained, a printing starting position of the label paper in the label printing paper is determined according to the voltage corresponding to the reflected light, and then the label paper is printed according to the printing starting position of the label paper. In the process, light emitted by the light source irradiates on the label printing paper, the label printing paper reflects the light back, and the sensor for receiving the reflected light needs to be arranged on the same side of the light source. The light source and the sensor on the same side can be driven by the same circuit, thus reducing the cost of the device.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a schematic view of a portion of a prior art label printer;
FIG. 2 is a schematic diagram of a partial structure of a printer provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a label printing process provided in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a label printing paper provided in an embodiment of the present specification;
fig. 5 is a schematic diagram of a photoelectric conversion circuit provided in an embodiment of the present disclosure;
fig. 6a to 6b are schematic diagrams illustrating determination of a printing start position of label paper according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating an exemplary embodiment of the present disclosure for adjusting a printing start position of a tab sheet;
fig. 8 is a schematic structural diagram of a label printing apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
The present specification provides a printer including a controller, a light source, a sensor, a photoelectric conversion circuit, a printing element, and a driving circuit. The light source and the sensor are arranged on the same side in a paper bin of the printer, and the controller drives the light source and the sensor through the same driving circuit. In addition, the light source and the sensor can be installed in other positions in the paper bin of the printer except for the paper bin cover, but are not installed on the paper bin cover. As shown in fig. 2.
Fig. 2 is a schematic partial structural diagram of a printer provided in an embodiment of the present specification. In fig. 2, there are a light source O, a sensor B, and a label paper F. The light source O and the sensor B are arranged on the same side of the other positions except the paper bin cover in the paper bin of the printer and are driven by the same driving circuit. Wherein, the light source O emits a light ray l, and the sensor B receives a light ray l' reflected by the light ray l.
Based on the printer shown in fig. 2, the present specification provides a method of label printing, as shown in fig. 3.
Fig. 3 is a schematic diagram of a label printing process provided in an embodiment of the present specification, including:
s100: illuminating label printing paper by a light source, wherein the label printing paper comprises label paper and base paper.
In the embodiment of the specification, a controller in the printer controls the light source to be started, so that the light emitted by the light source irradiates label printing paper, wherein the label printing paper comprises label paper and base paper. The specific structure of the label printing paper F is shown in fig. 4. In fig. 4, a parallelogram indicated by a dotted line is a region of the label paper, and other regions of the label printing paper than the region of the label paper are regions of the base paper. In addition, the label printing paper in the printer is continuously conveyed in one direction in the paper bin, and the position of the light emitted by the light source on the label printing paper is continuously changed along with the movement of the label printing paper.
S102: and receiving reflected light reflected by the label printing paper.
In the embodiments of the present specification, the controller controls the sensor to receive the reflected light reflected by the label printing paper. The surface of the label paper in the label printing paper is rougher relative to the surface of the base paper, so that the reflection capability of the label paper to light is weak, and the reflection capability of the base paper to light is strong.
S104: and converting the reflected light into an electric signal to obtain a voltage corresponding to the reflected light.
In the embodiment of the present specification, the reflected light is converted into an electrical signal according to a preset circuit, and a voltage output by the circuit is obtained. The preset circuit is a photoelectric conversion circuit.
Specifically, the intensity of the reflected light reflected by the label paper and the base paper can be determined according to the intensity of the light reflection capability of the label paper and the base paper in the label printing paper, then the controller controls the photoelectric conversion circuit to convert the reflected light into an electric signal, the voltage corresponding to the reflected light is output through the photoelectric conversion circuit, and whether the position irradiated by the light source is the position of the label paper can be judged according to the voltage corresponding to the reflected light.
S106: and determining the printing starting position of the label paper in the label printing paper according to the voltage corresponding to the reflected light.
In the embodiment of the present specification, as the label printing paper is continuously conveyed, the light source is sometimes irradiated on the label paper, sometimes irradiated on the base paper, sometimes in a transition stage from the label base to the base paper, and sometimes in a transition stage from the base paper to the label paper. In the above four irradiation cases, the voltages corresponding to the reflected light are different. Therefore, the controller can determine the printing start position of the label paper in the label printing paper according to the voltage output by the photoelectric conversion circuit.
Specifically, according to voltages corresponding to reflected light reflected by different printing label paper, the printing starting position of the label paper in the label printing paper can be determined by a method of setting a threshold value. The printing starting position of the label paper in the label printing paper can also be determined through the condition that the voltage corresponding to the reflected light reflected by the label printing paper continuously changes within a period of time.
S108: and printing the label paper according to the printing starting position.
In the embodiments of the present specification, the controller controls the printing element to print the tab sheet according to a printing start position of the tab sheet in the tab printing sheet.
As can be seen from the method shown in fig. 3, in the present specification, light is irradiated onto label printing paper in a printer by a light source, a sensor receives reflected light reflected by the label printing paper, a photoelectric conversion circuit converts the reflected light into an electrical signal, and obtains a voltage corresponding to the reflected light, a printing start position of the label paper in the label printing paper is determined according to the voltage corresponding to the reflected light, and then the label paper is printed according to the printing start position of the label paper. In the process, the voltage corresponding to the reflected light reflected by the label printing paper is obtained through the reflection of the light, so that the printing starting position of the label paper is determined. This method of determining the printing start position by the reflection of light determines the installation of the sensor receiving the reflected light on the same side as the light source. The light source and the sensor are arranged on the same side, so that the condition that the light source and the sensor are driven by the same circuit is provided, and the possibility of reducing the cost of equipment is provided.
Further, in step S104 shown in fig. 3, the correlation between the intensity of the reflected light and the voltage output from the photoelectric conversion circuit differs depending on the photoelectric conversion circuit. Such as: the intensity of the reflected light is positively correlated with the voltage output from the photoelectric conversion circuit. That is, the stronger the intensity of the reflected light, the larger the voltage output by the photoelectric conversion circuit, and conversely, the weaker the intensity of the reflected light, the smaller the voltage output by the photoelectric conversion circuit. Corresponding to the label printing paper, the reflected light reflected by the base paper is strong, the voltage output by the photoelectric conversion circuit is large, the reflected light reflected by the label paper is weak, and the voltage output by the photoelectric conversion circuit is small.
In addition to the above-described positive correlation between the intensity of the reflected light and the voltage output from the photoelectric conversion circuit, the intensity of the reflected light may also be negatively correlated with the voltage output from the photoelectric conversion circuit, as shown in fig. 5.
Fig. 5 is a schematic diagram of a photoelectric conversion circuit provided in an embodiment of the present disclosure. In fig. 5, a photo transistor, a light emitting diode, an inverting amplifier and a plurality of resistors are included. The light emitting diode is the light source in step S100. The phototriode in fig. 5 is connected in parallel with the light emitting diode, wherein the base of the phototriode is used for receiving the reflected light reflected by the label printing paper, the collector of the phototriode is connected with the power supply, and the emitter of the phototriode is connected with the inverting input end of the inverting amplifier. The positive phase input end of the inverting amplifier is grounded, and the output end outputs voltage. The connection mode of fig. 5 can drive the photosensitive triode and the light emitting diode by using the same driving circuit. Furthermore, after the whole circuit is electrified, the light emitting diode emits light, so that the light irradiates on the label printing paper, and the phototriode receives reflected light reflected by the label printing paper. Then, the photoelectric conversion region surrounded by the dotted line converts the reflected light received by the phototransistor into an electric signal, and outputs a corresponding voltage.
As is clear from the photoelectric conversion circuit shown in fig. 5, the weaker the intensity of the reflected light, the larger the voltage output from the photoelectric conversion circuit, and conversely, the stronger the intensity of the reflected light, the smaller the voltage output from the photoelectric conversion circuit. That is, the voltage corresponding to the reflected light reflected by the label paper in the label printing paper is large, and the voltage corresponding to the reflected light reflected by the base paper is small.
Based on the above-mentioned relationship that the intensity of the reflected light is in negative correlation with the voltage output by the photoelectric conversion circuit, in step S106 shown in fig. 3, the printing start position of the label paper in the label printing paper may be determined by a method of setting a threshold value, and may include: monitoring whether the voltage corresponding to the reflected light of the label printing paper is larger than a preset threshold value or not, and determining the printing starting position of the label paper in the label printing paper according to the position of the label printing paper irradiated by the light source when the voltage corresponding to the reflected light is larger than the preset threshold value.
Specifically, the label printing paper adopts white label paper and green base paper, the voltage corresponding to the reflected light reflected by the label paper is 2.6V, and 2.6V is a preset threshold value. While the label printing paper is being transported, the controller monitors the voltage output from the photoelectric conversion circuit, as shown in fig. 6 a. In fig. 6a, a voltage within 0s to 10s is obtained, and when the time is 1.3s, the obtained voltage reaches 2.6V, and the position irradiated by the light source at the time of 1.3s is the printing start position of the label paper in the label printing paper.
Alternatively, determining a printing start position of the label paper in the label printing paper may include: and monitoring whether the voltage corresponding to the reflected light of the label printing paper is continuously increased or not, and determining the printing starting position of the label paper in the label printing paper according to the position of the label printing paper irradiated by the light source when the voltage corresponding to the reflected light is continuously increased for the preset times.
Specifically, the label printing paper adopts white label paper and green base paper, and if the preset times are 10 times. While the label printing paper is being transported, the controller monitors the voltage output from the photoelectric conversion circuit, as shown in fig. 6 b. In fig. 6b, the voltage within 0s to 10s is obtained, and 10 voltages are continuously increased within the time of 6s to 6.6s, and the position irradiated by the light source at the moment of 6.6s is the printing start position of the label paper in the label printing paper.
Further, since the label printing paper is in a state of being continuously transferred, when the controller monitors the voltage of the printing start position of the label paper, the position where the light source is irradiated on the label printing paper actually exceeds the printing start position of the label paper. Therefore, the position where the light source irradiates on the label printing paper may be determined as an initial printing start position, and then the label printing paper may be moved by a preset distance in the reverse direction of the transfer direction of the label printing paper from the initial printing start position. And determining the position of the light source irradiating on the label printing paper after the label printing paper is moved in the opposite direction as the actual printing starting position of the label paper in the label printing paper. As shown in fig. 7. The actual printing start position is the above-mentioned printing start position. The preset distance may be determined according to the transfer speed and transfer time of the label printing paper.
In fig. 7, there are label printing paper, a light source O and light emitted from the light source. At time t1, the light source O irradiates the actual printing start position of the tab sheet in the tab sheet, but when the controller of the printer monitors the voltage of the actual printing start position of the tab sheet, the position at which the light source O irradiates the tab sheet in the tab sheet at this time is time t2, that is, the initial printing start position of the tab sheet in the tab sheet. Wherein time t1 is earlier than time t 2. the distance s from the time t1 to the time t2 is a preset distance.
Based on the same idea, the present specification further provides a corresponding apparatus and a storage medium.
Fig. 8 is a schematic structural diagram of a label printing apparatus provided in an embodiment of the present specification, where the apparatus includes:
the starting module 801 is used for controlling a light source to start, so that light emitted by the light source irradiates label printing paper, wherein the label printing paper comprises label paper and base paper;
an obtaining module 802, configured to control a sensor to receive reflected light reflected by the label printing paper;
a conversion module 803, configured to control a photoelectric conversion circuit to convert the reflected light into an electrical signal, so as to obtain a voltage corresponding to the reflected light;
a determining module 804, configured to determine a printing start position of label paper in the label printing paper according to the voltage output by the photoelectric conversion circuit;
and a printing module 805, configured to control a printing element to print the label paper according to the printing start position.
Optionally, the conversion module 803 is specifically configured to, according to a preset circuit, convert the reflected light into an electrical signal, and obtain a voltage output by the circuit; wherein the lower the intensity of the reflected light, the larger the value of the voltage, and the higher the intensity of the reflected light, the smaller the value of the voltage.
Optionally, the determining module 804 is specifically configured to monitor whether the voltage corresponding to the reflected light is greater than a preset threshold, and determine a printing start position of a label paper in the label printing paper according to a position where the light source irradiates the label printing paper when the voltage corresponding to the reflected light is greater than the preset threshold;
monitoring whether the voltage corresponding to the reflected light is continuously increased or not, and determining the printing starting position of label paper in the label printing paper according to the position of the label printing paper irradiated by the light source when the voltage corresponding to the reflected light is continuously increased for a preset number of times;
determining the position of the light source irradiating the label printing paper as an initial printing starting position; moving the label printing paper to a preset distance in a direction opposite to the conveying direction of the label printing paper from the initial printing starting position; and after the label printing paper is moved in the opposite direction, the light source irradiates the position of the label printing paper, and the actual printing starting position of the label paper in the label printing paper is determined.
The present specification also provides a computer-readable storage medium storing a computer program which, when executed by a processor, is operable to perform the label printing method provided in fig. 3 above.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (11)

1. A printer, comprising: a controller, a light source, a sensor, a photoelectric conversion circuit, and a printing element;
the controller is used for controlling the light source to be started, so that the light emitted by the light source irradiates label printing paper, wherein the label printing paper comprises label paper and base paper;
the sensor is used for receiving the reflected light reflected by the label printing paper;
the photoelectric conversion circuit is used for converting the reflected light into an electric signal to obtain a voltage corresponding to the reflected light;
the controller is further configured to determine a printing start position of label paper in the label printing paper according to the voltage output by the photoelectric conversion circuit, and control the printing element to print the label paper according to the printing start position.
2. The printer of claim 1, further comprising: a drive circuit;
the light source and the sensor are arranged on the same side in a paper bin of the printer;
the driving circuit is used for driving the light source and the sensor.
3. A printer according to claim 1 or 2, comprising:
the light source and the sensor are arranged at other positions of the paper bin of the printer except the paper bin cover.
4. The printer according to claim 1, wherein the photoelectric conversion circuit includes: the light-emitting diode comprises a phototriode, a light-emitting diode, an inverting amplifier and a resistor;
the controller is specifically used for controlling the light emitted by the light emitting diode to irradiate the label printing paper;
the phototriode is used for receiving reflected light reflected by the label printing paper;
the resistor and the inverting amplifier are used for converting the reflected light received by the phototriode into an electric signal to obtain the voltage output by the photoelectric conversion circuit.
5. The printer of claim 4, wherein said phototransistor is connected in parallel with said light emitting diode;
the base electrode of the phototriode is used for receiving reflected light reflected by the label printing paper, the collector electrode of the phototriode is used for being connected with a power supply, and the emitter electrode of the phototriode is used for being connected with the inverting input end of the inverting amplifier;
the non-inverting input end of the inverting amplifier is used for grounding, and the output end of the inverting amplifier is used for outputting voltage.
6. A method of label printing, comprising:
illuminating label printing paper by a light source, wherein the label printing paper comprises label paper and base paper;
receiving reflected light reflected by the label printing paper;
converting the reflected light into an electric signal to obtain a voltage corresponding to the reflected light;
determining a printing starting position of label paper in the label printing paper according to the voltage corresponding to the reflected light;
and printing the label paper according to the printing starting position.
7. The method according to claim 6, wherein converting the reflected light into an electrical signal to obtain a voltage corresponding to the reflected light, specifically comprises:
converting the reflected light into an electric signal according to a preset circuit, and obtaining a voltage output by the circuit; wherein the lower the intensity of the reflected light, the larger the value of the voltage, and the higher the intensity of the reflected light, the smaller the value of the voltage.
8. The method according to claim 6, wherein determining a printing start position of a label paper in the label printing paper according to the voltage corresponding to the reflected light specifically comprises:
monitoring whether the voltage corresponding to the reflected light is continuously increased;
and when the voltage corresponding to the reflected light is monitored to be continuously increased for a preset number of times, determining the printing starting position of the label paper in the label printing paper according to the position of the label printing paper irradiated by the light source.
9. The method according to claim 8, wherein determining a printing start position of a label paper in the label printing paper according to a position of the label printing paper irradiated by the light source comprises:
determining the position of the light source irradiating the label printing paper as an initial printing starting position;
moving the label printing paper to a preset distance in a direction opposite to the conveying direction of the label printing paper from the initial printing starting position;
and determining the position of the label printing paper irradiated by the light source after the label printing paper is moved in the opposite direction as the actual printing starting position of the label paper in the label printing paper.
10. A label printing apparatus, comprising:
the starting module is used for controlling the starting of the light source and enabling the light emitted by the light source to irradiate the label printing paper, wherein the label printing paper comprises label paper and base paper;
the acquisition module is used for controlling the sensor to receive the reflected light reflected by the label printing paper;
the conversion module is used for controlling the photoelectric conversion circuit to convert the reflected light into an electric signal to obtain a voltage corresponding to the reflected light;
the determining module is used for determining the printing starting position of the label paper in the label printing paper according to the voltage output by the photoelectric conversion circuit;
and the printing module is used for controlling a printing element to print the label paper according to the printing starting position.
11. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when being executed by a processor, carries out the method of any of the preceding claims 6-9.
CN202011631642.3A 2020-12-31 2020-12-31 Label printing method and device and storage medium Pending CN112721466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011631642.3A CN112721466A (en) 2020-12-31 2020-12-31 Label printing method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011631642.3A CN112721466A (en) 2020-12-31 2020-12-31 Label printing method and device and storage medium

Publications (1)

Publication Number Publication Date
CN112721466A true CN112721466A (en) 2021-04-30

Family

ID=75608341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011631642.3A Pending CN112721466A (en) 2020-12-31 2020-12-31 Label printing method and device and storage medium

Country Status (1)

Country Link
CN (1) CN112721466A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326903A (en) * 2021-05-27 2021-08-31 上海摩勤智能技术有限公司 Label detection device and POS equipment
CN115107382A (en) * 2022-07-25 2022-09-27 上海商米科技集团股份有限公司 Photoelectric sensing device of printer
CN116080286A (en) * 2022-12-30 2023-05-09 珠海芯烨电子科技有限公司 Method for detecting printed label by using reflection and printer

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925987A (en) * 2004-10-25 2007-03-07 株式会社佐藤 Printer
CN106541714A (en) * 2015-09-16 2017-03-29 山东新北洋信息技术股份有限公司 A kind of control method and label machine of label machine
CN106573476A (en) * 2014-08-05 2017-04-19 佐藤控股株式会社 Printer and printer operation mode-setting method
CN106626847A (en) * 2015-11-03 2017-05-10 山东新北洋信息技术股份有限公司 Printing method and printer
CN106696471A (en) * 2015-07-21 2017-05-24 山东新北洋信息技术股份有限公司 Printer and control method thereof
CN107284044A (en) * 2017-06-28 2017-10-24 威海新北洋技术服务有限公司 Label machine and label printing method
CN107584894A (en) * 2016-07-07 2018-01-16 东芝泰格有限公司 Label machine and its control method, terminal device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925987A (en) * 2004-10-25 2007-03-07 株式会社佐藤 Printer
CN106573476A (en) * 2014-08-05 2017-04-19 佐藤控股株式会社 Printer and printer operation mode-setting method
CN106696471A (en) * 2015-07-21 2017-05-24 山东新北洋信息技术股份有限公司 Printer and control method thereof
CN106541714A (en) * 2015-09-16 2017-03-29 山东新北洋信息技术股份有限公司 A kind of control method and label machine of label machine
CN106626847A (en) * 2015-11-03 2017-05-10 山东新北洋信息技术股份有限公司 Printing method and printer
CN107584894A (en) * 2016-07-07 2018-01-16 东芝泰格有限公司 Label machine and its control method, terminal device
CN107284044A (en) * 2017-06-28 2017-10-24 威海新北洋技术服务有限公司 Label machine and label printing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326903A (en) * 2021-05-27 2021-08-31 上海摩勤智能技术有限公司 Label detection device and POS equipment
CN115107382A (en) * 2022-07-25 2022-09-27 上海商米科技集团股份有限公司 Photoelectric sensing device of printer
CN116080286A (en) * 2022-12-30 2023-05-09 珠海芯烨电子科技有限公司 Method for detecting printed label by using reflection and printer
CN116080286B (en) * 2022-12-30 2024-03-01 珠海芯烨电子科技有限公司 Method for detecting printed label by using reflection and printer

Similar Documents

Publication Publication Date Title
CN112721466A (en) Label printing method and device and storage medium
KR102526246B1 (en) Driving circuit, display panel and display device
CN1030018C (en) Bit storage cell in memory
JPS5996966A (en) Side printer
JP2013213680A (en) Object detecting device, object detecting method, object detecting program, and information recording medium
CN111027384B (en) Fingerprint identification detection circuit, detection method and display device
JPS5939063B2 (en) Scanning device for information retrieval system
CN108920987B (en) Graphic code scanning method and device and scanning gun
US11765291B2 (en) Medium conveying device and determination method
KR970049104A (en) Electrophotographic image forming apparatus and its power saving method
JP2004302533A (en) Optical mouse and terminal device using the same
JP2012160413A (en) Led lighting control device and electronic appliance comprising the same
CN113050811A (en) Electronic equipment and input equipment
US20070273541A1 (en) Signal processing system
JP2006347120A (en) Bar-code printer
US3248553A (en) Binary record photosensing apparatus
US11375075B2 (en) Temperature based control for document reading apparatus
JPH076193A (en) Bar code signal generator
KR960035327A (en) Code reading device
CN111753661B (en) Target identification method, device and medium based on neural network
JP2010032889A (en) Image forming apparatus
CN116489851A (en) Intelligent illumination control method, device, storage medium and system based on ambient illuminance
ATE153787T1 (en) LOGIC DEVICE FOR USE WITH A COMPUTER
CN117774322A (en) LED driving method and circuit of LCD printer
JPS5875084A (en) Optical detection system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210430