Printing apparatus

The printing apparatus uses a TOF sensor with a calibration process to correct distance deviations, enabling precise detection of sheet-like media remaining amounts, addressing inaccuracies in conventional sensors.

JP7862769B2Active Publication Date: 2026-05-20BROTHER KOGYO KK
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP Β· JP
Patent Type
Patents
Current Assignee / Owner
BROTHER KOGYO KK
Filing Date
2022-03-29
Publication Date
2026-05-20

AI Technical Summary

Technical Problem

Conventional position sensors used in image forming apparatuses for detecting the remaining amount of sheet-like media are prone to errors due to environmental factors, leading to inaccurate detection of the medium's remaining amount.

Method used

A printing apparatus equipped with a TOF sensor that includes a storage unit, transport unit, printing unit, and control unit, which performs a calibration process to correct distance detection deviations using a known reference point, ensuring accurate detection of the remaining amount of sheet-like media.

Benefits of technology

The apparatus achieves high-precision detection of the remaining amount of sheet-like media by correcting distance detection errors in the TOF sensor, thereby ensuring accurate measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007862769000001
    Figure 0007862769000001
  • Figure 0007862769000002
    Figure 0007862769000002
  • Figure 0007862769000003
    Figure 0007862769000003
Patent Text Reader

Abstract

To provide a printer which can highly accurately detect a residual amount of a sheet-like medium by optically correctly detecting a distance to a detection object.SOLUTION: A printer 100 comprises: a storage part 103 which can store a roll body R; a TOF sensor 104 which detects a distance to the roll body R; a conveyance part 105 which conveys a roll sheet P1 of the roll body R; a printing part 106 which performs printing on the roll sheet P1 conveyed by the conveyance part 105; and a control part 117. The control part 117 executes: a step S10 of detecting a residual amount of the roll sheet P1 in the roll body R on the basis of the detection result of the distance to the roll body R by the TOF sensor 104; and a step S15 of correcting a distance detection deviation of the TOF sensor 104 on the basis of the detection result of the distance to a movable plate 111 by the TOF sensor 104 in such a state that an opening / closing cover 102 is opened and a distance from the TOF sensor 104 to the predetermined movable plate 111 becomes a known value.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a printing apparatus provided with a TOF sensor.

Background Art

[0002] Conventionally, for example, as described in Patent Document 1, there is known an image forming apparatus that optically detects the remaining amount of a sheet-like medium to be conveyed using a position sensor.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] The position sensor used in the above prior art is a sensor that detects the distance to a detection target based on the light reception result at a light receiving element of light emitted from a light emitting element, but there is a risk of errors depending on the environment in which the user uses it. In the technique described in Patent Document 1, no consideration is given to this error occurrence, so the distance to the detection target cannot be accurately detected, and there are cases where the remaining amount of the sheet-like medium cannot be accurately detected.

[0005] An object of the present invention is to provide a printing apparatus that can accurately detect the remaining amount of a sheet-like medium with high precision by optically and accurately detecting the distance to a detection target.

Means for Solving the Problems

[0006] To achieve the above objective, the printing apparatus of the present invention comprises: a storage unit capable of accommodating a sheet body in which a sheet-like medium is wound in a roll shape or stacked in multiple layers in the thickness direction; a TOF sensor for detecting the distance to the sheet body; a transport unit for transporting the sheet-like medium of the sheet body accommodated in the storage unit; a printing unit for printing on the sheet-like medium transported by the transport unit; and a control unit, wherein the control unit performs a remaining amount detection process to detect the remaining amount of the sheet-like medium in the sheet body within the storage unit based on the distance detection result to the sheet body by the TOF sensor; and a calibration process to correct the distance detection deviation of the TOF sensor based on the distance detection result to the object by the TOF sensor in a predetermined state in which the distance from the TOF sensor to a predetermined object to be detected becomes a known value.

[0007] In the printing apparatus of the present invention, a sheet-like medium provided on a sheet body housed in a storage unit is transported by a transport unit, and printing is performed on the transported sheet-like medium by a printing unit. Based on the distance detection result to the sheet body by a TOF sensor, the remaining amount of the sheet-like medium is detected by a remaining amount detection process executed by the control unit.

[0008] In the present invention, a calibration process is performed by the control unit in a predetermined state. The predetermined state is a state in which the distance from the TOF sensor to a predetermined object to be detected becomes a known value. In the calibration process, when the distance to the object to be detected is detected by the TOF sensor in the predetermined state, the distance detection deviation is corrected so that the detected distance value becomes the known value.

[0009] According to the present invention, the distance detection error in the TOF sensor is corrected by performing a calibration process, so that the distance to the sheet body to be detected can be detected optically with accuracy. As a result, the remaining amount of the sheet-like medium can be detected with high accuracy. [Effects of the Invention]

[0010] According to the present invention, the remaining amount of a sheet-like medium can be detected with high accuracy. [Brief explanation of the drawing]

[0011] [Figure 1] This is a side cross-sectional view showing an example of the overall configuration of a printing apparatus according to the first embodiment of the present invention, with the opening / closing cover closed. [Figure 2] This is a side cross-sectional view showing an example of the overall configuration of a printing apparatus according to the first embodiment of the present invention, with the opening / closing cover in the open position. [Figure 3] This is a partially enlarged cross-sectional view showing an example of the movable configuration of the movable plate when the opening / closing cover is closed. [Figure 4] This is a partially enlarged cross-sectional view showing an example of the movable configuration of the movable plate when the opening / closing cover is in the open position. [Figure 5] This is a block diagram showing an example of the control configuration of a printing apparatus according to the first embodiment of the present invention. [Figure 6] This flowchart shows an example of the control content performed by the control unit of the printing apparatus according to the first embodiment of the present invention. [Figure 7] This is a partially enlarged cross-sectional view showing an example of the movable configuration of the TOF sensor in the closed state in a modified version of the first embodiment. [Figure 8] This is a partially enlarged cross-sectional view showing an example of the movable configuration of the TOF sensor in the open / closed cover state in a modified version of the first embodiment. [Figure 9] This is a side cross-sectional view showing an example of the overall configuration of a printing apparatus according to a second embodiment of the present invention, with the opening / closing cover closed. [Figure 10] This is a side cross-sectional view showing an example of the overall configuration of a printing apparatus according to a second embodiment of the present invention, with the opening / closing cover in the open position. [Figure 11] This is a partially enlarged cross-sectional view showing an example of the opening and closing configuration of the opening of the retaining member when the opening / closing cover is closed. [Figure 12] This is a partially enlarged cross-sectional view showing an example of the opening and closing configuration of the opening of the retaining member when the opening / closing cover is in the open position. [Figure 13] It is a side sectional view showing an example of the overall configuration of the printing apparatus according to the third embodiment of the present invention. [Figure 14] It is a flowchart showing an example of the control content executed by the control unit of the printing apparatus according to the third embodiment of the present invention. [Figure 15] In a modification of the third embodiment, it is a flowchart showing an example of the control content executed by the control unit of the printing apparatus. [Figure 16] It is a side sectional view showing an example of the overall configuration of the printing apparatus according to another modification of the third embodiment. [Figure 17] In another modification of the third embodiment, it is a flowchart showing an example of the control content executed by the control unit of the printing apparatus. [Figure 18] In another modification of the third embodiment, it is a diagram showing an example of the guidance display displayed on the display unit. [Figure 19] In another modification of the third embodiment, it is a diagram showing an example of the error display displayed on the display unit. [Figure 20] It is a side sectional view showing an example of the overall configuration of the printing apparatus according to the fourth embodiment of the present invention. [Figure 21] It is a block diagram showing an example of the control configuration of the printing apparatus according to the fourth embodiment of the present invention. [Figure 22] It is a flowchart showing an example of the control content executed by the control unit of the printing apparatus according to the fourth embodiment of the present invention.

