Printer and printing control method

By introducing a combination of magnetoelectric sensors and magnets into the printer, the printing deviation problem caused by grating pollution is solved, and a more accurate and stable printing effect is achieved.

CN115503359BActive Publication Date: 2025-08-22HANNTO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211289363.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2025-08-22
Estimated Expiration
2042-10-20

AI Technical Summary

Technical Problem

In the prior art, the grating of the printer is contaminated, resulting in a deviation in the moving distance obtained by photoelectric induction, which affects the accuracy of the printing effect.

Method used

A magnet is provided on the encoding device, and a magnetoelectric sensor is installed at the corresponding position. The movement distance of the encoding device is determined by magnetoelectric induction. The control device calculates the position information of the printing nozzle based on the electrical signal for printing control.

Benefits of technology

The impact of grating pollution on photoelectric induction is avoided, the accuracy and stability of the printing effect are improved, and the printing offset and blurring are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115503359B_ABST
    Figure CN115503359B_ABST
Patent Text Reader

Abstract

The present invention provides a printer and a printing control method. The printer includes an encoding device, a magnetoelectric sensor, a control device, and a print head. The encoding device includes a first encoding component and a second encoding component. The first encoding component is provided with a grating, and the second encoding component is provided with a photoelectric sensor. The photoelectric sensor and the grating are used to generate photoelectric induction when components within the encoding device move relative to each other. The first encoding component is provided with a magnet; the second encoding component is provided with the magnetoelectric sensor. The magnetoelectric sensor and the magnet are used to generate magnetoelectric induction when components within the encoding device move relative to each other, and transmit the electrical signal generated by the magnetoelectric induction to the control device. The control device calculates the movement distance of the encoding device based on the electrical signal transmitted by the magnetoelectric sensor, and determines the position information of the print head based on the movement distance, thereby controlling printing according to the position information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the technical field of printers, and in particular to a printer and a printing control method. Background Art

[0002] Conventional printers use gratings installed on the internal encoder disk and encoder strip. A control module uses photoelectric sensing to determine the distance traveled by the encoder disk and encoder strip. This distance determines the current print head position, and the content to be printed at that position is then transmitted to the print head for printing. This traditional method can cause discrepancies in the distance traveled by the photoelectric sensing if the grating becomes contaminated. This can lead to deviations in the final position determination, resulting in offsets in the printed image and poor print quality. Summary of the Invention

[0003] To overcome the problems existing in the related art, this specification provides a printer and a printing control method, which improve the printing effect of the printer.

[0004] According to a first aspect of an embodiment of the present specification, a printer is provided, comprising: an encoding device, a magnetoelectric sensor, a control device, and a print head; the encoding device comprising a first encoding component and a second encoding component, the first encoding component being provided with a grating, and the second encoding component being provided with a photoelectric sensor; the photoelectric sensor and the grating being configured to generate photoelectric induction when the first encoding component moves relative to the second encoding component;

[0005] The first encoding component is provided with a magnet;

[0006] The magnetoelectric sensor is provided on the second encoding component, and the magnetoelectric sensor is provided at a position corresponding to the magnet.

[0007] The corresponding positions are such that when the first encoding component moves relative to the second encoding component, the magnet and the magnetoelectric sensor generate magnetoelectric induction; and the magnetoelectric sensor is used to transmit the electrical signal generated by the magnetoelectric induction to the control device;

[0008] The control device is used to calculate the moving distance of the encoding device according to the electrical signal after receiving the electrical signal transmitted by the magnetoelectric sensor, and determine the position information of the print head based on the moving distance, so as to perform printing control according to the position information.

[0009] According to a second aspect of an embodiment of this specification, a printing control method is provided, including:

[0010] The method is applied to a printer, which includes: an encoding device, a magnetoelectric sensor, a control device and a print head;

[0011] The encoding device includes: a first encoding component and a second encoding component, the first encoding component is provided with a grating, and the second encoding component is provided with a photoelectric sensor; the photoelectric sensor and the grating are used to generate photoelectric induction when the first encoding component moves relative to the second encoding component;

[0012] The first encoding component is provided with a magnet;

