WO2017032257A1 - Method for controlling printer and printer - Google Patents

Method for controlling printer and printer Download PDF

Info

Publication number
WO2017032257A1
WO2017032257A1 PCT/CN2016/095720 CN2016095720W WO2017032257A1 WO 2017032257 A1 WO2017032257 A1 WO 2017032257A1 CN 2016095720 W CN2016095720 W CN 2016095720W WO 2017032257 A1 WO2017032257 A1 WO 2017032257A1
Authority
WO
WIPO (PCT)
Prior art keywords
paper
sensor
state
printing
printing paper
Prior art date
Application number
PCT/CN2016/095720
Other languages
French (fr)
Chinese (zh)
Inventor
张春光
胡广东
邓少华
解丝艳
王春涛
Original Assignee
山东新北洋信息技术股份有限公司
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 山东新北洋信息技术股份有限公司 filed Critical 山东新北洋信息技术股份有限公司
Publication of WO2017032257A1 publication Critical patent/WO2017032257A1/en

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
    • 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
    • B41J11/36Blanking or long feeds; Feeding to a particular line, e.g. by rotation of platen or feed roller
    • B41J11/42Controlling printing material conveyance for accurate alignment of the printing material with the printhead; Print registering
    • 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
    • B41J13/00Devices or arrangements of selective printing mechanisms, e.g. ink-jet printers or thermal printers, specially adapted for supporting or handling copy material in short lengths, e.g. sheets
    • 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
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65HHANDLING THIN OR FILAMENTARY MATERIAL, e.g. SHEETS, WEBS, CABLES
    • B65H23/00Registering, tensioning, smoothing or guiding webs
    • B65H23/04Registering, tensioning, smoothing or guiding webs longitudinally
    • B65H23/18Registering, tensioning, smoothing or guiding webs longitudinally by controlling or regulating the web-advancing mechanism, e.g. mechanism acting on the running web
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65HHANDLING THIN OR FILAMENTARY MATERIAL, e.g. SHEETS, WEBS, CABLES
    • B65H7/00Controlling article feeding, separating, pile-advancing, or associated apparatus, to take account of incorrect feeding, absence of articles, or presence of faulty articles
    • B65H7/02Controlling article feeding, separating, pile-advancing, or associated apparatus, to take account of incorrect feeding, absence of articles, or presence of faulty articles by feelers or detectors
    • B65H7/06Controlling article feeding, separating, pile-advancing, or associated apparatus, to take account of incorrect feeding, absence of articles, or presence of faulty articles by feelers or detectors responsive to presence of faulty articles or incorrect separation or feed