Embodiments for Carrying Out the Invention

[0012] <First Embodiment> The first embodiment of the present invention will be described. The first embodiment is an embodiment in which calibration of the TOF sensor is performed in a state where the opening / closing cover is open in a so-called shaft-hold type printing apparatus in which a roll body is rotatably supported by a shaft member in a storage unit.

[0013] <Overall Configuration of the Printing Apparatus> Figures 1 and 2 show an example of the overall configuration of the printing apparatus 100 according to the first embodiment. Figure 1 shows the opening / closing cover in the closed state, and Figure 2 shows the opening / closing cover in the open state.

[0014] As shown in Figures 1 and 2, the printing apparatus 100 includes a housing 101, an opening / closing cover 102, a storage section 103, a TOF sensor 104, a transport section 105, a printing section 106, a cutting section 107, and an opening / closing sensor 120.

[0015] The housing 101, together with the opening / closing cover 102, constitutes the outer casing of the printing device 100. The housing 101 encloses the storage section 103, the TOF sensor 104, the transport section 105, the printing section 106, the cutting section 107, and the like.

[0016] The opening / closing cover 102 is rotatably connected to the housing 101 around the shaft 109. By opening and closing the opening / closing cover 102 relative to the housing 101, it opens and closes an opening provided at the top of the housing 101.

[0017] The opening / closing sensor 120 is installed, for example, on the housing 101 and detects whether the opening / closing cover 102 is open or closed. The opening / closing sensor 120 may be a sensor that detects the open / closed state of the opening / closing cover 102 mechanically, for example, or it may be a sensor that detects it by optical, magnetic, or other methods.

[0018] The housing section 103 is located inside the housing 101 and houses a roll body R in which roll paper P1 is wound in a roll shape around the outer circumference of a core member Rc. The roll body R is rotatably supported within the housing section 103 by a pair of support members 110 that support both axial ends of a shaft member Ax inserted into the core member Rc. Roll paper P1 is an example of a sheet-like medium, and roll body R is an example of a sheet body.

[0019] The TOF (Time Of Flight) sensor 104 has a light source (not shown) and a photodetector, and measures the distance to an object by measuring the time it takes for light emitted from the light source to reflect off the object and return to the photodetector. The TOF sensor 104 is installed in a recess 103a formed in the wall of the housing 103, facing the roll body R, and detects the distance to the roll body R. The TOF sensor 104 is installed between a pair of support members 110 in the axial direction of the roll body R, with the direction of light irradiation pointing towards the core member Rc of the roll body R.

[0020] The transport unit 105 transports the roll paper P1 that has been unwound from the roll body R stored in the storage unit 103. The transport unit 105 is, for example, a platen roller positioned opposite the printing unit 106. The transport unit 105 may also have rollers other than the platen roller.

[0021] The printing unit 106 prints on the roll paper P1 that is transported by the transport unit 105. The printing unit 106 is, for example, a print head positioned opposite the platen roller.

[0022] The cutting unit 107 is located downstream of the transport unit 105 and the printing unit 106 in the transport direction of the roll paper P1. The cutting unit 107 cuts the roll paper P1 that has been printed by the printing unit 106 using a cutter.

[0023] The housing section 103 is provided with a movable plate 111 that covers the recess 103a in which the TOF sensor 104 is installed. The movable plate 111 has an opening 111a. As shown in Figures 1 and 2, the movable plate 111 slides in conjunction with the opening or closing operation of the opening / closing cover 102, and its relative position to the TOF sensor 104 changes. As shown in Figure 1, when the opening / closing cover 102 is closed, the movable plate 111 slides downward, and the opening 111a is positioned between the TOF sensor 104 and the roll body R. This allows the TOF sensor 104 to detect the distance to the roll body R. On the other hand, as shown in Figure 2, when the opening / closing cover 102 is open, the movable plate 111 slides upward, and the opening 111a moves above the TOF sensor 104, so that the portion of the movable plate 111 that is not the opening 111a is interposed between the TOF sensor 104 and the roll body R. This allows the TOF sensor 104 to detect the distance to the movable plate 111. The distance from the TOF sensor 104 to the movable plate 111 is stored in the memory unit 114 (see Figure 5 below) as a known value. The control unit 117 (see Figure 5 below) performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the detection result by the TOF sensor 104 when the opening / closing cover 102 is open and the known value stored in the memory unit 114.

[0024] Note that the state in which the opening / closing cover 102 is opened from the closed state, as shown in Figure 2, is an example of a predetermined state. Also, the movable plate 111 is an example of an object to be detected, and is also an example of a relative displacement member.

[0025] <Movable configuration of the movable plate> Figures 3 and 4 show an example of the movable configuration of the movable plate 111. Figure 3 shows the opening / closing cover 102 in the closed state, and Figure 4 shows the opening / closing cover 102 in the open state.

[0026] As shown in Figures 3 and 4, the movable plate 111 is supported by, for example, a pair of guide members 112 so as to be slidable substantially parallel to the wall of the housing 103. One end of a link mechanism 113 is rotatably connected to the upper end of the movable plate 111, and the other end of the link mechanism 113 is rotatably connected to the opening / closing cover 102. The link mechanism 113 may consist of a single link member or may consist of multiple link members joined together. As shown in Figure 3, when the opening / closing cover 102 is closed, the movable plate 111 is pushed downward by the link mechanism 113 and slides, so that the opening 111a is positioned between the TOF sensor 104 and the roll body R. This allows the TOF sensor 104 to detect the distance to the roll body R. On the other hand, as shown in Figure 4, when the opening / closing cover 102 is open, the movable plate 111 is pulled upward and slides by the link mechanism 113, and the opening 111a moves above the TOF sensor 104, so that the portion of the movable plate 111 that is not the opening 111a is interposed between the TOF sensor 104 and the roll body R. In other words, the recess 103a in which the TOF sensor 104 is installed is covered by the movable plate 111. As a result, the TOF sensor 104 can detect the distance to the movable plate 111.

[0027] Furthermore, if it is possible to link the opening and closing operation of the opening / closing cover 102 with the sliding operation of the movable plate 111, other mechanisms besides the link mechanism 113 described above, such as a gear mechanism or a spring mechanism, may also be used.

[0028] <Control configuration of printing device> Figure 5 shows an example of the control configuration of the printing device 100.

[0029] As shown in Figure 5, the printing device 100 includes, in addition to the aforementioned TOF sensor 104, transport unit 105, printing unit 106, cutting unit 107, and open / close sensor 120, a storage unit 114, a display unit 115, an operation unit 116, and a control unit 117. The TOF sensor 104, transport unit 105, printing unit 106, cutting unit 107, open / close sensor 120, storage unit 114, display unit 115, operation unit 116, and control unit 117 are connected via a bus 118 to enable information transmission and reception.

[0030] The memory unit 114 stores various programs 119a, including, for example, a printing program and a calibration process as shown in the flowchart of Figure 6 described later, and various data 119b, including, for example, image data to be printed and a known distance from the TOF sensor 104 to the movable plate 111.

[0031] The control unit 117 is a device that performs data processing, such as a processor like a CPU. The control unit 117 executes various programs stored in the storage unit 114. A program 119a in the storage unit 114 and the control unit 117 that uses it are an example of a control unit.

[0032] The display unit 115 is, for example, a liquid crystal display and is capable of displaying various information. The operation unit 116 is, for example, a keyboard or buttons and accepts user input. By operating the operation unit 116, the user can input various instructions to the printing device 100.