[0013] The magnetoelectric sensor is provided on the second encoding component, and the magnetoelectric sensor is provided at a position corresponding to the magnet;

[0014] The printing control method comprises:

[0015] When the first encoding component moves relative to the second encoding component, the magnetoelectric sensor generates magnetoelectric induction with the magnet;

[0016] The magnetoelectric sensor transmits the electrical signal generated by the magnetoelectric induction to the control device;

[0017] After receiving the electrical signal transmitted by the magnetoelectric sensor, the control device calculates the moving distance of the encoding device according to the electrical signal, determines the position information of the print head based on the moving distance, and performs printing control according to the position information.

[0018] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0019] In the embodiments of this specification, by adding a magnetoelectric sensor and providing a magnet on the encoding device, the magnetoelectric sensor can generate an electrical signal when the encoding device moves. The control device determines the distance the encoding device has moved based on the electrical signal transmitted by the magnetoelectric sensor, and determines the position information of the print head based on the movement distance. The control device then controls printing based on this position information. By using magnetoelectric induction to determine position information and perform printing control, this solution can avoid photoelectric signal anomalies caused by grating contamination, which can lead to offset and inaccurate printed content. Even if the grating is contaminated, it will not affect the magnetoelectric induction between the magnetoelectric sensor and the magnet. Therefore, the printed content will not be printed incorrectly due to contamination, and the printing effect will be more accurate and clear.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0022] Figure 1 This is a block diagram of a printer according to an embodiment of the present specification.

[0023] Figure 2 This is a hardware structure diagram of the printer in the embodiment of this specification.

[0024] Figure 3 This is a schematic diagram of the structure of the internal encoding disk of the printer according to an embodiment of the present specification.

[0025] Figure 4 This is a structural diagram of a coding strip and a carriage according to an embodiment of the present specification.

[0026] Figure 5 This is a flowchart of a printing control method according to an embodiment of the present specification. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of this specification, as detailed in the appended claims.

[0028] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. As used in this specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0029] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information without departing from the scope of this specification. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to determining."

[0030] In order to solve the problem of the printing effect being affected by the contamination of the grating of the printer, an embodiment of the present invention provides a printer. The printer of the embodiment of the present invention is described in detail below, but the present invention is not limited thereto.

[0031] In one embodiment, Figure 1 As shown, a printer, see Figure 1 The printer may include: an encoding device 101, a magnetoelectric sensor, a control device 102 and a print head 103.

[0032] Among them, such as Figure 1 As shown, the encoding device 101 may include a first encoding component 1011 and a second encoding component 1012. The first encoding component 1011 is provided with a grating, and the second encoding component 1012 is provided with a photoelectric sensor. The photoelectric sensor and the grating are used to generate photoelectric induction when the first encoding component 1011 moves relative to the second encoding component 1012.

[0033] For example, the first encoding component 1011 is an encoding disk, and the second encoding component 1012 is a frame. When the encoding disk and the frame move relative to each other, photoelectric induction is generated between the grating on the encoding disk and the photosensor on the frame. The photosensor transmits the electrical signal generated by this photoelectric induction to the control device 102. Based on this, the control device 102 can calculate the relative movement distance between the encoding disk and the frame within the encoding device 101. Based on this movement distance, the control device 102 determines the current longitudinal position of the print head 103 relative to the paper.

[0034] For another example, the first encoding component 1011 may be an encoding bar, and the second encoding component 1012 may be a carriage. When the carriage and encoding bar move relative to each other, photoelectric induction is generated between the grating on the encoding bar and the photoelectric sensor on the carriage. The photoelectric sensor transmits the electrical signal generated by this photoelectric induction to the control device 102. Based on this electrical signal, the control device 102 can calculate the relative movement distance between the encoding bar and the carriage within the encoding device 101. Based on this movement distance, the control device 102 can determine the horizontal position of the print head 103 relative to the paper.

