Printing apparatus and control method therefor

Abstract: A printer and control method therefor enable printing at a specific location on an inserted cut-sheet form irrespective of whether the form is loaded automatically or manually in the printing apparatus. When a specific selection command is received from a host, the printer selects the insertion operation to be used for the cut-sheet form. If automatic loading is selected, the leading edge of the form is set to a specific position in the printer by a transport means, and printing then begins. If manually positioned form insertion is selected, printing begins directly with the form as inserted and positioned by the user.

Description: The present invention relates to a printing apparatus for printing on cut-sheet type recording media, to a method of controlling such printing apparatus, and to a storage medium for storing a control program corresponding to the control method. Printing apparatus for printing on cut-sheet type recording media, such as cut-sheet forms or paper, like slip forms, checks etc. (simply referred to as "paper" hereinafter), are well known. US-A-5,035,413, for instance, discloses a printer having a cut-sheet insertion path. Paper manually inserted into that insertion path is advanced to a printing start position in the printer. JP-A-2024172 discloses a printing apparatus having a manual sheet insertion port and a plurality of paper sensors arranged in accordance with different paper sizes. Means are provided in this printing apparatus for detecting a skew of an inserted paper by comparing the detection results of those paper sensors in the initial state to which the paper is manually inserted and after the paper has been advanced from that initial state. If the paper sensors indicate different paper sizes before and after the paper is advanced the user is prompted to reinsert the paper. Another example of a prior art printer for printing on cut-sheet paper is shown in Fig. 11. This printer 9 comprises a horizontal paper path 11 along which a (sheet or piece of) paper 1 can be transported from the right side of the figure toward the left side. The printer 9 further comprises, arrayed along paper path 11 from right to left in the order mentioned: BOF sensor 21 for detecting the presence of paper 1 in the paper path 11 and for detecting the trailing edge of the paper during printing; feed roller 31 and pinch roller 32 for transporting paper 1 along paper path 11; platen 36 and print head 37 for printing on paper 1; TOF sensor 22 for detecting the presence of a paper 1 in the paper path 11 and for detecting the leading edge of the paper; paper stop 15; and a paper guide 14 for guiding the printed paper 1 to a paper exit. To print at a specific position on a paper 1, the paper 1 must be placed in a specific position and manner in an insertion area 12 of the paper path 11. Paper stop 15 is therefore provided in this insertion area 12 to form an abutment for the leading edge of a paper 1 inserted into the paper path 11. The state in which the paper contacts paper stop 15, defines a predetermined and reproducible loading position for the papers. Depending upon the user or the type of paper 1 used, however, the tactile response when the leading edge of paper 1 abuts against paper stop 15 varies. If the paper 1 is not sufficiently stiff and contact with paper stop 15 is therefore soft, for example, the user may not recognize that the paper 1 has already contacted paper stop 15, resulting in paper 1 being inserted further and buckling inside paper path 11. If the paper 1 is then pinched between feed roller 31 and pinch roller 32 and paper stop 15 is retracted from paper path 11, the leading edge of paper 1 tends to shift from the normal position in the insertion area 12, so that the paper 1 will not be printed at the desired position. On the other hand, if TOF sensor 22 and BOF sensor 21 both indicate presence of paper despite the leading edge of the paper having not reached paper stop 15, the paper 1 will be pinched by the rollers 31 and 32 after a certain period of time has elapsed, and printing will be enabled. When printing starts in this condition, it will again not occur at the desired position on the paper 1. To resolve this problem, a conventional printer comprised as described above indexes the paper 1 to the correct loading position by transporting it in the forward or backward direction while detecting the leading and trailing edges of the paper with TOF sensor 22 and BOF sensor 21, thereby controlling the position of the leading edge of the paper in the insertion area 12. If the paper is positioned by such indexing operation, the paper stop is not necessarily required. Printers without such a paper stop have therefore also been developed. As described above, in order to ensure that a paper is correctly positioned and is printed at a desired position it is known to perform a paper indexing operation automatically when a paper is inserted. However, there are cases in which it is desirable to position a specific part of a paper at the printing position of the print head, and then to print on the paper at that specific part. This is referred to below as "target printing." One exemplary application for target printing is check printing, more specifically, printing the amount at a specific position on the check. In the prior art described above, however, the paper is automatically indexed to a predetermined position in the paper path 11 when the paper is inserted, and target printing at a specific desired position on the paper is therefore not possible. EP-A-0 486 031 discloses a printing apparatus comprising: an interface for communication with a host device; a paper path having an insertion opening at one end and a discharge opening at the other end; detection means for detecting whether a recording medium is present in the paper path; transport means for transporting the recording medium; printing means for printing on a cut-sheet type recording medium according to a print command and print data received from the host device; and control means. The insertion opening, the transport means, the printing means and the discharge opening are arranged in this order along the paper path. The printing apparatus is adapted to have either a first type of recording medium inserted through the insertion opening or a second type of recording medium inserted through the discharge opening. Selection means is responsive to a specific control command from the host device for selecting one of the two types of recording medium. The control means is adapted to automatically positions the leading edge of the first type of recording medium inserted through the insertion opening, but does not position the leading edge of a second type recording medium inserted through the second insertion opening. When the second type of recording medium is inserted through the discharge opening its inserted edge abuts against a positioning edge in the printing apparatus and printing starts from this position. With both, the first and the second type of recording medium the print start position is, thus, fixed and target printing is not possible. Thus, there is a need for a printing apparatus that can selectively perform a certain process when a cut-sheet type recording medium to be printed is inserted, according to the printing objective. It is an object of the invention to provide a printing apparatus allowing to selectively control, according to a printing objective, the process performed upon insertion of such recording medium. Another object of the invention is to provide a method of controlling such printing apparatus, and a storage medium storing a control program for implementing the control method. These objects are achieved with a printing apparatus as claimed in claim 1, a method as claimed in claim 6 and a storage medium as claimed in claim 9. Preferred embodiments of the invention are subject-matter of the dependent claims. Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying diagrammatic drawings, in which like parts are designated by like reference numerals and in which: Fig. 1 is a perspective view of a printer according to a preferred embodiment of the present invention; Fig. 2 is a view of the components arranged along the paper path together with a functional block diagram of the printer shown in Fig. 1; Fig. 3 is a flow chart used to describe the process for selecting the operation performed when a paper is inserted into the printer; Fig. 4 is a flow chart used to describe the operation controlling loading a paper; Fig. 5 is a flow chart used to describe the operation controlling a first evaluation process for checking whether a paper is skewed; Fig. 6 is a flow chart used to describe the operation controlling a second evaluation process for detecting the leading edge of a paper; Fig. 7 is a flow chart used to describe the operation controlling a leading edge indexing operation; Fig. 8 is a plan view illustrating movement of a paper during the skew detection process shown in Fig. 5; Fig. 9 is a plan view illustrating movement of a paper during the detection of skew in a different direction from that shown in Fig. 8; Fig. 10 is a plan view illustrating movement of a printing form during a leading edge detection and indexing operation; Fig. 11 is a view of a printer according to the prior art. Preferred embodiments of the present invention are described below with reference to the accompanying figures, of which Fig. 1 is an external perspective view of a printer 10 representing one preferred embodiment of a printing apparatus according to the invention. An arrangement of the substantial components of this printer 10 is shown in Fig. 2 with particular attention being given to the components disposed along the paper path 11. As shown in Fig. 2, the printer 10 of the present embodiment comprises, like the prior art printer described above and shown in Fig. 11, a BOF sensor 21, a transport mechanism 34 including a feed roller 31 and a pinch roller 32, a printing area 35 comprising a platen 36 and a print head 37, a TOF sensor 22, and a paper stop 15. These components are arranged in this order along the paper path 11 from the right side to the left side. A paper guide 14 for guiding the printed paper 1 to a paper exit is further disposed on the downstream side, shown at the left in the figure. The printer 10 further comprises a platen drive mechanism 40 for moving platen 36 up (closing) and down (opening) in a direction perpendicular to paper path 11. Paper transport mechanism 34 can be set to an operating state or a non-operating state in conjunction with platen closing and opening. The platen drive mechanism 40 comprises a platen frame 42, which serves to raise platen 36 by means of a spring 41; an operating rod 43 for controlling an up and down movement of the platen frame 42 by means of contact with an incline 42a of the platen frame 42; and a solenoid 44 for moving the position of the operating rod 43. When the operating rod 43 is moved to the right or left as seen in the figure by the solenoid 44, the platen frame 42 moves up or down, respectively, thereby moving the platen 36 into or out of the paper path 11. Movement of platen frame 42 also causes feed roller 31 to move concomitantly with platen 36 between an operating position in which a paper 1 inserted into an insertion area 12 is pinched between pinch roller 32 and feed roller 31, and a non-operating position retracted from pinch roller 32. When paper 1 is pinched it can be transported by the paper transport mechanism 34. In this way the paper transport mechanism in printer 10 is set to its non-operating state or its operating state in conjunction with the platen opening or closing movement. The operating rod 43 also contacts an incline 16a of a paper stop frame 16, which supports the paper stop 15 in a pivotable manner. The incline 16a of the paper stop frame 16 slopes in the direction opposite to that of the incline 42a of the platen frame. As a result, when the platen 36 moves into the paper path 11 as the operating rod 43 is moved to the right in Fig. 2, paper stop 15 is retracted from paper path 11. A paper 1 can thus be transported by rollers 31 and 32, and print head 37 can be moved in a direction perpendicular to the paper transport direction by a drive means not shown in the figure. In this way printing can be performed at a desired position on paper 1. As shown in Fig. 1, printer 10 comprises a base 2 substantially in the form of a rectangular parallelepiped. The top of the base functions as a table 3 used for paper path 11. At approximately the middle of the base 2 is attached a top cover 4 in which are housed the print head 37 and appurtenant components such as an ink ribbon, if required, a carriage mechanism supporting the print head, etc., these components being not shown in the figure. A document table 5 is disposed on the paper insertion side (the front or right side as shown in the figure) of the table 3 as an extension of the table 3, the two tables together forming a substantially plane surface of paper path 11 continuous to the surface below the top cover 4. A fixed paper guide 6 extending to a point proximal to BOF sensor 21 is provided on one side of document table 5 and forms one edge 11a (the right edge as seen in the figure) of paper path 11. A short, movable paper guide 7 for adjusting the width of the paper path 11 to the width of the paper is provided on the side of the paper path 11 opposite to paper guide 6. With the structure described above, it is possible to insert a paper 1 into the insertion area 12 of paper path 11 in printer 10 without skewing the paper alignment by inserting the paper 1 with one edge 1c held in contact with paper guide 6. With a table 3 thus configured, a paper 1 can be inserted in the direction X shown in Fig. 1 along the paper path 11 using the paper guides 6 and 7, or, alternatively, perpendicularly to the paper path 11 for target printing at a specific position 1a on paper 1 as indicated by arrow Y in Fig. 1. To facilitate alignment of the paper in this case, a mark 13 indicating the position of the path along which print head 37 travels, i.e., the position of the printing area 35 of paper path 11, is provided on the side 4a of top cover 4 from which the paper is inserted for target printing, that is, the left side as seen in Fig. 1. It is therefore possible to align paper 1 for target printing with this mark 13 to facilitate correct positioning. An operating panel 8a used for local control of printer 10 is provided on the right side of table 3 as seen in Fig. 1. A power switch 8b is provided on base 2. A control unit 50 for controlling various components of the printer 10 according to a control program and commands input by means of the operating panel 8a is also provided in printer 10. This control unit 50 comprises a memory 59, such as a flash memory, or other storage device for storing information such as the control program and settings. The printer 10 is connected to a host 81 by means of an interface cable 82 or communications interface such as an infrared transceiver, thereby enabling print data, control data and other information to be exchanged between printer 10 and host 81. The printer 10 can be controlled by an application program running on the host 81. Alternatively, a control program can be received from the host 81 via the interface and written into memory 59. The host 81 also has the ability to read and/or write portable storage media such as floppy disks 83 and ROM cards, which can be used to supply a control program to the printer 10. The host 81 may further have telecommunications functionality enabling communication via the Internet or other computer network 84. When thus comprised, a control program can be received via the network, stored on an internal hard disk 85 or other storage medium, and from there supplied to the printer 10. It will also be obvious that the printer 10 itself could include the necessary LAN hardware and software enabling direct connection to a network such that a control program, print data and/or other information can be supplied directly to the printer 10 via the network. The configuration of control unit 50 which is adapted to control, among others, the operation for loading (setting) a paper in the paper path 11 of printer 10 is described in further detail below with reference to Fig. 2. As shown in Fig. 2, control unit 50 comprises a paper detection unit 55, a mechanical control unit 56, a status determination unit 58, a bypass unit 54, the memory 59, and an interface 57. Using BOF sensor 21 and TOF sensor 22 the paper detection unit 55 determines whether paper is present in the paper path 11. The mechanical control unit 56 controls, for example, the opening/closing movement of platen 36 described above, the transport mechanism 34 and the print head 37. The status determination unit 58 evaluates the paper loading status based on the detection result output from the paper detection unit 55 when the transport mechanism 34 is driven in the forward or backward direction after it has been made operable in response to detection of paper by the paper detection unit 55. The status determination unit 58 comprises first and second evaluation units 51 and 52, and an indexing unit 53. The first evaluation unit 51 drives the transport mechanism 34 in a forward direction, detects presence of paper using BOF sensor 21, and checks for paper skewing. The second evaluation unit 52 drives the transport mechanism 34 in the backward direction, detects presence of paper using TOF sensor 22, and detects the leading edge of the paper 1. The indexing unit 53 drives the transport mechanism 34 so as to advance the paper by a specific distance in the forward direction and detects paper presence using the TOF sensor 22 to index the paper to a specific position. This status determination unit 58 can therefore be used for an auto-loading operation whereby paper 1 is reliably and automatically loaded, each sheet to the same position. The bypass unit 54 enables printing to be started without evaluating the paper loading status by bypassing the status determination unit 58. The bypass unit 54 therefore enables a paper 1 to be inserted with the desired printing position 1a thereon aligned with the print head (referred to as "positioned insertion" below) for target printing directly to a desired position 1 a on paper 1. The functional units described above are implemented by a control program stored in memory 59, and the instructions of the control program for executing various processes under appropriate conditions and timings are loaded into a CPU or other processor used as the control unit 50 but not shown in the figure. The control program and other data can be supplied to the memory 59 via the interface 57, thereby enabling the control program to be easily updated and maintained. In addition to being automatically controlled by a control program, the mechanical control unit 56 can also be manually controlled using operating panel 8a. The decision of whether the bypass unit 54 is to bypass the status determination unit 58 is controlled by a (paper insertion) selection command from the host 81 for selecting the operation to be executed when a paper is inserted. This selection command may, for instance, have the form "ESC x n " where n is 1 or 2. In hexadecimal notation, this exemplary command has the form "1Bh 78h n ". More specifically, the command ESC x is a predefined command for selecting the process to be implemented when a cut-sheet paper is inserted, and the parameter n is the argument specifying which process to implement. It will be appreciated that a particular form of this selection command is not critical for the present invention. In an exemplary embodiment of the invention, a value n = 1 does not bypass the status determination unit 58 and enables the auto-loading operation. A value n = 2 bypasses the status determination unit 58 and enables the above-noted positioned insertion operation. Use of this selection command is described in further detail below with reference to the flow chart in Fig. 3. The procedure starts when command data or print data sent from the host is received (step ST101). It is then determined whether the received data is such a selection command as explained above (ST102). If the received data is not a selection command, a process appropriate to the received command data or other data is performed (ST103). If the received data is a selection command, the value of parameter n is determined (ST104). If n is 1, auto-loading is enabled (ST105); if n is 2, positioned insertion is enabled (ST106). Note that by storing the insertion mode information (the parameter n) detected by this process in RAM or other storage device, it can be referenced in subsequent processes to determine what process to execute at paper insertion. The operation of the component units of control unit 50 is described in further detail below with reference to the flow charts shown in Fig. 4 to Fig. 7. Fig. 4 shows a series of steps for setting paper 1 in printer 10. When a print command or print data is supplied from the host 81 in step ST1, bypass unit 54 determines whether target printing (manually positioned insertion) is enabled. If target printing is enabled, the presence of paper is detected using TOF sensor 22 and BOF sensor 21 in step ST2. If a paper 1 has been set in insertion area 12 of paper path 11 and if both TOF sensor 22 and BOF sensor 21 indicate the presence of paper, platen 36 is closed in step ST3 and paper transport mechanism 34 is made operable. The process then shifts to step ST12 and printing begins. On the other hand, if target printing is not enabled in step ST1, the process shifts to step ST4 and printer 10 waits for a paper 1 to be set in insertion area 12 of paper path 11. If no paper 1 is set in insertion area 12 in step ST2 even though a selection command instructing target printing was received, target printing is canceled, the process also shifts to step ST4, and printer 10 waits for paper 1 to be set in insertion area 12. Target printing is disabled at this time to prevent paper buckling or bending, interference with traverse movement of the print head 37 and the resulting misalignment or desynchronization of the carriage, or paper jams as a result of the user inserting a paper from the X direction (Fig. 1) rather than the Y direction and keeping to push a paper. The procedure therefore shifts to step ST4 to prevent this by temporarily enabling the auto-loading operation. Note that an inserted paper will not become buckled or bent in a printer in which there is no paper stop. In this case, therefore, it is possible to wait in step ST2 until a paper is inserted without shifting to step ST4. When paper 1 is set in insertion area 12 and both TOF sensor 22 and BOF sensor 21 indicate the presence of the paper in step ST4, platen 36 is closed in step ST5 and paper transport mechanism 34 is made operable in conjunction therewith. As described above, printer 10 checks the loading status of paper 1 before it begins printing when paper 1 is set in insertion area 12 of paper path 11 and paper transport mechanism 34 becomes operable. For this reason, the loading status of the paper is checked in steps ST6, ST8, and ST10. To accomplish this, first evaluation unit 51 performs a first evaluation process wherein transport mechanism 34 is driven in the forward direction (paper insertion direction) to check for skew in step ST6. This first evaluation process (step ST6) is described in detail below with reference to the flow chart in Fig. 5. A typical plan view of paper 1 when skewed in paper path 1 is shown in Fig. 8. At step ST21 in Fig. 5, transport mechanism 34 is driven to advance the paper by an appropriate distance P1 in forward direction V as shown in Fig. 8, and a first paper detection operation is then performed in step ST22 after waiting for the output of BOF sensor to stabilize. If, as a result of this detection, BOF sensor 21 indicates in step ST23 that no paper is present, paper 1 is skewed in paper path 11 as shown in Fig. 8. An error flag is therefore set in step ST24. However, if BOF sensor 21 indicates that paper is present in step ST23, paper 1 is not skewed, the error flag is cleared (step ST25), and the transport mechanism 34 is driven in the direction opposite from that in step ST21 to transport the paper back by distance P1 (step ST26), thereby returning paper 1 to its original position. As shown in Fig. 8, BOF sensor 21 is provided in paper path 11 for detecting the presence of paper 1 and the end of the paper being printed, and is positioned near fixed paper guide 6 outside of (before) insertion area 12. As a result, BOF sensor 21 senses right edge 1c of paper 1, which contacts paper guide 6. Consequently, if paper 1 has not been inserted along paper guide 6 and only partially contacts paper guide 6, BOF sensor 21 will not detect paper 1 as it moves along paper path 11, and skew can be detected. In printer 10, paper guide 6 is relatively long and BOF sensor 21 is installed relatively close to the inside end (the printing area 35 side) of paper guide 6, which guides right edge 1c of paper 1. Consequently, if the paper is skewed to the left relative to the forward direction (insertion direction) V, there is little possibility that BOF sensor 21 will sense the paper in step ST4, and thus platen 36 will not close. However, paper 1 can also become skewed to the right relative to the direction V. The paper 1 is therefore advanced in step ST21 to detect skewing to the right side as seen in Fig. 8. While the distance P1 in the forward direction can be set to an appropriate value based on the width of paper path 11 and the size of paper guide 6, a range from several millimeters to several centimeters is sufficient. If paper guide 6 is relatively small or if BOF sensor 21 is installed in a position near the front (close to the outside end) of paper guide 6, there is a tendency that BOF sensor indicates paper presence while the paper is skewed to the left as shown in Fig. 9. In this case, skew can be detected by driving the transport mechanism 34 to effect an appropriate transport distance in the backward direction W in Fig. 9, and similarly detecting paper presence after the paper is reversed by a particular distance. Instead of using BOF sensor 21 for skew detection by detecting the trailing edge of the paper 1, it is also possible to detect skew using TOF sensor 22 to detect the leading edge, that is, the insertion end, of the paper 1 placed to the entrance to the insertion area 12. Skew detection, however, requires detecting edge 1c of paper 1, and there is a greater tendency for tears or wrinkles to appear near the long side at the leading edge of a paper 1. The detection rate therefore drops if TOF sensor 22 placed at the side to detect this edge 1c is used for detecting skew. In printer 10 TOF sensor 22 is therefore placed in the middle of the paper path 11 to improve the detection rate, and BOF sensor 21 is placed proximal to paper guide 6 to reliably detect the edge 1c of paper 1 and dependably detect skewing. Referring again to Fig. 4, if skewing is detected and the error flag is set in step ST6, an error routine is executed in step ST7, platen 36 is opened in step ST15, and the transport mechanism 34 is concomitantly released, thus freeing paper 1. A message prompting the user to reset the paper is also displayed on host 81 or printer 10. The printer 10 then waits for paper 1 to be removed from insertion area 12 as determined by TOF sensor 22 no longer detecting paper 1. When the paper 1 is removed, the procedure returns to step ST4 and the printer waits for paper 1 to be reset. If it is confirmed in step ST6 that the paper is not skewed, the process shifts to step ST8 and the second evaluation unit 52 executes a second evaluation process wherein the paper 1 is reversed to detect the leading edge 1b of the paper 1 in the paper path 11. This second evaluation process (step ST8 in Fig. 4) is described in detail below with reference to the flow chart in Fig. 6. A typical plan view of the paper 1 in the paper path 11 when the leading edge 1b of the paper is detected is shown in Fig. 10. At step ST31, a variable i, which is used in the subsequent steps for counting the number of times reverse transportation occurs, is initialized to 0, and is then immediately incremented by 1 in step ST32. The transport mechanism 34 is then driven in backward direction to cause a travel distance P2 (step ST33), and a second paper detection operation is performed in step ST34 after waiting for the output of TOF sensor 22 to stabilize. If as a result of this detection TOF sensor 22 indicates in step ST35 that paper is not present, the leading edge 1b of paper 1 has passed the position of TOF sensor 22, and the position of leading edge 1b of paper 1 has been confirmed. An error flag is therefore cleared in step ST36, and the procedure ends. On the other hand, if the presence of paper is indicated in step ST35, the position of leading edge 1b cannot be confirmed. If counter i is equal to or less than a predetermined count CO, the process returns to step ST32 and the reverse feeding and leading edge detection loop repeats. If counter i exceeds the predetermined count CO in step ST37, the position of leading edge 1b of paper 1 cannot be confirmed even though transport mechanism 34 has been driven to retract the paper by a specified distance. An error flag is therefore set in step ST38, and the procedure ends. As shown in Fig. 10, paper stop 15 obstructs the paper path 11 when a paper 1 is inserted into the insertion area 12 of the paper path 11, and the leading edge 1b of paper 1 therefore abuts against paper stop 15. The leading edge 1b of paper 1 should therefore become aligned with position L of paper stop 15. However, contact between the leading edge 1b of paper 1 and paper stop 15 can be hard for the user to detect depending on the type of paper (cut-sheet recording medium) used. When this happens, the use may tend to continue inserting the paper 1 even though it is fully inserted up to paper stop 15, resulting in the platen 36 closing with the paper buckled or bent inside the paper path 11. Irrespective of the tactile response of contact with the paper stop 15, inserting the paper 1 with excessive force can also result in the platen 36 closing with the paper buckled or bent inside the paper path 11. In both cases, when the paper stop 15 is then retracted in order to start printing, the leading edge 1b of paper 1 typically extends forward into the paper path 11 to a position M beyond paper stop 15 towards the printing area. The paper can also bounce off the paper stop 15, resulting in the platen 36 closing and printing starting without the leading edge 1b of paper 1 being positioned at the paper stop 15. The reference position for printing on paper 1 is the position in which platen 36 is closed and transport mechanism 34 is made to pinch paper 1. Therefore, in order to accurately print at the desired location on paper 1 , the leading edge 1b of each sheet of paper must be set at the same position. The printer 10 therefore confirms the position of the leading edge 1b by reversing, i.e., backward feeding the paper 1 inserted into the paper path 11. The distance (pitch) P2 used for this reverse feed process is preferably approximately plural millimeters with the precise distance determined by such considerations as the printing precision and the detection precision of the TOF sensor 22. The leading edge 1b of paper 1 can thus be precisely and reliably positioned by detecting the leading edge 1b while the paper is fed in backward direction by a known pitch. Therefore, even if the user does not insert the leading edge 1b of paper 1 to the normal position, the leading edge 1b can be automatically aligned to the particular position N on the entrance side of the TOF sensor 22 by reversing the paper 1 in direction W in Fig. 10 until the leading edge 1b passes the TOF sensor 22. Paper jams and other problems can also result when the inserted paper 1 is wrinkled or bent inside the paper path 11, and printing will not occur normally if started with the paper 1 thus loaded. In printer 10 an error is generated in step ST38 when the leading edge 1b is not detected even though the paper has been reversed by the specified distance as determined in step ST37. When an error is detected at step ST9 in Fig. 4, the error routine starting from step ST15 is executed. This error routine causes the user to be prompted to reset the paper 1 when it cannot be correctly positioned because of a possible paper jam or other cause, and prevents printing from starting. It is therefore possible to use printer 10 to reliably print personal checks and other forms without wasting such forms due to loading errors, and these like other types of cut-sheet recording medium can be reliably loaded to a specific position. When the leading edge 1b of paper 1 is detected by the TOF sensor 22 at step ST8, the indexing unit 53 operates in step ST10. This causes the paper 1 to be advanced to the desired position. This indexing operation (step ST10) is described in detail below with reference to the flow chart in Fig. 7. A typical plan view of the paper 1 in the paper path 11 for the indexing operation described below is shown in Fig. 10. It should be noted that the indexing position for the leading edge 1b of paper 1 in step ST8 can be set to position N in Fig. 10, that is, to a position on the entrance side of TOF sensor 22 relative to the paper path 11. However, in this embodiment printer 10 uses position L at the paper stop 15 as the reference position for printing. It is therefore necessary to advance the leading edge 1b from position N forward again to position L. At step ST10, therefore, the paper is advanced by a corresponding small distance in the forward direction for indexing. More particularly, the paper is advanced in step ST41 by the same pitch distance P2 that was used for reverse feeding in step ST8, and the leading edge is detected after waiting for the output of TOF sensor to stabilize. If as a result of this detection TOF sensor 22 indicates paper presence in step ST43, indexing is completed, an error flag is therefore cleared in step ST44, and the procedure ends. However, if the paper is not detected in step ST43, the paper is again advanced in the direction of arrow V by an amount corresponding to the distance between L and the center of TOF sensor 22. In this case it is assumed that the leading edge 1b of paper 1 is just at a position difficult to detect by TOF sensor 22, namely at the center of the sensor. The paper is then detected in step ST46 after waiting for the output of TOF sensor to stabilize. If the TOF sensor 22 indicates paper presence in step ST47, indexing is completed, an error flag is therefore cleared in step ST44, and the procedure ends. If the TOF sensor 22 was unable to detect the paper in step ST47, an error flag is set in step ST48 to indicate that there is a problem, and the indexing operation stops. As thus shown in Fig. 10, the indexing operation of step ST10 can align the leading edge 1b of paper 1 to position L at the paper stop 15 with a tolerance of P2 by advancing the leading edge 1b of paper 1 in forward direction V from position N. The paper 1 can therefore be transported reliably referenced to this same position for printing in the printing area 35 with excellent precision and good reproducibility. As described above, printer 10 according to the present invention can selectively perform an auto-loading operation and a (manually) positioned insertion operation based on a command that selects the paper insertion operation to perform. When the positioned insertion operation is selected and, thus, auto-loading is disabled, the user can easily insert a paper for printing to a desired location. Printer 10 can therefore easily accommodate printing from the leading edge (top edge) of a cut-sheet form as commonly performed with POS printers, as well as printing at a specific position on a cut-sheet form as required for printing an amount on a check. A paper can thus be loaded either automatically or manually for reliably printing at a specific position conforming to a particular format. It will be obvious that while the present invention has been described with reference to a printer comprising a paper stop, it can also be applied to a printer not having a paper stop. In this type of printer, the platen and transport rollers can be closed and printing started when the BOF sensor and TOF sensor detect that a paper has been inserted when positioned insertion (target printing) is selected. When auto-loading is selected, skew and the leading edge of the paper are detected as described above, and printing can commence reliably referenced to a common printing position. The control method for the above described printing apparatus according to the present invention can be provided as a control program for executing the processes shown in the accompanying flow charts and stored on any storage medium that can be read or accessed by a CPU or other processor. Such a control program can be provided using a wide range of storage media, including but limited to floppy disks and other non-fixed, exchangeable media. In addition, the control program can be provided via a computer network or communications network, including the Internet, and can be recorded to a hard disk or other fixed storage medium.