[0033] <Control details of the control unit> Figure 6 shows an example of the control contents performed by the control unit 117 of the printing device 100.

[0034] In step S5, the control unit 117 determines whether the opening / closing cover 102 has been opened or not based on the detection result of the opening / closing sensor 120. If the control unit 117 detects that the opening / closing cover 102 is closed (step S5: No), it proceeds to step S10.

[0035] In step S10, the control unit 117 sets the processing mode to "measurement mode" and measures the remaining amount of roll paper P1 in the roll body R within the storage unit 103 based on the distance detection result to the roll body R by the TOF sensor 104. Step S10 is an example of the remaining amount detection process. After that, the process returns to step S5.

[0036] On the other hand, in step S5, if the control unit 117 detects that the opening / closing cover 102 has been opened (step S5: Yes), it proceeds to step S15.

[0037] In step S15, the control unit 117 sets the processing mode to "calibration" mode and performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the distance detection result from the TOF sensor 104 to the movable plate 111 when the opening / closing cover 102 is opened from the closed state, and a known value of said distance read from the storage unit 114. Step S15 is an example of the calibration process.

[0038] In step S20, the control unit 117 determines, based on the detection result of the opening / closing sensor 120, whether or not the opening / closing cover 102 was closed before the end of calibration. If the control unit 117 detects that the opening / closing cover 102 was closed before the end of calibration (step S20: Yes), it proceeds to step S25.

[0039] In step S25, the control unit 117 interrupts the calibration. Then, this flowchart is terminated.

[0040] On the other hand, if in step S20 the control unit 117 does not detect that the opening / closing cover 102 was closed before the end of the calibration, in other words, if the calibration is completed with the opening / closing cover 102 in the open position (step S20: No), the system proceeds to step S30.

[0041] In step S30, the control unit 117 determines whether the opening / closing cover 102 has been closed based on the detection result of the opening / closing sensor 120. The control unit 117 waits in step S30 until the opening / closing cover 102 is closed (step S30: No), and if it detects that the opening / closing cover 102 has been closed (step S30: Yes), it proceeds to step S35.

[0042] In step S35, the control unit 117 sets the processing mode to "measurement mode" and measures the remaining amount of roll paper P1 in the roll body R within the storage unit 103 based on the distance detection result to the roll body R by the TOF sensor 104. This measurement of the remaining amount may be performed only once or multiple times.

[0043] In step S40, the control unit 117 compares the remaining amount of roll paper P1 measured immediately before performing calibration in step S15 with the remaining amount of roll paper P1 measured in step S35 after performing calibration, and determines whether the difference is less than or equal to a predetermined threshold. If the difference in the remaining amount measurement is greater than the threshold (step S40: No), the control unit 117 proceeds to step S45.

[0044] In step S40, instead of comparing the remaining amount measurements before and after calibration, the distance values ​​to the roll body R detected by the TOF sensor 104 before and after calibration may be compared. In this case, the distance value detected before calibration is an example of the first distance, the distance value detected after calibration is an example of the second distance, and step S40 is an example of the distance comparison process.

[0045] In step S45, the control unit 117 corrects the distance detection error of the TOF sensor 104, taking into account the results of the calibration performed in step S15. After that, this flowchart ends.

[0046] On the other hand, in step S40, if the difference in the remaining amount measurement value is less than or equal to the threshold (step S40: Yes), the control unit 117 proceeds to step S50.

[0047] In step S50, the control unit 117 discards the calibration results performed in step S15 and does not correct the distance detection deviation of the TOF sensor 104. That is, if the difference in the remaining amount measurement value is below the threshold, it is assumed that, for example, the roll body R was removed from the storage unit 103 by the user and then the same roll body R was set back into the storage unit 103, a so-called reset, or that only the opening / closing cover 102 was opened and closed. In this case, if correction by calibration is performed, there is a possibility that the detection distance will vary before and after the reset, even though it is the same roll body R. In step S50, by not performing correction by calibration, the occurrence of the above variation in detection distance can be prevented. After that, this flowchart is terminated.

[0048] Steps S45 and S50 described above are examples of processes for determining whether or not to reflect the changes.

[0049] <Effects of the First Embodiment> In the printing apparatus 100 of this embodiment, the roll paper P1 provided on the roll body R housed in the storage unit 103 is transported by the transport unit 105, and printing is performed on the transported roll paper P1 by the printing unit 106. Based on the distance detection result to the roll body R by the TOF sensor 104, the remaining amount of roll paper P1 is detected in the remaining amount detection process of step S10 executed by the control unit 117.

[0050] In this embodiment, when the opening / closing cover 102 is opened from the closed state, the control unit 117 performs the calibration process in step S15. When the opening / closing cover 102 is open, the object detected by the TOF sensor 104 becomes the movable plate 111, and the detected distance becomes a known value. In the calibration process, the distance to the movable plate 111 is detected by the TOF sensor 104 when the opening / closing cover 102 is open, and the distance detection deviation is corrected so that the detected distance value becomes the known value.

[0051] In this way, the calibration process corrects the distance detection error in the TOF sensor 104, allowing for accurate optical detection of the distance to the target roll R. As a result, the remaining amount of roll paper P1 can be detected with high accuracy.

[0052] Furthermore, in this embodiment, the state in which the control unit 117 executes the calibration process in step S15 is when the opening / closing cover 102 that opens and closes the opening of the housing 101 has been opened from the closed state. As a result, when the user opens the opening / closing cover 102, the calibration process is executed in conjunction with this, eliminating the need for any operation to instruct the user to perform the calibration. This allows for correction of the distance detection deviation of the TOF sensor 104 according to the user's operating environment without requiring any user intervention. In addition, the distance detection deviation of the TOF sensor 104 can be reliably corrected when the user replaces the roll body R.

[0053] Furthermore, in this embodiment, the object that the TOF sensor 104 detects the distance of during the calibration process in step S15 is the movable plate 111. As a result, the relative position between the movable plate 111 and the TOF sensor 104 changes in conjunction with the opening operation of the opening / closing cover 102, and after the change, the distance between the movable plate 111 and the TOF sensor 104 becomes a known distance, thereby correcting the distance detection error of the TOF sensor 104. In addition, when the opening / closing cover 102 opens, the opening 111a that was previously located in front of the TOF sensor 104 moves and closes the front of the TOF sensor 104, so that the user's fingers do not come into contact with the TOF sensor 104 or dirt adheres to it when the opening / closing cover 102 opens, thereby protecting the sensor.

[0054] Furthermore, in this embodiment, there are cases where, for example, a roll body R is removed from the storage unit 103 by the user and then set back into the storage unit 103, a process known as re-setting. In this case, due to the correction of the calibration process performed after setting the roll body R, there is a risk that variations in the detection distance may occur before and after re-setting, even though it is the same roll body R. In this embodiment, in step S40, the remaining amount measurement values ​​of the roll paper P1 measured before and after the calibration process are compared, and in steps S45 and S50, it is decided whether or not to reflect the correction of the calibration process according to the comparison result. This makes it possible to prevent variations in the detection distance by the TOF sensor 104 by not reflecting the correction of the calibration process when the roll body R is re-set.

[0055] <Modified form of the first embodiment> It should be noted that the first embodiment described above is not limited to what has been explained above, and various modifications are possible without departing from its purpose and technical concept.

[0056] For example, in the first embodiment described above, the movable plate 111 slides in conjunction with the opening and closing operation of the opening / closing cover 102, but the configuration is not limited to this, and the TOF sensor 104 may be moved instead. Figures 7 and 8 show an example of a movable configuration for the TOF sensor 104. Figure 7 shows the opening / closing cover 102 in the closed state, and Figure 8 shows the opening / closing cover 102 in the open state.