[0035] The printer of this embodiment has a magnet added to the first encoding component 1011 and a magnetoelectric sensor added to the second encoding component 1012. Furthermore, the magnetoelectric sensor is positioned corresponding to the magnet. This corresponding position enables magnetoelectric induction between the magnet and the magnetoelectric sensor when the first encoding component within the encoding device moves relative to the second encoding component. Furthermore, the magnetoelectric sensor is configured to transmit the electrical signal generated by this magnetoelectric induction to the control device, allowing the control device to control the printer's printing operation based on the electrical signal generated by the magnetoelectric induction.

[0036] Furthermore, in the printers of the embodiments of this specification, the magnetoelectric induction device consisting of the magnetoelectric sensor and magnet may be installed only on the encoder disk and frame, only on the carriage and encoder strip, or both on the "encoder disk and frame" and "carriage and encoder strip" of the printer. This embodiment of this specification does not limit this.

[0037] Figure 2 Taking the first encoding component 1011 as the encoding disk 22 and the second encoding component 1012 as the frame 21 as an example, the arrangement of the magnet and the magnetoelectric sensor is exemplified. Figure 2 As shown, the encoder disk 22 and the frame 21 included in the printer are shown. Figure 3 This is a schematic diagram of the structure of the printer's internal encoding disk

[0038] Among them, a plurality of magnets are provided on the encoding disk 22, for example, magnet 222, magnet 223, magnet 224, etc. Figure 2 and Figure 3 As shown, for example, the encoder disk 22 further includes a circularly arranged grating 221, and the plurality of magnets may be arranged parallel to the grating 221. The parallel arrangement herein may be arranged in the same circular pattern inside the grating 221. Furthermore, the magnets are positioned on the encoder disk 22 such that when the encoder disk 22 rotates, the magnetoelectric sensor generates an electrical signal due to magnetoelectric induction. The density of the magnets can be adjusted based on specific circumstances, with varying densities resulting in varying precision and costs.

[0039] In one example, the plurality of magnets may be arranged at equal intervals, which will facilitate calculations of the subsequent control device, and the specific calculation method will be described later.

[0040] like Figure 2As shown, the frame 21 is located above the encoding disk 22, and a magnetoelectric sensor 211 is provided on the frame 21. The magnetoelectric sensor can be a Hall element, which is not limited here. In addition, a photoelectric sensor 212 is also provided on the frame 21. The photoelectric sensor 212 can be set at a position corresponding to the grating 221 on the encoding disk 22, that is, when the encoding disk 22 rotates, the grating 221 on the encoding disk can cause the intensity of light received by the photoelectric sensor 212 to change, thereby enabling the photoelectric sensor 212 to generate photoelectric induction. Similarly, the magnetoelectric sensor 211 is also provided at a position corresponding to the multiple magnets on the encoding disk 22. This corresponding position enables the magnetoelectric sensor 211 to generate an electrical signal due to magnetoelectric induction when the encoding disk 22 rotates.

[0041] like Figure 2 As shown, by setting a magnet on the encoding disk 22 and setting a magnetoelectric sensor on the frame 21, when the encoding disk moves, the magnet can generate magnetoelectric induction with the magnetoelectric sensor, and the magnetoelectric sensor can generate an electrical signal through magnetoelectric induction and transmit the electrical signal to the control device 102.

[0042] Figure 4 Taking the first encoding component 1011 as the encoding bar 31 and the second encoding component 1012 as the carriage 32 as an example, the arrangement of the magnet and the magnetoelectric sensor is explained. Figure 4 As shown, the code strip 31 and the carriage 32 included in the printer are shown.

[0043] On one side of the encoder bar 31 is a horizontally arranged grating 311, and on the other side are horizontally arranged magnets 312, 313, 314, etc., with the multiple magnets arranged parallel to the grating. The density of the magnets can be adjusted according to the specific situation, and different density levels provide different precision and required costs. In one example, the multiple magnets can be arranged at equal intervals. This equal spacing makes it easier to calculate the relative movement distance between the encoder bar 31 and the carriage 32. The specific calculation method will be described in the subsequent processing of the control device.