Definitions

  • the present disclosure relates to the field of printing apparatuses and control methods, and, for example, to a method of controlling a printer and a printer using the same.
  • the printer is one of the output devices used in conjunction with a computer. It is used to print computer processing results on related media, usually printed on paper, and is an indispensable important device for modern social office and home use.
  • a printer having an open conveying path which is widely used in the related art, generally includes an upper cover and a base.
  • the upper cover can be opened or closed with respect to the base, and a printing paper is formed between the upper cover and the base when the upper cover is closed relative to the base. Delivery channel.
  • the first end of the conveying passage is provided with a paper inlet for inputting printing paper
  • the second end of the conveying passage is provided with a paper discharging port for discharging the printing paper
  • the conveying channel is provided with a conveying unit and a printing head, wherein the conveying unit is used for the conveying unit
  • the first method is to insert the leading edge of the printing paper into the paper opening when the upper cover is closed relative to the base; the second method is to open the upper cover first, then The leading edge of the printing paper is dragged from the paper feeding port to the paper exit port, and then the upper cover is closed.
  • the user selects any one of the printing paper mounting methods according to his own usage habits to install and print the printing paper.
  • the printer detects the leading edge of the printing paper by the signal change of the sensor output at the paper inlet, and accordingly controls the conveying unit to start the leading edge of the printing paper to the preset position. print.
  • the printer cannot detect the sensor signal before performing the printing task.
  • the change sends the paper to the preset position. Normally, the printer performs a print job directly on the installed paper. At this time, a piece of paper between the paper head and the print start position is wasted, or the print position of the print content is inaccurate.
  • the present disclosure provides a control method and a printer for a printer, which solves the problem of paper waste or inaccurate print position of print contents in the related art.
  • a control method of a printer comprising a first sensor (151), a print head (131), and a second sensor (152), wherein the first sensor (151), the print head (131), and The second sensor (152) is sequentially disposed in the feeding path (23) of the printer along the paper feeding direction of the printing paper, and the control method includes:
  • the printing paper is controlled to feed so that the paper head of the printing paper reaches the detection position of the second sensor (152).
  • the printing paper is driven to move a preset length, and the printing starting position of the printing paper is sent to the printing.
  • the printer further includes an upper cover (20) and a base (21), the upper cover (20) being openable or closable relative to the base (21), when the upper cover (20) When the base (21) is closed, the upper cover (20) and the base (21) form the conveying passage (23);
  • detecting whether the second sensor (152) is in a paper state includes:
  • controlling the paper to be ejected, so that the paper head of the printing paper reaches the detection position of the second sensor (152) includes:
  • the printing paper detects a state of the second sensor (152) every time a predetermined distance is ejected, and when detecting that the second sensor (152) is in a paperless state, determining that the paper head of the printing paper arrives The detection position of the second sensor (152).
  • the method further includes:
  • the method further includes:
  • a printer comprising: a transport channel (23), a print head (131), a transport unit (14), a first sensor (151), a second sensor (152), and a control unit (10);
  • the conveying unit (14) is configured to drive the printing paper to move in the conveying passage (23);
  • the first sensor (151) and the second sensor (152), wherein the first sensor (151), the print head (131), and the second sensor (152) follow the printing paper The paper direction is sequentially disposed in the conveying passage (23) of the printer;
  • the control unit (10) is configured to detect whether the first sensor (151) is in a paper state, and when detecting that the first sensor (151) is in a paper state, detecting the second sensor (152) Whether it is a paper-like state, when detecting that the second sensor (152) is in a paper state, controlling the conveying unit (14) to drive the printing paper to eject, so that the paper head of the printing paper reaches the paper a detecting position of the second sensor (152); when detecting that the second sensor (152) is in a paperless state, controlling the conveying unit (14) to drive the printing paper to feed the paper head of the printing paper A detection position of the second sensor (152) is reached.
  • control unit (10) is further configured to control, when the paper head of the printing paper reaches the detecting position of the second sensor (152), the conveying unit (14) to drive the printing paper movement pre-
  • the length is set to convey the printing start position of the printing paper to the printing position of the print head (131).
  • the upper cover (20) can be opened or closed relative to the base (21), and when the upper cover (20) is closed relative to the base (21), the upper cover (20)
  • the conveying passage (23) is formed between the bases (21), and the third sensor (153) is configured to output a signal indicating that the upper cover (20) is in an open state or a closed state;
  • the control unit (10) is further configured to detect the upper cover (20) by detecting a signal output by the third sensor (153) when detecting that the first sensor (151) is in a paper state. Whether it is in a closed state, when it is detected that the upper cover (20) is in a closed state, it is detected whether the second sensor (152) is in a paper state.
  • control unit (10) is configured to: when detecting that the second sensor (152) is in a paper state, the paper head of the printing paper reaches the second sensor (152) by: Detection location:
  • the control unit (10) detects the state of the second sensor (152) every time the control unit (14) controls the printing unit to drive the paper to eject a predetermined distance, when the second sensor is detected ( 152) When the paper is in a paperless state, it is determined that the paper head of the printing paper reaches the detection position of the second sensor (152).
  • an indication unit (16) is further included for indicating a status of the printer
  • the control unit (10) is further configured to count the paper ejection distance of the printing paper by using a first counter, and the control unit (10) controls the conveying unit (14) to drive the printing paper to eject one paper.
  • the count value of the first counter is incremented by 1.
  • the count value of the first counter is equal to the first pre-designed value, if the second sensor (152) has not been detected as being paperless, The indication unit (16) is controlled to perform a paper jam alarm.
  • control unit (10) is configured to: when detecting that the second sensor (152) is in a paperless state, the paper head of the printing paper reaches the second sensor (152) by: Detection location:
  • the control unit (10) detects a state of the second sensor (152) every time the control unit (14) controls the printing unit to drive the printing paper to a predetermined distance, when the second sensor is detected ( 152) When the paper is in the paper state, it is determined that the paper head of the printing paper reaches the detection position of the second sensor (152).
  • an indication unit (16) is further included for indicating a status of the printer
  • the control unit (10) is further configured to count the paper feeding distance of the printing paper by using a second counter, and the control unit (10) controls the conveying unit (14) to drive the printing paper to feed one paper.
  • the count value of the second counter is incremented by 1, when the count value of the second counter is equal to
  • the indication unit (16) is controlled to perform a paper jam alarm.
  • the present disclosure provides a first sensor and a second sensor for detecting the position of the printing paper in the conveying path of the printer. Therefore, when the printer replaces the printing paper, the user can select the printing paper when the upper cover is in the closed state.
  • the paper is installed by inserting the paper from the paper inlet. You can also choose to open the upper cover first, then drag the leading edge of the paper from the paper inlet to the paper exit and then close the upper cover to install the paper, no matter which user chooses.
  • the printer can transfer the printing start position of the printing paper to the printing position of the printing head, so that the position of the printing content on the printing paper is more accurate.
  • FIG. 1 is a schematic diagram showing the connection of components of a printer according to Embodiment 1 of the present disclosure
  • FIG. 2 is a schematic cross-sectional view showing the upper cover of the printer in a closed state according to Embodiment 1 of the present disclosure
  • FIG. 3 is a three-dimensional structural view of the printer upper cover in an open state according to Embodiment 1 of the present disclosure
  • FIG. 4 is a schematic cross-sectional view showing the printer upper cover in a closed state according to Embodiment 2 of the present disclosure
  • FIG. 5 is a flowchart of a method for controlling a printer according to Embodiment 1 of the present disclosure
  • FIG. 6 is a flowchart of a method for controlling a printer according to Embodiment 2 of the method of the present disclosure
  • FIG. 7 is a flowchart of a method for controlling a printer according to Embodiment 3 of the present disclosure.
  • FIG. 8 is a flowchart of a method for controlling a printer according to Embodiment 4 of the present disclosure.
  • the present disclosure discloses a printer that can include a top cover, a base, a printhead, a paper feed port, and a first sensor disposed at a position of the paper feed port.
  • a second sensor may be further included, the second sensor and the first sensor are respectively disposed at two sides of the print head, the second sensor is disposed at a predetermined position from the print head, and the upper cover and the base are closed to form a conveying passage for conveying the paper.
  • the upper cover can be opened or closed relative to the base, and the first sensor and the second sensor are located in the delivery channel.
  • the printer in the present disclosure has the above structure, when the printer replaces the printing paper, the user can select to install the printing paper by inserting the paper head of the printing paper from the paper feeding opening when the upper cover is in the closed state, or can select the first Open the top cover, then pull the leading edge of the paper from the paper inlet to the paper exit and then close the top cover to install the paper.
  • the printer can print the paper regardless of the way the printer chooses to install the paper.
  • the position is transported to the print position of the printhead, making the position of the printed content on the print paper more accurate.
  • the printer 1 may include a control unit 10, a communication unit 11, a storage unit 12, a printing unit 13, a conveying unit 14, and a sensor unit. 15.
  • the control unit 10 is connected to the communication unit 11, the storage unit 12, the printing unit 13, the transport unit 14, the sensor unit 15, and the indication unit 16, respectively.
  • the control unit 10 is configured to issue a control signal, control the operation of other work units, and perform calculation and processing of data.
  • the control unit 10 issues a control signal to control the communication unit 11 to perform data transfer between the printer 1 and the print requesting device (computer or the like), or to control the printing unit 13 to perform image printing or the like.
  • the communication unit 11 is for performing data transfer between the printer 1 and the print requesting device. For example, the communication unit 11 receives the print control command and the print data transmitted by the print requesting device, and transmits the print control command and the print data to the control unit 10, and then the control unit 10 controls the corresponding work unit to operate.
  • the storage unit 12 is used to store the control program of the printer 1 and to control the data and variables required during the running of the program.
  • the storage unit 12 is configured to store a first preset threshold T1, a second preset threshold T2, a first pre-designed value C1, a second pre-designed value C2, and the like.
  • the first preset threshold T1 is used to determine whether there is a printing paper located at the detecting position of the first sensor 151 of the sensor unit 15;
  • the value T2 is used to determine whether or not the printing paper is located at the detection position of the second sensor 152 of the sensor unit 15;
  • the first pre-designed value C1 and the second pre-designed value C2 are used to determine whether the printer 1 is jammed.
  • the printing unit 13 is for printing an image on a printing paper in accordance with a control signal output from the control unit 10.
  • the printing unit 13 can be a pin printing unit, a thermal printing unit, a thermal transfer printing unit or an inkjet printing unit.
  • other printing units that can be applied to the printer 1 can be used as long as the printing effect can be ensured.
  • the printing unit that can be applied can be.
  • the printing unit 13 is a thermal printing unit, including a print head 131 and a printing roller 132. When the printer 1 performs a printing operation, the printing paper passes between the printing head 131 and the printing roller 132, and prints.
  • the heat sensitive layer of the paper is in contact with the print head 131, and the print head 131 includes a plurality of heat generating bodies arranged in a row at equal intervals in the width direction of the printing paper (i.e., a direction perpendicular to the conveying direction of the printing paper).
  • the heat generating body of the printing head 131 generates heat to cause a chemical change of the heat sensitive layer of the printing paper to form an image on the printing paper.
  • the conveying unit 14 is for driving the printing paper to move in the conveying path of the printing paper.
  • the transport unit 14 may include a motor driver 141 and a motor 142 for supplying an operating current to the motor 142 according to a control signal output from the control unit 10 to drive the output shaft of the motor 142 to rotate.
  • the output shaft of the motor 142 is connected to a conveying roller disposed in a conveying passage of the printing paper (hereinafter referred to as a conveying passage).
  • a conveying passage When the output shaft of the motor 142 is rotated, the conveying roller in the conveying passage rotates accordingly, thereby driving the printing paper at Move in the conveying channel.
  • the print roller 132 is also coupled to the output shaft of the motor 142 for driving the printing paper as a transport roller to move in the transport path.
  • the sensor unit 15 may be a first sensor 151 and a second sensor 152 included in the transport path for detecting the position of the printing paper in the transport path.
  • the first sensor 151 and the second sensor 152 are photoelectric sensors, and of course, other types of sensors capable of implementing the detecting function may be used as long as the detecting task of the position of the printing paper can be completed.
  • the first sensor 151 and the second sensor 152 select a photoelectric sensor, which may be a reflective sensor or a transmissive sensor. Since the working principle of the two is the same, the following two are collectively referred to as a sensor, and work on a reflective sensor or a transmissive sensor. The principle is explained.
  • the sensor comprises a light generator and a light receiver.
  • the light generator and the light receiver are located on the same side of the conveying channel, and the light receiver receives the light emitted by the light generator reflected by the printing paper or the channel plate and the light signal It is converted into an electrical signal and transmitted to the control unit 10.
  • the sensor is a transmissive sensor
  • the light generator and the photoreceiver are respectively located on both sides of the transport channel, and the light receiver receives the light emitted by the light generator or receives the light emitted by the generator transmitted through the printing paper. The light converts the optical signal into an electrical signal and transmits the electrical signal to the control unit 10.
  • the optical receiver When there is a printing paper located at the detecting position of the sensor (hereinafter referred to as the sensor is in a paper state), the optical receiver outputs a first signal when no printing paper is located at the detecting position of the sensor (hereinafter referred to as the sensor is paperless).
  • the light receiver outputs a second signal, and the control unit 10 determines whether the sensor is in a paper state or a paperless state by detecting a signal output from the light receiver, thereby determining the position of the printing paper in the conveying path. For example, when the sensor changes from the paper state to the paperless state, it is determined that the printing paper leaves the detection position of the sensor; when the sensor changes from the paperless state to the paper state, it is determined that the printing paper reaches the detection position of the sensor.
  • the sensor unit 15 may further include a third sensor 153 for outputting a signal indicating that the upper cover of the printer 1 is in a closed state or an open state, and when the upper cover of the printer 1 is in a closed state, the third sensor 153 outputs The third signal, when the upper cover of the printer 1 is in the open state, the third sensor 153 outputs a fourth signal, and the control unit 10 determines whether the upper cover of the printer 1 is in the closed state by detecting the signal output from the third sensor 153.
  • a third sensor 153 for outputting a signal indicating that the upper cover of the printer 1 is in a closed state or an open state, and when the upper cover of the printer 1 is in a closed state, the third sensor 153 outputs The third signal, when the upper cover of the printer 1 is in the open state, the third sensor 153 outputs a fourth signal, and the control unit 10 determines whether the upper cover of the printer 1 is in the closed state by detecting the signal output from the third sensor 153.
  • the printer 1 may further include an indicating unit 16 for displaying the state of the printer 1 in a light, sound, or the like according to a control signal of the control unit 10.
  • the indicating unit 16 may be an indicator light, a liquid crystal display, or a buzzer. And voice devices, etc.
  • the indicating unit 16 uses a buzzer to perform a buzzer alarm to remind the user to process the paper jam, thereby reducing the waste caused by the paper jam and reducing the probability of the printer 1 being damaged. The experience is better.
  • the printer 1 includes an upper cover 20 and a base 21, and the upper cover 20 and the base 21 are rotatable through the shaft 22.
  • the pivoting of the upper cover 20 can be reversed about the axis 22 so as to be openable or closable relative to the base 21.
  • the print head 131 is mounted on the upper cover 20, the print roller 132 is mounted on the base 21, the print roller 132 is rotatable about its own axis, and the print roller 132 is coupled to the transport unit 14 for rotation by the transport unit 14.
  • the second sensor 152 and the first sensor 151 are respectively disposed on both sides of the print head 131, and the second sensor 152 is disposed at a predetermined position from the print head 131.
  • the first sensor 151, the print head 131, and the second sensor 152 are sequentially disposed in the conveying path, that is, in the paper feeding direction of the printing paper, the first sensor 151 is located upstream of the printing head 131, and the second The sensor 152 is located downstream of the printhead 131.
  • the arrow A is the paper feed direction of the printing paper
  • the paper feed port 24, the first sensor 151, the print head 131, the second sensor 152, and the paper discharge port 25 are in the paper feed direction of the printing paper.
  • the conveying passages 23 are arranged in order.
  • the detection position of the second sensor 152 is hit.
  • the distance between the printing positions of the print head 131 is the first distance L1.
  • the printing roller 132 is drivingly connected to the output shaft of the motor 142. When the output shaft of the motor 142 rotates, the printing roller 132 rotates accordingly, thereby driving the printing paper to move in the conveying path 23.
  • the printing paper is not additionally disposed.
  • the conveying roller has a simpler structure.
  • the first sensor 151 and the second sensor 152 are both reflective sensors, and both the light generator and the light receiver are fixedly connected to the base 21.
  • the first sensor 151 or the second sensor 152 may also be a transmissive sensor.
  • the light generator of the transmissive sensor is fixedly connected to the upper cover 20, and transmitted.
  • the light receiver of the sensor is fixedly connected to the base 21; or the light receiver is fixedly connected to the upper cover 20, and the light generator is fixedly connected to the base 21.
  • the upper cover 20 is closed relative to the base 21, the light generator and the light receiver are vertically disposed in the transport path 23 to ensure that the transmission sensor can be used normally.
  • the sensor unit of the printer 1 in this embodiment may further include a third sensor 153.
  • the third sensor 153 is fixedly mounted on the side wall of the base 21.
  • the upper cover 20 is closed relative to the base 21 (hereinafter referred to as the upper cover 20 is in a closed state)
  • the upper cover 20 is engaged with the third sensor 153, and is controlled.
  • the unit 10 emits a third signal; when the upper cover 20 is opened relative to the base 21 (hereinafter referred to as the upper cover 20 is in an open state), the upper cover 20 is separated from the third sensor 153, and the third sensor 153 is issued to the control unit 10 at this time.
  • the fourth signal When the upper cover 20 is engaged or disengaged from the third sensor 153, the third sensor 153 outputs a different signal, and the control unit 10 determines the state of the upper cover 20 by detecting the signal output from the third sensor 153.
  • the first sensor 151 and the second sensor 152 are disposed in the conveying passage 23, and the two can be used together to judge the position of the printing paper located in the conveying passage 23, and then print through the control unit 10 and the conveying unit 14.
  • the position of the paper is adjusted and then printed, which saves paper and is more environmentally friendly. At the same time, it can ensure the position of the printed image and text on the printing paper is more accurate and improve the printing effect.
  • the structure of the printer in this embodiment is basically the same as that of the printer in the first embodiment, and may include a control unit, a communication unit, a storage unit, a printing unit, a transport unit, and a sensor unit, and the control unit and the communication unit and the storage unit, respectively.
  • the unit, the printing unit, the conveying unit, the sensor unit, and the indicating unit are connected.
  • the sensor unit in this embodiment may also include a first sensor 151, a second sensor 152, and a third sensor 153.
  • the printer in this embodiment is also provided with a bit.
  • the first conveying roller 26a and the second conveying roller 26b are disposed upside down and located upstream of the printing head 131; the third conveying roller 27a and the fourth conveying roller 27b are vertically opposed It is disposed and located downstream of the print head 131.
  • the first conveying roller 26a and the third conveying roller 27a are mounted on the base 21 and are rotatable about their own axes; the second conveying roller 26b and the fourth conveying roller 27b are mounted on the upper cover 20, and are also rotatable about their own axes.
  • the upper cover 20 is closed with respect to the base 21, the first conveying roller 26a and the second conveying roller 26b are tangentially fitted in the conveying path 23, and the third conveying roller 27a and the fourth conveying roller 27b are tangent in the conveying path 23
  • the first conveying roller 26a and the third conveying roller 27a are drivingly coupled to the output shaft of the motor 142.
  • the first conveying roller 26a and the third conveying roller 27a rotate accordingly, the first conveying roller 26a drives the second conveying roller 26b to rotate, and the third conveying roller 27a drives the fourth conveying roller 27b to rotate.
  • the printing paper is driven to move in the conveying path 23.
  • the operation of the printing paper is made smoother during the process of conveying the printing paper.
  • the user when the printer replaces the printing paper, the user can insert the paper head of the printing paper from the paper feeding port 24 when the upper cover 20 is in the closed state, or open the upper cover 20 first, and then the leading edge of the printing paper.
  • the upper cover 20 is closed after being pulled from the paper feed port 24 to the paper exit port 25.
  • the embodiment of the present disclosure also discloses a control method of a printer, which may be, but is not limited to, performing control on a printer of an embodiment of the present disclosure.
  • control method may include the following steps:
  • step S110 when the first sensor is in the paper state, it is detected whether the second sensor is in a paper state.
  • the control unit detects whether the second sensor located downstream of the print head in the transport path is in a paper state, for the printer provided by the embodiment of the present disclosure, when When the signal output from the first sensor 151 determines that the first sensor 151 is in the paper state, the control unit 10 determines the second sensor by detecting the signal output by the second sensor 152. Whether the device 152 is in a paper state.
  • the control unit when detecting that the first sensor located upstream of the print head in the transport unit is in a paper state, the control unit first detects whether the upper cover of the printer is in a closed state, and when detecting that the upper cover of the printer is in a closed state, controlling The unit re-detects whether the second sensor is in a paper state.
  • the control unit 10 determines whether the upper cover 20 of the printer is closed relative to the base 21 by detecting a signal output by the third sensor 153.
  • the paper when the second sensor is in the paper state, the paper is controlled to eject the paper, so that the paper head of the printing paper reaches the detecting position of the second sensor; when the second sensor is in the paperless state, the printing paper is controlled to be fed. The paper head of the printing paper reaches the detection position of the second sensor.
  • the control unit controls the paper ejection or paper feeding according to the state of the second sensor to convey the paper head of the printing paper to the detecting position of the second sensor.
  • the paper is controlled to eject the paper, so that the paper head of the printing paper reaches the detecting position of the second sensor 152, and when the second sensor 152 is in the paperless state, the printing paper is controlled to be fed, so that the paper head of the printing paper reaches the second sensor 152. Detection location.
  • the paper head of the control printing paper is moved to the detecting position of the second sensor, the driving paper is moved to a preset length, and the printing starting position of the printing paper is started.
  • the print position delivered to the printhead is a preset length, and the printing starting position of the printing paper is started.
  • the state of the second sensor when controlling the paper exit, is detected every time the paper is ejected by a preset distance, and when the second sensor is detected to be in a paperless state, determining that the paper of the paper reaches the second sensor The detection position; when controlling the paper feeding, the state of the second sensor is detected every time the printing paper feeds a predetermined distance, and when the second sensor is detected to be in the paper state, it is determined that the paper head of the printing paper reaches the second sensor Detection location.
  • the first counter is used to count the paper ejection distance of the printing paper, and the counting value of the first counter is incremented by one when the printing paper is separated by a preset distance, when the counting value of the first counter is equal to the first pre-design If the second sensor is not detected as a paperless state, a paper jam alarm is issued; the second counter is used to count the paper feed distance, and the second counter is counted each time the paper feeds a predetermined distance The value is incremented by 1. When the count value of the second counter is equal to the second pre-designed value, if the second sensor is not detected to be in a paper state, a paper jam alarm is issued.
  • the printer can transport the paper head of the printing paper to the detecting position of the second sensor, and then the predetermined length can be moved by driving the printing paper.
  • the printing start position of the printing paper is conveyed to the printing position of the printing head.
  • control method in this embodiment is an optional embodiment of the first embodiment of the method. As shown in FIG. 6, the control method may include the following steps:
  • the control unit reads the signal output by the first sensor, and detects whether the first sensor is in a paper state by a signal output by the first sensor. For example, the control unit receives the signal output by the first sensor and compares the signal with the first preset threshold T1. When the signal output by the first sensor is greater than the first preset threshold T1, it is determined that the printing paper is located at the first sensor. The detection position, that is, the first sensor is in a paper state, the printer performs step S210; when the signal output by the first sensor is not greater than the first preset threshold T1, it is determined that the first sensor is in a paperless state, and the printer proceeds to step S200.
  • the control unit When the control unit detects that the first sensor is in the paper state, the control unit reads the signal output by the second sensor, and detects whether the second sensor is in the paper state by the signal output by the second sensor. For example, the control unit compares the signal output by the second sensor with a second preset threshold T2 stored in the storage unit, and determines that the printing paper is located at the second when the signal output by the second sensor is greater than the second preset threshold T2.
  • the detection position of the sensor that is, the second sensor is in a paper state, the printer performs step S220; when the signal output by the second sensor is not greater than the second preset threshold T2, it is determined that the second sensor is in a paperless state, and the printer performs step S230.
  • the paper is ejected until the paper head of the printing paper reaches the detection position of the second sensor.
  • the minimum unit distance is the printing paper when the stepping motor steps once
  • the minimum distance is the moving distance of the printing paper when the output shaft of the DC motor rotates by one unit time, for example, the unit time is 1 microsecond.
  • the printing paper continues to eject the paper until the control unit detects that the second sensor changes from the paper state to the paperless state, and determines that the printing paper leaves the detecting position of the second sensor, that is, the paper head of the printing paper reaches the detecting position of the second sensor. At this time, the printer executes step S240.
  • the control conveying unit drives the printing paper to feed, that is, drives the printing paper to move in the conveying passage in the direction indicated by the arrow A in FIG. 2, and the printing paper moves by a preset distance.
  • the control unit detects a state of the second sensor, wherein the preset distance may be a minimum unit distance.
  • the printing paper continues to feed until the control unit detects that the second sensor changes from the paperless state to the paper state, and determines that the printing paper reaches the detection position of the second sensor, that is, the paper head of the printing paper reaches the detection position of the second sensor. At this time, the printer executes step S240.
  • the printing paper is moved to a preset length, and the printing start position of the printing paper is conveyed to the printing position of the printing head.
  • the control unit controls the conveying unit to continue to drive the printing paper to move the preset length, that is, the distance L at which the printing paper needs to be fed or ejected, and the printing starting position of the printing paper.
  • the control unit calculates the distance L that the printing paper needs to be fed or ejected according to the first distance L1, the preset printing start position on the printing paper and the distance L2 between the paper ends of the printing paper, when it is detected by step S220 or step S230
  • the paper feed or the ejecting distance L is controlled.
  • the control unit controls the conveying unit to drive the printing paper to eject the paper first distance L1 to convey the paper head of the printing paper to the printing position of the printing head, wherein
  • the distance L1 is the distance between the detection position of the second sensor and the printing position of the print head.
  • the printer can transfer the printing start position of the printing paper to the printing position of the printing head regardless of the manner in which the user selects the printing paper, which can effectively solve the related art printer in the printing process.
  • the problem of wasted paper due to improper paper installation position ensures that the position of the printed content on the printing paper is more accurate.
  • the control method in this embodiment differs from the control method in the second embodiment in that, after detecting that the first sensor is in a paper state, first detecting whether the upper cover is closed relative to the base by the third sensor, when detecting When the cover is closed relative to the base, the control unit detects the state of the second sensor.
  • control method in this embodiment is described below by the control method flow.
  • control method in this embodiment is another optional embodiment of the method embodiment 1.
  • the optional steps of the control method in this embodiment are:
  • step S200a detecting whether the first sensor is in a paper state, when the first sensor is in a paper state, step S200a is performed;
  • step S210 it is detected whether the second sensor is in a paper state, if the second sensor is in a paper state, step S220 is performed, and if the second sensor is in a paperless state, step S230 is performed;
  • the paper is ejected until the paper head of the printing paper reaches the detection position of the second sensor;
  • step S240 is executed to drive the printing paper to move the preset length, and the printing start position of the printing paper is sent to the printing position of the printing head.
  • the remaining optional control methods are not described here, and are the same as in the second embodiment of the method.
  • the printer control method in this embodiment when the upper cover of the printer is in an open state, the printer needs to wait for the user to close the upper cover of the printer before feeding the print start position of the printing paper to the print head according to the state of the second sensor.
  • the print position is safer, more reliable, and has a better user experience.
  • An optional process of the control method in this embodiment is another optional embodiment of the method embodiment 1. As shown in FIG. 8, the method includes the following steps:
  • the control unit detects whether the first sensor is in a paper state by using a signal output by the first sensor, and when detecting that the first sensor is in a paper state, in step S310, when detecting that the first sensor is in a paperless state, proceeding to step S300 .
  • the control unit detects whether the upper cover is in the closed state by the signal output by the third sensor. When it is detected that the upper cover is in the closed state, in step S320, when it is detected that the upper cover is in the open state, the process proceeds to step S310.
  • the control unit detects whether the second sensor is in a paper state by a signal output by the second sensor, and when it is detected that the second sensor is in a paper state, step S330 is performed, and when the second sensor is detected to be paperless In the state, step S370 is performed.
  • the control unit initializes the count value of the first counter. For example, the counter value of the first counter is set to zero, and the first counter is used to calculate the eject distance of the printing paper.
  • the motor of the conveying unit is a stepping motor
  • the first counter is used to record the stepping motor during the ejecting process. The number of steps, the control unit can calculate the paper ejection distance of the printing paper by the number of steps of the stepping motor and the moving distance of the printing paper when the stepping motor steps.
  • the motor of the conveying unit is a DC motor
  • the first counter is used to record the time of the paper ejection, and the control unit can calculate the paper ejection distance of the printing paper by the paper ejection time and the moving distance of the printing paper per unit time.
  • the printing paper is ejected by a predetermined distance and the count value of the first counter is incremented by one.
  • the control unit controls the transport unit to drive the paper to eject a predetermined distance and increments the count value of the first counter by one.
  • the motor of the conveying unit is a stepping motor
  • the stepping motor is controlled to be stepped once to eject the printing paper by a preset distance, and the count value of the first counter is incremented by one.
  • the motor of the conveying unit is a DC motor
  • the DC motor is controlled to be energized for one unit time to eject the printing paper by a preset distance, and the count value of the first counter is incremented by one.
  • the control unit detects the state of the second sensor, determines whether the second sensor is in a paperless state, and when it is determined that the second sensor is in a paperless state, step S420 is performed, and when it is determined that the second sensor is in a paper state, step S360 is performed.
  • the first pre-designed value C1 is pre-stored in the storage unit, and may be calculated in advance according to the maximum allowable eject length.
  • the control unit initializes the count value of the second counter and sets the count value of the second counter to zero.
  • the second counter is used to calculate the paper feed distance of the printing paper.
  • the motor of the conveying unit is a stepping motor
  • the second counter is used to record the number of steps of the stepping motor during the feeding process, and the control unit prints the paper by stepping the stepping motor and stepping the motor once.
  • the moving distance can calculate the paper feeding distance of the printing paper; when the motor of the conveying unit is a DC motor, the second counter is used to record the time of feeding the paper, and control The unit can calculate the paper feed distance of the paper by the paper feed time and the moving distance of the paper in the unit time.
  • the printing paper is driven to feed a predetermined distance, and the count value of the second counter is incremented by one.
  • the control unit controls the transport unit to drive the paper feed a predetermined distance and increments the count value of the second counter by one.
  • the control unit detects the state of the second sensor, determines whether the second sensor is in the paper state, and when it is determined that the second sensor is in the paper state, step S420 is performed; and when it is determined that the second sensor is in the paperless state, step S400 is performed.
  • Step S410 when the count value of the second counter is not equal to the second pre-design value C2, proceed to step S380.
  • the second pre-designed value C2 is pre-stored in the storage unit and is calculated in advance according to the maximum allowable paper feed length.
  • control determines that the printer has a paper jam error, and the control unit controls the pointing unit to perform a paper jam alarm.
  • the printing paper is moved to a preset length, and the printing start position of the printing paper is conveyed to the printing position of the printing head.
  • the printer counts by the first counter during the paper ejection process, and counts by the second counter during the paper feeding process, when the count value of the first counter is equal to the first pre-designed value C1. Or if the state of the second sensor is not changed when the count value of the second counter is equal to the second preset value C2, it is determined that the printer has a paper jam error and an alarm is issued. Pass The printer of the embodiment and the control method of the printer can avoid the printer damage caused by the continuous rotation of the motor when a paper jam occurs in the printer.
  • the present disclosure provides a first sensor and a second sensor for detecting the position of the printing paper in the conveying path of the printer. Therefore, when the printer replaces the printing paper, the user can select the printing paper when the upper cover is in the closed state.
  • the paper is installed by inserting the paper from the paper inlet. You can also choose to open the upper cover first, then drag the leading edge of the paper from the paper inlet to the paper exit and then close the upper cover to install the paper, no matter which user chooses.
  • the printer can transfer the printing start position of the printing paper to the printing position of the printing head, so that the position of the printing content on the printing paper is more accurate.

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Controlling Sheets Or Webs (AREA)
  • Handling Of Sheets (AREA)
  • Ink Jet (AREA)