[0057] As shown in Figures 7 and 8, the sensor support member 121 on which the TOF sensor 104 is installed is supported by, for example, a pair of guide members 122 so as to be slidable substantially parallel to the wall of the housing 103. A fixing plate 123 with an opening 123a is installed on the roll body R side of the sensor support member 121. One end of a link mechanism 124 is rotatably connected to the upper end of the sensor support member 121, and the other end of the link mechanism 124 is rotatably connected to the opening / closing cover 102. The link mechanism 124 may consist of a single link member or may consist of multiple link members joined together. As shown in Figure 7, when the opening / closing cover 102 is closed, the sensor support member 121 is pushed downward and slides by the link mechanism 124, and the opening 123a of the fixing plate 123 is positioned between the TOF sensor 104 and the roll body R. This allows the TOF sensor 104 to detect the distance to the roll body R. On the other hand, as shown in Figure 8, when the opening / closing cover 102 is open, the sensor support member 121 is pulled upward and slides by the link mechanism 124, and the opening 123a of the fixing plate 123 moves downward relative to the TOF sensor 104, so that the portion of the fixing plate 123 that is not the opening 123a is interposed between the TOF sensor 104 and the roll body R. As a result, the TOF sensor 104 can detect the distance to the fixing plate 123. Since the distance from the TOF sensor 104 to the fixing plate 123 is stored in the storage unit 114 as a known value, the control unit 117 can perform calibration to correct the distance detection deviation of the TOF sensor 104. The fixing plate 123 is an example of a relative displacement member.

[0058] Furthermore, in the first embodiment described above, the calibration process is performed in conjunction with the opening operation of the opening / closing cover 102. However, it is not necessarily required that the timing of the calibration process be linked to the opening / closing operation of the opening / closing cover 102. Regardless of the opening / closing operation of the opening / closing cover 102, for example, the open / closed state of the opening / closing cover 102 may be detected at predetermined time intervals, and the calibration process may be performed when it is detected that the cover is open.

[0059] Furthermore, although the first embodiment described above explains the case in which the roll paper P1 is pulled out from the top of the roll body R, it can also be applied to the case in which the roll paper P1 is pulled out from the bottom of the roll body R.

[0060] <Second Embodiment> A second embodiment of the present invention will now be described. The second embodiment is a so-called drop-in type printing apparatus in which a roll body is rotatably supported by rollers in a housing section, and in which calibration of the TOF sensor is performed with the opening / closing cover open.

[0061] <Overall configuration of the printing device> Figures 9 and 10 show an example of the overall configuration of the printing apparatus 100A according to the second embodiment. Figure 9 shows the opening / closing cover in the closed state, and Figure 10 shows the opening / closing cover in the open state.

[0062] As shown in Figures 9 and 10, the printing apparatus 100A has a plurality of rollers 125 rotatably mounted at the bottom of the housing section 103. The rollers 125 rotatably support the roll body R. In the example shown in Figures 9 and 10, the number of rollers 125 is two, but there may be three or more.

[0063] The printing apparatus 100A has a pressing member 126. The pressing member 126 is a plate-shaped member having a predetermined dimension in the axial direction of the roll body R, and is connected to the housing 101 so as to be rotatable around an axis 109, for example. As shown in Figure 10, when the opening / closing cover 102 is open, the pressing member 126 is locked to the opening / closing cover 102 by a locking member (not shown), and rotates together with the opening / closing cover 102 while maintaining a predetermined gap between them. On the other hand, as shown in Figure 9, when the opening / closing cover 102 is closed, the pressing member 126 is released from the opening / closing cover 102, and for example, its own weight causes the pressing roller 127 to contact the upper part of the roll body R. The pressing member 126 rotates around the axis 109 as the diameter of the roll body R decreases, from when the roll body R is new and at its maximum diameter until the roll paper P1 is completely consumed and the roll body R is at its minimum diameter. The pressing roller 127 is rotatably mounted on the pressing member 126 and prevents the roll paper P1 from unraveling by contacting the roll body R from above. There may be one pressing roller 127, or multiple rollers may be installed at various locations along the axial direction of the roll body R.

[0064] The TOF sensor 104 is installed in a recess 102a formed in the opening / closing cover 102, facing the roll body R, and detects the distance to the roll body R. The TOF sensor 104 is installed so that the direction of light irradiation is directed toward the core member Rc of the roll body R.

[0065] The retaining member 126 has an opening 126a, which is configured to open and close. As shown in Figure 9, when the opening / closing cover 102 is closed, the opening 126a is open and positioned between the TOF sensor 104 and the roll body R. This allows the TOF sensor 104 to detect the distance to the roll body R from when the roll body R is new and at its maximum diameter until the roll paper P1 is completely consumed and the roll body R is at its minimum diameter.

[0066] On the other hand, as shown in Figure 10, when the opening / closing cover 102 is open, the opening 126a of the retaining member 126 is closed. This allows the TOF sensor 104 to detect the distance to the retaining member 126. The distance from the TOF sensor 104 to the retaining member 126 is stored in the storage unit 114 as a known value because the retaining member 126 and the opening / closing cover 102 are locked at a predetermined interval, as described above. The control unit 117 performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the detection result by the TOF sensor 104 when the opening / closing cover 102 is open and the known value stored in the storage unit 114.

[0067] Note that the configuration of the printing device 100A other than those described above is the same as that of the printing device 100 in the first embodiment described above, so a description will be omitted. Also, the state in which the opening / closing cover 102 is opened from the closed state, as shown in Figure 10, is an example of a predetermined state.

[0068] <Opening and closing mechanism of the opening of the retaining member> Figures 11 and 12 show an example of the opening and closing configuration of the opening 126a of the retaining member 126. Figure 11 shows the opening / closing cover 102 in the closed state, and Figure 12 shows the opening / closing cover 102 in the open state.

[0069] As shown in Figures 11 and 12, the retaining member 126 has a closing member 126b and a spring 126c. The closing member 126b is a plate-shaped member having an area capable of closing the opening 126a. The spring 126c pulls the closing member 126b with a predetermined force toward the tip side of the retaining member 126, i.e., toward the opposite side of the axis 109 from the opening 126a. The closing member 126b and the spring 126c are housed in a housing space 126d formed inside the retaining member 126 on the opposite side of the axis 109 from the opening 126a. The housing space 126d is in communication with the opening 126a.

[0070] As shown in Figure 11, when the opening / closing cover 102 is closed, the closing member 126b is pulled towards the tip of the retaining member 126 by the spring 126c and slides, opening the opening 126a of the retaining member 126. This allows the TOF sensor 104 to detect the distance to the roll body R. On the other hand, as shown in Figure 12, when the opening / closing cover 102 is open, the closing member 126b slides downward against the tensile force of the spring 126c due to its own weight, closing the opening 126a. This allows the TOF sensor 104 to detect the distance from the retaining member 126 to the closing member 126b.

[0071] Furthermore, if it is possible to link the opening and closing operation of the opening / closing cover 102 with the opening and closing operation of the opening 126a of the retaining member 126, other mechanisms such as a link mechanism or a gear mechanism may be used.

[0072] The control configuration of the printing apparatus 100A according to the second embodiment, and the control contents of the control unit 117 of the printing apparatus 100A, are the same as those of the first embodiment described above, so their explanation will be omitted.

