Printing apparatus and method of controlling it

Abstract: A printing apparatus capable of using recording media of different widths expands the range of print head movement while limiting the movement of a mask plate (40), which presses the recording medium (11, 12, 13) against a platen (5), to within the area of the recording medium, thereby preventing interference between the mask plate and the recording medium, as a means of assuring the minimum print head travel (MCT) required to sufficiently advance the ink ribbon (31) or prevent overheating of the print head (23).

Description: The present invention relates to a printing apparatus such as a dot matrix printer and relates, more particularly, to a printing apparatus which prints by shifting a print head across a recording medium and is capable of using recording media narrower than the maximum range of print head movement. The invention also relates to a method of controlling such printing apparatus. In order to achieve a high speed printing, printers of such kind conventionally use a "logical seeking" control method whereby the print head is moved the shortest distance between the current print head position and the printing start position, i.e. the start for printing the next print line. With wire dot printers and other printers which print using an ink ribbon, however, an ink ribbon refreshing operation whereby the ink ribbon is advanced a predetermined amount at a regular interval is required to sustain high quality printing. While it is possible to provide a separate motor dedicated to the ink ribbon advancement, the most common method applied in compact printers is a mechanism whereby the ink ribbon is advanced using the drive force of the carriage motor in conjunction with the movement of the carriage on which the print head is mounted. Advancing the ink ribbon with this type of mechanism, however, greatly increases the load on the carriage motor, or uses gears providing a high speed reduction ratio to reduce the load on the motor and prevent the print head from jamming. As a result, the print head must travel a relatively long distance (i.e., the ribbon refresh distance) to advance the ink ribbon far enough to refresh the ribbon. To reduce the frequency of the case in which the amount of movement of the print head to print a single line is shorter than the required ribbon refresh distance, this conventional logical seeking control method requires a low speed reduction ratio and, thus, a high output torque of the carriage motor, to achieve a sufficient ribbon advancement even with short carriage travels. In a wire dot printer, coils for driving the dot wires are housed in the print head. To prevent heat damage to these coils, or to prevent operating problems caused by wire heating, and thus maintain print quality, a control method that changes the printing frequency per unit time (the print duty) is used. This method typically uses a thermistor or other temperature detecting means to detect the internal temperature of the coils or print head, or a means for detecting the coil resistance instead. When the print head temperature is determined to have exceeded a predetermined threshold value, conventional logical seeking control is adjusted to reduce the print duty, and the print head is controlled to travel from one side to the other side of the maximum possible printing area. To further suppress the temperature rise, "interval drive" is used. With interval drive, movement of the print head is stopped for a predetermined period at one side of the printing area. Printers today are commonly connected as an essential peripheral device to data processing terminals of various types. Printers that can be used for validation printing, or slip printing in addition to journal printing using roll paper, are also commonly available. Validation printing means printing to so-called validation forms, which are cut-sheet type card like recording media of various widths having rather high rigidity. Validation forms are typically multiple sheet printing forms used for printing authorized receipts and similar documents. Slip printing means printing to so-called slips including various types of cut-sheet forms of different widths. Printing speeds and print quality have also improved greatly. Compact, lightweight printers offering high functionality and high quality are available. It has therefore become necessary to use increasingly compact carriage motors and print heads, and motor torque continues to decline while the operating duration of the dot wires in the print head continues to increase. As motor torque decreases, however, it is necessary to also reduce ribbon travel amount relative to carriage travel amount. When the dot wire operating duration increases, it is necessary to reduce the ribbon speed to prevent the dot wires from being caught by the ink ribbon. To prevent the carriage speed from also dropping, however, the ribbon travel to carriage travel ratio must be reduced. As a result, when the per-line printing area is too short to achieve the required ribbon refresh distance with logical seeking, the print head must be controlled to move beyond the printing area by an amount equal to the difference between the printing area and the ribbon refresh distance in order to properly refresh the ink ribbon. To increase the printing speed in wire dot printers, the gap between the platen and print head, i.e., the platen gap, is reduced to shorten the dot wire stroke and thereby improve the response characteristics of the print head. The ink ribbon is disposed in this narrow platen gap and extends parallel to the direction of print head travel, and to enable cut-sheet type multiple sheet recording media (such as validation forms) to be inserted smoothly between the ink ribbon and the platen without touching the ink ribbon, a separator called a "mask plate" is disposed between the ink ribbon and the platen. This mask plate is fastened to the reciprocating carriage carrying the print head, and it further serves to press the recording medium to the platen during printing. The mask plate therefore helps preventing smudging of the recording medium by preventing the interference that can easily occur between the recording medium and ink ribbon when the recording medium is loaded to the specified position and when recording the medium is advanced, and helps improving print quality by preventing the recording medium from lifting off the platen during printing. Printing noise increases when the recording medium lifts off the platen during printing and this happens even with cut-sheet type recording media thinner than validation forms. The mask plate, however, holds such cut-sheet type recording medium firmly against the platen, and thereby suppresses such printing noise. As a result, a high functionality and high print quality can be achieved with a relatively simple printing apparatus by using either a mask plate of the type mentioned or a similar mechanism that moves with the print head, as does the mask plate, to hold the recording medium to the platen. When the recording medium is narrower than the range of print head movement, however, the mask plate may travel to a position outside the recording medium, i.e., to an area where there is no recording medium. This may occur for instance if the range of print head movement is increased to assure a sufficient ribbon refresh distance or to prevent coil damage when the print head heats up as a result of the conventional printer control method described above. When the print head is then moved back to within the boundaries of the recording medium, i.e., within the printing area of the paper, the part of the mask plate pressing the recording medium against the platen commonly interferes with the edge of the recording medium, resulting in damage to the recording medium, interference with print head movement, and/or printing errors. When using a variety of recording media, including cut-sheet forms, the length and width of the forms will vary, and once the mask plate moves past the edges of the recording medium, the recording medium can easily lift off the platen, leading quickly to the interference problems described above. As a result, when a mask plate or similar pressing mechanism is used, it is possible to achieve a high printing quality with a variety of print media, but the problems described above are likely to occur when narrow recording media are used. The document EP-A-0 113 701 discloses a printing apparatus according to the prior art portion of claim 1. GB-A-2 170 934 discloses a printing apparatus that is designed to simplify setting of paper and not require left and right margins to be set. To that end the printer is provided with automatic paper position detection means which operate by moving the carriage along the platen to optically scan the front face of the platen, thereby to detect the left and right edges of paper set on the platen. From the difference between the positions of the detected paper edges, the paper width is calculated and left and right margins are retrieved from a ROM in accordance with the calculated paper width. Movement of the carriage is then controlled to a range defined by the positions of the paper edges with the retrieved margins being additionally considered. US-A-5,299,873 discloses a printing apparatus that detects the paper edges in the same way as does GB-A-2 170 934. The purpose of detecting the paper edges is to calculate the center position of the paper and to drive the carriage to that center position during initial line feeds. This document also mentions that a controller drives a motor to move the carriage between the left and right edge positions while the printer prints characters on the printing sheet. Thus, once the printer has determined the paper edges and is controlled within the range between these paper edges, the carriage can be assumed to be controlled between start and end positions that include the line end positions of the respective print lines and do not exceed the allowable range determined by the paper edges. The prior art of both GB-A-2 170 934 and US-A-5,299,873 requires the paper edges to be crossed in order to detect these edges and calculate the paper width and the allowable range of movement of the carriage. The object of the present invention is to provide a compact printing apparatus capable of printing to a variety of print media of different widths with high quality but without involving the problems described above. Another object of the invention is to provide a method of controlling such printing apparatus. This object is achieved with a printing apparatus as claimed in claim 1 and a method as claimed in claim 10, respectively. Specific embodiments of the invention are subject matter of the dependent claims. In a preferred embodiment of the invention thus defined, the printing apparatus has at least one insertion opening for insertion of recording media with one side of the opening defining an insertion guide for the recording media. This one side is preferably aligned with one end of the maximum range of movement of the print head as determined by the structure of the printing apparatus. As explained before, there are plural reasons possibly requiring expansion of the range of movement of the print head beyond one or both positions defining start and end of the current line to be printed. In order to avoid the print head moving beyond the edges of the recording medium in such case, according to the present invention, control means and a control method are provided for restricting the actual range of movement of the print head to an allowable range. Based on the assumption that the print line end positions instructed by means of print data received by the printing apparatus are within the width of the currently loaded recording medium, the allowable range is preferably set based on these print line end positions. Since the recording medium is set in the printer with one lateral edge aligned to a reference position (the insertion guide), the allowable range can be expressed by a position relative to the reference position. In one embodiment of the control method according to the invention, for each new line to be printed the allowable range is set to the minimum of the current print head position (the position where the print head stopped at the end of printing the previous print line) and a predetermined position. The predetermined position is at a distance from the reference position still within the width of the narrowest possible recording medium but enough to allow sufficient ink ribbon refreshment by moving the print head between the reference position and the predetermined position. In another embodiment that of the corresponding end positions of all previous print lines on the same recording medium that is farthest away from the reference position is used to define the allowable range. Thus, as long as the print positions instructed by the host device controlling the printing apparatus do in fact correspond to the width of the currently loaded recording medium, the above mentioned problems occurring when the mask plate moves past an edge of the recording medium can be easily avoided irrespective of the width of the recording medium actually used and without requiring this width to be set in the printing apparatus. Where the ink ribbon in the printing apparatus is advanced in accordance with a movement of the print head, the set allowable range of print head movement allows the actual movement for each print line to be expanded within the limits of the allowable range such as to ensure sufficient ink ribbon refreshment, provided the minimum allowable range corresponding to the narrowest possible recording medium is sufficient to achieve the desired ink ribbon advancement. This applies in a similar way to an expansion of the actual range of movement of the print head necessary to reduce the print duty. The invention will be described in more detail below with reference to the drawings which illustrate preferred embodiments of the invention only and in which: Fig. 1 is a perspective view of a printer according to a preferred embodiment of the present invention; Fig. 2 illustrates the relationship between the print head movement range and recording media of different widths in the printer shown in Fig. 1; Fig. 3 shows the ink ribbon transport assembly of the printer shown in Fig. 1; Fig. 4 is a block of a control system of a printer according to the present invention; Fig. 5 is a flow chart of a first control method according to the present invention; Fig. 6 is a flow chart of a second control method according to the present invention; Fig. 7 is a flow chart of an alternative control method according to the present invention; Fig. 8 is a flow chart of an alternative version of the control method shown in Fig. 7; Fig. 9 is a flow chart of another alternative version of the control method shown in Fig. 7; Fig. 10 is a flow chart of another control method according to the invention; Fig. 11 is a flow chart of an alternative version of the control method shown in Fig. 10; and Fig. 12 is a flow chart of still another control method according to the present invention. Fig. 1 shows a printer 1 having a substantially parallelepiped-shaped body 2 slightly elongated in a front-rear direction. A rearward section of body 2 forms a storage section for roll paper 11, which is one of different types of recording media that can be used for this printer. In a front section of body 2 a carriage unit 22 is slidably supported by a carriage guide shaft 20 to be movable in the widthwise direction of the printer along the guide shaft 20. This carriage unit 22 is driven by means of a timing belt not shown in the figures. A head unit 21 is mounted on this carriage unit 22. Print head 23 for dot matrix printing projects from head unit 21 towards the rear side of the printer. A paper guide 4 is provided at a position between carriage unit 22 and the roll paper storage section of body 2. Paper guide 4 extends in the crosswise direction of body 2. The paper guide 4 has a substantially U-shaped vertical cross section whose upper and lower legs form guide surfaces for the roll paper fed from the lower rear side of the body and delivered towards the upper rear side. The substantially vertically orientated base of the U-shape forms a paper guide surface for the roll paper and any other recording medium used. At the approximate center of this latter paper guide surface, more particularly, at a vertical position aligned to the print head 23, is formed an opening through which a platen 5 projects toward the print head (the platen may be movable and retracted behind the paper guide surface for insertion of a recording medium). Ribbon case 30 is installed in front of carriage unit 22, i.e., on the side of head unit 21 opposite paper guide 4, and comprises side arms projecting toward paper guide 4 outside of the range of print head 23 movement. Ink ribbon 31 passes through a loop extending from ribbon case 30 through one of the side arms, between print head 23 and platen 5 to the other side arm and through the other side arm back to ribbon case 30. Thus, an exposed portion of the ink ribbon extends in the direction of print head 23 movement through a platen gap defined between the platen and the print head. Ink ribbon 31 is advanced in accordance with a movement of carriage unit 22 (and thus print head 23) by a mechanism internal to the printer such that the unused (or used only few times) portion of ink ribbon 31 will be struck by the dot wires of print head 23 to print with good definition to a recording medium. The mechanism for advancing ink ribbon 31 described in detail further below. A mask plate 40 is disposed between ink ribbon 31 and platen 5 and in front of print head 23, i.e., in the platen gap. The mask plate 40 is a thin, flexible plate member, the bottom end of which is fastened to carriage unit 22. The top of mask plate 40 extends toward platen 5, and functions to resiliently press roll paper 11 or any other recording medium loaded between mask plate 40 and platen 5 against platen 5. The platen gap can be made narrower because mask plate 40 presses the recording medium firmly against platen 5 to prevent interference between the recording medium and ink ribbon 31, thereby making high quality and high speed printing possible. The recording medium is also prevented from lifting off platen 5 because it is pressed against platen 5 by mask plate 40, and noise caused by vibrations of the recording medium can therefore be prevented. Mask guide 41 contacting the leading (upper) edge of mask plate 40, and cutter 6 for cutting the roll paper, are provided above paper guide 4 so as to extend from one side 2a to the other side 2b of body 2. Roller shaft 26 is provided above mask guide 41 and also extends from one side 2a to the other side 2b of body 2. Plural paper feed rollers 25 are fixed on roller shaft 26 which is connected to a paper transport feed motor (not shown in the figures) by means of belt 24 disposed at the right side 2b of body 2 as viewed in Fig. 1. In addition to roll paper 11, printer 1 of the present invention can also print to cut-sheet type recording media such as validation forms 12, and slip forms 13a and 13b of various widths. In printer 1 according to the present embodiment, validation forms 12 are inserted through a first insertion opening provided in the area of paper transport rollers 25 at the top of printer 1, into a recording medium path defined between the paper guide 4 (or platen 5) and mask plate 40. Slip forms 13 inserted through a second insertion opening formed by a gap between a bottom paper guide 7 disposed below carriage unit 22 and body 2, are guided by curved bottom paper guide 7 to the recording medium path. Slip forms 13 may vary in width from wide forms that are wider than body 2 and therefore have the left side thereof remaining outside the printer while printing, to narrow forms that are much narrower than the maximum printable width of the printer. Both, validation forms and slip forms are inserted into the respective insertion opening with one lateral edge (the right hand one in the present embodiment) aligned with or abutting at the corresponding edge of the insertion opening (right side 2b of the printer in this embodiment). It is important to note that printer 1 according to the present invention is designed for printing even to slip forms 13 of the narrowest width currently used. Printing to any of the recording media loaded into printer 1 is controlled according to print data input from a personal computer or other host device. Movement of print head 23 across the surface of the recording medium loaded to printer 1 according to this embodiment is illustrated in Fig. 2. To simplify the following description, a narrow validation form 12 and a slip form 13 of an intermediate width are shown in Fig. 2 in addition to roll paper 11. In a printer 1 thus comprised, roll paper 11, a validation form 12 or a slip form 13 is loaded to printer 1 and pressed against platen 5 by mask plate 40 while print head 23 moves across the surface of the recording medium. The maximum range of print head 23 movement is from Lmax at the left side of printer 1 to Rmax at the right side, and this range is the maximum printable area. Note that the maximum printable area is narrower than the width of roll paper 11. The smallest range of print head 23 movement is from a position, indicated L o in Fig. 2, on the left side to Rmax. This smallest range is within the width of the narrowest recording medium used (exemplified by validation form 12 in Fig. 2). As also described above, ink ribbon 31 is advanced in conjunction with the movement of print head 23, and this smallest range is designed large enough to assure ink ribbon 31 is advanced sufficiently. Fig. 3 illustrates a schematic view of assembly 70 for advancing ink ribbon 31 in conjunction with the movement of print head 23, and the operation of assembly 70. Timing belt 18 connects pulley gear 16 disposed at the left side 2a of printer 1 with pulley 17 disposed at the right side 2b of printer 1. Pulley gear 16 is engaged with carriage motor 15, and drives carriage unit 22 (and thus print head 23) by means of timing belt 18. Carriage motor 15 is also engaged with ink ribbon transport assembly 70 and drives a gear 72' by means of idler gears 71a, 71b and 71c. Rocker 72 is concentrically mounted to gear 72' via a friction clutch and comprises two rocker gears 73a and 73b meshing with a pinion 72" fixed to gear 72'. In this manner the rotation of rocker 72 driven according to the rotational direction of carriage motor 15 causes either rocker gear 73a or rocker gear 73b to drive ribbon drive shaft 76 by means of idler gear 75 or idler gears 74 and 75, respectively. For example in Fig. 3, when carriage motor 15 rotates clockwise and print head 23 is driven to the left side 2a, rocker gear 73b drives idler gears 74 and 75 to rotate ribbon drive shaft 76 counterclockwise, thereby advancing ink ribbon 31 between print head 23 and the recording medium. When carriage motor 15 rotates counterclockwise and print head 23 is driven to the right side 2b, rocker gear 73a drives idler gear 75 to rotate ribbon drive shaft 76 counterclockwise again. As a result, a printer according to the present embodiment advances ink ribbon 31 in always in the same direction irrespective of whether print head 23 moves to the right or the left, and thereby assures reliable ink ribbon refreshment and, thus, high quality printing. It is important to note that ribbon drive shaft 76 is not rotated by carriage motor 15 while the engagement of rocker gears is switching when the rotational direction of carriage motor 15 is reversed. In other words, an idle movement of carriage unit 22, in which carriage unit 22 moves without advancing ink ribbon 31, appears when carriage unit 22 changes its moving direction. To prevent overloading carriage motor 15 and thus inhibiting print head 23 movement while advancing ink ribbon 31, ink ribbon transport assembly 70 uses plural idler gears to achieve a high speed reduction ratio. On the other hand it is also necessary to drive ribbon drive shaft 76 through a predetermined angle of rotation in order to advance the ink ribbon sufficiently, because it is necessary to perform the ink ribbon refreshment every printing line to assure a uniform printing density. This means that carriage motor 15 must rotate through a certain angle of rotation determined by the angle required for ink ribbon refreshment and the speed reduction ratio. The rotation of carriage motor 15 through this angle corresponds to a minimum required travel MCT (Minimum Carriage Travel) of carriage unit 22 in this embodiment. Note that MCT includes above mentioned carriage idle movement which occurs when switching the moving direction. In the logical seeking of the present embodiment, a pre-seek for moving carriage unit 22 from the present place to the printing start position is sometimes executed before printing. In this case, the moving direction of carriage unit 22 is reversed at the printing start position as described later and the carriage idle movement occurs here. Though the total amount of carriage movement equals the sum of the amount of movement actually performed for printing one print line and the pre-seek amount, the latter does not significantly contribute to the ink ribbon advancement because of the carriage idle movement at the turning point. Therefore, in the present embodiments, the pre-seek amount is neglected in the calculations of the ink ribbon advancement. In a printing apparatus printing only to roll paper 11, mask plate 40 will not move beyond the lateral edges of the roll paper even when print head 23 is moved through the full maximum printable area, and may therefore be controlled to move between Lmax and Rmax, i.e., within a range exceeding the minimum required travel MCT. However, when recording media of different widths are used as in the printer 1 of this embodiment, the side of mask plate 40 may interfere with the edge of a recording medium, and may therefore damage the recording medium, when mask plate 40 moves past the edge of the recording medium and then returns to the recording medium. For example, if a validation form 12 is used and no consideration is given to the width of the form, mask plate 40 may move beyond the (left) lateral edge of form 12 (position L1 in Fig. 3) in order to obtain the minimum required travel MCT. When print head 23 is then moved back to within the area of the validation form to print the next line, mask plate 40, which is still pressed against platen 5, moves with print head 23 to the right. Because mask plate 40 is flexible and presses the recording medium in the direction of platen 5, the gap between mask plate 40 and platen 5 becomes essentially zero once mask plate 40 separates from validation form 12 as the print head moves to the left side. As a result, when mask plate 40 returns to the right, the side of mask plate 40 and/or the opening in the center thereof through which the dot wires of print head 23 pass will very likely interfere with the left edge of validation form 12. With this type of control, therefore, there is a strong possibility that such problems as validation form 12 being damaged, or print head 23 becoming jammed and printing being therefore disabled, will occur. Multiple sheet forms such as validation forms 12 can be printed with well-defined characters, interference between validation forms 12 and ink ribbon 31 can be prevented, and noise caused by validation forms 12 lifting off the platen and vibrating, can be reduced because mask plate 40 holds a validation form 12 pressed firmly against platen 5. When mask plate 40 moves off a validation form 12 and the pressure holding validation form 12 against platen 5 is thereby released, the stiffness of the form and the removal of this pressure allow validation form 12 to lift from platen 5, resulting in the problems described above when print head 23 moves back toward validation form 12. Therefore, when the area to which printing is required is narrower than the minimum required travel MCT, the range of print head 23 movement is expanded in a printer 1 according to the present embodiment but kept within the boundaries of the recording medium used even if it is the narrowest one allowed for the printer. Fig. 4 is a block diagram of one embodiment of a control system for printer 1 suitable for achieving such type of control according to the present embodiment. The control system receives external data 60, including print data and commands for controlling the printing process (commonly referred to as "print data" in the following), from an external device, such as a personal computer or point-of-sale terminal, and controls printer operation based on the input external data 60. Input/output (I/O) controller 59 receives and analyzes external data 60 , and outputs internal data 61 comprising the printable data and commands, to a carriage controller 50 and a print head drive controller 51. Carriage controller 50 controls the position and speed of the carriage unit 22, and print head drive controller 51 controls print head drive for forming characters, images, and other printed data on the recording medium. Carriage control signal 63 generated by carriage controller 50 is output to print head drive controller 51 and carriage drive circuit 58 to execute the actual printing process. Carriage drive circuit 58 in turn outputs carriage drive signal 64 to carriage motor 15 to drive carriage motor 15, and thereby move carriage unit 22 to the specified location. Print head drive controller 51 obtains from signal 63 the position information of print head 23 mounted on carriage unit 22, and forms the specified characters, images, and other printed data on the recording medium by outputting to print head 23 a print head control signal 65 based on this position information. The structure of carriage controller 50, which is an essential component to the present invention, is described below. Carriage movement range controller 52 determines the movement range of carriage unit 22 and generates carriage control signal 63 based on the information input thereto, specifically: internal data 61 comprising the information identifying the position to be printed; information from an allowable print head movement range setting means 53, which sets the range of movement within which mask plate 40 can move without interfering with the recording medium; and information from ribbon refreshing movement setting means 54, which sets the minimum required carriage travel MCT required to refresh the ink ribbon. Based on this supplied information, controller 52 sets the actual range of carriage unit 22 movement required to print the print data and assure the ink ribbon is advanced far enough to refresh the ink ribbon while limiting the range of carriage unit 22 movement to within the area in which interference between mask plate 40 and the recording medium does not occur. There are various possibilities for setting the allowable range of movement. One possibility is to determine the width of the currently loaded recording medium by means of corresponding width information derived from the print data received from the host device. Another -preferred-possibility is to initially set the allowable range with each insertion of a new recording medium so as to be safe for the narrowest possible width of recording media and then to expand this initial allowable range to at least the range defined by print positions actually instructed by the host device. By inputting internal data 61 to setting means 53, it is possible to expand the range of allowable movement based on the history of the specified printing positions. More specifically, considering the high probability that the host device will generate the print commands based on the size of the recording medium used, it can be assumed that the recording medium will exist wherever printing is specified, and the range of allowable movement can therefore be expanded to at least the limit of the printing area specified for the current print data. In this embodiment, this expanded range of allowable movement is reset to a default initialization range after the printing process for each recording medium is completed. More specifically, setting means 53 reinitializes the range of allowable movement based on a "no paper" signal output from a paper detector not shown in the figures. Also input to controller 52 is the operating mode information from operating mode controller 57, which determines the operating mode of printer 1 according to the temperature rise resulting from heat generated by print head 23. When mode controller 57 selects the cooling mode whereby the print head drive duty is reduced, controller 52 sets the actual movement range to the range of allowable movement by means of the method described below. Because the range of print head movement will thus be maximized to include an area in which the print head does not print, the print head drive duty will be reduced relative to the normal operating mode, and the print head will therefore cool. The temperature rise of print head 23 is detected as described below for determining the operating mode. Temperature detection information 62 is obtained as a voltage corresponding to the resistance of a thermistor (not shown in the figures) provided in the print head, and is input to mode controller 57. Mode controller 57 converts the input voltage value to a digital value by means of an analog/digital (A/D) converter, and then compares this converted digital value with a predetermined value to detect whether the temperature of print head 23 has risen to a predetermined threshold value. A paper detector 55 for determining whether the recording medium is roll paper or not is also provided, and the data output therefrom makes it possible to achieve even more efficient carriage control. Specifically, the print head drive duty can be further reduced, and an even greater cooling effect can therefore be obtained, by increasing the range of allowable movement to the maximum limit of the printing apparatus when the recording medium is roll paper by overrunning the limit to the range of allowable movement set by setting means 53. In this embodiment, paper detector 55 identifies the type of recording medium based on corresponding information contained in internal data 61. It is to be noted, however, that this recording medium identification can be accomplished by means of information internal to printer 1, e.g. by using a signal from a paper detector disposed near the left side of the platen. Fig. 5 is a flow chart of a first method of controlling a printer according to the present invention. It is to be noted that in the following description the position of print head 23 and the range of print head movement are described using a system of linear coordinate values increasing from Lmax representing the left edge of the maximum printable area or maximum movement range to Rmax representing the right edge thereof. In step STH0, the left limit Llim of the allowable movement range is set to the smaller one of the values CRp and Rmax - MCT. MCT is fixed to such a value to ensure that the range from Rmax to Rmax - MCT is within the boundaries of the narrowest possible recording medium. CRp is the position where printing of the preceding print line stopped and is assumed to be within the width of the currently loaded recording medium. Upon each insertion of a new recording medium the initial value of CRp is within the minimum possible width of recording media, i.e. no smaller than Rmax - MCT . Thus, using CRp to update Llim is one form of "history control" employing data of the immediately preceding printing process to the same recording medium for setting the allowable range of movement. The result of step STH0 is stored as the new left limit of the allowable movement range (the right limit being the reference position Rmax). In step ST1, the right edge Rp and left edge Lp of the area through which print head 23 is actually to be moved are initialized to the right and left edges, respectively, of the area or print line to be printed based on internal data 61 from which corresponding print line end position data are derived. The values of Rp and CRp are then compared, and Rp is set to the greater of the two, i.e., the position nearer to Rmax. Similarly, the values of Lp and CRp are then compared, and Lp is set to the smaller of the two, i.e., the position nearer to Lmax. In step ST2, it is determined whether Lp is greater than the left limit Llim of the allowable range. If so, Rp is reset to Rmax and Lp is reset to the position separated by MCT from Rmax (step ST3). It is to be noted that printer 1 according to this embodiment is configured to accept recording media of any width inserted with the right edge abutting against the right side of the insertion opening. In addition, the minimum required travel MCT is predetermined according to the width of the narrowest print medium that will be inserted. Specifically, if the position at which mask plate 40 gets closest to Lmax when carriage unit 22 is moved from Rmax toward Lmax without moving beyond the left edge of the recording medium is defined as MPW when the narrowest possible medium is inserted with the right edge thereof abutting at the right side of the insertion opening, the following expression will be true: Rmax - MPW ≥ MCT As a result, if Lp is set to the position Rmax - MCT, mask plate 40 will not move beyond the left edge of the narrowest recording medium as print head 23 moves between Rmax and Lp. As a result, interference between the mask plate and the recording medium, and other problems as described above can be reliably prevented. In addition, the range of print head 23 movement is always equal to or larger than the minimum required travel MCT. Therefore, the ink ribbon can be reliably advanced, and quality printing can be accomplished. When llim ≥ Lp is detected in step ST2, it is checked in step ST4 whether the minimum required travel MCT is obtained between Lp and Rp. If not, Rp is reset to the value of Lp + MCT (step ST5). Because print head 23 travels at least the minimum required travel MCT as a result, the ink ribbon can be reliably advanced and refreshed. Furthermore, while the range of print head movement is increased by step ST5, the position of the left edge Lp is not changed. As a result, the value of Lp remains that set in step ST1. The position of the left edge of the printing area set according to the print data is specified by the host device outputting the print data, and is assumed to be a position within the printable area of the currently loaded recording medium. As a result, when print head 23 travels through the range thus defined, mask plate 40 will not move outside the limit of the recording medium currently loaded to the printer. As a result, interference between the mask plate and the recording media can be expected to be prevented. Based on the actual range of print head movement thus defined, it is determined in step ST6 whether the current stop position CRp of print head 23 is closer to the left edge Lp or right edge Rp. If print head 23 is closer to the right edge Rp, the current travel direction CTD of the print head is set to L (right -> left), the print head movement starting position Sp is set to the right edge Rp, and the end position Ep of print head movement is set to the left edge Lp, in step ST7. If in step ST6 it is determined that the current stop position CRp of print head 23 is closer to the left edge Lp, the current travel direction CTD of the print head is set to R (left -> right), the print head movement starting position Sp is set to the left edge Lp, and the end position Ep is set to the right edge Rp, in step ST8. Print head 23 is then driven and printing is accomplished in step ST10 based on the print data. If the current stop position CRp of print head 23 is within the actual range of print head movement, print head 23 must be moved to the starting position Sp at the right or left side of the movement area. To accomplish this, the current stop position CRp of print head 23 is determined in steps ST11 and ST12, and in step ST13 print head 23 is moved to the print head movement starting position Sp. Printing is then executed in step ST14. When the one line is completely printed, the procedure loops back to step ST1, and the area required to print the next line is set. As a result of the control method applied in a printer 1 according to the present embodiment above, mask plate 40 will not move outside the edges of the currently loaded recording medium irrespective of the width of recording medium used. In addition, there will be no interference between the sides of mask plate 40 and the recording medium, and such problems as the recording media becoming jammed in the platen gap, or print head 23 becoming jammed, can be prevented. Furthermore, even if the printer itself does not detect the width of the recording medium loaded into the printer, it is not necessary to determine the type of recording medium by means of a paper width detector or other detection means because the method explained above set the actual range of print head movement so as to assure the minimum travel required for ink ribbon refreshing within the boundaries of the recording medium without requiring such width information. Therefore, the ink ribbon can be reliably advanced, and quality printing can be accomplished, without adding a new detection function to the printer and without paper jamming or other problems occurring when recording media of different widths are used. It is also not necessary to inform the printer of the type of recording medium used when the print data is input to the printer from a host device since, as explained above, the actual range of movement of the print head is kept within the allowable range. As a result, there is no possibility of the printer receiving wrong recording media width information from a detection mechanism or host device, and problems caused by interference between mask plate 40 and the recording medium can still be prevented. A compact printer capable of handling recording media of various widths with no problems can be achieved by applying the control method of the present invention as described above. The control method of the present invention is described in further detail below with reference to a sample printing process. In the following example, it is assumed that data to be printed in the range between a left edge Lp and a right edge Rp in Fig. 3 is received by printer 1 with print head 23 stopped near the left edge of validation form 12. First, in step STH0 Llim will be set to the current stop position CRp which in the assumed case is smaller than Rmax - MCT. Because CRp is also located to the left of the left edge Lp of the print head movement range defined according to the area to be printed, in accordance with step ST1 of Fig. 5, Lp will also be set to CRp. It is further assumed that the minimum required travel MCT can be obtained between CRp and Rmax, but cannot be obtained between CRp and the right edge Rp. It is therefore necessary to offset the right edge Rp to a position Rp' corresponding to CRp plus the minimum required travel MCT. This is accomplished in the following way. In step ST2, since Lp equals Llim the condition Llim < Lp is not fulfilled. Thus, the processing advances via step ST4 to step ST5 providing this offset. If print head 23 is driven using CRp (the new Lp) as the starting position Sp and the new Rp' as the end position Ep, print head 23 will cover the area to be printed while also achieving the minimum travel MCT required to refresh the ink ribbon. In addition, print head 23 does not move farther left from the current stop position CRp, and therefore does not move outside the area of validation form 12. In the above example, in order to obtain the minimum required travel MCT the actual range of movement of the print head is expanded from the instructed ends of the print line to both the left (CRp) and the right (Rp'). In this case, while CRp can be assumed to be a safe value for the current recording medium, it does not necessarily represent the leftmost head position allowable for this recording medium without causing the problems mentioned above. The second control method according to the invention described below employs another form of "history control" allowing a further expansion of the range of movement of the print head toward the left by adaptively setting the allowable range. This is obtained by using the history of the left edge Lp values of each print line instructed by the host device for the same recording medium. In other words, the smallest Lp value set during printing to the currently loaded recording medium is set as the left limit Llim of the allowable movement range. Fig. 6 is a flow chart of a second control method according to the invention. Like control steps in the first control method described above with reference to Fig. 5 and the second control method shown in Fig. 6 are identified with like reference numbers. In step STH1, the left edge Lp of the printing range defined for the current line is compared with the left limit Llim of the allowable movement range, and the smaller value, i.e., the value for the leftmost position, is defined as the new left limit Llim. By thus dynamically updating the value of the left limit Llim, the left limit Llim can be set to the leftmost printing position during the current printing process. It will be appreciated that upon each insertion of a new cut sheet type recording medium Llim is initialized to a value safe for the narrowest possible one (see step STH6 below). As in the first control method described above, the print head movement range is set based on the right Rp and left edge Lp values of the area to be printed and the current position CRp of the carriage unit set in step ST1. In step STH2, the minimum required travel MCT is then compared with the distance between the left limit Llim and the right edge Rp of print head movement. If said distance is less than the minimum required travel MCT, the procedure steps to step ST2, and the process executed in the first control method above is executed. If, however, said distance is greater than or equal to the minimum required travel MCT, the movement range and the minimum required travel MCT are compared in step STH3. If the movement range is smaller than the minimum required travel MCT, the value of the left edge Lp is corrected in step STH4 such that the distance between the left edge Lp and the right edge Rp is equal to the minimum required travel MCT, and control flows to step ST7. Note that this step corresponds to the correction of the right edge Rp of the movement range in step ST5 of the first control method. If the movement range is greater than or equal to the minimum required travel MCT in step STH3, control flows to step ST7. As a result, the direction CTD of print head movement is set to L; the print head movement starting position Sp is set to the right edge Rp; and the end position Ep is set to the left edge Lp. After printing in step ST10, it is determined in step STH5 whether all printing to the current recording medium is completed, i.e., whether the end of the recording medium has been detected. If the end of the recording medium has been detected, the left limit Llim is initialized in step STH6 to the left-side range limit MPW, which is set according to the narrowest recording medium usable with the printer. As a result, even if the next printing operation applies to the narrowest recording medium usable in the printer, mask plate 40 will be prevented from moving beyond the left edge of the recording media. If the end of the recording media has not been detected in step STH5, the current value of the left limit Llim is held, and the process loops back to step STH1. Because the range of allowable movement of print head 23 can be more expanded by means of this second control method of the invention, the number of times the direction of print head movement is changed is reduced, and the print head can be moved more smoothly. In other words, printing processes in which the print head must be moved the minimum required travel MCT to the right after moving to the left edge Lp when the first control method is used can, by applying this second control method, be accomplished by simply moving the print head from the current position CRp further left to a point between the left limit Llim and the left edge Lp. This is described below. Assume that the current position CRp is between the right edge Rp of the printing area and Rmax, the distance between the current position CRp and the left limit Llim is greater than the minimum required travel MCT, and the distance between the current position CRp and the left edge Lp is less than MCT. With the first control method above, the right edge Rp is set to CRp and the left edge Lp is set to the left edge Lp of the printing area in the first step ST1. If under these conditions the distance between the right edge Rp and the left edge Lp of the printing area is shorter than the minimum required travel MCT, and the distance between the left edge Lp and Rmax is greater than MCT, control flows in the flow chart in Fig. 5 from step-ST4 to step ST5, and the value of the right edge Rp is corrected. The resulting right edge Rp and left edge Lp values are thus: Rp = Lp + MCT Lp = Lp. Control then flows through step ST6 to step ST7 or ST8, and the resulting values for the direction, starting position, and end position of print head movement are: CTD = L Sp = Lp + MCT Ep = Lp as a result of step ST7, or CTD = R Sp = Lp Ep = Lp + MCT as a result of step ST8. In each of these cases (ST7 and ST8), it is necessary to reassess the movement of the print head during the printing process of step ST10. When control flows through step ST7, CRp and Sp are compared in step ST12. Because the distance between the current position CRp and the left edge Lp is less than MCT under the above conditions, CRp - Lp < MCT, and by substituting equation (2) above, CRp < Sp. The conditions of step ST12 are therefore satisfied, and in step ST13 the print head is moved to the print head movement starting position Sp. When control flows through step ST8, CRp and Sp are compared in step ST11. Because CRp is clearly to the right of Lp under the above conditions, CRp > Lp, and by substituting equation (3) above, CRp > Sp. The conditions of step ST11 are therefore satisfied, and the print head is again moved to the print head movement starting position Sp in step ST13. When the distance between Rmax and printing area left edge Lp is shorter than the minimum required travel MCT, i.e., when Rmax - Lp < MCT is true as determined by step ST2, control steps to step ST3 whereby the right edge Rp and left edge Lp of the movement range are defined as follows: Rp = Rmax Lp = Rmax - MCT. In these cases, the direction of print head movement CTD during printing, the print head movement starting position Sp, and the end position Ep are set as follows in step ST7 or ST8: CTD = L Sp = Rmax Ep = Rmax - MCT as a result of step ST7, or CTD = R Sp = Rmax - MCT Ep = Rmax as a result of step ST8. Because CRp is clearly to the right of Lp under the above conditions, CRp > Lp, and by substituting equation (4) above, CRp > Rmax - MCT. Thus, when the direction of print head movement is set in step ST8 to be R, the conditions of step ST11 are satisfied, and the print head is moved to the print head movement starting position Sp in step ST13. In addition, because the current position CRp is to the left of the rightmost edge position_Rmax, CRp < Rmax. As a result, when the direction of print head movement is set in step ST7 to be LEFT, the conditions of step ST12 are satisfied, and the print head is again moved to the print head movement starting position Sp in step ST13. As described above, the print head is first moved to the print head movement starting position Sp, and is then moved in the opposite direction for printing under the above conditions. Operation under the same conditions as above controlled by the second control method of the invention is described below. Under these conditions, the current position CRp is to the right of the right edge Rp of the printing area, and the current position CRp value is therefore set to the right edge Rp value in step ST1: Rp = CRp. Because the distance between the left limit Llim and the current position CRp is greater than the minimum required travel MCT under the above conditions, the equation in step STH2 is not satisfied, and control passes to step STH3. Because the distance between the current position CRp and Lp is shorter than the minimum required travel MCT under these conditions, the left edge Lp value is updated in step STH4 to (Rp - MCT). The other variables are therefore set as follows in step ST7: CTD = L Sp = Rp Ep = Rp - MCT. As a result, step ST12 in the printing process ST10 is not satisfied because of equation (5), and print head movement and printing are started directly from the current position CRp without executing the process whereby the print head is first moved to the print head movement starting position Sp. Thus, in printers where acceleration and deceleration accompany print head movement, an extreme difference in the processing time occurs between the process wherein print head movement is interrupted to change the direction of travel while performing a single line printing, and the process wherein the print head is driven without changing the direction of travel while performing a single line printing. As a result, application of the second control method above in printers driving the print head with acceleration and deceleration thereof can achieve a significant improvement in printing speed. If the additional movement required for acceleration and deceleration is included in the printing range when defining the printing range in a printer driving the print head with acceleration and deceleration thereof, either the first or second control method above can be applied without modification. Fig. 7 is a flow chart of the control method applied in a printer using a mechanism whereby the ink ribbon is advanced only when the print head moves from the right side 2b to the left side 2a of the printer. A mechanism of this type also makes it possible to reduce the load on the drive motor by reducing the number of gears in the ink ribbon advancing mechanism, and also makes it possible to thereby reduce the number of parts. A mechanism of this type can be achieved by, for example, removing rocker gear 73a and idler gear 74 in ink ribbon transport assembly 70 shown in Fig. 3. The first step in the control method applied to a printer with this mechanism is to determine the direction of print head movement in step ST21. Specifically, if the current position CRp at which the print head is stopped is near the left edge Lp of the area to be printed, the direction of print head movement is determined to be R, and is otherwise determined to be L. If print head 23 is moved toward the left, the process executed from step ST2 to step ST5 in Fig. 5 above is executed from step ST22 to step ST26 in Fig. 7. In this case, the right edge Rp of the print head 23 movement range is defined as the print head movement starting position Sp, and the left edge Lp is defined as the end position Ep. If the print head is moved to the right, it is not necessary to advance the ink ribbon, and the print head movement range is defined as shown in step ST27. Specifically, the starting position Sp is defined as the left edge Lp of the movement range or the current position CRp, whichever is farther left; the right edge Rp of the movement range is defined as the end position Ep; and the current travel direction CTD is R. The print head is then controlled as described in the printing process (ST10) in Fig. 5 to print. As will be obvious from the above description, the ink ribbon is not refreshed when the print head prints as it moves to the right. To compensate for this, the amount of ribbon advancement when the print head moves left must be increased to an amount corresponding to the amount of ribbon advanced by a mechanism that advances the ink ribbon during both right and left movement of the print head. To achieve this, the speed reduction ratio of ink ribbon transport assembly 70 can be reduced, or the minimum required travel MCT can be increased, to increase ink ribbon advancement. The first control method described above can be applied to print head movement control with this type of mechanism. In this case, the printing direction determined in step ST6 in Fig. 5 is fixed to L irrespective of the other conditions. The ink ribbon will therefore be refreshed with the leftward movement of the print head in each print line. A flow chart of this control process is shown in Fig. 8. The second control method described above can also be applied to print head movement control with this type of mechanism. As with the first control method above, the printing direction determined in step ST6 in is fixed to L irrespective of the other conditions. A flow chart of this control process is shown in Fig. 9. Fig. 10 is a flow chart of the control method applied using a mechanism whereby the ink ribbon is advanced only when the print head moves from the right side 2b to the left side 2a of the printer. A mechanism of this type can be achieved by, for example, removing rocker gear 73b and idler gear 74 in ink ribbon transport assembly 70 shown in Fig. 3. The first step in the control method applied with this mechanism is to determine the direction of print head movement in step ST31. If print head 23 is moved toward the right, the process executed from step ST2 to step ST5 in Fig. 5 above is executed from step ST32 to step ST36 in Fig. 10. In this case, the left edge Lp of the print head 23 movement range is defined as the print head movement starting position Sp, and the right edge Rp is defined as the end position Ep. If the print head is moved to the left, it is not necessary to advance the ink ribbon, and the print head movement range is defined as usual as shown in step ST37. The print head is then controlled as described in the printing process (ST10) in Fig. 5 to print. The first control method described above can be applied to print head movement control with this type of mechanism, and a flow chart of this control process is shown in Fig. 11. It is to be noted that the second control method is characterized by expanding the range of print head movement to the left Application of this control method to a mechanism unable to advance the ink ribbon while moving to the left is essentially meaningless, and the benefit normally derived from this second control method cannot be achieved as far as ink ribbon refreshment is concerned. Yet, also the second control method can be modified on the basis of Fig. 10 (although not shown in the drawings) so that its expansion ability to the left may be utilized for such as decreasing the print duty. By thus applying a control method as described above to a printer using a mechanism whereby the ink ribbon is advanced only when the print head moves in one direction, interference between mask plate 40 and the recording media can be prevented, and high reliability printing can be achieved, even when recording media of different widths are used. It is to be noted that because the recording medium is inserted to the printer of the invention aligned to the right side, the range of print head movement is adjusted in relation to the right side of the printer, but it is also possible to use the left side as the reference depending upon the printer application. A control method for this left side reference can be easily derived from the control methods described herein above by interchanging the right and left sides in each step of the above control processes. It will also be obvious that the printer may be comprised to detect by means of the paper detecting means when recording medium with specifications differing from those of the roll paper is loaded into the printer, and to control printer operation accordingly as described above. Fig. 12 is a flow chart of the control method applied with a print head cooling mode, and will be used in the following to describe print head 23 operation in this cooling mode. When printer 1 is reset, the Rmax and Lmax values defining the maximum limit of the area printable by print head 23 are defined, and the left limit Llim is defined as the left-side range limit MPW for the narrowest validation form that may be printed using printer 1 (step ST41). In step ST42, the right edge Rp and left edge Lp of the area through which print head 23 moves are initialized to the right and left edges, respectively, of the area to be printed based on the print data contained in internal data 61. In step ST43, mode controller 57 determines whether the temperature of print head 23 is greater than the predetermined threshold value. If the print head 23 temperature has not risen to this threshold value, control jumps to the printing process of step ST50. The printing process of step ST50 may be either the first control method shown in Fig. 5, or the second control method shown in Fig. 6. It should be noted, however, that the control step to which the printing process loops back when printing is completed is step ST42 in Fig. 12. If in step ST43 the temperature of print head 23 is greater than the predetermined threshold value, the right edge Rp value of the print head movement range is changed to Rmax in step ST44. It is then determined in step ST45 whether a cut-sheet type recording medium is selected. In printer 1 according to the present embodiment, paper detector 55 determines whether cut-sheet forms or roll paper is required based on internal data 61. If the recording medium is roll paper 11, the left edge Lp value of the print head movement range is set to Lmax in step ST46. By thus redefining the left edge Lp and right edge Rp of the print head movement range to Lmax and Rmax, respectively, the printing area defined according to internal data 61 is exceeded, and print head 23 moves through the largest possible printable area. The print duty of print head 23 therefore drops, and the temperature increase thereof can be suppressed. If, however, cut-sheet type recording medium is selected, step ST45 branches to step ST47 to compare the left limit Llim value with the left edge Lp value. If Lp is greater then Llim, i.e., if the left edge of the printing area is to the right of the left limit of the allowable print head movement, the left edge Lp of print head movement is changed to the left limit Llim. As a result, print head 23 exceeds the printing area, and prints while moving between the Rmax position and the left limit Llim position. It is therefore possible to prevent interference between mask plate 40 moving with print head 23 and the recording media, reduce the print duty of print head 23, and thereby suppress the temperature rise in the print head. If in step ST47 left edge Lp is less than the left limit Llim, i.e., if the left edge of the printing area is to the left of the left limit of print head movement, the value of left edge Lp is not changed. In this case, the left limit Llim value is updated to the value of left edge Lp in step ST49. If printing to a position beyond the left limit Llim is required based on internal data 61 input to printer 1, it can be assumed that the width of the recording medium currently loaded into printer 1 is greater than the width corresponding to the current left limit Llim value. As a result, print head 23 will not move beyond the recording media edge if the left limit Llim of the print head is expanded. Because the recording medium is loaded with its right edge aligned to the right side of the insertion opening of printer 1 in the present embodiment, the right edge Rp value can be expanded to Rmax. For example, if in Fig. 2 slip forms 13 printing is selected, print head 23 first moves between Rmax and left-side range limit MPW defined for the narrowest form printable by the printer. When the left edge Lp value is set to L1 based on the print data, the left limit Llim for that recording medium will be L1, and the range of allowable movement for print head 23 increases. By thus increasing the minimum range of allowable movement for print head 23, the print duty can be further reduced, the temperature rise in the print head suppressed, and the temperature can be lowered. When a narrow recording medium that may be narrower than the maximum range of movement defined by Rmax and Lmax is selected in a printer according the present embodiment, the first control step is to define the value for left-side range limit MPW according to the narrowest recording medium usable, and thereby prevent mask plate 40 from separating from the recording medium. Based on the print data received thereafter, the print head movement range is expanded within the range within which mask plate 40 does not separate from the recording medium, thereby efficiently suppressing the increase in the print head temperature. By means of the printer control method thus described, mask plate 40 will not move outside the area of the recording medium even when the narrowest one printable by the printer is used. There is, therefore, no interference between mask plate 40 and the recording medium, and recording media damage and print head jamming problems resulting therefrom can be prevented. The print head movement range is also set according to the narrowest recording medium width while the range of print head movement may be expanded based on the print data. It is therefore not necessary for the user to manually specify the required recording medium width even when the range of print head movement is expanded within the range wherein the above interference-related problems do not occur as a means of efficiently controlling the temperature of the print head temperature. It is also not necessary though possible to supply the recording medium width information from the personal computer or other external device supplying the print data to the printer. It is also not necessary to provide plural paper detectors to detect the width of the recording medium. It is therefore possible to reliably control the print head temperature by means of a mechanism of simple structure without causing problems related to recording medium or print head jamming even when using different types and widths of recording media by applying a printer control method according to the present invention thus described. It is to be noted that a printer according to the present invention changes the print duty by controlling the range of print head movement. When it is not possible to suppress the temperature rise by changing the range of print head movement and the temperature continues to rise, it is simple to insert a predetermined pause interval into print head movement to further reduce the print duty. The printers of the above embodiments also determine from the print data whether a cut-sheet type recording medium is selected, but it will be obvious that information obtained by the printer itself can be alternatively used. For example, a paper detector may be disposed near the Lmax position at the extreme left side of the movement range, and step ST45 modified to skip to step ST47 when a recording medium cannot be detected by this paper detector. If the control method of the present invention is used, even when the recording medium is detected using paper detectors, a small number of paper detectors can be used because it is sufficient to determine from these paper detectors whether the maximum printable range of the printer can selected. Moreover, because the recording medium is loaded to the printer of the invention aligned to the right side of the insertion opening, the range of print head movement is changed referenced to this right side of the printer. It will be obvious, however, that this reference position may be the left side of the printer or even the center of the printer. Furthermore, the type of recording media is evaluated in step ST45 in this embodiment, but this step may be eliminated and the control method modified to assume printing to cut-sheet type forms. In this case, no kind of recording media width information is required, and the exchange of data between the printer and external devices can be further simplified. The cooling efficiency may drop slightly in this case when printing to roll paper, however, because the print head cooling operation may be executed in an area narrower than the maximum print head movement range. As described herein above, a printing apparatus according to the present invention can assure the minimum amount of print head travel required to advance the ink ribbon using recording media, including slip forms, validation forms, and other forms, of different widths without detecting the width of the medium used. It is therefore not necessary to add to the printing apparatus any means of monitoring the width of the different forms, and it is not necessary to request from the host device information relating to the type of recording medium used. It is therefore possible for a printing apparatus according to the present invention to prevent, by means of a simple mechanical configuration and a simple control method, interference between the recording medium and the mask plate or other recording medium pressing means moving with the print head even when recording media of different widths are used because the print head never moves outside the area of the loaded slip form or other printing form. As a result, small recording media of various types can be used without problems in a printing apparatus of the present invention, and a quiet, high reliability printing apparatus using a mask plate to prevent interference with the ink ribbon can be achieved. When validation forms or slip forms are selected, a printing apparatus according to the present invention first sets the range of print head movement to the smallest range limit, and then expands the range of print head movement based on the area to be printed. As a result, even when the range of print head movement is expanded to prevent the print head from heating above a predetermined threshold value, the mask plate will not move beyond the range of the validation form or slip form, and interference between the recording medium and the mask plate or other recording medium pressing means moving with the print head can be prevented. Therefore, the reliability of a printing apparatus that is capable of using small recording media of various types and achieves quiet, high reliability operation using a mask plate to prevent interference with the ink ribbon can be further improved. A printing apparatus according to the present invention can prevent interference between the mask plate and the recording medium by means of a simple mechanical configuration and a simple control method, and is therefore readily applicable in compact, lightweight, multiple function printing apparatuses. It is to be noted that the printer explained above is represents a preferred embodiment of a printing apparatus according to the invention which, however, is not limited to that embodiment. Control of the actual range of movement of the print head according to the invention may also be applied to printers having drive means for the ink ribbon separate from that for the carriage unit. In such case the control of the actual range of movement need not care about ink ribbon refreshment but may still be useful, for instance, to reduce the print duty for reasons mentioned above. Likewise, the invention is applicable to printers that, for whatever reason, do not need to reduce the print duty but need to expand the actual range of print head movement for ink ribbon refreshment or other reasons.