Abstract

A method for controlling a printer, wherein the printer comprises a first sensor, a print head, and a second sensor which are sequentially arranged in a conveying path of the printer, said method comprising: determining whether the first sensor has detected the presence of printing paper; determining whether the second sensor has detected the presence of the printing paper when the first sensor has detected the presence of the printing paper; and controlling the printing paper to move backward when the second sensor has detected the presence of the printing paper so that the top edge of the printing paper reaches a detection position of the second sensor, or controlling the printing paper to move forward when the second sensor has not detected the presence of the printing paper so that the top edge of the printing paper reaches the detection position of the second sensor.

Description

打印机的控制方法及打印机Printer control method and printer 技术领域Technical field
本公开涉及打印设备及控制方法领域,例如涉及一种打印机的控制方法及使用该控制方法的打印机。The present disclosure relates to the field of printing apparatuses and control methods, and, for example, to a method of controlling a printer and a printer using the same.
背景技术Background technique
打印机是配合计算机使用的输出设备之一,用于将计算机处理结果打印在相关介质上,通常打印在纸张上,是现代社会办公、家用所必不可少的重要设备。The printer is one of the output devices used in conjunction with a computer. It is used to print computer processing results on related media, usually printed on paper, and is an indispensable important device for modern social office and home use.
相关技术中应用比较广泛的具有开放式输送通道的打印机,通常包括上盖和基座,上盖可以相对于基座打开或闭合,当上盖相对于基座闭合时二者之间形成打印纸的输送通道。当打印机出现塞纸的情况时,需要打开上盖对打印机的塞纸错误进行排除,而后合上上盖继续使用。输送通道的第一端设有用于输入打印纸的入纸口,输送通道的第二端设有用于排出打印纸的出纸口,输送通道中设置有输送单元和打印头,其中,输送单元用于驱动打印纸在输送通道中由入纸口向出纸口移动,打印头用于在打印纸上打印预设的图像。打印机工作前,需要将打印纸安装到输送通道中,以使打印头能够在打印纸上打印预定的图像。在使用过程中,用户在安装打印纸时,第一种方法是在上盖相对于基座关闭的情况下,将打印纸的前沿插入入纸口中;第二种方法是先打开上盖,然后将打印纸的前沿从入纸口拖至出纸口后再闭合上盖,用户根据自己的使用习惯选择任意一种打印纸安装方法对打印纸进行安装打印。A printer having an open conveying path, which is widely used in the related art, generally includes an upper cover and a base. The upper cover can be opened or closed with respect to the base, and a printing paper is formed between the upper cover and the base when the upper cover is closed relative to the base. Delivery channel. When the printer is jammed, you need to open the top cover to eliminate the paper jam error of the printer, and then close the upper cover to continue using. The first end of the conveying passage is provided with a paper inlet for inputting printing paper, and the second end of the conveying passage is provided with a paper discharging port for discharging the printing paper, and the conveying channel is provided with a conveying unit and a printing head, wherein the conveying unit is used for the conveying unit The driving paper is moved from the paper inlet to the paper exit in the conveying path, and the printing head is used to print a preset image on the printing paper. Before the printer works, it is necessary to mount the paper into the transport path so that the print head can print a predetermined image on the paper. During use, when the user installs the printing paper, the first method is to insert the leading edge of the printing paper into the paper opening when the upper cover is closed relative to the base; the second method is to open the upper cover first, then The leading edge of the printing paper is dragged from the paper feeding port to the paper exit port, and then the upper cover is closed. The user selects any one of the printing paper mounting methods according to his own usage habits to install and print the printing paper.
当用户使用第一种方法安装打印纸时,打印机通过入纸口处的传感器输出的信号变化检测到打印纸的前沿,并据此控制输送单元将打印纸的前沿输送至预设位置后开始进行打印。When the user installs the printing paper by the first method, the printer detects the leading edge of the printing paper by the signal change of the sensor output at the paper inlet, and accordingly controls the conveying unit to start the leading edge of the printing paper to the preset position. print.
当用户使用第二种方法安装打印纸时,由于当用户闭合上盖后,入纸口处的传感器一直处于被打印纸覆盖的状态,因此,打印机在执行打印任务之前,无法通过检测该传感器信号的变化将打印纸输送至预设位置。通常情况下,打印机直接在已安装好的打印纸上执行打印任务,此时,就会导致纸头至打印起始位置之间的一段纸张被浪费,或者导致打印内容的打印位置不准确。When the user installs the printing paper by the second method, since the sensor at the paper inlet is always covered by the printing paper after the user closes the upper cover, the printer cannot detect the sensor signal before performing the printing task. The change sends the paper to the preset position. Normally, the printer performs a print job directly on the installed paper. At this time, a piece of paper between the paper head and the print start position is wasted, or the print position of the print content is inaccurate.
因此,市场亟需一种打印机的控制方法及使用该控制方法的打印机,能够有效减少纸张浪费,同时保证打印机在纸张上打印的位置更加准确。 Therefore, there is a need in the market for a printer control method and a printer using the same, which can effectively reduce paper waste while ensuring that the position of the printer on the paper is more accurate.
发明内容Summary of the invention
本公开提供了一种打印机的控制方法及打印机,解决了相关技术中的打印机所存在的纸张浪费或打印内容的打印位置不准确的问题。The present disclosure provides a control method and a printer for a printer, which solves the problem of paper waste or inaccurate print position of print contents in the related art.
一种打印机的控制方法,所述打印机包括第一传感器(151)、打印头(131)和第二传感器(152),其中,所述第一传感器(151)、所述打印头(131)和所述第二传感器(152)沿打印纸的进纸方向依次设置在所述打印机的输送通道(23)中,所述控制方法包括:A control method of a printer, the printer comprising a first sensor (151), a print head (131), and a second sensor (152), wherein the first sensor (151), the print head (131), and The second sensor (152) is sequentially disposed in the feeding path (23) of the printer along the paper feeding direction of the printing paper, and the control method includes:
检测所述第一传感器(151)是否为有纸状态;Detecting whether the first sensor (151) is in a paper state;
当所述第一传感器(151)为有纸状态时,检测所述第二传感器(152)是否为有纸状态;Detecting whether the second sensor (152) is in a paper state when the first sensor (151) is in a paper state;
当所述第二传感器(152)为有纸状态时,控制所述打印纸退纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置;以及When the second sensor (152) is in a paper state, controlling the paper to be ejected, so that the paper head of the printing paper reaches the detection position of the second sensor (152);
当所述第二传感器(152)为无纸状态时,控制所述打印纸进纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置。When the second sensor (152) is in a paperless state, the printing paper is controlled to feed so that the paper head of the printing paper reaches the detection position of the second sensor (152).
可选的,当所述打印纸的纸头到达所述第二传感器(152)的检测位置时,驱动所述打印纸移动预设长度,将所述打印纸的打印起始位置输送至所述打印头(131)的打印位置。Optionally, when the paper head of the printing paper reaches the detecting position of the second sensor (152), the printing paper is driven to move a preset length, and the printing starting position of the printing paper is sent to the printing. The print position of the head (131).
可选的,所述打印机还包括上盖(20)和基座(21),所述上盖(20)可以相对于所述基座(21)打开或闭合,当所述上盖(20)相对于所述基座(21)闭合时,所述上盖(20)与所述基座(21)之间形成所述输送通道(23);Optionally, the printer further includes an upper cover (20) and a base (21), the upper cover (20) being openable or closable relative to the base (21), when the upper cover (20) When the base (21) is closed, the upper cover (20) and the base (21) form the conveying passage (23);
所述当所述第一传感器(151)为有纸状态时,检测所述第二传感器(152)是否为有纸状态包括:When the first sensor (151) is in a paper state, detecting whether the second sensor (152) is in a paper state includes:
检测所述上盖(20)是否处于闭合状态;当所述上盖(20)处于闭合状态时,检测所述第二传感器(152)是否为有纸状态。Detecting whether the upper cover (20) is in a closed state; when the upper cover (20) is in a closed state, detecting whether the second sensor (152) is in a paper state.
可选的,所述当所述第二传感器(152)为有纸状态时,控制所述打印纸退纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置包括:Optionally, when the second sensor (152) is in a paper state, controlling the paper to be ejected, so that the paper head of the printing paper reaches the detection position of the second sensor (152) includes:
所述打印纸每退纸一个预设距离时检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为无纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The printing paper detects a state of the second sensor (152) every time a predetermined distance is ejected, and when detecting that the second sensor (152) is in a paperless state, determining that the paper head of the printing paper arrives The detection position of the second sensor (152).
可选的,在所述控制所述打印纸退纸过程中,还包括: Optionally, during the controlling the paper ejection process of the printing paper, the method further includes:
使用第一计数器对所述打印纸的退纸距离进行计数,所述打印纸每退纸一个预设距离时将所述第一计数器的计数值加1,当所述第一计数器的计数值等于第一预设计数值时如果还未检测到所述第二传感器(152)为无纸状态,进行塞纸报警。Counting a paper ejection distance of the printing paper by using a first counter, the printing paper adding a count value of the first counter every time a paper is ejected by a preset distance, when the counting value of the first counter is equal to When the first pre-designed value has not detected that the second sensor (152) is in a paperless state, a paper jam alarm is issued.
可选的,所述当所述第二传感器(152)为无纸状态时,控制所述打印纸进纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置包括:Optionally, when the second sensor (152) is in a paperless state, controlling the paper feeding, so that the paper head of the printing paper reaches the detecting position of the second sensor (152) includes:
所述打印纸每进纸一个预设距离时检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为有纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The printing paper detects a state of the second sensor (152) every time a predetermined distance is fed, and when detecting that the second sensor (152) is in a paper state, determining that the paper head of the printing paper arrives The detection position of the second sensor (152).
可选的,在控制所述打印纸进纸过程中,还包括:Optionally, in controlling the paper feeding process, the method further includes:
使用第二计数器对所述打印纸的进纸距离进行计数,所述打印纸每进纸一个预设距离时将所述第二计数器的计数值加1,当所述第二计数器的计数值等于第二预设计数值时如果还未检测到所述第二传感器(152)为有纸状态,进行塞纸报警。Counting a paper feed distance of the printing paper by using a second counter, the printing paper adding a count value of the second counter every time a paper is fed a predetermined distance, when the count value of the second counter is equal to When the second pre-designed value has not detected that the second sensor (152) is in a paper state, a paper jam alarm is issued.
一种打印机,包括:输送通道(23)、打印头(131)、输送单元(14)、第一传感器(151)、第二传感器(152)以及控制单元(10);其中,A printer comprising: a transport channel (23), a print head (131), a transport unit (14), a first sensor (151), a second sensor (152), and a control unit (10);
所述打印头(131),用于在打印纸上执行打印;The print head (131) for performing printing on the printing paper;
所述输送单元(14),用于驱动所述打印纸在所述输送通道(23)中移动;The conveying unit (14) is configured to drive the printing paper to move in the conveying passage (23);
所述第一传感器(151)和第二传感器(152),其中,所述第一传感器(151)、所述打印头(131)和所述第二传感器(152)沿所述打印纸的进纸方向依次设置在所述打印机的输送通道(23)中;The first sensor (151) and the second sensor (152), wherein the first sensor (151), the print head (131), and the second sensor (152) follow the printing paper The paper direction is sequentially disposed in the conveying passage (23) of the printer;
所述控制单元(10),用于检测所述第一传感器(151)是否为有纸状态,当检测到所述第一传感器(151)为有纸状态时,检测所述第二传感器(152)是否为有纸状态,当检测到所述第二传感器(152)为有纸状态时,控制所述输送单元(14)驱动所述打印纸退纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置;当检测到所述第二传感器(152)为无纸状态时,控制所述输送单元(14)驱动所述打印纸进纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置。The control unit (10) is configured to detect whether the first sensor (151) is in a paper state, and when detecting that the first sensor (151) is in a paper state, detecting the second sensor (152) Whether it is a paper-like state, when detecting that the second sensor (152) is in a paper state, controlling the conveying unit (14) to drive the printing paper to eject, so that the paper head of the printing paper reaches the paper a detecting position of the second sensor (152); when detecting that the second sensor (152) is in a paperless state, controlling the conveying unit (14) to drive the printing paper to feed the paper head of the printing paper A detection position of the second sensor (152) is reached.
可选的,所述控制单元(10)还用于在所述打印纸的纸头到达所述第二传感器(152)的检测位置时,控制所述输送单元(14)驱动所述打印纸移动预设长度,将所述打印纸的打印起始位置输送至所述打印头(131)的打印位置。 Optionally, the control unit (10) is further configured to control, when the paper head of the printing paper reaches the detecting position of the second sensor (152), the conveying unit (14) to drive the printing paper movement pre- The length is set to convey the printing start position of the printing paper to the printing position of the print head (131).
可选的,还包括上盖(20)、基座(21)和第三传感器(153);Optionally, further comprising an upper cover (20), a base (21) and a third sensor (153);
所述上盖(20)能够相对于所述基座(21)打开或闭合,当所述上盖(20)相对于所述基座(21)闭合时,所述上盖(20)与所述基座(21)之间形成所述输送通道(23),所述第三传感器(153)用于输出表示所述上盖(20)处于打开状态或闭合状态的信号;The upper cover (20) can be opened or closed relative to the base (21), and when the upper cover (20) is closed relative to the base (21), the upper cover (20) The conveying passage (23) is formed between the bases (21), and the third sensor (153) is configured to output a signal indicating that the upper cover (20) is in an open state or a closed state;
其中,所述控制单元(10)还用于在检测到所述第一传感器(151)为有纸状态时,通过检测所述第三传感器(153)输出的信号检测所述上盖(20)是否处于闭合状态,当检测到所述上盖(20)处于闭合状态时,检测所述第二传感器(152)是否为有纸状态。The control unit (10) is further configured to detect the upper cover (20) by detecting a signal output by the third sensor (153) when detecting that the first sensor (151) is in a paper state. Whether it is in a closed state, when it is detected that the upper cover (20) is in a closed state, it is detected whether the second sensor (152) is in a paper state.
可选的,所述控制单元(10)用于在检测到所述第二传感器(152)为有纸状态时,通过以下方式使所述打印纸的纸头到达所述第二传感器(152)的检测位置:Optionally, the control unit (10) is configured to: when detecting that the second sensor (152) is in a paper state, the paper head of the printing paper reaches the second sensor (152) by: Detection location:
所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸退纸一个预设距离时,检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为无纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The control unit (10) detects the state of the second sensor (152) every time the control unit (14) controls the printing unit to drive the paper to eject a predetermined distance, when the second sensor is detected ( 152) When the paper is in a paperless state, it is determined that the paper head of the printing paper reaches the detection position of the second sensor (152).
可选的,还包括指示单元(16),用于指示所述打印机的状态;Optionally, an indication unit (16) is further included for indicating a status of the printer;
所述控制单元(10)还用于使用第一计数器对所述打印纸的退纸距离进行计数,所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸退纸一个预设距离时将所述第一计数器的计数值加1,当所述第一计数器的计数值等于第一预设计数值时如果还未检测到所述第二传感器(152)为无纸状态,控制所述指示单元(16)进行塞纸报警。The control unit (10) is further configured to count the paper ejection distance of the printing paper by using a first counter, and the control unit (10) controls the conveying unit (14) to drive the printing paper to eject one paper. When the preset distance is set, the count value of the first counter is incremented by 1. When the count value of the first counter is equal to the first pre-designed value, if the second sensor (152) has not been detected as being paperless, The indication unit (16) is controlled to perform a paper jam alarm.
可选的,所述控制单元(10)用于在检测到所述第二传感器(152)为无纸状态时,通过以下方式使所述打印纸的纸头到达所述第二传感器(152)的检测位置:Optionally, the control unit (10) is configured to: when detecting that the second sensor (152) is in a paperless state, the paper head of the printing paper reaches the second sensor (152) by: Detection location:
所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸进纸一个预设距离时,检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为有纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The control unit (10) detects a state of the second sensor (152) every time the control unit (14) controls the printing unit to drive the printing paper to a predetermined distance, when the second sensor is detected ( 152) When the paper is in the paper state, it is determined that the paper head of the printing paper reaches the detection position of the second sensor (152).
可选的,还包括指示单元(16),用于指示所述打印机的状态;Optionally, an indication unit (16) is further included for indicating a status of the printer;
所述控制单元(10)还用于使用第二计数器对所述打印纸的进纸距离进行计数,所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸进纸一个预设距离时将所述第二计数器的计数值加1,当所述第二计数器的计数值等于 第二预设计数值时如果还未检测到所述第二传感器(152)为有纸状态,控制所述指示单元(16)进行塞纸报警。The control unit (10) is further configured to count the paper feeding distance of the printing paper by using a second counter, and the control unit (10) controls the conveying unit (14) to drive the printing paper to feed one paper. When the preset distance is set, the count value of the second counter is incremented by 1, when the count value of the second counter is equal to When the second pre-designed value has not detected that the second sensor (152) is in a paper state, the indication unit (16) is controlled to perform a paper jam alarm.
本公开由于在打印机的输送通道中设置了用于检测打印纸位置的第一传感器和第二传感器,因此,当打印机更换打印纸时,用户可以选择在上盖处于闭合状态时,将打印纸的纸头从入纸口插入的方式安装打印纸,也可以选择先打开上盖,然后将打印纸的前沿从入纸口拖至出纸口后再闭合上盖的方式安装打印纸,不管用户选择哪种方式安装打印纸,打印机都可以将打印纸的打印起始位置输送至打印头的打印位置,使得打印内容在打印纸上的位置更加准确。通过本公开,可以有效解决相关技术的打印机在打印过程中由于纸张安装位置不当造成纸张浪费的问题,能够保证打印内容在打印纸上的位置更准确。The present disclosure provides a first sensor and a second sensor for detecting the position of the printing paper in the conveying path of the printer. Therefore, when the printer replaces the printing paper, the user can select the printing paper when the upper cover is in the closed state. The paper is installed by inserting the paper from the paper inlet. You can also choose to open the upper cover first, then drag the leading edge of the paper from the paper inlet to the paper exit and then close the upper cover to install the paper, no matter which user chooses. By way of installing the printing paper, the printer can transfer the printing start position of the printing paper to the printing position of the printing head, so that the position of the printing content on the printing paper is more accurate. Through the present disclosure, it is possible to effectively solve the problem that the printer of the related art causes paper waste due to improper installation position of the paper during the printing process, and can ensure the position of the printed content on the printing paper is more accurate.
附图说明DRAWINGS
图1是本公开装置实施例一提出的打印机组成结构连接示意图;1 is a schematic diagram showing the connection of components of a printer according to Embodiment 1 of the present disclosure;
图2是本公开装置实施例一提出的打印机上盖处于闭合状态下的截面示意图;2 is a schematic cross-sectional view showing the upper cover of the printer in a closed state according to Embodiment 1 of the present disclosure;
图3是本公开装置实施例一提出的打印机上盖处于打开状态下的三维结构图;3 is a three-dimensional structural view of the printer upper cover in an open state according to Embodiment 1 of the present disclosure;
图4是本公开装置实施例二提出的打印机上盖处于闭合状态下的截面示意图;4 is a schematic cross-sectional view showing the printer upper cover in a closed state according to Embodiment 2 of the present disclosure;
图5是本公开方法实施例一提出的打印机的控制方法的流程图;5 is a flowchart of a method for controlling a printer according to Embodiment 1 of the present disclosure;
图6是本公开方法实施例二提出的打印机的控制方法的流程图;6 is a flowchart of a method for controlling a printer according to Embodiment 2 of the method of the present disclosure;
图7是本公开方法实施例三提出的打印机的控制方法的流程图;7 is a flowchart of a method for controlling a printer according to Embodiment 3 of the present disclosure;
图8是本公开方法实施例四提出的打印机的控制方法的流程图。FIG. 8 is a flowchart of a method for controlling a printer according to Embodiment 4 of the present disclosure.
图中:In the picture:
1、打印机;10、控制单元;11、通信单元;12、存储单元;13、打印单元;131、打印头;132、打印辊;14、输送单元;141、电机驱动器;142、电机;15、传感器单元;151、第一传感器;152、第二传感器;153、第三传感器;16、指示单元;20、上盖;21、基座;22、轴;23、输送通道;24、入纸口;25、出纸口;26a、第一输送辊;26b、第二输送辊;27a、第三输送辊;27b、第四输送辊。 1, printer; 10, control unit; 11, communication unit; 12, storage unit; 13, printing unit; 131, print head; 132, printing roller; 14, transport unit; 141, motor driver; 142, motor; Sensor unit; 151, first sensor; 152, second sensor; 153, third sensor; 16, indicating unit; 20, upper cover; 21, base; 22, shaft; 23, conveying passage; 24, paper inlet 25, paper exit port; 26a, first transport roller; 26b, second transport roller; 27a, third transport roller; 27b, fourth transport roller.
实施方式Implementation
下面结合附图并通过可选实施方式来说明本公开的技术方案。在不冲突的情况下,以下实施方式中的特征可以任意相互组合。The technical solutions of the present disclosure will be described below in conjunction with the accompanying drawings and by alternative embodiments. The features in the following embodiments may be combined with each other arbitrarily without conflict.
本公开公开了一种打印机,可以是包括上盖、基座、打印头、入纸口和设置在入纸口位置处的第一传感器。还可以包括第二传感器,第二传感器与第一传感器分别设置在打印头的两侧,第二传感器设置在距离打印头预定位置处,上盖与基座闭合形成用于输送纸张的输送通道,上盖可以相对于基座打开或闭合,第一传感器和第二传感器位于输送通道中。由于本公开中的打印机具有上述结构,因此,当打印机更换打印纸时,用户可以选择在上盖处于闭合状态时,将打印纸的纸头从入纸口插入的方式安装打印纸,也可以选择先打开上盖,然后将打印纸的前沿从入纸口拖至出纸口后再闭合上盖的方式安装打印纸,不管用户选择哪种方式安装打印纸,打印机都可以将打印纸的打印起始位置输送至打印头的打印位置,使得打印内容在打印纸上的位置更加准确。The present disclosure discloses a printer that can include a top cover, a base, a printhead, a paper feed port, and a first sensor disposed at a position of the paper feed port. A second sensor may be further included, the second sensor and the first sensor are respectively disposed at two sides of the print head, the second sensor is disposed at a predetermined position from the print head, and the upper cover and the base are closed to form a conveying passage for conveying the paper. The upper cover can be opened or closed relative to the base, and the first sensor and the second sensor are located in the delivery channel. Since the printer in the present disclosure has the above structure, when the printer replaces the printing paper, the user can select to install the printing paper by inserting the paper head of the printing paper from the paper feeding opening when the upper cover is in the closed state, or can select the first Open the top cover, then pull the leading edge of the paper from the paper inlet to the paper exit and then close the top cover to install the paper. The printer can print the paper regardless of the way the printer chooses to install the paper. The position is transported to the print position of the printhead, making the position of the printed content on the print paper more accurate.
下面通过可选的实施例,对本公开中打印机的结构进行描述。The structure of the printer in the present disclosure will be described below by way of an alternative embodiment.
装置实施例一 Device embodiment 1
如图1所示,是本实施例中打印机中多个工作单元之间的连接结构,打印机1可以是包括控制单元10、通信单元11、存储单元12、打印单元13、输送单元14和传感器单元15,控制单元10分别与通信单元11、存储单元12、打印单元13、输送单元14、传感器单元15、指示单元16相连接。As shown in FIG. 1, it is a connection structure between a plurality of work units in the printer in the embodiment, and the printer 1 may include a control unit 10, a communication unit 11, a storage unit 12, a printing unit 13, a conveying unit 14, and a sensor unit. 15. The control unit 10 is connected to the communication unit 11, the storage unit 12, the printing unit 13, the transport unit 14, the sensor unit 15, and the indication unit 16, respectively.
其中,控制单元10用于发出控制信号,对其他工作单元的工作进行控制并进行数据的计算和处理。比如,控制单元10发出控制信号控制通信单元11执行打印机1与打印请求装置(电脑等)之间的数据传输,或是控制打印单元13执行图像打印等。The control unit 10 is configured to issue a control signal, control the operation of other work units, and perform calculation and processing of data. For example, the control unit 10 issues a control signal to control the communication unit 11 to perform data transfer between the printer 1 and the print requesting device (computer or the like), or to control the printing unit 13 to perform image printing or the like.
通信单元11用于执行打印机1与打印请求装置之间的数据传输。比如,通信单元11接收打印请求装置发送的打印控制命令和打印数据,并将上述打印控制命令和打印数据传递给控制单元10,而后控制单元10再控制相应的工作单元进行工作。The communication unit 11 is for performing data transfer between the printer 1 and the print requesting device. For example, the communication unit 11 receives the print control command and the print data transmitted by the print requesting device, and transmits the print control command and the print data to the control unit 10, and then the control unit 10 controls the corresponding work unit to operate.
存储单元12用于存储打印机1的控制程序以及控制程序运行过程中需要的数据及变量。比如,存储单元12用于存储第一预设阈值T1、第二预设阈值T2、第一预设计数值C1和第二预设计数值C2等。其中,第一预设阈值T1用于判断是否有打印纸位于传感器单元15的第一传感器151的检测位置;第二预设阈 值T2用于判断是否有打印纸位于传感器单元15的第二传感器152的检测位置;第一预设计数值C1和第二预设计数值C2用于判断打印机1是否塞纸。The storage unit 12 is used to store the control program of the printer 1 and to control the data and variables required during the running of the program. For example, the storage unit 12 is configured to store a first preset threshold T1, a second preset threshold T2, a first pre-designed value C1, a second pre-designed value C2, and the like. The first preset threshold T1 is used to determine whether there is a printing paper located at the detecting position of the first sensor 151 of the sensor unit 15; the second preset threshold The value T2 is used to determine whether or not the printing paper is located at the detection position of the second sensor 152 of the sensor unit 15; the first pre-designed value C1 and the second pre-designed value C2 are used to determine whether the printer 1 is jammed.
打印单元13用于根据控制单元10输出的控制信号在打印纸上打印图像。本实施例中打印单元13可以为针式打印单元、热敏打印单元、热转印打印单元或喷墨打印单元,当然也可以为其他能够应用在打印机1上的打印单元,只要能够保证打印效果且能够被应用的打印单元均可。可选的,本实施例中打印单元13为热敏打印单元,包括打印头131和打印辊132,打印机1执行打印操作时,打印纸从打印头131和打印辊132之间穿过,且打印纸的感热层与打印头131接触,打印头131包括沿打印纸宽度方向(即与打印纸的输送方向相垂直的方向)等距排列成一行的多个发热体。在打印单元13执行打印工作时,打印头131的发热体发热使打印纸的感热层发生化学变化显色,从而在打印纸上形成图像。The printing unit 13 is for printing an image on a printing paper in accordance with a control signal output from the control unit 10. In this embodiment, the printing unit 13 can be a pin printing unit, a thermal printing unit, a thermal transfer printing unit or an inkjet printing unit. Of course, other printing units that can be applied to the printer 1 can be used as long as the printing effect can be ensured. And the printing unit that can be applied can be. Optionally, in this embodiment, the printing unit 13 is a thermal printing unit, including a print head 131 and a printing roller 132. When the printer 1 performs a printing operation, the printing paper passes between the printing head 131 and the printing roller 132, and prints. The heat sensitive layer of the paper is in contact with the print head 131, and the print head 131 includes a plurality of heat generating bodies arranged in a row at equal intervals in the width direction of the printing paper (i.e., a direction perpendicular to the conveying direction of the printing paper). When the printing unit 13 performs the printing operation, the heat generating body of the printing head 131 generates heat to cause a chemical change of the heat sensitive layer of the printing paper to form an image on the printing paper.
输送单元14用于驱动打印纸在打印纸的输送通道中移动。输送单元14可以是包括电机驱动器141和电机142,电机驱动器141用于根据控制单元10输出的控制信号向电机142提供工作电流,以驱动电机142的输出轴转动。电机142的输出轴与设置在打印纸的输送通道(以下简称输送通道)中的输送辊传动连接,当电机142的输出轴转动时,输送通道中的输送辊随之转动,从而驱动打印纸在输送通道中移动。本实施例中,打印辊132除了用于与打印头131配合实现图像打印外,还与电机142的输出轴传动连接,用于作为输送辊驱动打印纸在输送通道中移动。The conveying unit 14 is for driving the printing paper to move in the conveying path of the printing paper. The transport unit 14 may include a motor driver 141 and a motor 142 for supplying an operating current to the motor 142 according to a control signal output from the control unit 10 to drive the output shaft of the motor 142 to rotate. The output shaft of the motor 142 is connected to a conveying roller disposed in a conveying passage of the printing paper (hereinafter referred to as a conveying passage). When the output shaft of the motor 142 is rotated, the conveying roller in the conveying passage rotates accordingly, thereby driving the printing paper at Move in the conveying channel. In this embodiment, in addition to image printing for cooperation with the print head 131, the print roller 132 is also coupled to the output shaft of the motor 142 for driving the printing paper as a transport roller to move in the transport path.
传感器单元15可以是包括位于输送通道中的第一传感器151和第二传感器152,用于检测打印纸在输送通道中的位置。可选的,第一传感器151和第二传感器152为光电传感器,当然也可以为其他能够实现检测功能的传感器类型,只要能够完成对打印纸位置的检测任务即可。本实施例中,第一传感器151和第二传感器152选择光电传感器,可以为反射传感器或透射传感器,由于二者的工作原理相同,以下将二者统称为传感器,对反射传感器或透射传感器的工作原理进行说明。传感器包括光发生器和光接收器,当传感器为反射传感器时,光发生器和光接收器位于输送通道同一侧,光接收器接收经由打印纸或通道板反射的光发生器发出的光并将光信号转化为电信号,并将电信号传递给控制单元10。当传感器为透射传感器时,光发生器和光接收器分别位于输送通道的两侧,光接收器接收光发生器发射的光或接收经由打印纸透射的由发生器发射的 光并将光信号转化为电信号,并将电信号传递给控制单元10。当有打印纸位于传感器的检测位置时(以下简称为传感器为有纸状态),其光接收器输出第一信号,当没有打印纸位于传感器的检测位置时(以下简称为传感器为无纸状态),其光接收器输出第二信号,控制单元10通过检测光接收器输出的信号判断传感器为有纸状态或无纸状态,从而判断打印纸在输送通道中的位置。比如,当传感器由有纸状态变化为无纸状态时,判定打印纸离开传感器的检测位置;当传感器由无纸状态变化为有纸状态时,判定打印纸到达传感器的检测位置。The sensor unit 15 may be a first sensor 151 and a second sensor 152 included in the transport path for detecting the position of the printing paper in the transport path. Optionally, the first sensor 151 and the second sensor 152 are photoelectric sensors, and of course, other types of sensors capable of implementing the detecting function may be used as long as the detecting task of the position of the printing paper can be completed. In this embodiment, the first sensor 151 and the second sensor 152 select a photoelectric sensor, which may be a reflective sensor or a transmissive sensor. Since the working principle of the two is the same, the following two are collectively referred to as a sensor, and work on a reflective sensor or a transmissive sensor. The principle is explained. The sensor comprises a light generator and a light receiver. When the sensor is a reflective sensor, the light generator and the light receiver are located on the same side of the conveying channel, and the light receiver receives the light emitted by the light generator reflected by the printing paper or the channel plate and the light signal It is converted into an electrical signal and transmitted to the control unit 10. When the sensor is a transmissive sensor, the light generator and the photoreceiver are respectively located on both sides of the transport channel, and the light receiver receives the light emitted by the light generator or receives the light emitted by the generator transmitted through the printing paper. The light converts the optical signal into an electrical signal and transmits the electrical signal to the control unit 10. When there is a printing paper located at the detecting position of the sensor (hereinafter referred to as the sensor is in a paper state), the optical receiver outputs a first signal when no printing paper is located at the detecting position of the sensor (hereinafter referred to as the sensor is paperless). The light receiver outputs a second signal, and the control unit 10 determines whether the sensor is in a paper state or a paperless state by detecting a signal output from the light receiver, thereby determining the position of the printing paper in the conveying path. For example, when the sensor changes from the paper state to the paperless state, it is determined that the printing paper leaves the detection position of the sensor; when the sensor changes from the paperless state to the paper state, it is determined that the printing paper reaches the detection position of the sensor.
可选地,传感器单元还15可以是包括第三传感器153,用于输出表示打印机1的上盖处于闭合状态或打开状态的信号,当打印机1的上盖处于闭合状态时,第三传感器153输出第三信号,当打印机1的上盖处于打开状态时,第三传感器153输出第四信号,控制单元10通过检测第三传感器153输出的信号判断打印机1的上盖是否处于闭合状态。Optionally, the sensor unit 15 may further include a third sensor 153 for outputting a signal indicating that the upper cover of the printer 1 is in a closed state or an open state, and when the upper cover of the printer 1 is in a closed state, the third sensor 153 outputs The third signal, when the upper cover of the printer 1 is in the open state, the third sensor 153 outputs a fourth signal, and the control unit 10 determines whether the upper cover of the printer 1 is in the closed state by detecting the signal output from the third sensor 153.
可选的,打印机1还可以是包括指示单元16,用于根据控制单元10的控制信号以光、声音等方式显示打印机1的状态,指示单元16可以是指示灯、液晶显示屏、蜂鸣器及语音装置等。比如,当打印机1处于塞纸状态,指示单元16采用蜂鸣器进行蜂鸣报警,提醒用户对塞纸进行处理,减少了因塞纸造成的浪费,同时减少了打印机1被损害的概率,用户体验更好。Optionally, the printer 1 may further include an indicating unit 16 for displaying the state of the printer 1 in a light, sound, or the like according to a control signal of the control unit 10. The indicating unit 16 may be an indicator light, a liquid crystal display, or a buzzer. And voice devices, etc. For example, when the printer 1 is in the paper jam state, the indicating unit 16 uses a buzzer to perform a buzzer alarm to remind the user to process the paper jam, thereby reducing the waste caused by the paper jam and reducing the probability of the printer 1 being damaged. The experience is better.
图2和图3所示是本实施例中打印机的可选结构,如图2和图3所示,打印机1包括上盖20和基座21,上盖20和基座21通过轴22可转动的枢接,上盖20可以绕轴22翻转,从而可以相对于基座21打开或闭合。打印头131安装在上盖20上,打印辊132安装在基座21上,打印辊132可以绕自身轴线转动,打印辊132与输送单元14相连接,在输送单元14的带动下转动。当上盖20相对于基座21闭合时,上盖20与基座21之间形成输送通道23,打印头131和打印辊132在输送通道23中相切,二者的切线位置为打印头131的打印位置。2 and 3 show an alternative structure of the printer in this embodiment. As shown in FIGS. 2 and 3, the printer 1 includes an upper cover 20 and a base 21, and the upper cover 20 and the base 21 are rotatable through the shaft 22. The pivoting of the upper cover 20 can be reversed about the axis 22 so as to be openable or closable relative to the base 21. The print head 131 is mounted on the upper cover 20, the print roller 132 is mounted on the base 21, the print roller 132 is rotatable about its own axis, and the print roller 132 is coupled to the transport unit 14 for rotation by the transport unit 14. When the upper cover 20 is closed relative to the base 21, a transport path 23 is formed between the upper cover 20 and the base 21, and the print head 131 and the print roller 132 are tangent in the transport path 23, and the tangent positions of the two are the print head 131. Print location.
第二传感器152与第一传感器151分别设置在打印头131的两侧,第二传感器152设置在距离打印头131预定位置处。沿打印纸的进纸方向,第一传感器151、打印头131、第二传感器152依次设置在输送通道中,即沿打印纸的进纸方向,第一传感器151位于打印头131的上游,第二传感器152位于打印头131的下游。图2所示实施例中,箭头A为打印纸的进纸方向,沿打印纸的进纸方向,入纸口24、第一传感器151、打印头131、第二传感器152和出纸口25在输送通道23中依次排布。在本实施例中,第二传感器152的检测位置与打 印头131的打印位置之间的距离为第一距离L1。打印辊132与电机142的输出轴传动连接,当电机142的输出轴转动时打印辊132随之转动,从而驱动打印纸在输送通道23中移动,本实施例中不再额外设置对打印纸进行传送的输送辊,结构更加简单。The second sensor 152 and the first sensor 151 are respectively disposed on both sides of the print head 131, and the second sensor 152 is disposed at a predetermined position from the print head 131. In the paper feeding direction of the printing paper, the first sensor 151, the print head 131, and the second sensor 152 are sequentially disposed in the conveying path, that is, in the paper feeding direction of the printing paper, the first sensor 151 is located upstream of the printing head 131, and the second The sensor 152 is located downstream of the printhead 131. In the embodiment shown in Fig. 2, the arrow A is the paper feed direction of the printing paper, and the paper feed port 24, the first sensor 151, the print head 131, the second sensor 152, and the paper discharge port 25 are in the paper feed direction of the printing paper. The conveying passages 23 are arranged in order. In this embodiment, the detection position of the second sensor 152 is hit. The distance between the printing positions of the print head 131 is the first distance L1. The printing roller 132 is drivingly connected to the output shaft of the motor 142. When the output shaft of the motor 142 rotates, the printing roller 132 rotates accordingly, thereby driving the printing paper to move in the conveying path 23. In this embodiment, the printing paper is not additionally disposed. The conveying roller has a simpler structure.
本实施例中,第一传感器151和第二传感器152均为反射传感器,二者的光发生器和光接收器均与基座21固定连接。当然,第一传感器151或第二传感器152也可以为透射传感器,当第一传感器151或第二传感器152为透射传感器时,可选的,透射传感器的光发生器与上盖20固定连接,透射传感器的光接收器和基座21固定连接;或者,光接收器与上盖20固定连接,光发生器与基座21固定连接。当上盖20相对于基座21闭合时,光发生器和光接收器在输送通道23中上下相对设置,以保证透射传感器能够正常使用。In this embodiment, the first sensor 151 and the second sensor 152 are both reflective sensors, and both the light generator and the light receiver are fixedly connected to the base 21. Of course, the first sensor 151 or the second sensor 152 may also be a transmissive sensor. When the first sensor 151 or the second sensor 152 is a transmissive sensor, optionally, the light generator of the transmissive sensor is fixedly connected to the upper cover 20, and transmitted. The light receiver of the sensor is fixedly connected to the base 21; or the light receiver is fixedly connected to the upper cover 20, and the light generator is fixedly connected to the base 21. When the upper cover 20 is closed relative to the base 21, the light generator and the light receiver are vertically disposed in the transport path 23 to ensure that the transmission sensor can be used normally.
如图3所示,作为一种可选的实施方式,本实施例中打印机1的传感器单元还可以是包括第三传感器153。第三传感器153固定安装在基座21的侧壁上,当上盖20相对于基座21闭合时(以下简称上盖20处于闭合状态),上盖20与第三传感器153配合,并向控制单元10发出第三信号;当上盖20相对于基座21打开时(以下简称上盖20处于打开状态),上盖20与第三传感器153分离,此时第三传感器153向控制单元10发出第四信号。当上盖20与第三传感器153配合或分离时,第三传感器153输出不同的信号,控制单元10通过检测第三传感器153输出的信号,判断上盖20的状态。As shown in FIG. 3, as an optional implementation manner, the sensor unit of the printer 1 in this embodiment may further include a third sensor 153. The third sensor 153 is fixedly mounted on the side wall of the base 21. When the upper cover 20 is closed relative to the base 21 (hereinafter referred to as the upper cover 20 is in a closed state), the upper cover 20 is engaged with the third sensor 153, and is controlled. The unit 10 emits a third signal; when the upper cover 20 is opened relative to the base 21 (hereinafter referred to as the upper cover 20 is in an open state), the upper cover 20 is separated from the third sensor 153, and the third sensor 153 is issued to the control unit 10 at this time. The fourth signal. When the upper cover 20 is engaged or disengaged from the third sensor 153, the third sensor 153 outputs a different signal, and the control unit 10 determines the state of the upper cover 20 by detecting the signal output from the third sensor 153.
本实施例中在输送通道23中设置第一传感器151和第二传感器152,两者配合使用能够对位于输送通道23中的打印纸的位置进行判断,进而通过控制单元10和输送单元14对打印纸的位置进行调整后再打印,节约了纸张,更加环保,同时还能够保证打印的图像和文字在打印纸上的位置更加准确,提高打印效果。In the embodiment, the first sensor 151 and the second sensor 152 are disposed in the conveying passage 23, and the two can be used together to judge the position of the printing paper located in the conveying passage 23, and then print through the control unit 10 and the conveying unit 14. The position of the paper is adjusted and then printed, which saves paper and is more environmentally friendly. At the same time, it can ensure the position of the printed image and text on the printing paper is more accurate and improve the printing effect.
装置实施例二Device embodiment 2
如图4所示,是本实施例提出的打印机。本实施例中的打印机的结构与装置实施例一中的打印机的结构基本相同,可以是包括控制单元、通信单元、存储单元、打印单元、输送单元和传感器单元,控制单元分别与通信单元、存储单元、打印单元、输送单元、传感器单元、指示单元相连接。本实施例中的传感器单元中也可以是包含有第一传感器151、第二传感器152和第三传感器153。As shown in FIG. 4, it is the printer proposed in this embodiment. The structure of the printer in this embodiment is basically the same as that of the printer in the first embodiment, and may include a control unit, a communication unit, a storage unit, a printing unit, a transport unit, and a sensor unit, and the control unit and the communication unit and the storage unit, respectively. The unit, the printing unit, the conveying unit, the sensor unit, and the indicating unit are connected. The sensor unit in this embodiment may also include a first sensor 151, a second sensor 152, and a third sensor 153.
本实施例与装置实施例一的区别在于,本实施例中的打印机上还设置有位 于输送通道23中的第一输送辊26a、第二输送辊26b、第三输送辊27a和第四输送辊27b。作为可选的实施方式,沿打印纸的进纸方向,第一输送辊26a和第二输送辊26b上下相对设置并位于打印头131的上游;第三输送辊27a和第四输送辊27b上下相对设置并位于打印头131的下游。第一输送辊26a、第三输送辊27a安装在基座21上,并且可以绕自身轴线转动;第二输送辊26b、第四输送辊27b安装在上盖20上,也可以绕自身轴线转动。当上盖20相对于基座21闭合时,第一输送辊26a和第二输送辊26b在输送通道23中相切配合,第三输送辊27a和第四输送辊27b在输送通道23中相切配合,第一输送辊26a、第三输送辊27a与电机142的输出轴传动连接。当电机142的输出轴转动时第一输送辊26a、第三输送辊27a随之转动,第一输送辊26a带动第二输送辊26b转动,第三输送辊27a带动第四输送辊27b转动,从而驱动打印纸在输送通道23中移动。The difference between this embodiment and the device embodiment 1 is that the printer in this embodiment is also provided with a bit. The first conveying roller 26a, the second conveying roller 26b, the third conveying roller 27a, and the fourth conveying roller 27b in the conveying path 23. As an alternative embodiment, in the paper feeding direction of the printing paper, the first conveying roller 26a and the second conveying roller 26b are disposed upside down and located upstream of the printing head 131; the third conveying roller 27a and the fourth conveying roller 27b are vertically opposed It is disposed and located downstream of the print head 131. The first conveying roller 26a and the third conveying roller 27a are mounted on the base 21 and are rotatable about their own axes; the second conveying roller 26b and the fourth conveying roller 27b are mounted on the upper cover 20, and are also rotatable about their own axes. When the upper cover 20 is closed with respect to the base 21, the first conveying roller 26a and the second conveying roller 26b are tangentially fitted in the conveying path 23, and the third conveying roller 27a and the fourth conveying roller 27b are tangent in the conveying path 23 In cooperation, the first conveying roller 26a and the third conveying roller 27a are drivingly coupled to the output shaft of the motor 142. When the output shaft of the motor 142 rotates, the first conveying roller 26a and the third conveying roller 27a rotate accordingly, the first conveying roller 26a drives the second conveying roller 26b to rotate, and the third conveying roller 27a drives the fourth conveying roller 27b to rotate. The printing paper is driven to move in the conveying path 23.
由于本实施例中除了打印辊132外,还设置有四个输送辊,因此在输送打印纸的过程中使打印纸的运行更加平稳。Since four conveying rollers are provided in addition to the printing roller 132 in the present embodiment, the operation of the printing paper is made smoother during the process of conveying the printing paper.
本公开实施例的打印机,打印机更换打印纸时,用户可以在上盖20处于闭合状态时,将打印纸的纸头从入纸口24插入,也可以先打开上盖20,然后将打印纸的前沿从入纸口24拖至出纸口25后再闭合上盖20。In the printer of the embodiment of the present disclosure, when the printer replaces the printing paper, the user can insert the paper head of the printing paper from the paper feeding port 24 when the upper cover 20 is in the closed state, or open the upper cover 20 first, and then the leading edge of the printing paper. The upper cover 20 is closed after being pulled from the paper feed port 24 to the paper exit port 25.
本公开实施例还公开了一种打印机的控制方法,该控制方法可以但不限于对本公开实施例的打印机执行控制。The embodiment of the present disclosure also discloses a control method of a printer, which may be, but is not limited to, performing control on a printer of an embodiment of the present disclosure.
方法实施例一 Method embodiment 1
如图5所示,该控制方法可以是包括以下步骤:As shown in FIG. 5, the control method may include the following steps:
在S100中,检测第一传感器是否为有纸状态。In S100, it is detected whether the first sensor is in a paper state.
控制单元检测输送通道中位于打印头上游的第一传感器是否为有纸状态,对于本公开实施例提供的打印机,控制单元10通过检测第一传感器151输出的信号判断是第一传感器151是否为有纸状态。The control unit detects whether the first sensor located upstream of the print head in the transport path is in a paper state. For the printer provided in the embodiment of the present disclosure, the control unit 10 determines whether the first sensor 151 is present by detecting the signal output by the first sensor 151. Paper status.
在步骤S110中,当第一传感器为有纸状态时,检测第二传感器是否为有纸状态。In step S110, when the first sensor is in the paper state, it is detected whether the second sensor is in a paper state.
当检测到输送单元中位于打印头上游的第一传感器为有纸状态时,控制单元检测输送通道中位于打印头下游的第二传感器是否为有纸状态,对于本公开实施例提供的打印机,当控制单元10通过第一传感器151输出的信号判定第一传感器151为有纸状态时,通过检测第二传感器152输出的信号判断第二传感 器152是否为有纸状态。When it is detected that the first sensor located upstream of the print head in the transport unit is in a paper state, the control unit detects whether the second sensor located downstream of the print head in the transport path is in a paper state, for the printer provided by the embodiment of the present disclosure, when When the signal output from the first sensor 151 determines that the first sensor 151 is in the paper state, the control unit 10 determines the second sensor by detecting the signal output by the second sensor 152. Whether the device 152 is in a paper state.
可选的,当检测到输送单元中位于打印头上游的第一传感器为有纸状态时,控制单元首先检测打印机的上盖是否处于闭合状态,当检测到打印机的上盖处于闭合状态时,控制单元再检测第二传感器是否为有纸状态,对于本公开实施例提供的打印机,控制单元10通过检测第三传感器153输出的信号判断打印机的上盖20是否相对于基座21闭合。Optionally, when detecting that the first sensor located upstream of the print head in the transport unit is in a paper state, the control unit first detects whether the upper cover of the printer is in a closed state, and when detecting that the upper cover of the printer is in a closed state, controlling The unit re-detects whether the second sensor is in a paper state. For the printer provided by the embodiment of the present disclosure, the control unit 10 determines whether the upper cover 20 of the printer is closed relative to the base 21 by detecting a signal output by the third sensor 153.
在S120中,当第二传感器为有纸状态时,控制打印纸退纸,使打印纸的纸头到达第二传感器的检测位置;当第二传感器为无纸状态时,控制打印纸进纸,使打印纸的纸头到达第二传感器的检测位置。In S120, when the second sensor is in the paper state, the paper is controlled to eject the paper, so that the paper head of the printing paper reaches the detecting position of the second sensor; when the second sensor is in the paperless state, the printing paper is controlled to be fed. The paper head of the printing paper reaches the detection position of the second sensor.
控制单元根据第二传感器的状态,控制打印纸退纸或进纸,以将打印纸的纸头输送至第二传感器的检测位置,对于本公开实施例提供的打印机,当第二传感器152为有纸状态时,控制打印纸退纸,使打印纸的纸头到达第二传感器152的检测位置,当第二传感器152为无纸状态时,控制打印纸进纸,使打印纸的纸头到达第二传感器152的检测位置。The control unit controls the paper ejection or paper feeding according to the state of the second sensor to convey the paper head of the printing paper to the detecting position of the second sensor. For the printer provided by the embodiment of the present disclosure, when the second sensor 152 has paper In the state, the paper is controlled to eject the paper, so that the paper head of the printing paper reaches the detecting position of the second sensor 152, and when the second sensor 152 is in the paperless state, the printing paper is controlled to be fed, so that the paper head of the printing paper reaches the second sensor 152. Detection location.
可选地,为了保证打印内容在打印纸上的位置更准确,当控制打印纸的纸头移动至第二传感器的检测位置时,继续驱动打印纸移动预设长度,将打印纸的打印起始位置输送至打印头的打印位置。Optionally, in order to ensure that the position of the printed content on the printing paper is more accurate, when the paper head of the control printing paper is moved to the detecting position of the second sensor, the driving paper is moved to a preset length, and the printing starting position of the printing paper is started. The print position delivered to the printhead.
可选的,当控制打印纸退纸时,打印纸每退纸一个预设距离时检测第二传感器的状态,当检测到第二传感器为无纸状态时,判定打印纸的纸头到达第二传感器的检测位置;当控制打印纸进纸时,打印纸每进纸一个预设距离时检测第二传感器的状态,当检测到第二传感器为有纸状态时,判定打印纸的纸头到达第二传感器的检测位置。Optionally, when controlling the paper exit, the state of the second sensor is detected every time the paper is ejected by a preset distance, and when the second sensor is detected to be in a paperless state, determining that the paper of the paper reaches the second sensor The detection position; when controlling the paper feeding, the state of the second sensor is detected every time the printing paper feeds a predetermined distance, and when the second sensor is detected to be in the paper state, it is determined that the paper head of the printing paper reaches the second sensor Detection location.
可选的,使用第一计数器对打印纸的退纸距离进行计数,打印纸每退纸一个预设距离时将第一计数器的计数值加1,当第一计数器的计数值等于第一预设计数值时如果还未检测到第二传感器为无纸状态,进行塞纸报警;使用第二计数器对打印纸的进纸距离进行计数,打印纸每进纸一个预设距离时将第二计数器的计数值加1,当第二计数器的计数值等于第二预设计数值时如果还未检测到第二传感器为有纸状态,进行塞纸报警。Optionally, the first counter is used to count the paper ejection distance of the printing paper, and the counting value of the first counter is incremented by one when the printing paper is separated by a preset distance, when the counting value of the first counter is equal to the first pre-design If the second sensor is not detected as a paperless state, a paper jam alarm is issued; the second counter is used to count the paper feed distance, and the second counter is counted each time the paper feeds a predetermined distance The value is incremented by 1. When the count value of the second counter is equal to the second pre-designed value, if the second sensor is not detected to be in a paper state, a paper jam alarm is issued.
本实施例的打印机控制方法中,当第一传感器为有纸状态时,打印机根据第二传感器的状态选择进纸或退纸将打印纸的纸头输送至第二传感器的检测位置,通过本公开实施例的打印机及其控制方法,打印机更换打印纸时,用户可 以选择在上盖处于闭合状态时,将打印纸的纸头从入纸口插入的方式安装打印纸,也可以选择先打开上盖,然后将打印纸的前沿从入纸口拖至出纸口后再闭合上盖的方式安装打印纸纸,不管用户选择哪种方式安装打印纸,打印机都可以将打印纸的纸头输送至第二传感器的检测位置,进而可以通过驱动打印纸移动预设长度,将打印纸的打印起始位置输送至打印头的打印位置,通过本公开,可以有效解决相关技术的打印机在打印过程中由于纸张安装位置不当造成纸张浪费的问题,能够保证打印内容在打印纸上的位置更准确。In the printer control method of the embodiment, when the first sensor is in the paper state, the printer selects the paper feed or the paper feed according to the state of the second sensor to transport the paper head of the printing paper to the detection position of the second sensor, and is implemented by the present disclosure. Example of the printer and its control method, when the printer replaces the printing paper, the user can To select the paper to be inserted from the paper inlet when the top cover is closed, you can also choose to open the top cover first, then drag the leading edge of the paper from the paper inlet to the paper exit. The printing paper is installed by closing the upper cover. Regardless of which method the user selects to install the printing paper, the printer can transport the paper head of the printing paper to the detecting position of the second sensor, and then the predetermined length can be moved by driving the printing paper. The printing start position of the printing paper is conveyed to the printing position of the printing head. Through the disclosure, the problem that the related art printer wastes paper due to improper installation position of the paper during the printing process can be effectively solved, and the printing content can be ensured on the printing paper. The location is more accurate.
方法实施例二Method embodiment two
本实施例中的控制方法的流程是方法实施例一的一可选实施例,如图6所示,该控制方法可以是包括以下步骤:The flow of the control method in this embodiment is an optional embodiment of the first embodiment of the method. As shown in FIG. 6, the control method may include the following steps:
在S200中,检测第一传感器是否为有纸状态。In S200, it is detected whether the first sensor is in a paper state.
控制单元读取第一传感器输出的信号,通过第一传感器输出的信号检测第一传感器是否为有纸状态。比如,控制单元接收第一传感器输出的信号并将该信号与第一预设阈值T1进行比较,当第一传感器输出的信号大于第一预设阈值T1时,判定有打印纸位于第一传感器的检测位置,即第一传感器为有纸状态,打印机执行步骤S210;当第一传感器输出的信号不大于第一预设阈值T1时,判定第一传感器为无纸状态,打印机继续执行步骤S200。The control unit reads the signal output by the first sensor, and detects whether the first sensor is in a paper state by a signal output by the first sensor. For example, the control unit receives the signal output by the first sensor and compares the signal with the first preset threshold T1. When the signal output by the first sensor is greater than the first preset threshold T1, it is determined that the printing paper is located at the first sensor. The detection position, that is, the first sensor is in a paper state, the printer performs step S210; when the signal output by the first sensor is not greater than the first preset threshold T1, it is determined that the first sensor is in a paperless state, and the printer proceeds to step S200.
在S210中,检测第二传感器是否为有纸状态。In S210, it is detected whether the second sensor is in a paper state.
当控制单元检测到第一传感器为有纸状态时,控制单元读取第二传感器输出的信号,通过第二传感器输出的信号检测第二传感器是否为有纸状态。比如,控制单元将第二传感器输出的信号与存储于存储单元中的第二预设阈值T2进行比较,当第二传感器输出的信号大于第二预设阈值T2时,判定有打印纸位于第二传感器的检测位置,即第二传感器为有纸状态,打印机执行步骤S220;当第二传感器输出的信号不大于第二预设阈值T2时,判定第二传感器为无纸状态,打印机执行步骤S230。When the control unit detects that the first sensor is in the paper state, the control unit reads the signal output by the second sensor, and detects whether the second sensor is in the paper state by the signal output by the second sensor. For example, the control unit compares the signal output by the second sensor with a second preset threshold T2 stored in the storage unit, and determines that the printing paper is located at the second when the signal output by the second sensor is greater than the second preset threshold T2. The detection position of the sensor, that is, the second sensor is in a paper state, the printer performs step S220; when the signal output by the second sensor is not greater than the second preset threshold T2, it is determined that the second sensor is in a paperless state, and the printer performs step S230.
在S220中,退纸直至打印纸的纸头到达第二传感器的检测位置。In S220, the paper is ejected until the paper head of the printing paper reaches the detection position of the second sensor.
当控制单元检测到第二传感器为有纸状态时,控制输送单元驱动打印纸退纸,即驱动打印纸在输送通道中沿图2中与箭头A所示方向相反的方向移动,打印纸每移动一个预设距离,控制单元检测第二传感器的状态,其中,所述预设距离可以是最小单位距离,对于本公开实施例所提供的打印机,当输送单元14的电机142为步进电机时,该最小单位距离为步进电机步进一次时打印纸的 移动距离,当输送单元14的电机142为直流电机时,该最小距离为直流电机的输出轴转动一个单位时间时打印纸的移动距离,比如,该单位时间为1微秒。打印纸持续退纸,直至控制单元检测到第二传感器由有纸状态变化到无纸状态时,判定打印纸离开第二传感器的检测位置,也即打印纸的纸头到达第二传感器的检测位置,此时,打印机执行步骤S240。When the control unit detects that the second sensor is in the paper state, the control conveying unit drives the paper to eject the paper, that is, the driving paper moves in the conveying passage in the opposite direction to the direction indicated by the arrow A in FIG. 2, and the printing paper moves. a preset distance, the control unit detects a state of the second sensor, wherein the preset distance may be a minimum unit distance. For the printer provided by the embodiment of the present disclosure, when the motor 142 of the transport unit 14 is a stepping motor, The minimum unit distance is the printing paper when the stepping motor steps once When the motor 142 of the conveying unit 14 is a DC motor, the minimum distance is the moving distance of the printing paper when the output shaft of the DC motor rotates by one unit time, for example, the unit time is 1 microsecond. The printing paper continues to eject the paper until the control unit detects that the second sensor changes from the paper state to the paperless state, and determines that the printing paper leaves the detecting position of the second sensor, that is, the paper head of the printing paper reaches the detecting position of the second sensor. At this time, the printer executes step S240.
在S230中,进纸直至打印纸的纸头到达第二传感器的检测位置。In S230, paper is fed until the paper end of the printing paper reaches the detection position of the second sensor.
当控制单元检测到第二传感器为无纸状态时,控制输送单元驱动打印纸进纸,即驱动打印纸在输送通道中沿图2中箭头A所示方向移动,打印纸每移动一个预设距离,控制单元检测第二传感器的状态,其中,所述预设距离可以是一个最小单位距离。打印纸持续进纸,直至控制单元检测到第二传感器由无纸状态变为有纸状态时,判定打印纸到达第二传感器的检测位置,也即打印纸的纸头到达第二传感器的检测位置,此时,打印机执行步骤S240。When the control unit detects that the second sensor is in a paperless state, the control conveying unit drives the printing paper to feed, that is, drives the printing paper to move in the conveying passage in the direction indicated by the arrow A in FIG. 2, and the printing paper moves by a preset distance. The control unit detects a state of the second sensor, wherein the preset distance may be a minimum unit distance. The printing paper continues to feed until the control unit detects that the second sensor changes from the paperless state to the paper state, and determines that the printing paper reaches the detection position of the second sensor, that is, the paper head of the printing paper reaches the detection position of the second sensor. At this time, the printer executes step S240.
在S240中,驱动打印纸移动预设长度,将打印纸的打印起始位置输送至打印头的打印位置。In S240, the printing paper is moved to a preset length, and the printing start position of the printing paper is conveyed to the printing position of the printing head.
当打印纸的纸头到达第二传感器的检测位置时,控制单元控制输送单元继续驱动打印纸移动预设长度,也就是打印纸需要进纸或退纸的距离L,将打印纸的打印起始位置输送至打印头的打印位置。控制单元根据第一距离L1、打印纸上预设的打印起始位置与打印纸的纸头之间的距离L2计算打印纸需要进纸或退纸的距离L,当通过步骤S220或步骤S230检测到打印纸的纸头到达第二传感器的检测位置时,控制打印纸进纸或退纸距离L。比如,当打印纸的打印起始位置为打印纸的纸头时,控制单元控制输送单元驱动打印纸退纸第一距离L1,以将打印纸的纸头输送至打印头的打印位置,其中,第一距离L1为第二传感器的检测位置与打印头的打印位置之间的距离。When the paper head of the printing paper reaches the detecting position of the second sensor, the control unit controls the conveying unit to continue to drive the printing paper to move the preset length, that is, the distance L at which the printing paper needs to be fed or ejected, and the printing starting position of the printing paper. The print position delivered to the printhead. The control unit calculates the distance L that the printing paper needs to be fed or ejected according to the first distance L1, the preset printing start position on the printing paper and the distance L2 between the paper ends of the printing paper, when it is detected by step S220 or step S230 When the paper head of the printing paper reaches the detection position of the second sensor, the paper feed or the ejecting distance L is controlled. For example, when the printing start position of the printing paper is the paper head of the printing paper, the control unit controls the conveying unit to drive the printing paper to eject the paper first distance L1 to convey the paper head of the printing paper to the printing position of the printing head, wherein The distance L1 is the distance between the detection position of the second sensor and the printing position of the print head.
使用本公开中的控制方法进行工作时,不管用户选择哪种方式安装打印纸,打印机都可以将打印纸的打印起始位置输送至打印头的打印位置,可以有效解决相关技术的打印机在打印过程中由于纸张安装位置不当造成纸张浪费的问题,能够保证打印内容在打印纸上的位置更准确。When working with the control method of the present disclosure, the printer can transfer the printing start position of the printing paper to the printing position of the printing head regardless of the manner in which the user selects the printing paper, which can effectively solve the related art printer in the printing process. The problem of wasted paper due to improper paper installation position ensures that the position of the printed content on the printing paper is more accurate.
方法实施例三Method embodiment three
本实施例中的控制方法与方法实施例二中的控制方法区别在于,在检测到第一传感器为有纸状态后,首先通过第三传感器检测上盖是否相对于基座闭合,当检测到上盖相对于基座闭合时,则控制单元检测第二传感器的状态。 The control method in this embodiment differs from the control method in the second embodiment in that, after detecting that the first sensor is in a paper state, first detecting whether the upper cover is closed relative to the base by the third sensor, when detecting When the cover is closed relative to the base, the control unit detects the state of the second sensor.
下面通过控制方法流程对本实施例中控制方法进行说明,如图7所示,本实施例中的控制方法是方法实施例一的又一可选实施例。本实施例中的控制方法的可选步骤为:The control method in this embodiment is described below by the control method flow. As shown in FIG. 7, the control method in this embodiment is another optional embodiment of the method embodiment 1. The optional steps of the control method in this embodiment are:
在S200中,检测第一传感器是否为有纸状态,当第一传感器为有纸状态时,执行步骤S200a;In S200, detecting whether the first sensor is in a paper state, when the first sensor is in a paper state, step S200a is performed;
在S200a中,检测打印机的上盖是否处于闭合状态,若是,则执行步骤S210若否,则继续检测上盖是否处于闭合状态;In S200a, it is detected whether the upper cover of the printer is in a closed state, and if yes, executing step S210, if no, continuing to detect whether the upper cover is in a closed state;
在S210中,检测第二传感器是否为有纸状态,若第二传感器为有纸状态时,执行步骤S220,若第二传感器为无纸状态时,执行步骤S230;In S210, it is detected whether the second sensor is in a paper state, if the second sensor is in a paper state, step S220 is performed, and if the second sensor is in a paperless state, step S230 is performed;
在S220中,退纸直至打印纸的纸头到达第二传感器的检测位置;In S220, the paper is ejected until the paper head of the printing paper reaches the detection position of the second sensor;
在S230中,进纸直至打印纸的纸头到达第二传感器的检测位置;In S230, feeding the paper until the paper head of the printing paper reaches the detection position of the second sensor;
在完成步骤S220或S230后,则与方法实施例二中的步骤相同,执行步骤S240,驱动打印纸移动预设长度,将打印纸的打印起始位置输送至打印头的打印位置。其余可选的控制方法,在此不再赘述,与方法实施例二中相同。After the step S220 or S230 is completed, the same as the step in the second embodiment of the method, the step S240 is executed to drive the printing paper to move the preset length, and the printing start position of the printing paper is sent to the printing position of the printing head. The remaining optional control methods are not described here, and are the same as in the second embodiment of the method.
通过本实施例中的打印机控制方法,当打印机的上盖为打开状态时,打印机需要等待用户将打印机的上盖闭合后才根据第二传感器的状态将打印纸的打印起始位置输送至打印头的打印位置,使用更加安全、可靠,用户体验更好。With the printer control method in this embodiment, when the upper cover of the printer is in an open state, the printer needs to wait for the user to close the upper cover of the printer before feeding the print start position of the printing paper to the print head according to the state of the second sensor. The print position is safer, more reliable, and has a better user experience.
方法实施例四Method embodiment four
本实施例中的控制方法的可选流程是方法实施例一的又一可选实施例,如图8所示,该方法包括以下步骤:An optional process of the control method in this embodiment is another optional embodiment of the method embodiment 1. As shown in FIG. 8, the method includes the following steps:
在S300中,检测第一传感器是否为有纸状态。In S300, it is detected whether the first sensor is in a paper state.
控制单元通过第一传感器输出的信号检测第一传感器是否为有纸状态,当检测到第一传感器为有纸状态时,步骤S310,当检测到第一传感器为无纸状态时,继续执行步骤S300。The control unit detects whether the first sensor is in a paper state by using a signal output by the first sensor, and when detecting that the first sensor is in a paper state, in step S310, when detecting that the first sensor is in a paperless state, proceeding to step S300 .
在S310中,检测上盖是否处于闭合状态。In S310, it is detected whether the upper cover is in a closed state.
控制单元通过第三传感器输出的信号检测上盖是否处于闭合状态,当检测到上盖处于闭合状态时,步骤S320,当检测到上盖处于开启状态时,继续执行步骤S310。The control unit detects whether the upper cover is in the closed state by the signal output by the third sensor. When it is detected that the upper cover is in the closed state, in step S320, when it is detected that the upper cover is in the open state, the process proceeds to step S310.
在S320中,检测第二传感器是否为有纸状态。In S320, it is detected whether the second sensor is in a paper state.
控制单元通过第二传感器输出的信号检测第二传感器是否为有纸状态,当检测到第二传感器为有纸状态时,执行步骤S330,当检测到第二传感器为无纸 状态时,执行步骤S370。The control unit detects whether the second sensor is in a paper state by a signal output by the second sensor, and when it is detected that the second sensor is in a paper state, step S330 is performed, and when the second sensor is detected to be paperless In the state, step S370 is performed.
在S330中,初始化第一计数器。In S330, the first counter is initialized.
控制单元初始化第一计数器的计数值。比如,将第一计数器的计数值设置为零,第一计数器用于计算打印纸的退纸距离,当输送单元的电机为步进电机时,第一计数器用于记录退纸过程中步进电机的步进次数,控制单元通过步进电机的步进次数及步进电机步进一次时打印纸的移动距离可以计算打印纸的退纸距离。当输送单元的电机为直流电机时,第一计数器用于记录退纸的时间,控制单元通过退纸时间及单位时间内打印纸的移动距离可以计算打印纸的退纸距离。The control unit initializes the count value of the first counter. For example, the counter value of the first counter is set to zero, and the first counter is used to calculate the eject distance of the printing paper. When the motor of the conveying unit is a stepping motor, the first counter is used to record the stepping motor during the ejecting process. The number of steps, the control unit can calculate the paper ejection distance of the printing paper by the number of steps of the stepping motor and the moving distance of the printing paper when the stepping motor steps. When the motor of the conveying unit is a DC motor, the first counter is used to record the time of the paper ejection, and the control unit can calculate the paper ejection distance of the printing paper by the paper ejection time and the moving distance of the printing paper per unit time.
在S340中,驱动打印纸退纸一个预设距离,并将第一计数器的计数值加1。In S340, the printing paper is ejected by a predetermined distance and the count value of the first counter is incremented by one.
控制单元控制输送单元驱动打印纸退纸一个预设距离,并将第一计数器的计数值加1。当输送单元的电机为步进电机时,控制步进电机步进一次以使打印纸退纸一个预设距离,并将第一计数器的计数值加1。当输送单元的电机为直流电机时,控制直流电机通电一个单位时间以使打印纸退纸一个预设距离,并将第一计数器的计数值加1。The control unit controls the transport unit to drive the paper to eject a predetermined distance and increments the count value of the first counter by one. When the motor of the conveying unit is a stepping motor, the stepping motor is controlled to be stepped once to eject the printing paper by a preset distance, and the count value of the first counter is incremented by one. When the motor of the conveying unit is a DC motor, the DC motor is controlled to be energized for one unit time to eject the printing paper by a preset distance, and the count value of the first counter is incremented by one.
在S350中,检测第二传感器是否为无纸状态。In S350, it is detected whether the second sensor is in a paperless state.
控制单元检测第二传感器的状态,判断第二传感器是否为无纸状态,当判定第二传感器为无纸状态时,执行步骤S420,当判定第二传感器为有纸状态时,执行步骤S360。The control unit detects the state of the second sensor, determines whether the second sensor is in a paperless state, and when it is determined that the second sensor is in a paperless state, step S420 is performed, and when it is determined that the second sensor is in a paper state, step S360 is performed.
在S360中,判断第一计数器的计数值是否等于第一预设计数值。In S360, it is determined whether the count value of the first counter is equal to the first pre-designed value.
将第一计数器的计数值与第一预设计数值C1进行比较,判断第一计数器的计数值是否等于第一预设计数值C1,当第一计数器的计数值等于第一预设计数值C1时,执行步骤S410,当第一计数器的计数值不等于第一预设计数值C1时,继续执行步骤S340。其中,第一预设计数值C1预先存储在存储单元中,可以是预先根据最大可允许的退纸长度计算所得的。Comparing the count value of the first counter with the first pre-designed value C1, determining whether the count value of the first counter is equal to the first pre-designed value C1, and when the count value of the first counter is equal to the first pre-designed value C1, performing Step S410, when the count value of the first counter is not equal to the first pre-designed value C1, proceeding to step S340. Wherein, the first pre-designed value C1 is pre-stored in the storage unit, and may be calculated in advance according to the maximum allowable eject length.
在S370中,初始化第二计数器。In S370, the second counter is initialized.
控制单元初始化第二计数器的计数值,将第二计数器的计数值设置为零。第二计数器用于计算打印纸的进纸距离。当输送单元的电机为步进电机时,第二计数器用于记录进纸过程中步进电机的步进次数,控制单元通过步进电机的步进次数及步进电机步进一次时打印纸的移动距离可以计算打印纸的进纸距离;当输送单元的电机为直流电机时,第二计数器用于记录进纸的时间,控制 单元通过进纸时间及单位时间内打印纸的移动距离可以计算打印纸的进纸距离。The control unit initializes the count value of the second counter and sets the count value of the second counter to zero. The second counter is used to calculate the paper feed distance of the printing paper. When the motor of the conveying unit is a stepping motor, the second counter is used to record the number of steps of the stepping motor during the feeding process, and the control unit prints the paper by stepping the stepping motor and stepping the motor once. The moving distance can calculate the paper feeding distance of the printing paper; when the motor of the conveying unit is a DC motor, the second counter is used to record the time of feeding the paper, and control The unit can calculate the paper feed distance of the paper by the paper feed time and the moving distance of the paper in the unit time.
在S380中,驱动打印纸进纸一个预设距离,并将第二计数器的计数值加1。In S380, the printing paper is driven to feed a predetermined distance, and the count value of the second counter is incremented by one.
控制单元控制输送单元驱动打印纸进纸一个预设距离,并将第二计数器的计数值加1。The control unit controls the transport unit to drive the paper feed a predetermined distance and increments the count value of the second counter by one.
在S390中,判断第二传感器是否为有纸状态。In S390, it is determined whether the second sensor is in a paper state.
控制单元检测第二传感器的状态,判断第二传感器是否为有纸状态,当判定第二传感器为有纸状态时,执行步骤S420;当判定第二传感器为无纸状态时,执行步骤S400。The control unit detects the state of the second sensor, determines whether the second sensor is in the paper state, and when it is determined that the second sensor is in the paper state, step S420 is performed; and when it is determined that the second sensor is in the paperless state, step S400 is performed.
在S400中,判断第二计数器的计数值是否等于第二预设计数值。In S400, it is determined whether the count value of the second counter is equal to the second pre-designed value.
将第二计数器的计数值与第二预设计数值C2进行比较,判断第二计数器的计数值是否等于第二预设计数值C2,当第二计数器的计数值等于第二预设计数值C2时,执行步骤S410,当第二计数器的计数值不等于第二预设计数值C2时,继续执行步骤S380。其中,第二预设计数值C2预先存储在存储单元中,是预先根据最大可允许的进纸长度计算所得的。Comparing the count value of the second counter with the second pre-designed value C2, determining whether the count value of the second counter is equal to the second pre-design value C2, and when the count value of the second counter is equal to the second pre-design value C2, performing Step S410, when the count value of the second counter is not equal to the second pre-design value C2, proceed to step S380. Wherein, the second pre-designed value C2 is pre-stored in the storage unit and is calculated in advance according to the maximum allowable paper feed length.
在S410中,进行塞纸报警。In S410, a paper jam alarm is issued.
当第一计数器的计数值等于第一预设计数值C1时第二传感器仍然为有纸状态,或者当第二计数器的计数值等于第二预设计数值C2时第二传感器仍然为无纸状态,控制单元控制判定打印机发生塞纸错误,控制单元控制指示单元进行塞纸报警。When the count value of the first counter is equal to the first pre-designed value C1, the second sensor is still in the paper state, or when the count value of the second counter is equal to the second pre-design value C2, the second sensor is still paperless, control The unit control determines that the printer has a paper jam error, and the control unit controls the pointing unit to perform a paper jam alarm.
在S420中,驱动打印纸移动预设长度,将打印纸的打印起始位置输送至打印头的打印位置。In S420, the printing paper is moved to a preset length, and the printing start position of the printing paper is conveyed to the printing position of the printing head.
当第二传感器在第一计数器的计数值等于第一预设计数值C1前由有纸状态变化为无纸状态,或者,当第二传感器在第二计数器的计数值等于第二预设计数值C2前由无纸状态变化为有纸状态,控制器判定打印纸的纸头到达第二传感器的检测位置,此时,控制单元控制输送单元驱动打印纸移动预设长度,以将打印纸的打印起始位置输送至打印头的打印位置。When the second sensor changes from the paper state to the paperless state before the count value of the first counter is equal to the first pre-designed value C1, or when the second sensor is equal to the second pre-design value C2 before the count value of the second counter is equal to the second pre-designed value C2 The controller determines that the paper head of the printing paper reaches the detecting position of the second sensor, and the control unit controls the conveying unit to drive the printing paper to move the preset length to print the printing start position of the printing paper. The print position delivered to the printhead.
本实施例中的打印机的控制方法,打印机在退纸过程中通过第一计数器进行计数,在进纸过程中通过第二计数器进行计数,当第一计数器的计数值等于第一预设计数值C1时或当第二计数器的计数值等于第二预设值C2时如果检测不到第二传感器的状态发生变化,判定打印机发生塞纸错误并进行报警。通过 本实施例的打印机及该打印机的控制方法,可以避免由于打印机发生塞纸错误时电机持续转动所造成的打印机损坏问题。In the control method of the printer in this embodiment, the printer counts by the first counter during the paper ejection process, and counts by the second counter during the paper feeding process, when the count value of the first counter is equal to the first pre-designed value C1. Or if the state of the second sensor is not changed when the count value of the second counter is equal to the second preset value C2, it is determined that the printer has a paper jam error and an alarm is issued. Pass The printer of the embodiment and the control method of the printer can avoid the printer damage caused by the continuous rotation of the motor when a paper jam occurs in the printer.
以上结合可选实施例描述了本公开的技术原理,这些描述只是为了解释本公开的原理,不能以任何方式解释为对本公开保护范围的限制。基于此处解释,本领域的技术人员不需要付出创造性的劳动即可联想到本公开的其它可选实施方式,这些方式都将落入本公开的保护范围之内。The technical principles of the present disclosure have been described above in connection with the alternative embodiments, and the description is only for the purpose of explaining the principles of the present disclosure, and is not to be construed as limiting the scope of the disclosure. Based on the explanation herein, those skilled in the art can associate other alternative embodiments of the present disclosure without departing from the scope of the present disclosure.
工业实用性Industrial applicability
本公开由于在打印机的输送通道中设置了用于检测打印纸位置的第一传感器和第二传感器,因此,当打印机更换打印纸时,用户可以选择在上盖处于闭合状态时,将打印纸的纸头从入纸口插入的方式安装打印纸,也可以选择先打开上盖,然后将打印纸的前沿从入纸口拖至出纸口后再闭合上盖的方式安装打印纸,不管用户选择哪种方式安装打印纸,打印机都可以将打印纸的打印起始位置输送至打印头的打印位置,使得打印内容在打印纸上的位置更加准确。通过本公开,可以有效解决相关技术的打印机在打印过程中由于纸张安装位置不当造成纸张浪费的问题,能够保证打印内容在打印纸上的位置更准确。 The present disclosure provides a first sensor and a second sensor for detecting the position of the printing paper in the conveying path of the printer. Therefore, when the printer replaces the printing paper, the user can select the printing paper when the upper cover is in the closed state. The paper is installed by inserting the paper from the paper inlet. You can also choose to open the upper cover first, then drag the leading edge of the paper from the paper inlet to the paper exit and then close the upper cover to install the paper, no matter which user chooses. By way of installing the printing paper, the printer can transfer the printing start position of the printing paper to the printing position of the printing head, so that the position of the printing content on the printing paper is more accurate. Through the present disclosure, it is possible to effectively solve the problem that the printer of the related art causes paper waste due to improper installation position of the paper during the printing process, and can ensure the position of the printed content on the printing paper is more accurate.