[0073] <Effects of the second embodiment> In this embodiment, in the printing apparatus 100A that drops in a roll of paper R, detection is performed by the TOF sensor 104 through the opening 126a of the pressing member 126. This allows for accurate detection of the remaining amount of paper while preventing the roll of paper P1 from unraveling with the pressing member 126, even when the remaining amount is relatively small.

[0074] <Modified form of the second embodiment> Furthermore, the second embodiment described above is not limited to what has been explained above, and various modifications are possible without departing from its purpose and technical concept.

[0075] For example, in the second embodiment described above, the case in which the pressing member 126 is a plate-shaped member forming an opening 126a was described. However, instead, a configuration may be used in which a pressing roller 127 is rotatably held by a plurality of arm-shaped members, and the held pressing roller 127 presses down on the roll body R to prevent it from unraveling. In this case, when the opening / closing cover 102 is closed, the TOF sensor 104 can detect the distance to the roll body R through the space between the plurality of arm-shaped members. Alternatively, a mechanism may be provided to close the space between the arm-shaped members when the opening / closing cover 102 is opened.

[0076] Furthermore, while the above explanation described the case where the roll paper P1 is pulled out from the top of the roll body R, it can also be applied to the case where the roll paper P1 is pulled out from the bottom of the roll body R.

[0077] <Third Embodiment> A third embodiment of the present invention will now be described. The third embodiment is an embodiment in which the TOF sensor is calibrated with the opening / closing cover closed.

[0078] <Overall configuration of the printing device> Figure 13 shows an example of the overall configuration of the printing apparatus 100B according to the third embodiment. As shown in Figure 13, the printing apparatus 100B has a paper sensor 128 in the middle of the transport path of the roll paper P1 that detects the presence or absence of the roll paper P1. When the opening / closing cover 102 is closed, the control unit 117 detects that the roll paper P1 in the roll body R has been completely consumed, that is, that the roll body R has become empty except for the core member Rc, when the paper sensor 128 detects that the state in which the roll paper P1 is present in the transport path has changed from the state in which the roll paper P1 is present to the state in which it is absent.

[0079] When the roll paper P1 of the roll body R is completely consumed, the core member Rc is exposed. This allows the TOF sensor 104 to detect the distance to the core member Rc located in the detection direction. Since the outer diameter of the core member Rc is determined by, for example, the specifications of the roll body R, the distance from the TOF sensor 104 to the core member Rc is stored in the storage unit 114 as a known value. The control unit 117 performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the detection result by the TOF sensor 104 when the roll paper P1 of the roll body R is empty and the known value stored in the storage unit 114. The core member Rc of the roll body R is an example of an object to be detected, and is also an example of a structural member of a sheet body.

[0080] Note that the configuration of the printing device 100B, including its control configuration, is the same as that of the printing device 100 in the first embodiment described above, and therefore will not be explained. Also, an example of a predetermined state is when the opening / closing cover 102 is closed and the roll paper P1 of the roll body R is empty.

[0081] <Control details of the control unit> Figure 14 shows an example of the control performed by the control unit 117 of the printing device 100B. As shown in Figure 14, in step S110, the control unit 117 determines whether or not the roll paper P1 of the roll body R is empty based on the detection result of the paper sensor 128. If the control unit 117 detects that the roll paper P1 is not empty (step S110: No), it proceeds to step S120.

[0082] In step S120, the control unit 117 sets the processing mode to "measurement mode" and measures the remaining amount of roll paper P1 in the roll body R within the storage unit 103 based on the distance detection result to the roll body R by the TOF sensor 104. Step S120 is an example of the remaining amount detection process. After that, the process returns to step S110.

[0083] On the other hand, in step S110, if the control unit 117 detects that the roll paper P1 is empty (step S110: Yes), it proceeds to step S130.

[0084] In step S130, the control unit 117 sets the processing mode to "calibration" mode and performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the distance detection result from the TOF sensor 104 to the core member Rc when the roll paper P1 of the roll body R is empty, and a known value of said distance read from the storage unit 114. Step S130 is an example of the calibration process.

[0085] In step S140, the control unit 117 corrects the distance detection error of the TOF sensor 104, taking into account the results of the calibration performed in step S130. After that, this flowchart ends.

[0086] <Effects of the Third Embodiment> In this embodiment, the object that the TOF sensor 104 detects the distance to during the calibration process is the core member Rc of the roll body R located in the detection direction of the TOF sensor 104 when the roll body R has been completely consumed. Generally, in a roll body R in which roll paper P1 is wound in a roll shape, the sheet-like roll paper P1 is wound around an appropriate structural member such as the core member Rc. In this case, since the external dimensions of the core member Rc are usually known, when the roll paper P1 of the roll body R is completely consumed and the core member Rc is exposed within the housing section 103 of the printing device 103, the distance from, for example, the part of the core member Rc located in the detection direction of the TOF sensor 104 to the TOF sensor 104 is also known. According to this embodiment, when the roll paper P1 of the roll body R is completely consumed and the core member Rc is exposed, the distance detection deviation of the TOF sensor 104 can be corrected by using the core member Rc at that known distance as the object to be detected. Furthermore, in this embodiment, calibration is performed when the remaining amount of roll paper P1 is zero, which improves the detection accuracy of the remaining amount of roll paper P1 when it is close to zero.

[0087] <Modified form of the third embodiment> Furthermore, the third embodiment described above is not limited to what has been explained above, and various modifications are possible without departing from its purpose and technical concept.

[0088] <When performing calibration when replacing with a new roll> For example, the calibration process may be performed when the roll body R is replaced with a new one. The configuration of the printing apparatus 100C according to this modified example is the same as that of the printing apparatus 100 in the first embodiment described above, so a description will be omitted.

[0089] The control unit 117 of the printing device 100C determines whether the roll body R has been replaced with a new one after the opening / closing cover 102 has been opened and then closed. This determination is made based on the detection result of the TOF sensor 104. For example, the control unit 117 calculates the difference between the remaining amount of roll paper P1 measured before the opening / closing cover 102 is opened and the remaining amount measured after the opening / closing cover 102 is closed, and determines that the roll body R has been replaced with a new one if the difference is greater than or equal to a predetermined threshold. Note that whether or not the roll body R has been replaced with a new one may be detected by a sensor other than the TOF sensor 104.

[0090] The TOF sensor 104 detects the distance to the new roll body R that has been replaced, that is, the distance to the roll paper P1 closest to the TOF sensor 104 within the roll body R. Generally, a new roll body R is a standard product with known external dimensions, so when it is placed in the storage section 103, whose position is known within the printing device 100C, the distance from the roll paper P1 on the TOF sensor 104 side to the TOF sensor 104 is also known. This known value is stored in the storage unit 114 beforehand. The control unit 117 performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the detection result by the TOF sensor 104 when the roll body R has been replaced with a new one, and the known value stored in the storage unit 114.

[0091] The roll paper P1 closest to the TOF sensor 104 within the roll body R is an example of an object to be detected. Furthermore, an example of a predetermined state is when the opening / closing cover 102 is closed from the open position, and the roll body R has been replaced with a new one.

[0092] Figure 15 shows an example of the control operations performed by the control unit 117 of the printing device 100C. In Figure 15, steps S210 and S220 are the same as steps S5 and S10 in Figure 6 described above, so their explanation is omitted.

[0093] In step S210 described above, if the control unit 117 detects that the opening / closing cover 102 has been opened (step S210: Yes), it proceeds to step S230.

[0094] In step S230, the control unit 117 determines whether the opening / closing cover 102 has been closed based on the detection result of the opening / closing sensor 120. The control unit 117 waits in step S230 until the opening / closing cover 102 is closed (step S230: No), and if it detects that the opening / closing cover 102 has been closed (step S230: Yes), it proceeds to step S240.