[0044] like Figure 4As shown, a carriage 32 is disposed above the encoding strip 31. A photoelectric sensor 321 and a magnetoelectric sensor 322 are disposed on the carriage 32. The photoelectric sensor 321 is positioned corresponding to the encoding strip. Specifically, when the carriage 32 moves, the photoelectric sensor 321 on the carriage generates an electrical signal based on changes in the intensity of light passing through the grating 311. Similarly, the magnetoelectric sensor 322 is also positioned corresponding to the magnet 3122 on the encoding strip 31. Specifically, when the carriage 32 moves, the magnetoelectric sensor 322 generates an electrical signal due to magnetic induction. After generating the electrical signal, the magnetoelectric sensor 322 transmits the electrical signal to the control device 102.

[0045] As mentioned above, the embodiment of this specification improves the encoding device 101 of the printer, a magnet is set on the first encoding component of the encoding device, and a magnetoelectric sensor is set on the second encoding component, and magnetoelectric induction occurs when the magnetoelectric sensor and the magnet move relative to each other. The magnetoelectric sensor generates an electrical signal due to the magnetoelectric induction and transmits the electrical signal to the control device 102.

[0046] Please continue to refer to Figure 1 Next, let’s look at the control device 102 in the printer. After receiving the electrical signal transmitted by the magnetoelectric sensor, the control device 102 can calculate the moving distance of the first encoding component relative to the second encoding component inside the encoding device based on the electrical signal, determine the position information of the print head 103 based on the moving distance, and perform printing control based on the position information.

[0047] The print head 103 receives the printing information transmitted by the control device and performs printing.

[0048] Among them, as mentioned above, when the magnet is set in the first encoding component, it can be a plurality of magnets spaced apart from each other. Therefore, when the magnet and the magnetoelectric sensor move relative to each other, the magnetic field sensed by the magnetoelectric sensor will change intermittently. This change will cause the electrical signal generated by the magnetoelectric sensor to change. The control device can determine the relative movement distance between the first encoding component and the second encoding component based on the number of times the electrical signal changes and the spacing positions of the magnets.

[0049] Take the first encoding component as an encoding disk and the second encoding component as a magnet as an example. Figure 2As shown, in this example, the magnets on the encoder disk can be arranged at equal intervals. Since the magnets on the encoder disk are arranged at equal intervals, when the encoder disk rotates, the magnetoelectric induction device on the frame will undergo regular changes in the magnetic field at equal intervals, thereby generating an electrical signal that changes at equal intervals. Every time the electrical signal of the magnetoelectric sensor changes after one cycle, it can be understood that the encoder disk has rotated by a fixed angle, which corresponds to the spacing between the magnets on the encoder disk. The circumference of the encoder disk corresponding to this angle is the distance the encoder disk moves in one cycle. Because the encoder disk drives the paper in the printer to move longitudinally, the control device can directly multiply the number of changes in the electrical signal by the distance the encoder disk moves in each change cycle to obtain the arc length corresponding to the current encoder disk rotation angle. Based on this arc length, the control device determines the current longitudinal position of the print head relative to the paper.

[0050] For example, the first encoding component is an encoding strip and the second encoding component is a magnet. In this example, the magnets on the encoding strip can also be arranged at equal intervals. Figure 4 As shown, during the printing process, the position of the encoding strip is fixed, and the carriage moves laterally along the encoding strip, and the carriage carries a print head. The function of the encoding strip is to determine the lateral position of the current print head relative to the paper. The determination method is as follows: during printing, the carriage carrying the print head moves laterally along the encoding strip, and the magnetoelectric sensor carried by the carriage generates an electrical signal that changes at equal intervals when passing through magnets set at equal intervals. This electrical signal changes periodically, and each cycle indicates that the carriage has passed a magnet on the encoding strip. The control device multiplies the number of times the electrical signal changes by the spacing between the magnets to obtain the movement distance of the carriage relative to the encoding strip. Based on this distance, the control device determines the lateral position of the current print head relative to the paper.

[0051] In the two examples above, we can see that evenly spaced magnets make the controller's distance calculation process simpler and faster. Different printers may require different positioning information. For example, some printers may only print in portrait orientation, others only in landscape orientation, or a combination of both. This allows for specific printer settings.