Claims: A printing apparatus comprising: an interface (57) for communication with a host device (81); a paper path (11); printing means (36, 37) for printing on a cut-sheet type recording medium (1) according to a print command and print data received from the host device (81); an insertion area (12) adapted to allow the recording medium (1) to be inserted into the paper path (11) while being manually set at a desired position relative to the position of said printing means (36, 37); transport means (34) for transporting the recording medium (1); detection means (21, 22) for detecting whether a recording medium (1) is present in said paper path (11); determination unit (58) for automatically positioning the leading edge (1b) of a recording medium (1) inserted at said insertion area (12) at a specific position (L) based on a detection result from said detection means (21, 22) by driving the transport means (34); and bypass unit (54) responsive to a specific control command from the host device (81) for enabling or disabling operation of the determination unit (58) on a recording medium (1) inserted at said insertion area (12), so as to allow the recording medium being printed in said manually set desired position, when the determination unit is disabled. The apparatus according to claim 1, further comprising storage means for storing a value set by the bypass unit (54). The apparatus according to claim 1 or 2, further comprising means for temporarily enabling operation of the determination unit (58) irrespective of the bypass unit (54) if a detection result from the detection means (21, 22) indicates absence of a recording medium (1) after print data and/or print command data has been received from the host device (81) when operation of the determination unit (58) has been disabled by the bypass unit (54). The apparatus according to claim 1, 2 or 3, wherein said insertion area (12) comprises a first insertion opening for inserting a recording medium (1) in a first direction parallel to the direction (X) in which it is transported by the transport means (34); and a second insertion opening for inserting a recording medium (1) in a second direction (Y) substantially perpendicular to said first direction. The apparatus according to claim 4, further comprising a housing (2, 4) for housing at least the printing means (36, 37) wherein the housing has a mark (13) on the second insertion opening side the mark being aligned with the printing means (36, 37). A method of controlling a printing apparatus as defined in claim 1, said method comprising: (a) receiving a print command and print data from the host device (81); (b) detecting whether a recording medium (1) is present in the paper path (11); (c) enabling or disabling, according to a specific control command from the host device (81), automatic positioning of a recording medium (1) inserted at said insertion area (12) into said paper path (11); (d) if automatic positioning is enabled in step (c), automatically positioning the leading edge (1b) of a recording medium (1) inserted at said insertion area (12) at a specific position by transporting and detecting presence/absence of the recording medium (1); and (e) printing on the recording medium (1) according to received print data and/or print command data; wherein, when step (c) disables automatic positioning, step (e) starts printing at a position of the recording medium (1) as manually selected when the recording medium was inserted at said insertion area (12). The method according to claim 6, further comprising a storing step for storing a setting that indicates whether automatic positioning has been enabled or disabled in step (c), the decision in step step (d), whether or not to perform automatic positioning, being made on the basis of the setting. The method according to claim 6 or 7, further comprising a step of (f) automatically positioning the leading edge (1b) of a recording medium (1) inserted at said insertion area (12) at a specific position by transporting and detecting presence/absence of the recording medium (1), step (f) being executed when automatic positioning has been disabled in step (c) and subsequently step (b) detects absence of a recording medium (1). A storage medium storing a control program for implementing the method as defined in any one of claims 6 to 8.

Inventors: KOAKUTSU NAOHIKO, TERADAIRA MITSUAKI, KOAKUTSU, NAOHIKO, TERADAIRA, MITSUAKI
Applicants: SEIKO EPSON CORP, SEIKO EPSON CORPORATION
Application year: 1998
Main classification: B41J11
IPC codes: B41J11, B41J13