[0095] In step S240, the control unit 117 sets the processing mode to "measurement mode" and measures the remaining amount of roll paper P1 in the roll body R within the storage unit 103 based on the distance detection result to the roll body R by the TOF sensor 104. This measurement of the remaining amount may be performed only once or multiple times.

[0096] In step S250, the control unit 117 compares the remaining amount of roll paper P1 measured immediately before the opening / closing cover 102 is opened in step S210 with the remaining amount of roll paper P1 measured in step S240 after the opening / closing cover 102 has been closed, and determines whether the difference is greater than or equal to a predetermined threshold. If the difference in the remaining amount measured is less than the threshold (step S250: No), the control unit 117 terminates this flowchart, determining that the roll has not been replaced with a new roll R. On the other hand, if the difference in the remaining amount measured is greater than or equal to the threshold (step S250: Yes), the control unit 117 proceeds to step S260, determining that the roll has been replaced with a new roll R. The threshold is pre-set to an appropriate value so that the replacement with a new roll R can be detected.

[0097] In step S260, the control unit 117 sets the processing mode to "calibration" mode and performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the distance detection result to the roll body R by the TOF sensor 104 when the roll body R has been replaced with a new one, and a known value of said distance read from the storage unit 114. Step S260 is an example of the calibration process.

[0098] In step S270, the control unit 117 corrects the distance detection error of the TOF sensor 104, taking into account the results of the calibration performed in step S260. After that, this flowchart ends.

[0099] In the modified example described above, the object that the TOF sensor 104 detects the distance to during the calibration process is the roll paper P1 closest to the TOF sensor 104 when the roll body R has been replaced with a new one. Generally, a new roll body R is a standard product with known external dimensions, so when it is placed in the storage section 103, whose position is known within the printing device 100C, the distance from the roll paper P1 on the TOF sensor 104 side to the TOF sensor 104 is also known. According to this modified example, when the roll body R is replaced with a new one, the distance detection error of the TOF sensor 104 can be corrected by using the roll paper P1 at the known distance as the object to be detected.

[0100] Furthermore, the above modified method can also be applied to printing devices that have a configuration in which a new roll body R is replaced without opening or closing the opening / closing cover 102. For example, this applies to printing devices that have a configuration in which a new roll body R is replaced by inserting and removing the roll paper cassette into and out of the housing 101. In this case, in step S210, it is necessary to determine whether or not the roll paper cassette has been detected to have been removed from the housing 101 by an appropriate sensor, and in step S230, it is necessary to determine whether or not the roll paper cassette has been inserted into the housing 101. Then, in step S250, it is necessary to compare the remaining amount of roll paper P1 measured immediately before the roll paper cassette was removed in step S210 with the remaining amount of roll paper P1 measured after the roll paper cassette was inserted, and determine whether or not the difference is greater than or equal to a predetermined threshold.

[0101] <When performing calibration when the roll body is not yet contained> For example, the calibration process may be performed even when the roll body R is not housed in the storage section 103.

[0102] Figure 16 shows an example of the configuration of the printing apparatus 100D according to this modified example. As shown in Figure 16, the printing apparatus 100D is a drop-in type printing apparatus, similar to the printing apparatus 100A of the second embodiment described above, and has a plurality of rollers 125 that rotatably support the roll body R at the bottom 103b of the housing section 103. The TOF sensor 104 is installed in a recess 102a formed in the opening / closing cover 102 so as to face the roll body R housed in the housing section 103. When the roll body R is not housed in the housing section 103, the TOF sensor 104 faces the bottom 103b of the housing section 103.

[0103] A roll detection sensor 129 is installed in the housing section 103 to detect the presence or absence of a roll body R. The roll detection sensor 129 is located at the lower part of the axial side surface of the roll body R in the housing section 103. The roll detection sensor 129 may be a sensor that detects the presence or absence of a roll body R, for example, optically, or by mechanical, magnetic, or other means. The other configurations of the printing apparatus 100D are the same as those of the printing apparatus 100A of the second embodiment described above, except that the pressing member 126 is not equipped.

[0104] Alternatively, the presence or absence of the roll body R in the storage section 103 may be detected based on the detection value of the TOF sensor 104, without providing the roll detection sensor 129. For example, if the detection value of the TOF sensor 104 is greater than a predetermined threshold when the opening / closing cover 102 is closed, it may be determined that the roll body R is not stored in the storage section 103.

[0105] The control unit 117 of the printing device 100D determines whether or not a roll body R is stored in the storage section 103 based on the detection result of the roll detection sensor 129 after the opening / closing cover 102 has been opened and then closed. If the roll body R is not stored, the TOF sensor 104 becomes able to detect the distance to the bottom 103b of the storage section 103. The distance from the TOF sensor 104 to the bottom 103b is stored in the storage unit 114 as a known value. Based on the detection result of the TOF sensor 104 when the roll body R is not stored in the storage section 103 and the known value stored in the storage unit 114, the control unit 117 performs calibration to correct the distance detection deviation of the TOF sensor 104. In addition, in order to perform the above calibration, the control unit 117 displays a guidance message on the display unit 115 prompting the user to remove the roll body R and close the opening / closing cover 102.

[0106] One example of a predetermined state is when the opening / closing cover 102 is closed from the open position, and the roll body R is not housed in the storage section 103. The bottom portion 103b is an example of a fixed structural member.

[0107] Furthermore, the object detected by the TOF sensor 104 is not limited to the bottom 103b of the storage section 103. The object detected by the TOF sensor 104 can be any fixed structural member of the printing device 100D that the TOF sensor 104 can detect the distance to when the roll body R is not stored, such as a wall or other member.

[0108] Figure 17 shows an example of the control operations performed by the control unit 117 of the printing device 100D. In Figure 17, steps S310 and S320 are the same as steps S5 and S10 in Figure 6 described above, so their explanation is omitted.

[0109] In step S310, if the control unit 117 detects that the opening / closing cover 102 has been opened (step S310: Yes), it proceeds to step S330.

[0110] In step S330, the control unit 117 displays a guidance message on the display unit 115 prompting the user to remove the roll body R and close the opening / closing cover 102. An example of this guidance message is shown in Figure 18.

[0111] In step S340, the control unit 117 determines whether the opening / closing cover 102 has been closed based on the detection result of the opening / closing sensor 120. The control unit 117 waits in step S340 until the opening / closing cover 102 is closed (step S340: No), and if it detects that the opening / closing cover 102 has been closed (step S340: Yes), it proceeds to step S350.

[0112] In step S350, the control unit 117 determines, based on the detection result of the roll detection sensor 129, whether the roll body R is in an unused state and not stored in the storage unit 103. If the control unit 117 determines that the roll body R is stored in the storage unit 103 (step S350: No), the process proceeds to step S360.

[0113] In step S360, the control unit 117 displays an error message on the display unit 115 warning the user that the roll body R is installed. An example of this error message is shown in Figure 19. In the example shown in Figure 19, the user is warned that the roll body R is installed and is prompted to remove the roll body R and close the opening / closing cover 102 again. The process then returns to step S340.

[0114] On the other hand, if the control unit 117 determines in step S350 that the roll body R is not housed in the storage unit 103 (step S350: Yes), it proceeds to step S370.

[0115] In step S370, the control unit 117 sets the processing mode to "calibration" mode and performs calibration to correct the distance detection deviation of the TOF sensor 104 based on the distance detection result to the bottom 103b by the TOF sensor 104 when the roll body R is in an unaccommodated state and not stored in the storage unit 103, and a known value of said distance read from the storage unit 114. Step S370 is an example of the calibration process.