Claims (14)

  1. 一种打印机的控制方法,所述打印机包括第一传感器(151)、打印头(131)和第二传感器(152),其中,所述第一传感器(151)、所述打印头(131)和所述第二传感器(152)沿打印纸的进纸方向依次设置在所述打印机的输送通道(23)中,所述控制方法包括:A control method of a printer, the printer comprising a first sensor (151), a print head (131), and a second sensor (152), wherein the first sensor (151), the print head (131), and The second sensor (152) is sequentially disposed in the feeding path (23) of the printer along the paper feeding direction of the printing paper, and the control method includes:
    检测所述第一传感器(151)是否为有纸状态;Detecting whether the first sensor (151) is in a paper state;
    当所述第一传感器(151)为有纸状态时,检测所述第二传感器(152)是否为有纸状态;Detecting whether the second sensor (152) is in a paper state when the first sensor (151) is in a paper state;
    当所述第二传感器(152)为有纸状态时,控制所述打印纸退纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置;以及When the second sensor (152) is in a paper state, controlling the paper to be ejected, so that the paper head of the printing paper reaches the detection position of the second sensor (152);
    当所述第二传感器(152)为无纸状态时,控制所述打印纸进纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置。When the second sensor (152) is in a paperless state, the printing paper is controlled to feed so that the paper head of the printing paper reaches the detection position of the second sensor (152).
  2. 根据权利要求1所述的控制方法,其中,当所述打印纸的纸头到达所述第二传感器(152)的检测位置时,驱动所述打印纸移动预设长度,将所述打印纸的打印起始位置输送至所述打印头(131)的打印位置。The control method according to claim 1, wherein when the paper head of the printing paper reaches the detection position of the second sensor (152), the printing paper is driven to move a preset length to print the printing paper The starting position is delivered to the printing position of the printhead (131).
  3. 根据权利要求1所述的控制方法,其中,所述打印机还包括上盖(20)和基座(21),所述上盖(20)可以相对于所述基座(21)打开或闭合,当所述上盖(20)相对于所述基座(21)闭合时,所述上盖(20)与所述基座(21)之间形成所述输送通道(23);The control method according to claim 1, wherein said printer further comprises an upper cover (20) and a base (21), said upper cover (20) being openable or closable relative to said base (21), When the upper cover (20) is closed relative to the base (21), the upper cover (20) and the base (21) form the transport channel (23);
    所述当所述第一传感器(151)为有纸状态时,检测所述第二传感器(152)是否为有纸状态包括:When the first sensor (151) is in a paper state, detecting whether the second sensor (152) is in a paper state includes:
    检测所述上盖(20)是否处于闭合状态;当所述上盖(20)处于闭合状态时,检测所述第二传感器(152)是否为有纸状态。Detecting whether the upper cover (20) is in a closed state; when the upper cover (20) is in a closed state, detecting whether the second sensor (152) is in a paper state.
  4. 根据权利要求1所述的控制方法,其中,所述当所述第二传感器(152)为有纸状态时,控制所述打印纸退纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置包括:The control method according to claim 1, wherein said paper is ejected when said second sensor (152) is in a paper state, and said paper head of said printing paper reaches said second sensor The detection locations of (152) include:
    所述打印纸每退纸一个预设距离时检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为无纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The printing paper detects a state of the second sensor (152) every time a predetermined distance is ejected, and when detecting that the second sensor (152) is in a paperless state, determining that the paper head of the printing paper arrives The detection position of the second sensor (152).
  5. 根据权利要求4所述的控制方法,其中,在所述控制所述打印纸退纸过程中,还包括:The control method according to claim 4, wherein in the controlling the paper ejection process, the method further comprises:
    使用第一计数器对所述打印纸的退纸距离进行计数,所述打印纸每退纸一 个预设距离时将所述第一计数器的计数值加1,当所述第一计数器的计数值等于第一预设计数值时如果还未检测到所述第二传感器(152)为无纸状态,进行塞纸报警。Counting the paper ejection distance of the printing paper using a first counter, each of the printing papers The preset value of the first counter is incremented by one, and when the count value of the first counter is equal to the first pre-designed value, the second sensor (152) is not detected to be paperless. , a paper jam alarm.
  6. 根据权利要求1所述的控制方法,其中,所述当所述第二传感器(152)为无纸状态时,控制所述打印纸进纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置包括:The control method according to claim 1, wherein said controlling said paper feed is performed when said second sensor (152) is in a paperless state, so that a paper head of said printing paper reaches said second sensor The detection locations of (152) include:
    所述打印纸每进纸一个预设距离时检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为有纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The printing paper detects a state of the second sensor (152) every time a predetermined distance is fed, and when detecting that the second sensor (152) is in a paper state, determining that the paper head of the printing paper arrives The detection position of the second sensor (152).
  7. 根据权利要求6所述的控制方法,其中,在控制所述打印纸进纸过程中,还包括:The control method according to claim 6, wherein in controlling the paper feeding process, the method further comprises:
    使用第二计数器对所述打印纸的进纸距离进行计数,所述打印纸每进纸一个预设距离时将所述第二计数器的计数值加1,当所述第二计数器的计数值等于第二预设计数值时如果还未检测到所述第二传感器(152)为有纸状态,进行塞纸报警。Counting a paper feed distance of the printing paper by using a second counter, the printing paper adding a count value of the second counter every time a paper is fed a predetermined distance, when the count value of the second counter is equal to When the second pre-designed value has not detected that the second sensor (152) is in a paper state, a paper jam alarm is issued.
  8. 一种打印机,包括:输送通道(23)、打印头(131)、输送单元(14)、第一传感器(151)、第二传感器(152)以及控制单元(10);其中,A printer comprising: a transport channel (23), a print head (131), a transport unit (14), a first sensor (151), a second sensor (152), and a control unit (10);
    所述打印头(131),用于在打印纸上执行打印;The print head (131) for performing printing on the printing paper;
    所述输送单元(14),用于驱动所述打印纸在所述输送通道(23)中移动;The conveying unit (14) is configured to drive the printing paper to move in the conveying passage (23);
    所述第一传感器(151)、所述打印头(131)和所述第二传感器(152)沿所述打印纸的进纸方向依次设置在所述打印机的输送通道(23)中;The first sensor (151), the print head (131) and the second sensor (152) are sequentially disposed in the paper feed direction of the printer in the transport channel (23) of the printer;
    所述控制单元(10),用于检测所述第一传感器(151)是否为有纸状态,当检测到所述第一传感器(151)为有纸状态时,检测所述第二传感器(152)是否为有纸状态,当检测到所述第二传感器(152)为有纸状态时,控制所述输送单元(14)驱动所述打印纸退纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置;当检测到所述第二传感器(152)为无纸状态时,控制所述输送单元(14)驱动所述打印纸进纸,使所述打印纸的纸头到达所述第二传感器(152)的检测位置。The control unit (10) is configured to detect whether the first sensor (151) is in a paper state, and when detecting that the first sensor (151) is in a paper state, detecting the second sensor (152) Whether it is a paper-like state, when detecting that the second sensor (152) is in a paper state, controlling the conveying unit (14) to drive the printing paper to eject, so that the paper head of the printing paper reaches the paper a detecting position of the second sensor (152); when detecting that the second sensor (152) is in a paperless state, controlling the conveying unit (14) to drive the printing paper to feed the paper head of the printing paper A detection position of the second sensor (152) is reached.
  9. 根据权利要求8所述的打印机,其中,所述控制单元(10)还用于在所述打印纸的纸头到达所述第二传感器(152)的检测位置时,控制所述输送单元(14)驱动所述打印纸移动预设长度,将所述打印纸的打印起始位置输送至所 述打印头(131)的打印位置。The printer according to claim 8, wherein said control unit (10) is further configured to control said conveying unit (14) when a paper head of said printing paper reaches a detection position of said second sensor (152) Driving the printing paper to move a preset length, and conveying the printing starting position of the printing paper to the The print position of the print head (131).
  10. 根据权利要求8所述的打印机,还包括上盖(20)、基座(21)和第三传感器(153);The printer according to claim 8, further comprising an upper cover (20), a base (21) and a third sensor (153);
    所述上盖(20)能够相对于所述基座(21)打开或闭合,当所述上盖(20)相对于所述基座(21)闭合时,所述上盖(20)与所述基座(21)之间形成所述输送通道(23),所述第三传感器(153)用于输出表示所述上盖(20)处于打开状态或闭合状态的信号;The upper cover (20) can be opened or closed relative to the base (21), and when the upper cover (20) is closed relative to the base (21), the upper cover (20) The conveying passage (23) is formed between the bases (21), and the third sensor (153) is configured to output a signal indicating that the upper cover (20) is in an open state or a closed state;
    其中,所述控制单元(10)还用于在检测到所述第一传感器(151)为有纸状态时,通过检测所述第三传感器(153)输出的信号检测所述上盖(20)是否处于闭合状态,当检测到所述上盖(20)处于闭合状态时,检测所述第二传感器(152)是否为有纸状态。The control unit (10) is further configured to detect the upper cover (20) by detecting a signal output by the third sensor (153) when detecting that the first sensor (151) is in a paper state. Whether it is in a closed state, when it is detected that the upper cover (20) is in a closed state, it is detected whether the second sensor (152) is in a paper state.
  11. 根据权利要求8所述的打印机,其中,所述控制单元(10)用于在检测到所述第二传感器(152)为有纸状态时,通过以下方式使所述打印纸的纸头到达所述第二传感器(152)的检测位置:The printer according to claim 8, wherein said control unit (10) is configured to cause said paper head of said printing paper to arrive at said paper when said second sensor (152) is detected to be in a paper state Detection position of the second sensor (152):
    所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸退纸一个预设距离时,检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为无纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The control unit (10) detects the state of the second sensor (152) every time the control unit (14) controls the printing unit to drive the paper to eject a predetermined distance, when the second sensor is detected ( 152) When the paper is in a paperless state, it is determined that the paper head of the printing paper reaches the detection position of the second sensor (152).
  12. 根据权利要求11所述的打印机,还包括指示单元(16),用于指示所述打印机的状态;A printer according to claim 11, further comprising an indication unit (16) for indicating a status of said printer;
    所述控制单元(10)还用于使用第一计数器对所述打印纸的退纸距离进行计数,所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸退纸一个预设距离时将所述第一计数器的计数值加1,当所述第一计数器的计数值等于第一预设计数值时如果还未检测到所述第二传感器(152)为无纸状态,控制所述指示单元(16)进行塞纸报警。The control unit (10) is further configured to count the paper ejection distance of the printing paper by using a first counter, and the control unit (10) controls the conveying unit (14) to drive the printing paper to eject one paper. When the preset distance is set, the count value of the first counter is incremented by 1. When the count value of the first counter is equal to the first pre-designed value, if the second sensor (152) has not been detected as being paperless, The indication unit (16) is controlled to perform a paper jam alarm.
  13. 根据权利要求8所述的打印机,其中,所述控制单元(10)用于在检测到所述第二传感器(152)为无纸状态时,通过以下方式使所述打印纸的纸头到达所述第二传感器(152)的检测位置:The printer according to claim 8, wherein said control unit (10) is configured to cause said paper head of said printing paper to arrive at said paper when said second sensor (152) is detected to be in a paperless state Detection position of the second sensor (152):
    所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸进纸一个预设距离时,检测所述第二传感器(152)的状态,当检测到所述第二传感器(152)为有纸状态时,判定所述打印纸的纸头到达所述第二传感器(152)的检测位置。The control unit (10) detects a state of the second sensor (152) every time the control unit (14) controls the printing unit to drive the printing paper to a predetermined distance, when the second sensor is detected ( 152) When the paper is in the paper state, it is determined that the paper head of the printing paper reaches the detection position of the second sensor (152).
  14. 根据权利要求13所述的打印机,还包括指示单元(16),用于指示所 述打印机的状态;The printer of claim 13 further comprising an indication unit (16) for indicating State the state of the printer;
    所述控制单元(10)还用于使用第二计数器对所述打印纸的进纸距离进行计数,所述控制单元(10)每控制所述输送单元(14)驱动所述打印纸进纸一个预设距离时将所述第二计数器的计数值加1,当所述第二计数器的计数值等于第二预设计数值时如果还未检测到所述第二传感器(152)为有纸状态,控制所述指示单元(16)进行塞纸报警。 The control unit (10) is further configured to count the paper feeding distance of the printing paper by using a second counter, and the control unit (10) controls the conveying unit (14) to drive the printing paper to feed one paper. When the preset distance is set, the count value of the second counter is incremented by 1. When the count value of the second counter is equal to the second pre-designed value, if the second sensor (152) is not detected to be in a paper state, The indication unit (16) is controlled to perform a paper jam alarm.