[0052] The printer of the above embodiment is equipped with a magnet and a magnetoelectric sensor, so that the electrical signal generated by magnetoelectric induction can be used for printing control. This magnetoelectric induction is not affected by grating contamination or damage, thereby avoiding problems such as printing deviation and blurring caused by grating contamination, damage, etc. Therefore, using magnetoelectric induction for printing control can effectively improve the stability of position information acquisition during printing and reduce the possibility of printing deviation.

[0053] As described above, the printer controls printing based on the electrical signal from the magnetic induction, and may continue to do so. In another example, given that the accuracy of photoelectric sensing is higher than that of magnetic induction, to improve printing accuracy, the printer may initially control printing based on photoelectric sensing, then switch to magnetic induction when the electrical signal from the photoelectric sensing is abnormal, and then switch back to photoelectric sensing for printing control when the electrical signal from the photoelectric sensing returns to normal.

[0054] For both encoder disks and encoder strips, the principle of using photoelectric sensing to determine position information is the same. Here, taking the encoder disk as an example, when the printer uses photoelectric sensing to control printing, the principle is as follows:

[0055] Likewise Figure 2 For example, when the encoding disk rotates, the grating on the encoding disk rotates accordingly. The photoelectric sensor on the rack corresponding to the grating changes the intensity of the received light, and the electrical signal generated by the photoelectric induction also changes.

[0056] The period of this electrical signal's variation is related to the length of the grating. The grating is composed of alternating transparent sections that allow light to pass through and opaque sections that do not. As the grating moves, the alternating transparent and opaque sections cause the intensity of light passing through the grating to alternate. When the light is strong, the electrical signal generated by the photoelectric sensor is strong, and when the light is weak, the light intensity is weak.

[0057] Therefore, as the intensity of the light passing through the grating periodically fluctuates, the photoelectric sensor also undergoes periodic fluctuations in intensity. The time it takes for the electrical signal to change from strong to weak and then strong again is called a cycle. After the electrical signal undergoes a cycle of change, it can be understood that the encoder disk has rotated an angle corresponding to the distance between the transparent and opaque gratings. This angle can be used to determine the arc length of the encoder disk movement corresponding to each electrical signal cycle. The arc length corresponding to each electrical signal cycle is pre-set in the control device. By multiplying the number of electrical signal changes by the corresponding arc length, the longitudinal distance of the paper moved by the encoder disk can be calculated.

[0058] In this improved example, we call the electrical signal generated by photoelectric induction a photoelectric signal, and the electrical signal generated by magnetoelectric induction a magnetoelectric signal. We first use a combination of photoelectric induction and magnetoelectric induction to perform printing control, that is, we first use the photoelectric signal for printing control, and when the photoelectric signal is in an abnormal state, we use the magnetoelectric signal for printing control, until the photoelectric signal returns to normal, and then continue to use the photoelectric signal for printing control.

[0059] For the determination of the abnormal state and normal state of the photoelectric signal, we can make settings based on the corresponding change cycle of the photoelectric signal mentioned above. The photoelectric sensor will generate a periodically changing photoelectric signal due to the movement of the grating. According to the time required for the electrical signal generated by the photoelectric sensor to change from a peak value to the next peak value, that is, the time it takes for the electrical signal to change for one cycle, a time threshold is pre-set. This time threshold is related to the change cycle of the electrical signal generated by the photoelectric sensor, but does not need to be exactly the same. It is set according to the specific situation and is not limited here. When the time required for the photoelectric signal to change for one cycle is greater than this time threshold, the control device determines that the photoelectric signal is in an abnormal state. When the time required for the photoelectric signal to change for one cycle returns to within this threshold, the control device determines that the current photoelectric signal has returned to a normal state.

[0060] When the printing control mode is switched, the position information obtained by the previous control mode can be called the current position information, and the moving distance of the switched encoding disk or encoding bar is added to the previous position information to obtain the real-time position information.

[0061] For example, the control device first determines the position of the print head relative to the paper using a photoelectric signal. When it switches to determining the position using a magnetoelectric signal, the relative movement distance of the encoder disk or encoder strip determined by the magnetoelectric signal can be added to the position before the photoelectric signal abnormality to obtain the current position information. This method is also used when switching. It should be noted that the control device continuously receives both photoelectric and magnetoelectric signals. The specific signal used to determine the position of the print head needs to be determined according to the above rules. Even if the photoelectric signal abnormality occurs, it will continue to receive the signal because it will be used again when the photoelectric signal recovers.

