PRINTING APPARATUS

Abstract: A printing apparatus is disclosed which moves a print head of a printing mechanism to a relocation position on receiving a relocation command signal. On receiving a relocation command signal, a searching means retrieves a code data of a character or the like other than a space code in sequence from an end address toward a head address of a correction memory. Then, when the searching means detects code data of the character or the like, a controlling means relocates the print head at the print position which is shifted by one digit in the printing direction from the position corresponding to the address of the code data detected by the searching means.

Description: The present invention relates to a printing apparatus and specifically relates to a printing apparatus wherein control of retrieving the relocation position when a print head is relocated is improved. Conventionally, the electronic typewriters and the like are generally provided with a relocating function for returning a print head to an original position. This relocating function is a function which returns the print head to the original print position wherefrom printing is to be continued when making a corrective print of a wrongly printed character which is noticed during printing while inputting through a keyboard,or when the print head is backspaced for another reason. For example, in the Japanese Patent Publication (exam­ ined) No. 58-3l3l5, there is disclosed a relocation controlling apparatus for typewriter provided with a present position register storing the present position of a print element in one print line as a numeric value, a relocation register storing a maximum numeric value stored in this present position on register and the like. In this relocation controlling apparatus, the relocation position of the print element is stored in the relocation register, and data of the relocation register is always renewed for every change of the relocation position of the print element in response to printing operation. However, in the relocation controlling apparatus men­ tioned in the above-described patent publication, data of the relocation register is renewed always in response to a movement of the print head even when the print head makes printing operation in the printing direction without making backspace, and therefore this controlling apparatus has a problem that the burden of a CPU (central processing unit) of the controlling apparatus is increased by that much, and the processing time in the CPU is extended. The object of the present invention is to provide a printing apparatus which can relocate the print head by retrieving the relocation position only when performing relocation without the need of the relocation register. As shown in a functional block diagram of Fig. l, a printing apparatus in accordance with the present invention is provided with a printing mechanism printing characters, symbols and the like on a print paper corresponding to the inputted data, a correction memory storing this printed data correspondingly to the print position; and a present position memory storing the present position of a print head of the printing mechanism correspondingly to the print position: above-mentioned printing apparatus characterized by comprising; a searching means for searching code data of a character or the like other than a space code in sequence from an end address toward the upper address of the correction memory when receiving a relocation command signal from an inputting means, and a controlling means for relocating the print head of the printing mechanism to the print position corresponding to the address lower by one character than the address where the code data of a character or the like is first detected based on an output from the searching means and the data of the present position memory. Next, description is made on operation of the printing apparatus in accordance with the present invention. The printing apparatus in accordance with the present invention is constituted as described above, and therefore a character, symbol or the like corresponding to the inputted data is printed on a print paper by the printing mechanism, and in parallel with this operation, the printed data is stored in the correction memory corresponding to the print position. Also, the present position of the print head is stored in the present position memory corresponding to the print position. When the searching means receives a relocation command from the inputting means, code data of a character or the like other than the space code is retrieved in sequence from the end address toward the upper address (the direction reverse to the printing direction) of the correction memory, and then, when this searching means detects code data of a character or the like, the data representing that address is outputted to the controlling means from the searching means, and the controlling means relocates the print head to the print position corresponding to the address lower by one character than the address where code data or a character or the like is first detected based on the data of that address and the data of the present position memory. The printing apparatus in accordance with the present invention, as is described above, is constituted in a manner that code data of a character or the like is retrieved in sequence by searching from the end address toward the upper address of the correction memory without providing the correction register storing the relocation position, and the relocation position is obtained from the address where the code data of the character or the like is first detected, therefore the memory capacity can be reduced by the amount required for the relocation register. Also, when the searching means receives a relocation command signal from the inputting means, the relocation position is retrieved as described above only when relocation is required, no relocation position is required to be retrieved when no relocation is performed. Accordingly, the burden of the CPU (central processing unit) of the controlling apparatus is alleviated and the processing time in the CPU is shortened. An embodiment of the invention is now described by way of example only: Fig. l is a functional block diagram showing a constitution in accordance with the present invention. Fig. 2 through Fig. 6 show an embodiment of the present invention. Fig. 2 is a perspective view of an electronic type­ writer. Fig. 3 is a plan view of a keyboard. Fig. 4 is a block diagram of a controlling apparatus of the typewriter. Fig. 5 is an explanatory view schematically exemplifying relationships among a printed word, print position and data in the correction memory. Figs. 6(a) and (b) are a flowcharts showing a routine of relocation control for relocating the print head. Hereinafter, description is made on an embodiment wherein the present invention is applied to an electronic typewriter with reference to the drawings. As shown in Fig. 2, a platen 2 is supported at the rear side part of a main unit case l of a typewriter, and a guide rod 4 extending in parallel with the platen 2 is disposed in front of it. A carriage 3 is supported on this guide rod 4 in a manner capable of moving right and left along the platen 2. A thermal head 5 is attached to the carriage 3, and the thermal head 5 is changed-over between the print position where the thermal head 5 is pushed against a print paper P in front of the platen 2 and the non-print position where the head 5 is parted forward from the print paper P. Also, a keyboard l0 is installed in front part of the main unit case l, and a liquid crystal display (LCD) ll which is l5 digits shorter than one line is installed on the keyboard l0. Furthermore, the following operating members for operating the typewriter such as various keys and change­ over switches are disposed on the keyboard l0. These are character-symbol keys comprising alphabet keys l2, and numeral keys l3, and a space key l4, a backspace key l5, a carriage return key l6, a shift key l7, a second shift key l8, a left margin set key l9, a right margin set key 20, a tab set key 2l, a tab clear key 22, a tab key 23, a paper feed key 24, a paper return key 25, a repeat key 26, a code key 27, first and second mode select switches 28 and 29, an insert key 30, a delete key 3l, cursor move keys 78 and 79 for moving a cursor 33 indicating the data input position on the display ll, an erase command key 40 outputting an erase signal, a relocating key 55 moving the thermal head 5 to the original print position wherefrom character printing is continued when a wrongly printed character is corrected. In addition, description on the other keys is omitted because they are provided in the normal typewriter. Also, as to a carriage feeding mechanism which moves the carriage 3 having the thermal head 5 right and left in a reciprocative fashion and a ribbon feeding mechanism which is incorporated in the carriage 3, their constitutions are the same as those shown in the Japanese Patent (unexamined) No. 60-87085, and a thermal transfer ribbon R is taken up by a take-up spool by rotation of the take-up spool when the thermal head 5 moves in the printing direction at printing, but when moving the thermal head 5 in the direction reverse to the printing direction, the take-up spool is prevented from rotating by making the thermal head 5 retreat to the non-print position. In addition, description on the con­ crete configurations thereof are omitted because they are the same as those of the normal typewriter. Next, description is made on the controlling apparatus of the above-mentioned typewriter in reference to the block diagram of Fig. 4. A printing mechanism 6l, a displaying mechanism 62, a driver-receiver 77 for external interface connected to an external interface 63, the keyboard l0, a ROM (read only memory) 64 and a RAM (random access memory) 65 are connected to a CPU (central processing unit) 60 as illustrated. The printing mechanism 6l is provided with a paper feed motor 66 driving a paper feed roller, a paper feed motor driver 72, a carriage feed motor 67 moving the carriage 3, a carriage feed motor driver 73, a solenoid 68 selectively changing-over the thermal head 5 between the print position and the non-print position, a solenoid driver 74, the thermal head 5, a thermal head driver 75 and the like. The displaying mechanism 62 is constituted with the display (liquid crystal display) ll and a display controller 76. Also, the ROM 64 provides a pattern memory l00 storing pattern data of characters, symbols and the like and a program memory l02 storing a control program for controlling the printing mechanism 6l and the displaying mechanism 62, a control program for controlling the relocation position as described later and the like. The RAM 65 is provided with a present position memory (print position pointer) l04 storing at least the present position of the thermal head 5 correspondingly to the print position where printing is made on the print paper P, a correction memory (line memory) l06 storing code data inputted from the keyboard l0 correspondingly to the print position, a searching address counter l08 for searching code data written to the correction memory l06 in sequence on an address basis, various temporary memories required for controlling the printing mechanism 6l and the displaying mechanism 62 and the like. The above-mentioned CPU60 stores code data corresponding to characters and symbols such as alphabet, numerals and space inputted through the character-symbol keys on the keyboard l0 in the correction memory l06 of the RAM 65, and reads out the pattern data corresponding to these code data in sequence from the pattern memory l00 of the ROM64, out­ putting them to the thermal head driver 75 and the carriage feed motor driver 73. Furthermore, the CPU60 processes the code data inputted from various function keys on the keyboard l0 by the control program read from the program memory l02 of the ROM64, and thereby outputs the control signal corresponding to the input code data to the paper feed motor driver 72, the carriage feed motor driver 73, the solenoid driver 74 and the display controller 76. Then, the thermal transfer ribbon R is similar to the one as shown in the Japanese Patent Application No. 60-­ 2l9762, that is, the one which can be used not only as a print ribbon but also a correction ribbon, and next description is made on operation of erasing a wrongly printed character. When erasing a wrongly printed character, the operator moves the thermal head 5 to the print position where wrong printing has been made through the backspace key l5 or the like and operates the erase command key 40, and thereby the CPU60 controls the printing mechanism 6l by processing the data from the present position memory l04 and the collection memory l06 of the RAM65 by a predetermined control program to print the same character as the wrongly printed character facing the thermal head 5 in a manner of superposing on the wrongly printed character. Then the ink of the wrongly printed character on the print paper P is peeled off the print paper P and is transferred to the thermal transfer ribbon R side, and thereby the wrongly printed character is erased. Then, the correct character is reprinted at the corrective printing. At the same time, the CPU 60 erases or corrects the data in the correction memory l06 corresponding to each erased or corrected character for erasure or correction of each printed character. Then, the present invention is characterized by the relocation position control for moving the thermal head 5 to the print continuing position (relocation position) for continuing printing characters after the character printed with wrong spelling has been erased or corrected, and des­ cription is made on an outline of this relocation position control to easily understand explanation of the flowchart. Fig. 5 visually exemplifies a character string printed with wrong spelling "THE EXANPLE" and data in the correction memory l06 as one example. Spaces are typed at the first digit and the fifth digit of the print position, and "L" and "E" are printed by the double-width characters, and the thermal head 5 is positioned at the l5th digit (Ho). On the other hand, the code data corresponding to the printed character is written to the position (address) corresponding to the printed character in the correction memory l06. Here, an address in the correction memory l06 corres­ ponding to the first digit of print position is assumed as an address Al, an address corresponding to the second digit as an address A2 --- an address corresponding to the 30th digit as an address A80 (endmost address). Then, the code data of "L" and the data showing the double-width character (for example, l) are written to the address All corresponding to the double-width character "L" at the llth digit in the correction memory l06, and a space (SP) is written to the address Al2, and to the address Al3 and the address Al4 corresponding to the double-width character "E" at the l3th digit, writing is performed like­ wise the above-mentioned. Also, the space codes are written to the address Al5- the address A80 not printed yet. In the case where, to correct the wrongly printed character "N" in the above-mentioned case, the wrongly printed character "N" is corrected to "M" by the above-­ mentioned correcting operation by moving the thermal head 5 to the 9th digit (Hl) and thereafter printing is continued by moving the thermal head 5 to the relocation position (Ho) at the l5th digit, a relocation command signal is outputted to the CPU 6o by operating the relocation key 55. In the CPU60, code data of each address is retrieved in sequence while going upstream from the end address A80 of the correction memory l06 based on the relocation control program stored in the program memory l02 of the ROM64, and when a code data other than the space code is first detected, an address An of the memory wherein the code data is stored (in this case, An = l3) is obtained, and when that character is a double-width character, an address (An+l2) obtained by adding two to the address An is set as a relocation address An, and the thermal head 5 is moved to the print position at the l5th digit corresponding to the relocation address An. Also, in the CPU60, when the first detected code data other than the space code is of a normal width character, an address (An + l) obtained by adding one to the address An is set as a relocation address An, and the thermal head 5 is moved to the print position corresponding to that relocation address An. Accordingly, printing can be continued from the original position after this relocation. Next, description is made on a flowchart of relocation control performed in the controlling apparatus of the above-mentioned electronic typewriter in reference to Fig. 6(a) and Fig. 6(b). When the power switch of the typewriter is turned on, this control is started, and initialization in step Sl (hereinafter represented simply as Sl, and the same is true of the other steps) is performed, and the space code is written to all addresses of the correction memory l06, and subsequently S2 is executed. In S2, decision is made on whether or not a key input has been done (a key has been operated), and when no key is operated, S2 is repeated every small time until a key is operated, and when the key is operated, processing moves to S3. In S3, decision is made on whether or not the relocation key 55 has been operated in S2, and when the relocation key 55 has been operated, processing moves to S4, and when the relocation key 55 is not operated, processing moves to Sl4, and character printing or character erasure is executed in response to the code data through the operated key, or when a function key is operated, another processing such as processing corresponding to that function key is executed, and processing returns to S2. In S4, the endmost address is set in a searching address counter l08 indicating an address to be retrieved, and the code data of the end address of the correction memory l06 in the RAM65 indicated by the searching address counter l08 is read. Then, in the following S5, decision is made on whether or not the code data read in S4 is space code, and when it is the space code (for example, in fig. 5, the space code is written to the l5th digit - the 80th digit where characters are not printed yet), processing moves to S6, and when not the space code (for example, when the code data of "E" is detected at the l3th digit of Fig. 5), processing moves to S8. In S6, decision is made on whether or not the address of the correction memory l06 now under retrieval is a head address (address Al corresponding to the first digit of Fig. 5) based on the data of the searching address counter l08, and when it is a head address, that is, when no characters are printed on that line, processing returns to S2. Also, when it is not a head address, in the next S7, code data of an address one digit upper from the address now under retrieval (in the direction reverse to the printing direct­ ion) is read by subtracting one from the address value of the searching address counter l08, and processing returns to S5. Accordingly, when the space code is written to a plurality of addresses, S5 - S7 are repeated every small time, and when a code data other than of space is first detected in S5, processing moves from S5 to S8. In S8, by reading the data of the searching address counter l08, the address An of the correction memory l06 when a code data other than of space is first detected is obtained, and in the next S9, decision is made on whether or not the detected character is a double-width character based on the data indicating a double-width character of the correction memory l06, and when it is a double-width character, processing moves to Sll, and when not a double-­ width character, processing moves to Sl0. In Sl0, an address An obtained by adding one to the address An obtained in S8, that is, the relocation address An corresponding to the print position for moving the thermal head 5 is obtained, and processing moves to Sl2. Also, in Sll, an address An obtained by adding two to the address An obtained in S8, that is, the relocation address An corresponding to the print position for moving the thermal head 5 is obtained (for example, "E" at the l3th digit of Fig. 5 is a double-width character, and therefore the relocation position becomes the l5th digit), and processing moves to Sl2. In Sl2, based on the data of the present position memory l04 of the RAM65, decision is made whether or not the value of digit of the present position of the thermal head 5 is smaller than the value of digit of the position corres­ ponding to the address An obtained in Sl0 or Sll, that is, whether or not the position of the thermal head 5 is located at the print position upper from the relocation position (direction reverse to the printing direction), and when the thermal head 5 is located at the print position upper from the relocation position, processing moves to Sl3, and when the thermal head 5 is located at the print position lower from the relocation position (printing direction), processing returns to S2. In Sl3, the thermal head 5 is moved to the print posi­ tion of the Nth digit corresponding to the relocation address An obtained in Sl0 or Sll, and processing returns to S2. In this movement, the CPU60 outputs a control signal to the carriage feed motor driver 73 of the printing mechanism 6l based on the the value of the relocation address An and the data of the present position memory l04. As described above, after the erasing or correcting operation of a wrongly printed character has been performed, the thermal head 5 is moved to the print continuing position (relocation position) for continuing character printing by operating the relocation key 55. In addition, in the above-mentioned embodiment, des­ cription is made on the thermal typewriter provided with the thermal printer, but it is needless to say that the present invention is applicable likewise also to the typewriter provided with the digital wheel type printer or the type ball type printer.

Claims: 1. In a printing apparatus provided with a printing mechanism printing a character, symbol or the like corresponding to an inputted data on a print paper; a correction memory storing this printed data correspondingly to the print position; and a present position memory storing the present position of a print head of said printing mechanism correspondingly to the print position: said printing apparatus characterized by comprising; a searching means for searching code data of a character or the like other than a space code in sequence from an end address toward the upper address of said correction memory when receiving a relocation command signal from an inputting means; and a controlling means for relocating said print head of said printing mechanism to the print position corresponding to the address lower by one character than the address where code data of the character or the like is first detected based on an output of said searching means and the data of said present position memory.

Inventors: HATTORI, HIROSHI, SHIBATA, SATOSHI
Applicants: BROTHER KOGYO KABUSHIKI KAISHA
Application year: 1987
Main classification: B41J29
IPC codes: B41J19, B41J29, B41J5