PCT/CN2016/095720 2015-08-25 2016-08-17 Method for controlling printer and printer WO2017032257A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510528943.6 2015-08-25
CN201510528943.6A CN106476453B (en) 2015-08-25 2015-08-25 A kind of control method and printer of printer

Publications (1)

Publication Number Publication Date
WO2017032257A1 true WO2017032257A1 (en) 2017-03-02

Family

ID=58099584

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095720 WO2017032257A1 (en) 2015-08-25 2016-08-17 Method for controlling printer and printer

Country Status (2)

Country Link
CN (1) CN106476453B (en)
WO (1) WO2017032257A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113858831A (en) * 2021-09-23 2021-12-31 厦门汉印电子技术有限公司 Printer paper fault elimination method and printer

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110228723A (en) * 2019-07-10 2019-09-13 威海新北洋技术服务有限公司 Sheet delivery and printer
CN111873641A (en) * 2020-06-30 2020-11-03 厦门汉印电子技术有限公司 Portable printer
CN113199879B (en) * 2021-05-17 2022-05-17 威海新北洋技术服务有限公司 Label peeling printing structure, label printer and control method
CN113860019B (en) * 2021-09-10 2024-06-04 珠海趣印科技有限公司 Logic control method and device for automatic calibration paper feeding device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05193228A (en) * 1992-01-17 1993-08-03 Janome Sewing Mach Co Ltd Printing device in slip printer
JPH08188308A (en) * 1995-01-09 1996-07-23 Fujitsu Ltd Method for positioning printing paper sheet
JPH08301483A (en) * 1995-04-28 1996-11-19 Canon Inc Image recording device
JPH1111742A (en) * 1997-06-23 1999-01-19 Brother Ind Ltd Sheet body conveying device
US5870114A (en) * 1992-02-12 1999-02-09 Canon Kabushiki Kaisha Image recording apparatus with improved conveying system for recording medium
CN101758664A (en) * 2008-12-22 2010-06-30 兄弟工业株式会社 ink-jet recording apparatus
CN103213410A (en) * 2013-04-22 2013-07-24 山东新北洋信息技术股份有限公司 Receipt paper cutting control device and receipt drawing machine

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05193228A (en) * 1992-01-17 1993-08-03 Janome Sewing Mach Co Ltd Printing device in slip printer
US5870114A (en) * 1992-02-12 1999-02-09 Canon Kabushiki Kaisha Image recording apparatus with improved conveying system for recording medium
JPH08188308A (en) * 1995-01-09 1996-07-23 Fujitsu Ltd Method for positioning printing paper sheet
JPH08301483A (en) * 1995-04-28 1996-11-19 Canon Inc Image recording device
JPH1111742A (en) * 1997-06-23 1999-01-19 Brother Ind Ltd Sheet body conveying device
CN101758664A (en) * 2008-12-22 2010-06-30 兄弟工业株式会社 ink-jet recording apparatus
CN103213410A (en) * 2013-04-22 2013-07-24 山东新北洋信息技术股份有限公司 Receipt paper cutting control device and receipt drawing machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113858831A (en) * 2021-09-23 2021-12-31 厦门汉印电子技术有限公司 Printer paper fault elimination method and printer
CN113858831B (en) * 2021-09-23 2022-12-20 厦门汉印电子技术有限公司 Printer paper fault elimination method and printer

