A printing processing method, apparatus and device
By acquiring the position information of the printing carriage and the image width, and using a filtering error detection algorithm, the problem of low printing accuracy caused by the skewed placement of the object to be printed was solved, achieving high-precision and efficient printing processing.
Patent Information
- Application Number
- CN202411739193.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In existing technologies, the placement of the object to be printed is prone to skew, which causes the printed image to shift, affecting printing accuracy and efficiency, and is particularly difficult to apply in high-precision printing applications.
By acquiring the position information and image width of the printing carriage, a filtering error detection algorithm is used to determine the effective triggering of the sensor, record the coordinates, calculate the media width based on the coordinates, and perform split or merge printing processing to ensure the accuracy of the initial position of the printing carriage and reduce the influence of external interference.
It improves printing accuracy and efficiency, ensures the accurate initial position of the printing carriage, reduces errors in the width measurement process, enables multi-copy or spliced printing, and improves overall printing quality and speed.
Smart Images

Figure CN119550739B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printing technology, and more particularly to a printing processing method, apparatus, and device. Background Technology
[0002] In flatbed or roll-to-roll printing, the paper, glass, cardboard, or other objects to be printed are typically placed close to the edge of the guide belt. The printing area is then positioned on the object according to the guide belt edge and printing requirements, and the printhead is controlled to print in that area.
[0003] However, if the object to be printed is placed at an angle, the printed image will be misaligned, resulting in lower printing accuracy. In practical applications, various factors can cause placement deviations, such as accidental contact when placing the object on the printing platform, accumulated mechanical vibrations, or airflow caused by personnel moving nearby. Therefore, the current positioning method of placing the object against the guide strip edge is unsuitable for printing operations requiring high accuracy. Summary of the Invention
[0004] The purpose of this invention is to provide a printing processing method, apparatus, and device for improving printing accuracy and efficiency when printing on multiple printing media.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] In a first aspect, the present invention provides a printing processing method, comprising:
[0007] When measuring the width of multiple printing media, the position information of the printing carriage and the image width of multiple printed images are obtained;
[0008] The printing carriage is controlled to move along the movement direction based on the initial position in the position information; the initial position is the width measurement start position; the movement direction is parallel to the width direction of the printing medium.
[0009] A preset filtering error detection algorithm is used to determine whether each trigger of the sensor on the printing carriage meets the valid triggering condition. If each trigger of the sensor meets the valid triggering condition, the N coordinates corresponding to the N triggers in the width measurement process are recorded; where N is an even number.
[0010] Based on the N coordinates, the width of each printing medium is determined;
[0011] After the width measurement is completed, based on the dimensional relationship between the media width and the image width, the multiple printed images are split for printing or merged for printing.
[0012] Compared with existing technologies, the printing method provided by this invention controls the movement of the printing carriage based on the initial position, which can avoid some manual errors before width measurement, such as the printing carriage not being at the width measurement start position but on the printing medium. By determining the width measurement start position, the accuracy of width measurement can be improved, thereby improving printing precision. During the width measurement process, a preset filtering error detection algorithm is also used to determine whether each trigger of the sensor meets the valid trigger conditions. Only when all are valid are all coordinates recorded and the media width calculated. This can avoid other external interference affecting the position of the printing medium during the width measurement process, because after the position is determined, the image needs to be printed. If the position of the printing medium moves, it will affect the accuracy of subsequent image printing and thus the overall printing precision. Finally, based on the dimensional relationship between the media width and the image width, the printed image is split for printing or merged for printing, which can improve printing efficiency.
[0013] In a second aspect, the present invention also provides a printing processing apparatus, comprising:
[0014] The acquisition module is used to acquire the position information of the printing carriage and the image width of multiple printed images when measuring the width of multiple printing media;
[0015] The control module is used to control the printing carriage to move along the movement direction based on the initial position in the position information; the initial position is the width measurement start position; the movement direction is parallel to the width direction of the printing medium;
[0016] The first determining module is used to determine whether each trigger of the sensor on the printing carriage meets the valid triggering condition by using a preset filtering error detection algorithm. If each trigger of the sensor meets the valid triggering condition, the N coordinates corresponding to the N triggers in the width measurement process are recorded; where N is an even number.
[0017] The second determining module is used to determine the width of each printing medium based on the N coordinates;
[0018] The printing processing module is used to perform split printing or merge printing processing on the multiple printed images based on the dimensional relationship between the width of the medium and the width of the image after the width measurement is completed.
[0019] Thirdly, the present invention also provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus; wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program that can be executed by the processor; when the processor runs the computer program, it executes the above-described printing processing method. Attached Figure Description
[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0021] Figure 1 A schematic flowchart of a printing processing method provided in one embodiment of the present invention;
[0022] Figure 2 A schematic diagram of a printing device provided according to an embodiment of the present invention;
[0023] Figure 3 A schematic diagram illustrating the state of a printing device recording coordinates, provided as an embodiment of the present invention;
[0024] Figure 4 A schematic diagram illustrating the algorithm of a preset filtering error detection algorithm provided for an embodiment of the present invention;
[0025] Figure 5 A schematic flowchart illustrating the width measurement process provided in one embodiment of the present invention;
[0026] Figure 6 A schematic diagram of the states of multiple objects to be printed provided in one embodiment of the present invention;
[0027] Figure 7 A schematic diagram of the structure of a printing processing apparatus provided in one embodiment of the present invention;
[0028] Figure 8 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention. Detailed Implementation
[0029] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0030] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0031] In this invention, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between the associated objects, indicating that three relationships can exist.
[0032] like Figure 1 As shown, an embodiment of the present invention provides a printing processing method, which may include:
[0033] Step 110: When measuring the width of multiple printing media, obtain the position information of the printing carriage and the image width of multiple printed images;
[0034] First, it should be noted that the printing processing method in this embodiment of the invention includes at least two printing modes: the first printing mode is a planar printing mode, and the second printing mode is a roll printing mode.
[0035] The following example uses the first printing mode, namely flatbed printing mode, to illustrate the technical solution and details.
[0036] Secondly, it should be noted that the printing processing method in this embodiment of the invention is applied to the corresponding printing device. The printing device in the planar printing mode includes at least a printing carriage, a printing platform, a sensor, and a grating ruler.
[0037] like Figure 2 As shown, multiple printing media, such as Media 1, Media 2 through Media 5, can be placed on the printing platform. For example, the printing media can be paper. That is, the printing carriage can print images on multiple printing media. Sensors are mounted on the printing carriage, and the sensors are configured such that the light emitted by the sensors is perpendicular to the printing media. This way, the sensors move with the printing carriage as it moves. The printing platform and the printing media do not move.
[0038] The grating ruler on the printing equipment is used to read the coordinates of the printing carriage's position. The printing equipment can obtain the position information of the printing carriage through the grating ruler. The grating ruler is parallel to the surface of the printing platform. The working principle of the grating ruler can be found in relevant technologies, and will not be elaborated here.
[0039] The entire printing process requires the printing carriage to move in two stages. The first stage corresponds to the measurement of the width of the printing medium, and the second stage corresponds to the printing of the image after the width measurement is completed.
[0040] The working principle of the sensor is: to emit light signals to an object located below the sensor, and to receive light signals reflected back from the object located below the sensor. The object below can be a printing platform or a printing medium, and different objects will reflect back different light signals.
[0041] It should be noted that in this embodiment of the invention, if the object below is the ground, there will be no reflected light signal.
[0042] Understandably, after receiving the reflected light signal, the sensor converts it into a corresponding electrical signal. For example, it can convert the light signal reflected from the printing platform into a low level, and the light signal reflected from the printing medium, such as paper, into a high level. Moreover, when the sensor moves from the printing platform to the printing medium, the electrical signal can switch from a low level to a high level, and when the sensor moves from the printing medium to the printing platform, the electrical signal can switch from a high level to a low level.
[0043] The above also relates to the first trigger (first trigger behavior) and second trigger (second trigger behavior) of the sensor mentioned in subsequent steps. The first trigger indicates that the sensor receives a light signal reflected back from the printing platform or printing medium. In other words, the sensor generates a first trigger as long as it acquires either a high-level or low-level electrical signal. The second trigger indicates a change in the electrical signal acquired by the sensor. Specifically, the sensor generates a second trigger when the acquired electrical signal changes from a high level to a low level, and vice versa.
[0044] Optionally, this embodiment of the invention does not specifically limit the type of sensor; it can utilize a combination of a grating sensor and a color sensor to measure the width of the object to be printed. The grating reader and color sensor can be mounted on the printing carriage, moving with the carriage along a direction parallel to the printer's crossbeam. The color sensor is mounted perpendicular to the printing platform plane, and the grating reader is mounted perpendicular to the plane of the grating ruler. Alternatively, both the grating ruler and the printing carriage can be mounted on the crossbeam. The length of the grating ruler should be greater than or equal to the length of the area to be printed, i.e., the length of the moving area of the printing carriage. It is understood that during the movement of the printing carriage, there can be two working states: printing and width measurement. These two working states must be executed separately and independently. When the printing carriage is in printing mode, the printhead mounted on the carriage performs inkjet printing according to the printing data received from the host computer. When the printing carriage is in width measurement mode, the color sensor mounted on the carriage is activated for detection. Since the colors of the object to be printed and the printing platform are different, the light signals detected by the color sensor are different. When the color sensor detects a change in the light signal, it will generate a level jump. The grating read head responds to the level jump sent by the color sensor to read the coordinate data on the grating ruler, and sequentially uses the coordinate difference between the first and second coordinates as the width of the first object to be printed, the coordinate difference between the third and fourth coordinates as the width of the second object to be printed, and so on, to obtain the width and position of all objects to be printed placed on the printing platform.
[0045] Step 110 presupposes the measurement of the width of multiple printing media. This width measurement process is one of the key improvements in this embodiment of the invention. The reason for measuring the width of multiple printing media is twofold: first, without width measurement, if even one piece of paper is misplaced and does not meet the set width, the entire printing process needs to be restarted, reducing overall printing efficiency; second, in some special printing scenarios, the width of the printed image may not match the set width of the paper, requiring replacement with paper that meets the parameter requirements. This replacement process necessitates stopping printing, thus affecting printing accuracy and efficiency. In summary, the width measurement process for multiple printing media in this embodiment of the invention needs to improve accuracy.
[0046] It should be noted that, assuming the printing carriage moves in the x-axis direction, the Y-axis of the printing device must be stationary before width measurement, because if the Y-axis is in motion, the test results may be inaccurate.
[0047] Step 120: Based on the initial position information, control the printing carriage to move along the movement direction; the initial position is the width measurement start position; the movement direction is parallel to the width direction of the printing medium;
[0048] It should be emphasized that the initial position of the printing carriage is the width measurement start position, which indicates that there is a preset distance between the initial position of the printing carriage and the printing platform.
[0049] Understandably, the printing carriage must have an initial position during the width measurement process. The reason this initial position (the starting position of the side width) is specifically mentioned in this embodiment of the invention, and the printing device is set to control the movement of the printing carriage based on this initial position, is because the inventors discovered that before performing the width measurement operation in actual work, operators often mistakenly place the printing carriage arbitrarily in a position, which may very well be above the paper. Understandably, the printing device cannot accurately measure the width of the printing medium without knowing the edge position of the paper, let alone print the image on the paper without knowing the edge position. Therefore, such operator errors necessitate readjusting the initial position of the printing carriage in actual production, which wastes time and reduces printing efficiency. Since the printing carriage can measure the width of the paper and print the image more accurately when it is at a certain distance from the printing platform, in this embodiment of the invention, in order to avoid the above-mentioned misoperation before printing in the prior art, a fixed initial position is directly set so that this initial position, that is, the width measurement start position, is at a certain preset distance from the printing platform, and the printing carriage only starts to move at this width measurement start position. This ensures that the initial position of the printing carriage is absolutely not on the printing medium, thereby achieving a more accurate measurement of the width of the paper.
[0050] Based on the above analysis, in order to ensure that the initial position of the printing carriage is the starting position for width measurement, the following steps need to be performed before step 120:
[0051] When the printing carriage is in the initial position, it is determined whether the sensor has generated a first trigger; the first trigger indicates that the sensor has received a light signal reflected back from the printing platform or the printing medium.
[0052] If the sensor does not generate the first trigger, the printing carriage is controlled to move along the direction of movement;
[0053] If the sensor generates the first trigger, the printing carriage is controlled to move to the initial position.
[0054] Understandably, if the sensor does not generate the first trigger, it indicates that the sensor's actual position before moving was not above the printing platform. In other words, the sensor's actual position before moving was at a preset distance from the printing platform. At this time, the printing carriage can be controlled to move along the direction of movement.
[0055] Based on the stop position in the location information, the printing carriage is controlled to stop moving; the stop position is the width measurement end position. That is, when the printing carriage moves to the width measurement end position during the width measurement process, it can stop moving, and the width measurement ends.
[0056] If the sensor triggers its first detection, meaning it receives a light signal reflected from the printing platform or printing media, it indicates that the sensor's actual position before movement might have been above the printing platform, potentially causing subsequent width measurement failure. In this case, the printing carriage needs to be moved to the designated initial position. Another scenario is that if the sensor triggers its first detection, but upon inspection, it is found that the sensor is indeed at the designated initial position, then this trigger may indicate a machine malfunction in the printing equipment, requiring immediate troubleshooting.
[0057] Step 130: Using a preset filtering error detection algorithm, determine whether each trigger of the sensor on the printing carriage meets the valid triggering conditions. If each trigger of the sensor meets the valid triggering conditions, record the N coordinates corresponding to the N triggers during the width measurement process; where N is an even number.
[0058] Understandably, the valid triggering condition is used to verify the validity of the second trigger. Therefore, step 130 specifically includes:
[0059] (1) When the sensor triggers the second time, a preset number of electrical signals are continuously collected by the sensor; the electrical signals are either high level or low level; wherein, the second trigger indicates that the electrical signals collected by the sensor have changed.
[0060] (2) Based on a preset number of electrical signals, determine whether the second trigger of the sensor is effective.
[0061] In step (2), there are two cases. The first case is: if the electrical signal changes from low level to high level, and a preset number of electrical signals are all at high level, then the second trigger of the sensor is determined to be valid. The second case is: if the electrical signal changes from high level to low level, and a preset number of electrical signals are all at low level, then the second trigger of the sensor is determined to be valid.
[0062] Of course, if each trigger of the sensor meets the valid triggering conditions during the width measurement process, record the N coordinates corresponding to the N triggers during the width measurement process, that is, record the corresponding coordinates after each valid trigger.
[0063] Combination Figure 3 and Figure 4Step 130 is illustrated by way of example, assuming a preset quantity of 10. When the printing carriage moves from its initial position to the printing platform, the sensor on the printing carriage receives the light signal reflected back from the printing platform and converts it into a corresponding electrical signal: a low level (0). During the movement of the printing carriage on the printing platform, the electrical signal remains low; when the printing carriage moves from the printing platform to... Figure 3 When the printing carriage moves to the left edge of medium 1, the electrical signal changes from low level 0 to high level 1. At this time, starting from the first high level, the sensor will continuously collect the electrical signal 10 times. If the electrical signal is high for 10 consecutive times, it indicates that the second trigger of the sensor is valid. At this time, the coordinate corresponding to this second trigger is recorded as X1. During the movement of the printing carriage on medium 1, the electrical signal remains high. When the printing carriage enters the printing platform from the right edge of medium 1, the electrical signal changes from high level 1 to low level 0. At this time, starting from the first low level, the sensor will continuously collect the electrical signal 10 times. If the electrical signal is low for 10 consecutive times, it indicates that the second trigger of the sensor is valid. At this time, the coordinate corresponding to this second trigger is recorded as X2. The printing carriage continues to move until it reaches the width measurement end position. A total of N coordinates corresponding to M printing media are recorded, where N = 2M and M is greater than 1.
[0064] If the printing equipment is not malfunctioning, or if the printing medium is moved along the x-axis by external force, the electrical signals collected in the above 10 consecutive measurements may not be completely identical. In this case, stop the width measurement and confirm whether the printing medium has been moved or a machine malfunction has occurred. Therefore, it can be designed that if a preset number of electrical signals are not completely identical, an alarm signal is issued and the width measurement is stopped.
[0065] In an optional embodiment, in addition to the filtering error detection algorithm described above, another filtering error detection algorithm is provided to improve the accuracy of width measurement operations in multi-object printing scenarios. The specific implementation is as follows: It is understood that in printing scenarios with multiple objects to be printed, although the boundaries between the objects and the printing platform can usually be distinguished by a color sensor, in some special scenarios, if the object to be printed has a background color similar to the printing platform, or if shadows are cast on the object due to lighting conditions in the printing environment, it may affect the judgment of the color sensor. To further improve the accuracy of width measurement, another filtering error detection algorithm is provided, which detects whether the total number of transition level signals is even. The transition level signals include two cases: adjacent levels of 01 or 10. If the total number of transition level signals is odd, the width measurement data read into the memory will inevitably have errors, possibly due to missed or over-reading of the boundaries between the object to be printed and the printing platform. In this case, an alarm message is issued and width measurement is stopped.
[0066] After the width measurement is completed, proceed to step 140: determine the width of each printing medium based on N coordinates;
[0067] Step 140 may specifically include:
[0068] The difference between the first and second coordinates among the N coordinates is used to determine the width of the first printing medium.
[0069] The difference between the third and fourth coordinates out of N coordinates is used to determine the width of the second printing medium.
[0070] Calculate the difference between adjacent coordinates in the N coordinates one by one until the difference between the (N-1)th coordinate and the Nth coordinate is obtained, and then determine the media width of all printing media.
[0071] Combination Figure 3 To understand this, the width of medium 1 is W1 = X2 - X1; the width of medium 2 is W2 = X4 - X3; the width of medium 3 is W3 = X6 - X5; the width of medium 4 is W4 = X8 - X7; and the width of medium 5 is W5 = X10 - X9.
[0072] For a complete process of width measurement, you can combine... Figure 5 To organize:
[0073] like Figure 5 As shown, step 500: Start measuring width;
[0074] Step 501: The carriage moves to the starting position for width measurement; here, the carriage refers to the printing carriage.
[0075] Step 502: Determine whether the current sensor has generated a first trigger; the first trigger refers to the sensor receiving a light signal reflected back from the printing platform or printing medium; if the sensor has not generated a first trigger, proceed to step 503; if the sensor has generated a first trigger, proceed to step 507, and then check whether the printing equipment has a machine malfunction, or check whether the printing carriage is at the specified width measurement start position; if there is a machine malfunction, resolve the malfunction; if the printing carriage is not at the specified width measurement start position, return to step 501.
[0076] Step 503: The trolley begins to move;
[0077] Step 504: Determine if the second trigger of the sensor is valid; if the second trigger of the sensor is valid, proceed to step 505; if the second trigger of the sensor is invalid, proceed to step 507, and then check if the printing equipment has a machine malfunction, or check if the printing medium is affected by external force and has a positional shift; if there is a machine malfunction, resolve the malfunction; if the printing medium has a positional shift, adjust the position of the printing medium and repeat step 500.
[0078] Step 505: Record the coordinates of the printing cart when the sensor generates the second trigger by using the grating ruler coordinate feedback;
[0079] Step 506: Is the measurement complete? If the measurement is complete, proceed to step 507; if the measurement is not complete, continue to step 504 until the trolley moves to the width measurement end position and the measurement is completed.
[0080] Step 507: Width measurement complete.
[0081] Step 150: After width measurement, based on the dimensional relationship between the media width and the image width, multiple print images are split for printing or merged for printing. Before proceeding to step 150, the printing carriage is moved to its initial position.
[0082] Step 150 may specifically include:
[0083] Split printing process: If the image width of the target print image is greater than the width of a printing medium, print the target print image on at least two adjacent printing media.
[0084] In the split printing process, if the width of the target print image is greater than the width of one printing medium but less than the sum of the widths of two printing media, then the target print image can be printed on two adjacent printing media; if the width of the target print image is greater than the width of two printing media but less than the sum of the widths of three printing media, then the target print image can be printed on three adjacent printing media; and so on.
[0085] Step 150 may also include:
[0086] Merge printing operation: If the width of a printing medium is greater than the sum of the widths of two adjacent printed images, the two adjacent printed images will be printed on the same printing medium. For example... Figure 6 As shown, the width of medium 1 is relatively large. If the width of medium 1 is greater than the sum of the widths of two adjacent printed images, then the two adjacent printed images can be printed on medium 1. After printing, they can be trimmed.
[0087] In one optional implementation, an alarm is triggered if the width of the printing medium is greater than or equal to a first preset width, or if the width of the printing medium is less than a second preset width, to prompt the replacement of a suitable printing medium. This is generally for situations where the printing medium is too large or too small. For example, if the width of one printing medium is much larger than the sum of the widths of all images, it is no longer suitable for actual printing and needs to be replaced. Conversely, if the sum of the widths of all printing media is less than the width of a single image, meaning that none of the printing media can print an image, then the printing media also needs to be replaced.
[0088] In one optional embodiment, the number of objects to be printed can be one or more. It should be noted that when there are multiple objects to be printed, only the width of the objects is measured in the X-direction. When the objects are placed on the printing platform, their Y-axis coordinates should be identical; therefore, width measurement on the Y-axis is unnecessary. The position of the image to be printed on the objects can be determined by pre-obtaining the size information of multiple objects and combining this size information with the width measurement data. Multiple objects with overlapping Y-axis coordinates can be ensured to have the same Y-axis coordinate when placed on the printing platform through both time and position methods. Specifically, this can be achieved by feeding multiple objects simultaneously or by stopping the guide belt movement while feeding multiple objects, facilitating the placement of multiple objects at the same Y-axis coordinate. The dimensions of the multiple objects to be printed can be the same or different in the X and Y directions.
[0089] Combination Figure 6Multiple objects to be printed can be the same or different in size, and the printed images on these objects can also be the same or different. When the objects to be printed move along the guide belt to the bottom of the printing carriage, the width data of the multiple objects to be printed is calculated based on the data obtained by the grating sensor. Based on the width data and the pre-acquired size data of the objects to be printed, the arrangement of the objects to be printed in the printing platform within the next preset time period is obtained, and the corresponding printing data is generated in real time based on the arrangement. It is understandable that when the images to be printed on multiple objects are the same, such as printing the letter A with a width of 5cm on 5 objects, we can obtain the widths of the 5 objects, such as 6cm, 12cm, 6cm, 7cm, and 10cm. Assuming that printing can start directly from the boundary of the objects in this printing scenario, we know that two letters A can be printed on the second and fifth objects, and one letter A can be printed on the first, third, and fourth objects. The corresponding printing data is generated in real time based on the width measurement results. When the images to be printed on multiple objects are different, such as printing 5cm English letters in sequence on 3 objects, we can obtain the widths of the 3 objects, such as 6cm, 12cm, and 6cm. We know that A is printed on the first object, B and C are printed on the second object, and D is printed on the third object. The corresponding printing data is generated in real time based on the width measurement results.
[0090] In existing technologies, the object to be printed is typically placed against the edge of the printing platform to calculate the placement position of the image to be printed on the object. This invention allows the first object to be printed to be placed either against the edge of the printing platform or not, offering greater freedom and flexibility. It is understood that before printing, the printing position of the image on the object can be preset according to requirements. The printing position can include, for example, centering, left-aligning, or right-aligning on the object.
[0091] Based on the above embodiments, the width measurement method can also be used in width detection scenarios to check whether the size of the object to be printed is the same as the preset value. For example, in a certain printing task, the personal information of all employees is printed sequentially on multiple 10CM wide name tags. The width measurement scheme detects some cards that do not conform to the preset size, such as 10.5CM or 9.5CM cards. In response to the detection of the object to be printed that does not conform to the preset size, an alarm signal is issued and printing is stopped. The unqualified object to be printed is removed before printing, avoiding the need to check whether there are unqualified name tags after all the name tags of all employees have been printed. The detection process is cumbersome and wastes human and material resources.
[0092] As can be seen from the above, in this embodiment of the invention, firstly, before width measurement begins, the printing device is moved to the width measurement start position. At this time, it is determined whether the sensor generates a first trigger. If the sensor is triggered, width measurement will stop, and it is necessary to check whether the sensor is working properly and whether the printing medium is in the printing platform. This operation can improve the accuracy of width measurement, thereby improving the printing accuracy and precision of subsequent image printing. Secondly, during the width measurement process, a preset filtering error detection algorithm is used to continuously sample, for example, 20 times, each second trigger of the sensor. If the trigger voltage obtained from each sampling is the same, the trigger is valid. If there is even one instance of a different voltage level, it is considered to have been affected by external interference, and the trigger is invalid. It is necessary to promptly eliminate the cause of the invalidity before continuing printing. These operations can improve the accuracy of width measurement, thereby improving the precision of subsequent image printing. The printing accuracy is improved; third, multiple printing is possible, allowing for printing multiple copies in both planar and roll-to-roll printing, up to five copies at a time, significantly increasing production output; fourth, splicing printing is possible in both planar and roll-to-roll printing environments: when an image is too large, it can be split and printed separately on different printing media, then glued together after printing, greatly improving printing speed and efficiency; fifth, merged printing is possible, for example, printing two images simultaneously on one printing media, then cropping them after printing, further improving printing speed and efficiency; sixth, an alarm is triggered when the width of the printing media is too large or too small, improving printing accuracy.
[0093] The printing processing apparatus provided by the present invention will be described below. The printing processing apparatus described below can be referred to in correspondence with the printing processing method described above.
[0094] like Figure 7 As shown, this embodiment of the invention also provides a printing processing apparatus for implementing the printing processing method in any of the above embodiments. The printing processing apparatus may include:
[0095] The acquisition module 710 is used to acquire the position information of the printing carriage and the image width of multiple printed images when measuring the width of multiple printing media.
[0096] The control module 720 is used to control the printing carriage to move along the movement direction based on the initial position in the position information; the initial position is the width measurement start position; the movement direction is parallel to the width direction of the printing medium.
[0097] The first determining module 730 is used to determine whether each trigger of the sensor on the printing carriage meets the valid triggering condition by using a preset filtering error detection algorithm. If each trigger of the sensor meets the valid triggering condition, the N coordinates corresponding to the N triggers in the width measurement process are recorded; where N is an even number.
[0098] The second determining module 740 is used to determine the media width of each printing medium based on N coordinates;
[0099] The printing processing module 750 is used to split or merge multiple print images based on the dimensional relationship between the media width and the image width after the width measurement is completed.
[0100] The printing processing device also includes a judgment module for determining whether the sensor generates a first trigger at the initial position; wherein, the first trigger refers to the sensor receiving a light signal reflected back from the printing platform or the printing medium;
[0101] If the sensor does not generate the first trigger, the printing carriage is controlled to move along the direction of movement;
[0102] If the sensor generates the first trigger, the printing carriage is controlled to move to the initial position.
[0103] The printing processing device also includes a stop control module, which controls the printing carriage to stop moving based on the stop position in the position information; the stop position is the width measurement end position.
[0104] The first determining module 730 is specifically used for:
[0105] When the sensor triggers a second time, it acquires a preset number of electrical signals continuously collected by the sensor; the electrical signals are either high or low level; the second trigger refers to a jump in the electrical signals collected by the sensor.
[0106] Based on a preset number of electrical signals, determine whether the second trigger of the sensor is valid.
[0107] The first determining module 730 is specifically used for:
[0108] If the electrical signal changes from low level to high level, and a preset number of electrical signals are all at high level, then the second trigger of the sensor is determined to be valid;
[0109] or,
[0110] If the electrical signal changes from high level to low level, and a preset number of electrical signals are all at low level, then the second trigger of the sensor is determined to be valid.
[0111] The printing processing unit also includes a control movement module for controlling the printing carriage to move to the initial position.
[0112] The print processing module 750 is specifically used for:
[0113] If the width of the target print image is greater than the width of a print medium, the target print image will be printed on at least two adjacent print media.
[0114] or,
[0115] If the width of a printing medium is greater than the sum of the widths of two adjacent printed images, the two adjacent printed images will be printed on the same printing medium.
[0116] The second determining module 740 is specifically used for:
[0117] The difference between the first and second coordinates among the N coordinates is used to determine the width of the first printing medium.
[0118] The difference between the third and fourth coordinates out of N coordinates is used to determine the width of the second printing medium.
[0119] Calculate the difference between adjacent coordinates in the N coordinates one by one until the difference between the (N-1)th coordinate and the Nth coordinate is obtained, and then determine the media width of all printing media.
[0120] like Figure 8 As shown, this embodiment of the invention also provides an electronic device, which may include: a processor 810, a communications interface 820, a memory 830, and a communication bus, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communication bus. The memory 830 stores a computer program that can be executed by the processor 810; when the processor 810 executes the computer program, it can perform the printing processing method in any of the above embodiments.
[0121] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, wherein the computer storage medium stores instructions that, when executed, implement the printing processing method in any of the above embodiments.
[0123] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed invention. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0124] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely exemplary descriptions of the invention as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A printing processing method, characterized in that, include: When measuring the width of multiple printing media, the position information of the printing carriage and the image width of multiple printed images are obtained; The printing carriage is controlled to move along the movement direction based on the initial position in the position information; the initial position is the width measurement start position; the movement direction is parallel to the width direction of the printing medium. A preset filtering error detection algorithm is used to determine whether each trigger of the sensor on the printing carriage meets the valid triggering condition. If each trigger of the sensor meets the valid triggering condition, the N coordinates corresponding to the N triggers in the width measurement process are recorded; where N is an even number. Based on the N coordinates, the width of each printing medium is determined; After the width measurement is completed, based on the dimensional relationship between the media width and the image width, the multiple printed images are split for printing or merged for printing. Before controlling the printing carriage to move along the direction of movement based on the initial position, the process also includes: When the printing carriage is at the initial position, it is determined whether the sensor generates a first trigger; wherein, the first trigger indicates that the sensor receives a light signal reflected back from the printing platform or the printing medium. If the sensor does not generate the first trigger, then control the printing carriage to move along the direction of movement; If the sensor generates a first trigger, the printing carriage is controlled to move to the initial position; The method employs a preset filtering error detection algorithm to determine whether each triggering of the sensor on the printing carriage meets the valid triggering conditions, including: When the sensor is triggered a second time, a preset number of electrical signals are continuously acquired by the sensor; the electrical signals are either high level or low level; wherein, the second trigger indicates that the electrical signals acquired by the sensor have changed direction. Based on the preset number of electrical signals, determine whether the second trigger of the sensor is valid; The process of splitting or merging the multiple printed images based on the dimensional relationship between the media width and the image width includes: If the image width of the target print image is greater than the width of a printing medium, the target print image is printed on at least two adjacent printing media. or, If the width of a printing medium is greater than the sum of the widths of two adjacent printed images, the two adjacent printed images are printed on the same printing medium.
2. The printing processing method according to claim 1, characterized in that, Before determining the media width of each printing medium based on the N coordinates, the method further includes: Based on the stop position in the location information, the printing carriage is controlled to stop moving; the stop position is the width measurement end position.
3. The printing process method according to claim 1, characterized in that, The step of determining whether the second trigger of the sensor is valid based on the preset number of electrical signals includes: If the electrical signal changes from a low level to a high level, and the preset number of electrical signals are all at a high level, then the second trigger of the sensor is determined to be valid; or, If the electrical signal changes from a high level to a low level, and the preset number of electrical signals are all at a low level, then the second trigger of the sensor is determined to be valid.
4. The printing processing method according to claim 1, characterized in that, Before performing split printing or merge printing on the multiple printed images, the process also includes: Control the printing carriage to move to the initial position.
5. The printing processing method according to claim 1, characterized in that, Determining the media width of each printing medium based on the N coordinates includes: The difference between the first and second coordinates among the N coordinates is determined as the media width of the first printing medium; The difference between the third and fourth coordinates among the N coordinates is determined as the media width of the second printing medium; Calculate the difference between adjacent coordinates in the N coordinates one by one until the difference between the (N-1)th coordinate and the Nth coordinate is obtained, and determine the media width of all printing media.
6. A printing processing apparatus, characterized in that, include: The acquisition module is used to acquire the position information of the printing carriage and the image width of multiple printed images when measuring the width of multiple printing media; The control module is used to control the printing carriage to move along the movement direction based on the initial position in the position information; the initial position is the width measurement start position; the movement direction is parallel to the width direction of the printing medium; The first determining module is used to determine whether each trigger of the sensor on the printing carriage meets the valid triggering condition by using a preset filtering error detection algorithm. If each trigger of the sensor meets the valid triggering condition, the N coordinates corresponding to the N triggers in the width measurement process are recorded; where N is an even number. The second determining module is used to determine the width of each printing medium based on the N coordinates; The printing processing module is used to perform split printing or merge printing processing on the multiple printed images based on the dimensional relationship between the media width and the image width after the width measurement is completed; The printing processing device further includes a judgment module, used to determine whether the sensor generates a first trigger when the printing carriage is located at the initial position; wherein, the first trigger indicates that the sensor receives a light signal reflected back from the printing platform or the printing medium; If the sensor does not generate the first trigger, then control the printing carriage to move along the direction of movement; If the sensor generates a first trigger, the printing carriage is controlled to move to the initial position; The first determining module is specifically used for: When the sensor is triggered a second time, a preset number of electrical signals are continuously acquired by the sensor; the electrical signals are either high level or low level; wherein, the second trigger indicates that the electrical signals acquired by the sensor have changed direction. Based on the preset number of electrical signals, determine whether the second trigger of the sensor is valid; The printing processing module is specifically used for: If the image width of the target print image is greater than the width of a printing medium, the target print image is printed on at least two adjacent printing media. or, If the width of a printing medium is greater than the sum of the widths of two adjacent printed images, the two adjacent printed images are printed on the same printing medium.
7. An electronic device, characterized in that, include: The processor, the communication interface, the memory, and the communication bus; wherein the processor, the communication interface, and the memory communicate via the communication bus. The memory stores a computer program that can be executed by the processor; when the processor runs the computer program, it performs the printing process method as described in any one of claims 1-5.
Citation Information
Patent Citations
Methods and systems for handling printing of large-size objects
CN111098612A
Intelligent printing equipment and control method thereof
CN111301010A