Claims: A printing apparatus comprising: a platen (5), a print head (23) arranged opposite to the platen and movable along the platen within a given maximum range, an ink ribbon (31) passing through a platen gap defined between the platen (5) and print head (23), mask means (40) disposed in the platen gap between the ink ribbon (31) and the platen (5), the mask means being arranged to be movable together with the print head (23), wherein a recording medium path is defined between the mask means and the platen, an insertion opening for insertion of a recording medium (12, 13), the insertion opening communicating with said recording medium path and having one lateral side defining an insertion guide along which to insert a recording medium, receiving means (59) for receiving print data (60, 61), and carriage control means (50) for controlling the movement of the print head (23) in accordance with said print data (60, 61), characterized in that said carriage control means (50) includes: means responsive to said receiving means for deriving, from said print data, an allowable range of movement of the print head relative to a reference position (Rmax) substantially aligned with said insertion guide, said allowable range being defined such as to prevent the mask means (40) from being moved beyond the lateral edges of a respective recording medium, first setting means (53) for setting and storing said allowable range of movement, means for extracting from said print data the two line end positions of each line to be printed, each line end position relative to said reference position (Rmax), and movement range control means (52) responsive to said print data and the allowable range stored by the first setting means and comprising means for establishing, for each line to be printed, an actual range of movement of the print head such that the actual range includes said two line end positions and does not exceed said allowable range. The apparatus according to Claim 1 wherein said first setting means (53) comprises: initializing means for storing an initial allowable range (Llim) corresponding to the width of the narrowest recording medium allowed to be used in the printing apparatus, comparison means for comparing the currently stored allowable range with a range (CRp) derived from the movement of the print head during printing of a preceding line to the same recording medium, and updating means for storing the larger one of the ranges compared by the comparison means as a new allowable range. The apparatus according to Claim 1 or 2 wherein said first setting means (53) includes means for determining the width of the recording medium based on data included in said print data and for storing said allowable range on the basis of the determined width. The apparatus according to Claim 1 or 3 wherein said first setting means (53) comprises: initializing means for storing an initial allowable range, comparison means for comparing the currently stored allowable range with the range defined by said line end positions, and updating means for storing the larger one of the ranges compared by the comparison means as a new allowable range. The apparatus according to Claim 4 wherein said carriage control means (50) further comprises recording medium detection means for detecting the presence and absence of a recording medium and for putting out a respective detection signal, wherein said initializing means stores said initial allowable range in response to each change in the detection signal. The apparatus according to any one of Claims 1 to 5 wherein ink ribbon advancing means (70) are provided for advancing the ink ribbon (31) in response to a movement of the print head (23) wherein the amount of ink ribbon advancement is related to the amount of movement of the print head, wherein said carriage control means further includes second setting means (54) for setting a minimum amount (MCT) of print head movement required for a desired ink ribbon advancement and wherein said movement range control means (52) includes range expansion means for establishing the actual range of movement to be no less than said set minimum amount. A printing apparatus according to Claim 6 further comprising: a direction evaluation means for determining the direction of print head movement based on said line end positions and the current position of the print head; wherein the ink ribbon advancing means advances the ink ribbon only when the direction of print head movement determined by the direction evaluation means is a predetermined direction; and said movement range control means (52) is adapted to expand the actual range of movement only when the direction of print head movement determined by the direction-evaluation means is said predetermined direction. The apparatus according to any one of Claims 1 to 5 further comprising: temperature detection means for detecting the temperature of the print head; and temperature comparison means for comparing the detected temperature with a predetermined threshold value; wherein said movement range control means (52) is responsive to the temperature comparison means for expanding said actual range. The apparatus according to Claim 8 wherein said movement range control means (52) is adapted to establish, when the detected temperature exceeds the threshold value, as said actual range a range equal to the allowable range. A method of controlling a printing apparatus as defined in claim 1, said method comprising the steps of a) receiving print data from a host device, b) deriving from said print data limit position data, the limit position data being relative to said reference position and representing an allowable range of movement of the print head defined such as to prevent the mask means (40) from being moved beyond the lateral edges of a recording medium, and setting said allowable range in said first setting means (53), c) extracting from the print data line position data representing the line end positions of the next line to be printed, said line position data being relative to a reference position of the print head and defining a first range, d) reading said limit position data from the first setting means (53), e) comparing said first range with said allowable range, f) establishing start and end positions between which to move the print head for printing said next line wherein said start and end positions are established to define an actual range including said line end positions and not exceeding said allowable range, and g) controlling said print head to move from said start position to said end position. The method according to claim 10 wherein step f) comprises establishing said start and end positions such that said actual range is equal to or larger than a second range representing a predetermined minimum amount of movement of the print head. The method according to claim 10 or 11 further including an updating step in which, when said position data extracted in step a) represent a range larger than the allowable range, the larger range is stored as a new allowable range. The method according to Claim 10, 11 or 12 further comprising the steps of: h) detecting a change between presence and absence of a recording medium in the controlled printing apparatus, i) resetting, in response to the detection of step h), said limit position data to represent an allowable range such as to prevent the mask means from being moved beyond the lateral edges of the narrowest recording medium used in the controlled printing apparatus. The method according to Claim 10 or 11 further comprising the steps of: j) determining based on said print data data the width of the recording medium, and k) setting the limit position data in the first setting means (53) in accordance with the determined width. The method according to any of claims 10 to 14 or controlling a printing apparatus as defined in claim 7, further comprising the steps of l) determining the direction of print head movement based on said line position data and the current position of the print head, and m) expanding the actual range of print head movement only when the direction of print head movement determined in step l) is a predetermined direction. The method according to any of claims 10 to 15 further comprising the steps of: n) detecting the temperature of the print head, and o) comparing the detected temperature with a predetermined threshold value, and wherein step f) comprises establishing said start and end position such that the actual range substantially corresponds to said allowable range when step o) reveals that the detected temperature exceeds the threshold value.

Inventors: ARUGA KAZUHISA, ITO YOSHIKAZU, ARUGA, KAZUHISA, ITO, YOSHIKAZU, ARUGA, KAZUHISA, C/O SEIKO EPSON CORP., ITO, YOSHIKAZU, C/O SEIKO EPSON CORP.
Applicants: SEIKO EPSON CORP, SEIKO EPSON CORPORATION
Application year: 1995
Main classification: B41J35
IPC codes: B41J29, B41J35, B41J11