Method of and device for printer control

Abstract: In a printer in which a print head (1) and a print medium (31) are moved relative to each other in the spacing direction and in the line-feed direction, the position of the print head (1) in the direction of spacing is detected, and the stoppage of the print head (1) during spacing operation is detected, and the stop position in the direction of spacing is stored. When the print head stops, reverse line-feed is performed by a first amount. The spacing operation is then performed in the same direction as before the carriage has stopped, then a forward line-feed is performed by said first amount, and then the spacing operation is performed in the opposite direction. If the print head stops again at the same stop position, an error indication is made. If the print head does not stop, the spacing is continued.

Description: The present invention relates to a printer control device and a method of operating a printer. Dot matrix printers have a print head and an ink ribbon cassette mounted on a carriage. The print head has print wires that are selectively driven toward a print medium on a platen. Printing is achieved by selectively driving the print wires while moving the carriage laterally across the print medium. This lateral movement is called spacing. The spacing is conducted in the forward direction (from the left to the right, as seen from the front of the platen) or in both forward and reverse directions. After printing of each line is completed, the print medium is moved (by moving the platen, for example) longitudinally by one line. This longitudinal movement is called line-feed. Such sequence consisting of printing while spacing, and line-feed is repeated to perform printing over all the surface of the print medium. In such a printer the tip of the print head is disposed close to the surface of the print medium. It is therefore possible that the print head is stopped by abutment with a projection of a print medium. This will be described in further detail with reference to Figure 4, which is a partial perspective view of a carriage in a conventional dot matrix printer. As illustrated, a print head 1 is mounted on a carriage frame 2, and is disposed such that it is capable of sliding, together with the carriage, to the right and to the left on a carriage shaft 3. A space motor 4 is mounted on the carriage. The stator of the space motor 4 is also the carriage frame 2. When the space motor 4 rotates, the pinion 5 rotates to move the space rack 6 back and forth, with the result that the carriage on which the space motor 4 is mounted is moved to the right and to the left. Provided on the carriage is a slit disk 7 which moves together with the space motor 4. A pulse generator 8 comprises a light-emitting element such as a light-emitting diode, and a photosensor disposed to receive light from the light-emitting element, and produces pulses at a rate proportional to the rotational speed of the space motor 4. In the above dot matrix printer, the print head 1 is moved in the forward and reverse directions (this operation is the spacing operation), and at timings in synchronism with the spacing operation, the print wires of the print head 1 are struck against the print medium on the platen, so that printing is made. When printing of each line ends, the print medium on the platen is line-fed by means of the line-feed motor, and the print head 1 is moved to the position at which the printing of the next line is started, and printing is again started. During printing, when the load on the carriage is temporarily increased, or when the torque of the space motor 4 is temporarily decreased, the carriage may stop, causing an error. In such a case, even when the operator tries to restart the printer, the spacing operation will not be resumed unless the cause of the stoppage of the carriage is removed. A solution in the prior art is to increase the torque of a space motor 4, making the carriage stoppage difficult to occur. However, this was undesirable because of the resultant increase in the size and the cost of the space motor 4 and the motor drive circuit. Recently, a printer control device for a printer, in which a spacing operation and a line feed operation of a print head relative to a print medium are performed, has been proposed in which the carriage control is achieved without increasing the torque of the space motor 4. This printer control device comprises line feed means for performing the line feed operation; spacing means for performing a spacing operation; means for detecting the stoppage of the print head during spacing operation; and a stop position memory for storing the position of the print head in the direction of the spacing when the print head is found to have stopped. A method of operating a printer, having a print head for printing on a print medium on a platen, is associated with this control device and comprises the steps of: (a) performing spacing operation of the print head; (b) performing line-feed of the print medium on the platen; (c) detecting the position of the print head in the direction of spacing; (d) detecting the stoppage of the print head during spacing operation; and (e) storing the position in the direction of the print head when the print head is found to have stopped, In this control device, when the carriage is stopped, it is moved backward to the original position, i.e., where the spacing operation is started, and then the carriage is again moved forward. If the carriage is stopped again at the same position, recognition is made that the error is not recoverable and an error indication is made. If the carriage is not stopped, the spacing operation is continued and the printing is resumed. It is however often the case that the cause of the stoppage of the carriage is not removed by such operation, and rather the situation becomes worse by such operation. This is true where the cause of the stoppage is abutment of the print head with a projection of multiply paper (consisting of several sheets laminated with each other). An example of such a multiply paper is shown in Fig. 5A and Fig. 5B, which are cross sectional view and a perspective view. The multiply paper 31 having feed perforations 32 is provided witha projection 33 in the form of an embossment or piercing provided to hold the sheets together. In such a case, sheets of the multiply paper may be turned over by abutment with the printhead, and the projection becomes higher that the projection is not eliminated but rather become higher by the abutment. An object of the invention is to solve the above problems of the prior art control device, and to provide a control device that is capable of spacing operation without stopping the carriage even under a heavy carriage load. According to a first aspect of the present invention, there is provided a printer control device, as defined above, characterised by control means for causing the line-feed means to perform a line-feed by a first amount when the print head stops, causing the spacing means to perform the spacing operation in the same direction as before the print head stopped, causing the line-feed means to perform a line-feed equal and opposite said first amount, causing the spacing means to perform the spacing operation in the opposite direction and continuing if the print head does not stop at the stop position. According to a second aspect of the present invention, there is a method of operating a printer, as defined above, characterised by the steps of: (f) performing a line-feed by a first amount when the print head stops; (g) performing the spacing operation in the same direction as before the carriage stopped; (h) performing a line-feed equal and opposite said first amount; (i) performing the spacing operation in the direction opposite to that of the spacing before the print head stopped; (j) detecting the stoppage during the spacing in said opposite direction as well; (k) performing an error indication when the print head stops at the position at which it has stopped; and (l) continuing the spacing operation if the carriage does not stop at the stop position. The term "reverse line-feed" is used to mean line-feed in the direction opposite to normal line-feed or "forward line-feed". During the reverse spacing to the stop position, printing may also be made. An embodiment of the present invention will now be described, by way of example, with reference to Figs. 1 to 3 of the accompanying drawings, in which: Fig. 1 is a block diagram of the control device according to the invention; Fig. 2 is a flowchart showing the operation of the control device according to the invention; Fig. 3 is a diagram for explaining the variation in the position of printing corresponding to the flowchart of the operation of Fig. 2; Fig. 4 is a partial perspective view of a carriage in a conventional dot matrix printer; and Fig. 5A and Fig. 5B are a cross section and a perspective view of a multiply paper having a projection. Fig. 1 is a block diagram of the printer control device according to the invention. Fig. 2 is a flowchart showing the operation of the printer control device according to the invention. Fig. 3 is a diagram showing the positions of the print head at the respective steps in the flowchart of Fig. 2. The control system of this embodiment is for a serial printer which is described with reference to Fig. 4. As illustrated, a microprocessor 10 comprises a CPU 11 for performing control over the entire operation of the dot matrix printer. Specifically, the microprocessor 11 performs control over spacing operation, and line-feed, as in conventional printer, as well as spacing and line-feed for recovery from the stoppage of the carriage due to the presence of a projection or the like on the printing medium. The microcomputer 10 also comprises a ROM, a RAM, I/O ports, etc., not shown as such. The ROM stores a program shown by the flowchart of Fig. 2. A print control circuit 18 is for controlling the print head 1 for the purpose of printing. A space motor control circuit 12 is for performing control over the operation of the space motor 4. A space motor drive circuit 13 is responsive to the timing signals from the space motor control circuit 12 for driving the space motor 4. A pulse generator 8 produces two series of pulses in synchronism with the rotation of the space motor 4. The frequency of the pulses is therefore proportional to the rotational speed of the space motor 4, and the relative phase of the two series of the pulses differ depending on the direction of the rotation of the space motor 4, i.e., the direction of the spacing. By processing the pulses from the pulse generator 8, it is therefore possible to determine the position of the carriage. The output of the pulse generator 8 is supplied to the space motor control circuit 12 where it is converted into a single-phase pulses whose frequency is proportional to the rotational speed of space motor and a signal indicating the direction of the rotation of the space motor 4. The pulses and the direction indicating signal are supplied to the CPU 11 and to the position counter 14. The position counter 14 up-counts or down-counts the pulses depending on whether the direction indicating signal indicates the forward or reverse direction. The CPU 11 detects the stoppage of the carriage in accordance with the pulses. That is if the frequency of the pulses becomes zero during spacing operation, i.e., when the commands for spacing operation is issued, recognition is made that the carriage has stopped. A stop position memory 15 stores the count value of the position of the counter 14 when the carriage stops. For this purpose, the stop position memory 15 receives, from the position counter 14, information on the stop position in the spacing direction. The position counter 14 and the stop position memory 15 may be formed of part of the RAM in the microcomputer 10. A line-feed motor drive circuit 16 is responsive to commands from a microprocessor 21 for driving a line-feed motor 17. The stop position memory 15 also stores the amount by which the line feed is made in either direction. For this purpose, the stop position memory 15 receives, from the CPU 11, data indicating the amount of reverse line-feed that are contained in the commands which the CPU sends to the line-feed motor when the reverse line-feed is to be made because of the stoppage of the carriage. An error indicator 19 is a light-emitting diode which is turned on when an unrecoverable error is recognized to indicate the error. The operation of the control device according to the invention will be described with reference to Fig. 2 and Fig. 3. The positions of the carriage at the respective steps in Fig. 2 are indicated by the same numerals in Fig. 3. Step 101 When, on the basis of the pulses from the pulse generator 8, the CPU 11 detects stoppage of the carriage due to abnormality in the spacing operation while the dot matrix printer is printing in one direction, e.g., the reverse direction, it produces a control signal indicating the abnormality of the carriage. Step 102 Then, the CPU 11 receives the data on the stop position in the spacing direction that is counted by the position counter 14, and stores the data in the stop position memory 15. Step 103 The CPU 11 supplies a line-feed motor drive signal to the line-feed motor drive circuit 16, and performs reverse line-feed by one line. The amount (one line in this example) by which the reverse line-feed is made is stored in the stop position memory. Such an amount is known from the commands issued by the CPU 11 to the line-feed motor drive circuit 16. Step 104 The CPU 11 supplies the space motor drive signal through the space motor control circuit 12 to the space motor drive circuit 13, and moves the carriage in the same direction as before it stops, i.e., in the reverse direction, and stops at the position opposite to the print start position, i.e., print end position. Step 105 Then, forward line-feed is performed by the same amount (one line) that is stored in the stop position memory 15. Step 106 The microprocessor 11 then alters the direction of movement of the carriage into the forward direction, and moves the carriage while performing printing by means of the print control circuit 18 and the print head 1, the data for the printing being for the line on which the printing was interrupted because of the stoppage of the carriage. The spacing and the printing is continued to the stop position, i.e., the position at which the position data in the position counter 14 coincide with the position data in the spacing direction as stored in the stop position memory 15. Step 107 Decision is made whether or not the carriage again stops at the stop position. Steps 108 and 109 When the carriage stops again, recognition is made that the error is unrecoverable, and the spacing operation is terminated and the error indication is made by means of the error indicator 19. When the carriage does not stop, the spacing operation is continued further. As has been described according to the invention, when the carriage stops, the stop position that is counted by the position counter is stored in the stop position memory. Then, reverse line-feed is made, and the carriage is then moved in the same direction as before the carriage has stopped, to the position at which the printing ends, and subsequently, forward line-feed is performed by the same amount as the above reverse line-feed, and the carriage is moved while printing the print data that has not been printed to the stop position. If the carriage stops at the same position, the processing is terminated and error indication is made. When the carriage does not stop, the spacing operation is continued. Accordingly, even when there is a projection due for example to embossment or piercing in multiply paper, possibility of occurrence of turn-over of the paper is reduced, and the load on the carriage is reduced. Accordingly, in the event of a temporary abnormality, the spacing operation is automatically resumed, and restarting with the operator's intervention is obviated, so that work efficiency of the printer is improved. The above description is made on the control of printing in the reverse direction. But for the control of printing operation in the forward direction, the same operation may be performed with the exception that the "reverse direction" and the "forward direction" in the above description are interchanged. In the above description, the amount of reverse line-feed and the forward line-feed is one line, but any amount of line-feed may be set as long as it is possible to avoid the stop position.