[0062] The printer uses a combination of photoelectric and magnetoelectric signals for print control. This not only achieves greater accuracy through the photoelectric signal, but also utilizes the magnetoelectric signal to control print when optical signal anomalies occur, resulting in more stable printing. This significantly avoids print offset issues caused by grating contamination.

[0063] The embodiment of this specification also provides a printing control method, which is applied to Figure 1 The virtual device shown in FIG. 1 is a flowchart of the steps of the method. Figure 5 As shown, the method may include the following steps:

[0064] S501: When the first encoding component and the second encoding component inside the encoding device move relative to each other, the magnet and the magnetoelectric sensor generate magnetoelectric induction, and the magnetoelectric sensor transmits an electrical signal to the control device.

[0065] S502: The control device receives the electrical signal transmitted by the magnetoelectric sensor, calculates the relative movement distance between the internal components of the encoding device based on the electrical signal, and determines the position information of the print head based on the movement distance. The control device sends control information to the print head based on the position information.

[0066] S503: The print head receives the control information sent by the control device and performs printing.

[0067] In step S501, when the first encoding component is an encoding disc and the second encoding component is a frame, and the encoding disc moves relative to the frame, a magnetoelectric sensor on the frame can generate an electrical signal through magnetoelectric induction and transmit the electrical signal to a control device, which then determines the longitudinal position information of the paper. When the first encoding component is an encoding bar and the second encoding component is a carriage, and the carriage moves relative to the encoding bar, a magnetoelectric sensor on the carriage can generate an electrical signal through magnetoelectric induction and transmit the electrical signal to a control device, which then determines the transverse position information of the paper.

[0068] In step S502, the control device receives the electrical signal transmitted by the magnetoelectric sensor, calculates the relative movement distance between the first encoding component and the second encoding component inside the encoding device based on the electrical signal, and determines the position information of the print head based on the movement distance. The control device sends control information to the print head based on the position information.

[0069] The control device calculates the movement distance and performs printing control in the following manner: when the magnets are arranged with a certain spacing between them, the control device multiplies the number of changes in the electrical signal by the spacing between the magnets to obtain the movement distance between the first and second encoding components. Based on this movement distance, the control device determines the position of the print head on the current carriage relative to the paper. Based on this position information, the control device determines the content to be printed at this position and transmits the content to be printed by the print head as control information to the print head, causing the print head to print according to the control information.

[0070] In step S503, the print head receives the control information sent by the control device and performs printing.

[0071] The print head is located on the carriage. As the carriage moves, the position of the print head relative to the paper changes. The content to be printed varies at different positions. The print head prints the content based on control information sent by the control device. The control information is the current position of the print head determined by the encoder's movement distance. The control device determines the content to be printed at this position based on this position information and transmits this content to the print head as control information. After receiving this control information, the print head prints.

[0072] Based on the above method, the printing method can also be improved as follows: the control device can first control the printer based on the photoelectric signal. When the photoelectric signal is abnormal, the magnetoelectric signal is used to obtain the current position of the print head to control printing. After the photoelectric signal returns to normal, the photoelectric signal is again used to determine the specific position of the print head and print again. The determination of abnormality and normalization of the photoelectric signal corresponds to the method described in the device section of the specification and will not be elaborated here.

[0073] The printing method is used to control the printing of the printer, which not only has the accuracy of the photoelectric signal, but also can effectively avoid the phenomenon of printing content deviation caused by grating pollution, thereby enhancing the printing effect.

[0074] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0075] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0076] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0077] Other embodiments of the present invention will readily occur to those skilled in the art after considering the present invention and practicing the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this specification and include common knowledge or customary techniques in the art that are not claimed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present invention being indicated by the following claims.