Also Published As

Publication number Publication date
CN106476453B (en) 2019-10-11
CN106476453A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017032257A1 (en) Method for controlling printer and printer
JP5427502B2 (en) Paper discharge monitoring mechanism and paper discharge monitoring method for printing apparatus
JP4502004B2 (en) Medium feeding method and recording apparatus in recording apparatus
JP6362382B2 (en) Printing control apparatus and control method therefor
US20120055272A1 (en) Paper roll detection apparatus and method, and printer
JP4483941B2 (en) Medium feeding method and recording apparatus in recording apparatus
US10386771B2 (en) Image forming apparatus and method of controlling image forming apparatus
JP5050841B2 (en) Medium feeding method and recording apparatus in recording apparatus
JP2010241029A (en) Liquid ejecting apparatus
JP5208023B2 (en) Conveying apparatus and image forming apparatus
US8894065B2 (en) Printing apparatus and method for conveying sheet
JP2018130918A (en) Printer and printing control method
JP2006289887A (en) Method of loading recording paper of printer
JP6705260B2 (en) Inkjet recording device
JP2007160681A (en) Inkjet recording device, inkjet recording method, and program
JP5955058B2 (en) Sheet feeding apparatus, printing apparatus, and sheet processing apparatus
JP6565295B2 (en) Recording device
JP2006327066A (en) Image forming apparatus
JP2011051747A (en) Printer and end part detecting method of printing medium
JP2010202307A (en) Method for detecting recording paper and printer
JP2023090101A (en) Printer, and printer control method
JP2019130755A (en) Double-sided printing system
JP2013075764A (en) Image recorder
US20110236041A1 (en) Image forming device
JP2010110902A (en) Inkjet recording apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16838516

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16838516

Country of ref document: EP

Kind code of ref document: A1