Claims: A printer control device for a printer in which spacing operation and a line-feed operation of a print head relative to a print medium are performed, comprising: (a) line-feed means (16, 17) for performing the line-feed operation; (b) spacing means (12, 13, 4) for performing the spacing operation; (c) means for detecting the stoppage of the print head during spacing operation; and (d) a stop position memory for storing the position of the print head in the direction of the spacing when the print head is found to have stopped, characterised by: (e) control means (10) for causing the line-feed means to perform a line-feed by a first amount when the print head stops, causing the spacing means to perform the spacing operation in the same direction as before the print head stopped, causing the line-feed means to perform a line-feed equal and opposite said first amount, causing the spacing means to perform the spacing operation in the opposite direction and continuing if the print head does not stop at the stop position. A device according to claim 1, wherein the control means (10) causes the spacing means (12, 13, 4) to perform spacing to the position where the spacing should have ended, if the stoppage had not occurred, and then to perform spacing for printing in the opposite direction to the stop position. The device of claim 1 or 2, wherein said line-feed means (16, 17) comprises (a1) a line-feed motor (17) for performing line-feed of a print medium on the platen; (a2) a line-feed motor drive circuit (16) for driving the line-feed motor (17); and said spacing means (12, 13, 4) comprises: (b1) a space motor (4) for moving the print head to the right and to the left; (b2) a space motor drive circuit (13) for driving the space motor (4); and (b3) a space motor control circuit (12) for controlling the space motor drive circuit (13). The device of claim 1, 2 or 3, including position detecting means (8, 14) comprising: (c1) a pulse generator (8) for producing pulses in synchronism with the operation of the spacing means (12, 13, 4); and (c2) a position counter (14) for counting the pulses from the pulse generator (8). The device of claim 4, wherein said stoppage detecting means is responsive to said pulse generator (8). A method of operating a printer having a print head for printing on a print medium on a platen, comprising the steps of: (a) performing spacing operation of the print head; (b) performing line-feed of the print medium on the platen; (c) detecting the position of the print head in the direction of spacing; (d) detecting the stoppage of the print head during spacing operation; and (e) storing the position in the direction of the print head when the print head is found to have stopped, characterised by the steps of: (f) performing a line-feed by a first amount when the print head stops; (g) performing the spacing operation in the same direction as before the print head stopped; (h) performing a line-feed equal and opposite said first amount; (i) performing the spacing operation in the direction opposite to that of the spacing before the print head stopped; (j) detecting the stoppage during the spacing in said opposite direction as well; (k) performing an error indication when the print head stops at the position at which it has stopped; and (l) continuing the spacing operation if the print head does not stop at the stop position. The method of claim 6, wherein said step of performing spacing following the detection of the stoppage comprises performing the spacing to the end position where the spacing should have ended, if the stoppage had not occurred, and said method further comprises the step of performing printing during said spacing in said opposite direction to said stop position.

Inventors: ISHIMIZU HIDEAKI C O OKI ELECT, KASAI TADASHI C O OKI ELECTRIC, KOMORI CHIHIRO C O OKI ELECTRI, TANUMA JIRO C O OKI ELECTRIC I, ISHIMIZU, HIDEAKI, C/O OKI ELECTRIC IND. CO., LTD., KASAI, TADASHI, C/O OKI ELECTRIC IND. CO., LTD., KOMORI, CHIHIRO, C/O OKI ELECTRIC IND. CO., LTD., TANUMA, JIRO, C/O OKI ELECTRIC INDUSTRY CO., LTD.
Applicants: OKI ELECTRIC IND CO LTD, OKI ELECTRIC INDUSTRY COMPANY, LIMITED
Application year: 1990
Main classification: B41J11
IPC codes: B41J19, B41J29