[0116] In step S380, the control unit 117 corrects the distance detection error of the TOF sensor 104, taking into account the results of the calibration performed in step S370. After that, this flowchart ends.

[0117] In the modified example described above, the object that the TOF sensor 104 detects the distance of during the calibration process is the bottom 103b of the housing 103. This allows the TOF sensor 104 to correct its distance detection error by using the bottom 103b, which is located at a predetermined position within the printing device 100D and at a known distance from the TOF sensor 104, as the object to be detected.

[0118] <Fourth Embodiment> A fourth embodiment of the present invention will now be described. The fourth embodiment is an embodiment in which a printing device prints on cut paper.

[0119] <Overall configuration of the printing device> Figure 20 shows an example of the overall configuration of the printing apparatus 200 according to the fourth embodiment. As shown in Figure 20, the printing apparatus 200 includes a housing 201, a tray 202, a storage section 203, a TOF sensor 204, a transport section 205, a printing section 206, a detachment sensor 207, and a guide wall section 208.

[0120] The housing 201 contains a tray 202, a storage section 203, a TOF sensor 204, a transport section 205, a printing section 206, a detachable sensor 207, and a guide wall section 208, etc.

[0121] The tray 202 is attached to and removed from the housing 201 by inserting and removing it from the lower part of the housing 201. The attachment / detachment sensor 207 is installed, for example, on the guide wall 208 and detects whether the tray 202 is inserted into or removed from the housing 201. The attachment / detachment sensor 207 may be a sensor that detects the attachment / detachment state of the tray 202 mechanically, for example, or a sensor that detects it by optical, magnetic, or other methods.

[0122] The storage section 203 is provided in the tray 202. The storage section 203 accommodates a sheet body S in which multiple cut sheets P2 are stacked in the thickness direction. Cut sheets P2 are an example of a sheet-like medium.

[0123] The TOF sensor 204 is installed on the upper part of the tray 202 inserted into the housing 201, for example, on the arm support member 210 that rotatably supports the swing arm 209 (described later), so as to face the sheet body S. The TOF sensor 204 detects the distance to the cut paper P2 closest to the TOF sensor 204 in the sheet body S, i.e., the uppermost cut paper P2. The TOF sensor 204 may be installed anywhere that faces the sheet body S, and may be installed on a member other than the arm support member 210.

[0124] The transport unit 205 transports the cut paper P2 stored in the storage unit 203. The transport unit 205 includes, for example, a feeding roller 205a, an intermediate roller 205b, a transport roller 205c, and a paper discharge roller 205d. The feeding roller 205a is installed near the tip of a swinging arm 209 that is rotatably supported by an arm support member 210. The feeding roller 205a rotates under the drive of a motor, feeding the cut paper P2 from the storage unit 203 of the tray 202 and transporting it along the guide wall 208. The intermediate roller 205b transports the cut paper P2 transported by the feeding roller 205a to the transport roller 205c. The transport roller 205c transports the cut paper P2 transported by the intermediate roller 205b to the printing unit 206. The paper output roller 205d transports the cut paper P2, which has been printed by the printing unit 206, to the paper output port 211.

[0125] The printing unit 206 prints on the cut paper P2 that is transported by the transport roller 205c. The printing unit 206 is a print head positioned downstream of the transport roller 205c in the transport direction and upstream of the paper discharge roller 205d in the transport direction.

[0126] The control unit 217 of the printing device 200 (see Figure 21 below) determines whether the tray 202 has been removed from the housing 201 based on the detection result of the attachment / detachment sensor 207. If the tray 202 has been removed from the housing 201, the TOF sensor 204 can detect the distance to the exposed bottom 201a of the housing 201. The distance from the TOF sensor 204 to the bottom 201a is stored in advance as a known value in the storage unit 214 (see Figure 21 below). Based on the detection result of the TOF sensor 204 when the tray 202 is removed from the housing 201 and the known value stored in the storage unit 214, the control unit 217 performs calibration to correct the distance detection deviation of the TOF sensor 204. The bottom 201a is an example of a fixed structural member.

[0127] Furthermore, the object detected by the TOF sensor 204 is not limited to the bottom 201a of the housing 201. Any fixed structural member of the printing device 200 that the TOF sensor 204 can detect the distance of when the tray 202 is detached from the housing 201 is acceptable, such as a wall or other member. The state in which the tray 202 is detached from the housing 201 is an example of a predetermined state.

[0128] <Control configuration of printing device> Figure 21 shows an example of the control configuration of the printing device 200.

[0129] As shown in Figure 21, the printing apparatus 200 includes, in addition to the aforementioned TOF sensor 204, transport unit 205, printing unit 206, and attachment / detachment sensor 207, a storage unit 214, a display unit 215, an operation unit 216, and a control unit 217. The TOF sensor 204, transport unit 205, printing unit 206, attachment / detachment sensor 207, storage unit 214, display unit 215, operation unit 216, and control unit 217 are connected via a bus 218 to enable information transmission and reception.

[0130] The memory unit 214 stores various programs 219, including, for example, a printing program and a calibration process as shown in the flowchart of Figure 22 described later, as well as various data 220, including, for example, image data of the object to be printed and a known distance from the TOF sensor 204 to the bottom 201a.

[0131] The control unit 217 is a device that performs data processing, such as a processor like a CPU. The control unit 217 executes various programs stored in the storage unit 214. The program 219 in the storage unit 214 and the control unit 217 that uses it are an example of a control unit.

[0132] The display unit 215 is, for example, a liquid crystal display and is capable of displaying various information. The operation unit 216 is, for example, a keyboard or buttons and accepts user input. By operating the operation unit 216, the user can input various instructions to the printing device 200.

[0133] <Control details of the control unit> Figure 22 shows an example of the control operations performed by the control unit 217 of the printing device 200.

[0134] In step S405, the control unit 217 determines whether the tray 202 has been removed from the housing 201 based on the detection result of the attachment / detachment sensor 207. If the control unit 217 detects that the tray 202 is inserted into the housing 201 (step S405: No), it proceeds to step S410.

[0135] In step S410, the control unit 217 sets the processing mode to "measurement mode" and measures the remaining amount of cut paper P2 in the storage unit 203 based on the distance detection result to the sheet body S by the TOF sensor 204. Step S410 is an example of the remaining amount detection process. After that, the process returns to step S405.

[0136] On the other hand, if the control unit 217 detects in step S405 that the tray 202 has been removed from the housing 201 (step S405: Yes), it proceeds to step S415.

[0137] In step S415, the control unit 217 sets the processing mode to "calibration" mode and performs calibration to correct the distance detection deviation of the TOF sensor 204 based on the distance detection result from the TOF sensor 204 to the bottom 201a when the tray 202 is removed from the housing 201 and a known value of said distance read from the storage unit 214. Step S415 is an example of the calibration process.

[0138] In step S420, the control unit 217 determines, based on the detection result of the insertion / removal sensor 207, whether or not the tray 202 was inserted into the housing 201 before the end of calibration. If the control unit 217 detects that the tray 202 was inserted before the end of calibration (step S420: Yes), it proceeds to step S425.

[0139] In step S425, the control unit 217 interrupts the calibration. Then, this flowchart is terminated.

[0140] On the other hand, in step S420, if the control unit 217 does not detect that the tray 202 has been inserted into the housing 201 before the end of calibration, in other words, if the calibration is completed with the tray 202 removed from the housing 201 (step S420: No), the process proceeds to step S430.

[0141] In step S430, the control unit 217 determines whether the tray 202 has been inserted into the housing 201 based on the detection result of the insertion / removal sensor 207. The control unit 217 waits in step S430 until the tray 202 is inserted into the housing 201 (step S430: No), and if it detects that the tray 202 has been inserted into the housing 201 (step S430: Yes), it proceeds to step S435.