[0078] It should be understood that the present description is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0079] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A printer, characterized in that: The printer includes: an encoding device, a magnetoelectric sensor, a control device and a printing nozzle; The encoding device includes: a first encoding component and a second encoding component, wherein the first encoding component is provided with a grating, and the second encoding component is provided with a photoelectric sensor; the photoelectric sensor and the grating are used to generate photoelectric induction when the first encoding component moves relative to the second encoding component; and the photoelectric sensor is used to transmit the electrical signal of the photoelectric induction to the control device; The first encoding component is further provided with a magnet; The second encoding component is further provided with the magnetoelectric sensor, and the magnetoelectric sensor is arranged at a position corresponding to the magnet, and the corresponding position enables the magnetoelectric induction to be generated between the magnet and the magnetoelectric sensor when the first encoding component moves relative to the second encoding component; and the magnetoelectric sensor is used to transmit the electrical signal generated by the magnetoelectric induction to the control device; The control device is configured to, upon detecting that the received electrical signal of the photoelectric sensor is in an abnormal state, calculate the movement distance of the encoding device according to the electrical signal transmitted by the magnetoelectric sensor after receiving the electrical signal transmitted by the magnetoelectric sensor, and determine the position information of the print head based on the movement distance, so as to perform printing control according to the position information; The control device is also used to stop calculating the moving distance of the encoding device based on the received electrical signal transmitted by the magnetoelectric sensor when it is detected that the received photoelectric sensing electrical signal has recovered from an abnormal state to a normal state, and switch to calculating the moving distance of the encoding device based on the photoelectric sensing electrical signal.

2. The printer according to claim 1, wherein: The abnormal state is: the change time of the electrical signal of the photoelectric sensor exceeds a preset time threshold, and the change time of the electrical signal is the time for one cycle of the electrical signal change; The normal state is that the change time of the electrical signal of the photoelectric sensor is within a preset time threshold.

3. The printer according to claim 1, wherein: The first encoding component is an encoding disc, and the second encoding component is a frame of the encoding disc; or; The first encoding component is an encoding bar, and the second encoding component is a carriage.

4. The printer according to claim 1, wherein The number of magnets provided on the first encoding component is multiple; The arrangement positions of the plurality of magnets on the first encoding component are parallel to the arrangement position of the grating; and the plurality of magnets are arranged at equal intervals.

5. A printing control method, characterized in that: The method is applied to a printer, which includes: an encoding device, a magnetoelectric sensor, a control device and a print head; The encoding device includes: a first encoding component and a second encoding component, wherein the first encoding component is provided with a grating, and the second encoding component is provided with a photoelectric sensor; the photoelectric sensor and the grating are used to generate photoelectric induction when the first encoding component moves relative to the second encoding component; and the photoelectric sensor is used to transmit the electrical signal of the photoelectric induction to the control device; The first encoding component is further provided with a magnet; The second encoding component is further provided with the magnetoelectric sensor, and the magnetoelectric sensor is arranged at a position corresponding to the magnet; The printing control method comprises: When the first encoding component moves relative to the second encoding component, the magnetoelectric sensor generates magnetoelectric induction with the magnet; The magnetoelectric sensor transmits the electrical signal generated by the magnetoelectric induction to the control device; When the control device detects that the received electrical signal of the photoelectric sensor is in an abnormal state, the control device calculates the movement distance of the encoding device according to the electrical signal transmitted by the magnetoelectric sensor after receiving the electrical signal transmitted by the magnetoelectric sensor, determines the position information of the print head based on the movement distance, and performs printing control according to the position information; When the control device detects that the received photoelectric sensing electrical signal has returned to a normal state from an abnormal state, it stops calculating the moving distance of the encoding device based on the received electrical signal transmitted by the magnetoelectric sensor, and switches to calculating the moving distance of the encoding device based on the photoelectric sensing electrical signal.

6. The method according to claim 5, characterized in that The detecting that the received photoelectric sensing electrical signal is in an abnormal state includes: Detecting a change time of the received photoelectrically sensed electrical signal; In response to the change time of the electrical signal exceeding a preset time threshold, it is determined that the photoelectrically sensed electrical signal is in an abnormal state.

Citation Information

Patent Citations

  • Magneto-electric mixing type absolute value encoder

    CN105180976A

  • Printer ribbon identification sensor

    CN1209776A