[0142] In step S435, the control unit 217 sets the processing mode to "measurement mode" and measures the remaining amount of cut paper P2 in the storage unit 203 based on the distance detection result to the sheet body S by the TOF sensor 204. This measurement of the remaining amount may be performed only once or multiple times.

[0143] In step S440, the control unit 217 compares the remaining amount of cut paper P2 measured immediately before performing calibration in step S415 with the remaining amount of cut paper P2 measured in step S435 after performing calibration, and determines whether the difference is less than or equal to a threshold. If the difference in the remaining amount measurement is greater than the threshold (step S440: No), the control unit 217 proceeds to step S445.

[0144] In step S440, instead of comparing the remaining amount measurements before and after calibration, the distance values ​​to the sheet body S detected by the TOF sensor 204 before and after calibration may be compared. In this case, the distance value detected before calibration is an example of the first distance, the distance value detected after calibration is an example of the second distance, and step S440 is an example of the distance comparison process.

[0145] In step S445, the control unit 217 corrects the distance detection error of the TOF sensor 204, taking into account the results of the calibration performed in step S415. After that, this flowchart ends.

[0146] On the other hand, in step S440, if the difference in the remaining amount measurement value is less than or equal to the threshold (step S440: Yes), the control unit 217 proceeds to step S450.

[0147] In step S450, the control unit 217 discards the calibration results performed in step S415 and does not correct the distance detection deviation of the TOF sensor 204. That is, if the difference in the remaining amount measurement value is below a threshold, it is assumed that, for example, the tray 202 was removed from the housing 201 by the user and then reinserted into the housing 201 without increasing or decreasing the amount of cut paper P2, a so-called reset. In this case, if correction by calibration is performed, even though the sheet body S consists of the same amount of cut paper P2, there is a possibility that the detection distance will vary before and after the reset. In step S450, by not performing correction by calibration, the occurrence of the above variation in detection distance can be prevented. After that, this flowchart ends.

[0148] Steps S445 and S450 described above are examples of processes for determining whether or not to reflect the changes.

[0149] <Effects of the 4th Embodiment> According to the printing apparatus 200 of this embodiment, the distance detection deviation in the TOF sensor 204 is corrected by performing a calibration process, so that the distance to the sheet body S to be detected can be detected optically with accuracy. As a result, the remaining amount of cut paper P2 can be detected with high accuracy.

[0150] In addition to what has already been described above, the methods described in each of the above embodiments and their respective modifications may be used in appropriate combinations.

[0151] In the above explanation, if terms such as "perpendicular," "parallel," and "plane" are used, these terms do not have a strict meaning. Rather, "perpendicular," "parallel," and "plane" refer to a design or manufacturing tolerance or error that is acceptable, meaning that they are "effectively perpendicular," "effectively parallel," and "effectively plane."

[0152] Furthermore, in the above explanation, if there are descriptions such as "identical," "equal," or "different" regarding external dimensions or size, these descriptions do not have a strict meaning. In other words, "identical," "equal," and "different" mean that tolerances and errors in design and manufacturing are allowed, and that they are "substantially identical," "substantially equal," or "substantially different."

[0153] Furthermore, although not to be exemplified individually, the present invention may be implemented with various modifications without departing from its spirit. [Explanation of Symbols]

[0154] 100 Printing equipment 100A Printing Machine 100B printing device 100C printing device 100D printing equipment 101 cabinets 102 Opening / Closing Cover 103 Storage Unit 103b bottom 104 TOF Sensor 105 Conveying section 106 Printing Department 107 Cutting section 111 Movable plate 117 Control Unit 123 Fixed plate 200 Printing device 201 cabinet 201a bottom 202 Tray 203 Accommodation Unit 204 TOF Sensor 205 Conveying Section 206 Printing Department 217 Control Unit P1 Roll Paper P2 Cut Sheet R Roll Body Rc core member S Sheet Body

Claims

1. A storage section capable of accommodating a sheet body in which a sheet-like medium is wound into a roll or multiple sheets are stacked in the thickness direction, A TOF sensor for detecting the distance to the aforementioned sheet body, A transport unit for transporting the sheet-like medium of the sheet body housed in the aforementioned storage unit, A printing unit that prints on the sheet-like medium conveyed by the conveying unit, Control unit and A housing that encloses the storage unit, the transport unit, and the printing unit, An opening / closing cover for opening and closing an opening provided in the housing, It has, The control unit, Based on the distance detection result to the sheet body by the TOF sensor, a remaining amount detection process is performed to detect the remaining amount of the sheet-like medium in the sheet body within the storage compartment. A calibration process is performed to correct the distance detection deviation of the TOF sensor based on the distance detection result of the TOF sensor to the object to be detected in a predetermined state where the distance from the TOF sensor to the object to be detected is a known value, and A printing device that performs the following: The aforementioned predetermined state is, The aforementioned opening / closing cover is in a state where it has been opened from a closed state, or, The aforementioned opening / closing cover is in the state where it has been moved from the open position to the closed position. The object to be detected is, This is a relative displacement member whose relative position to the TOF sensor changes in conjunction with the opening or closing operation of the opening / closing cover. Printing device.

2. The control unit further, A distance comparison process that compares a first distance to the sheet body detected by the TOF sensor before the calibration process is performed and a second distance to the sheet body detected by the TOF sensor after the calibration process is performed. A determination process for whether or not to reflect the correction in the calibration process in the subsequent remaining amount detection process, depending on the comparison result in the distance comparison process, A printing apparatus according to claim 1, which performs the following:

3. A storage section capable of accommodating a sheet body in which a sheet-like medium is wound in a roll shape or multiple sheets are stacked in the thickness direction, A TOF sensor for detecting the distance to the aforementioned sheet body, A transport unit for transporting the sheet-like medium of the sheet body housed in the aforementioned storage unit, A printing unit that prints on the sheet-like medium conveyed by the conveying unit, Control unit and A printing apparatus having, The control unit, Based on the distance detection result to the sheet body by the TOF sensor, a remaining amount detection process is performed to detect the remaining amount of the sheet-like medium in the sheet body within the storage compartment. A calibration process is performed to correct the distance detection deviation of the TOF sensor based on the distance detection result of the TOF sensor to the object to be detected in a predetermined state where the distance from the TOF sensor to the object to be detected is a known value, and A distance comparison process that compares a first distance to the sheet body detected by the TOF sensor before the calibration process is performed and a second distance to the sheet body detected by the TOF sensor after the calibration process is performed. A determination process for whether or not to reflect the correction in the calibration process in the subsequent remaining amount detection process, depending on the comparison result in the distance comparison process, A printing device that performs this task.

4. A housing that encloses the storage unit, the transport unit, and the printing unit, An opening / closing cover for opening and closing an opening provided in the housing, It further possesses, The aforementioned predetermined state is, The aforementioned opening / closing cover is in a state where it has been opened from a closed state, or, The aforementioned opening / closing cover is in the state where it has been moved from the open position to the closed position. The printing apparatus according to claim 3.

5. The object to be detected is, When the sheet body in the housing is replaced, the sheet-like medium contained in the sheet body that is closest to the TOF sensor, The printing apparatus according to claim 3.

6. The object to be detected is, When the sheet-like medium of the sheet body within the storage section is completely consumed, the structural member of the sheet body located in the detection direction of the TOF sensor is: The printing apparatus according to claim 3.

7. The object to be detected is, The fixing structural member of the aforementioned printing apparatus, The printing apparatus according to claim 3.