Raster image serial printer and method for operating same

Abstract: A raster image serial printer in which a printing operation can be carried out using a buffer (13; 23) having as small a capacity as possible by altering the form of bit map data in proportion to the amount of the memory that can be used as an image buffer. The raster image serial printer includes a print data decision unit (11) for determining the type of input data, a buffer capacity decision unit (14) for determining the capacity of a buffer (13) in which raster image data is assembled, an image assembling unit (12) for assembling the image by determining the number of bits to be assembled corresponding to the available memory capacity, and a latch (15) for latching the image data assembled in the buffer (13) and null data obtained from a null data generator (16) for making up the deficiency. When the input data is raster image data and the capacity of an image buffer is small, the printing operation is carried out while the deficiency is made up by null data in such a way that bit map data lines fewer in number than the dot forming elements of a recording head are stored in the buffer.

Description: The present invention relates to a raster image serial printer and a method for operating same. A printing operation in a raster image mode is started when bit map data is stored in a print buffer. Conventionally, when a printhead with 24 dot forming elements arranged in the subscanning direction ( i.e ., in the paper feeding direction) is used, for instance, printing cannot be started until data have been assembled and stored corresponding to all 24 dots in the subscanning direction and the number of print columns, i.e ., a number of dots in the main scanning direction determined by the desired printing resolution. For this purpose, there has been provided a print image buffer having a capacity equal to the product of the number of print columns and the number of dot forming elements of the recording head. The storage capacity of the print image buffer must be increased as the numbers of print columns and dot forming elements are increased. Therefore, to be able to print all types of data, it is necessary to either provide an image buffer having a large storage capacity or allow the printer to wait a relatively long period of time while the necessary data is assembled and stored in the print image buffer. Prior art document Patent Abstracts of Japan, vol. 13, No. 36, (M-790) and JP-A-63 247 064 disclose an apparatus and method of printing small-type characters in which a null data generating means is provided to print blank data. Further, prior art document Patent Abstracts of Japan, vol. 13, No. 60, (M-796) and JP-A-63 265 648 describe a printing controller which generates zero dot information to complete a second print pass when a character to be printed is greater than one print pass wide (see preamble of claim 1). It is an object of the invention to provide a serial printer capable of varying the memory capacity of a print image buffer required to be filled before a printing operation can be started so that the printing operation can be started in a short amount of time without having to store bit map data in the main scanning direction in conformity with the number of dot forming elements of the recording head. This object is solved by the raster image serial printer according to independent claim 1. It is a further object of the invention to provide a method for operating such a printer. This object is solved by the method of operating a raster image serial printer according to independent claim 3. Further advantageous features aspects and details of the invention are evident from the dependent claims, the description and the drawings. The printer according to the present invention provides a novel raster imaging function. The printer of the invention, according to a specific aspect, is provided for producing printed data by carrying out raster scanning with a serial recording head in response to bit map data received from a host computer. When the input data requires a printing operation in a raster image mode but the memory capacity of the print image buffer is not large enough to store the entire image data, the printing operation is started in a state where bit map data in a number of lines fewer than the number of dot forming elements of the recording head has been stored in the print image buffer, while null data is used to make up the deficiency. It thus becomes possible to reduce the capacity of the buffer for assembling and storing the print image data and to shorten the time required to store the data in the buffer. Fig. 1 is a block diagram of the functional parts of a control system for a raster image serial printer according to the present invention which is exemplified by means of a microcomputer system, Fig. 2 is a block diagram of a raster image serial printer embodying the present invention; Fig. 3 is a flowchart showing an operation for determining a data storage mode in the printer of Fig. 2; Fig. 4 is a flowchart showing the primary operation of the printer above and a printing process in a one-byte mode; Fig. 5 is a flowchart showing the printing operation in a two-byte mode in the above printer; Fig. 6 is a flowchart showing the printing operation in a three-byte mode in the above printer; Fig. 7 is illustrative of the operations of the above printer as shown in the form of Figs. 7(i) - 7(iii); Fig. 8 is an elevational view of a recording head used in the practice of the present invention; Fig. 9 is a block diagram illustrating another embodiment of the present invention; Fig. 10 is a flowchart showing the operation of the printer of Fig. 9; Fig. 11 is an exemplary diagram illustrating an example of print data; Fig. 12 is an exemplary diagram illustrating data being transferred in the first and second paths; and Fig. 13 is an exemplary diagram illustrating bit map data during the printing operation. Referring to the accompanying drawings, a detailed description will subsequently be given of preferred embodiments of the present invention. Fig. 2 illustrates a preferred embodiment of a raster image serial printer of the present invention, wherein reference numeral l denotes control means exemplified by means of a microcomputer for generating image data of a size corresponding to the capacity of a print image buffer when a printing operation is to be carried out in a raster image mode in accordance with print data received from a host computer, for converting code data to bit map data by means of a character generator (not shown), and for controlling a paper feed motor 5 in such a manner as to feed paper through a length corresponding to a print span in the main scanning direction. The microcomputer is provided with a memory 2 for forming both work areas and a print image buffer. Reference numeral 3 denotes a recording head driving circuit for operating dot forming elements P 1 - P 24 (Fig. 8) such as wire dots, heating elements, ink jets, or the like of a serial recording head 4in response to the bit map data received from the microcomputer 1. Fig. 1 is a block diagram illustrating functions to be performed by the control means l whereby the microcomputer is programmed such as to form a print data decision unit 11 for determining whether or not the print data received from a host computer is raster image data, an image assembling unit 12 for assembling, in a print image buffer 13, image data of a type in agreement with the type of print data and the capacity of the memory, a buffer capacity decision unit 14 for determining the available capacity of the image buffer in the memory, a latch 15 for latching image data conforming to the number of lines of data assembled in the image buffer 13, that is, the number of bits in the main scanning direction and for latching null data from a null data generator 16 for making up any deficiency, and a paper feed unit 17 for feeding paper through a distance corresponding to the length in the main scanning direction of the image data that has been printed. Referring to the flowcharts of Figs. 3-6 inclusive, a description will subsequently be given of the operation of the system thus constructed considering the case of a recording head which has 24 dot forming elements in the subscanning direction, as shown in Fig. 8, and which is thus capable of simultaneously printing three bytes of data in the subscanning direction during one printing operation. When print data is output from the host computer (Step 100, Fig. 3), the print data decision unit 11 determines whether or not the data is in the raster image mode (Step 101). If the data is determined to be in the raster image mode, assuming that the memory 2 has only a small storage capacity, the buffer capacity decision unit 14 determines that the capacity of the image buffer 13 is small in relation to the data (Steps 102, 103). Accordingly, the assembly of eight bits of data, that is, only one byte of data in the main scanning direction, is carried out, and a one-byte flag is set in the ON state (Step 104). On the other hand, in a case where there is still sufficient capacity for at least two bytes to be assembled lengthwise in the image buffer 13 (even though the memory 2 may have minimal additional storage capacity) (Steps 102, 103), the assembly of 16 dots, that is, two bytes in the main scanning direction, is determined, and a two-byte flag is set to the ON state (Step 105). Further, in a case where the data is not in the raster image mode (Step 101) or where the memory 2 has sufficient storage capacity (Step 102), such as when character code data is received, the assembly of at least 24 dots, that is, three bytes in the main scanning direction, is determined and a three-byte flag is set to the ON state (Step 106). When the byte flag has thus been set, the image assembly unit 12 stores raster image data for line no. 0. The data are sequentially fed from the host computer in the raster image mode in eight-bit bytes, and stored at addresses 7, 15, 23, ..., N-1 (N = multiples of eight) in the image buffer 13 in consideration of crosswise conversion at the time the data is fed to the recording head 4. Similarly, raster image data for the next line (line no. 1) are stored in succession at eight-byte intervals at addresses 6, 14, 22, ..., N-2 located just prior to the addresses at which the respective data for line no. 0 are stored (Step 110, Fig. 4). The one-byte flag is checked (Step 112) when the raster image data for line no. 7 have been stored at addresses 0, 8, ..., N-8 in the image buffer 13 after repetition of the storage operation in the above-described manner. If the byte flag is ON, the reception of the raster image data from the host computer is suspended and a crosswise conversion process is performed (Step 113). If the one-byte flag is OFF, the image assembling unit 12 receives raster image data for line no. 8 in succussion, and with N as an offset value, stores the data in succession at eight-byte intervals at addresses 7+N,15+N, 23+N, ..., 2N-1 of the image buffer 13 continuously until the raster image data for line no. 15 have been stored at addresses N, 8+N, 16+N, ..., 2N-8 (Step 121, Fig. 5). The two-byte flag is checked (Step 122) after the raster image data for line no. 15 have been completely stored. If the two-byte flag is ON, the reception of the raster image data from the host computer is suspended and the crosswise conversion process is performed (Step 123). If the two-byte flag is OFF, that is, when the three-byte flag is ON, the image assembling unit 12 receives the raster image data for line no. 16 in succussion, and with 2N as an offset value, stores the data at eight-byte intervals in the image buffer 13 at addresses 7+2N, 15+2N, 23+2N, ..., 3N until the raster image data for line no. 23 has been stored at addresses 2N, 8+2N, 16+2N, ..., 3N-8 (Step 130, Fig. 6). With respect to the images generated by the host computer as shown in Fig. 11, the image assembling unit 12 stores the raster image data in the image buffer 13 in such a state that images to be actually printed are rotated 90° clockwise, as shown in Fig. 12. In the aforementioned crosswise conversion process, data is read continuously every eight bytes from the leading address of the image buffer 13 to generate eight-byte data rotated by 90° counterclockwise by extracting the corresponding bits so as to overwrite each datum at the address of the memory where the original data was been stored. In this way, data corresponding to the pin arrangement of the recording head 4 are stored in the image buffer 13 without the necessity of a separate storage area for data generation (Fig. 13). The crosswise conversion process can be carried out with the microcomputer. Upon the termination of the crosswise conversion process in conformity with the byte flags as stated above, scanning of the recording head 4 is carried out by a carriage drive motor M in the main scanning direction. The following is an explanation of the one-byte data assembly mode with reference to Fig. 4. While the one-byte flag is ON (Step 112), one byte of image data stored in the image buffer 13 together with two bytes of null data (as deficient data) supplied from a null data generator 16 are latched (I, Fig. 7 (i)). When the recording head reaches a print start position (Steps 114, 115), these data are fed to a head drive circuit 3. Consequently, the dot forming elements P 1 - P 8 in the predetermined area of the recording head 4, for instance, in the first byte area (Fig. 8), print dots conforming to the print data received (Step 116). In this case, no dots will be formed by the elements P 9 to P 24 for forming the remaining two bytes of dots as these elements receive null data. When recording at the printing start position is terminated, a pointer for reading the image buffer 13 is switched and the recording head 4 is moved by one dot (Step 117). Then, one byte of data in the second row is read from the image buffer 13 and two bytes of null data are latched and fed to the head drive circuit 3 (Steps 114 to 118). A series of these steps is repeated thereafter, with the paper being fed through a distance corresponding to eight dots as necessary in the subscanning direction (Step 119) until all the data stored in the image buffer 13 have been printed (Step 118). The reception of raster image data from the host computer can then be restarted (Step 120). The two-byte assembly mode will now be discussed with reference to Fig. 5. When the two-byte flag is ON (Step 122), image data corresponding to the first and second byte areas are latched (Step 124; I, II, Fig. 7 (ii)) and, with respect to the third area of the recording head 4, null data from the null data generator 16 are latched when the recording head 4 reaches the print start position (Step 125). These data are fed to the head drive circuit 3. Consequently, the dot forming elements P 1 - P 16 in the first and second byte areas of the recording head 4 output dots in accordance with the print data while null data are fed to the third byte area of the recording head 4, whereby images of 16 bits are printed in the subscanning direction (Step 126). When recording at the printing start position is terminated, the pointer for reading the image buffer 13 is switched (Step 127) and the recording head 4 is moved by one dot (Step 128). Then, two bytes of print data in the second row and one byte of null data are latched at the next recording position (Step 124) before the assembled data is fed to the head drive circuit 3 (Steps 114 to 118). A series of these steps is repeated thereafter, with the paper being fed through a distance corresponding to 16 dots in the subscanning direction (Step 129) when all the data stored in the image buffer 13 have been printed (Step 128). The reception of raster image data from the host computer can then be restarted (Step 110, Fig. 4). The three-byte assembly mode will now be discussed with reference to Fig. 6. When the three-byte flag is ON (Step 131), the image data stored in the image buffer 13 are latched from the image buffer 13 (Step 133) and the image data corresponding to the lengthwise first, second and third byte areas are latched and fed to the head drive circuit 3 (I, II, III, Fig. 7 (iii)) when the recording head 4 reaches the printing start position. Consequently, the dot forming elements P 1 - P 24 in the first, second and third byte areas of the recording head 4 print dots in accordance with the received print data, whereby 24 bits of image data are printed in the subscanning direction (Step 134). When recording at the start position has terminated, the pointer for reading the image buffer 13 is switched and the recording head 4 is moved through a distance corresponding to one dot (Step 135). Then, three bytes of data from the image buffer 13 in the second row are latched (Step 133) before being fed to the head drive circuit 3. A series of these process steps is repeated thereafter, and the paper is fed through a distance corresponding to 24 dots in the subscanning direction (Step 137) after all the data stored in the image buffer 13 have been printed (Step 136). Then, the reception of raster image data from the host computer can be restarted (Step 110, Fig. 4). In the three-byte mode, however, print data may be text data. In such a case, rather than feeding the recording paper though a distance corresponding to 24 dots as when the print data is raster image data, the paper is fed through a length corresponding to one line of the printed data. Although a description has been given of a recording head provided with 24 dot forming elements in the main scanning direction by way of example, the invention is equally applicable to a recording head having any number of dot forming elements. Moreover, although the above embodiment has been described with reference to a case where the paper is fed through a distance corresponding to one or two bytes (eight or 16 dots) when eight or 16 dots of the printing head are used for printing, the same effect will obviously be achieved by sequentially switching the area of the dot forming element for printing the bit map data without feeding the paper. More specifically, the printing operation can be carried out by applying the data of the second byte to the second area of the dot forming elements and feeding null data to the first and third areas thereof without feeding the paper after one-byte printing has been completed in a case where, for example, the data of one byte are used for printing. At the time of printing the third byte, the print data are fed to the third area of the recording head, whereas null data are fed to the first and second areas thereof. A series of these process steps is repeated. Although the size in the main scanning direction of bit data to be assembled in the image buffer has been based on one byte as a unit in the embodiment described above, the same effect will obviously be achieved by employing data of four or 16 bits as a unit in accordance with the number of dot forming elements of the recording head and the memory structure. Fig. 9 illustrates a second embodiment of the present invention, wherein reference numeral 20 denotes a timer which starts a timing operation when the feeding of raster image data is stopped and which outputs a signal when the raster image data is not fed for a predetermined time T. Reference numeral 21 indicates an image assembly unit having the function of starting the null data generator upon determining that the data in the print path has terminated when the signal from the timer is received, in addition to the function provided for the image assembling unit 12 discussed above in the context of Fig. 1. In performing a printing operation at a pitch finer than the dot space of the recording head 4, for example, when a recording head having a dot pitch of 0.1411 mm (1/180 in.) is used for printing at a pitch of 0.0706 mm (1/360 in.) in the subscanning direction, there is provided in this embodiment a switch unit 22 for distributing data on even-numbered lines of the raster image data transferred from the host computer to a first area 23a of an image buffer 23 and those on odd-numbered lines thereof to a second area 23b. The switch unit 22 uses the first and second areas as a continuous buffer without distributing such data when raster image data at the same pitch as the dot space of the recording head 4 are printed. Referring to the flowchart of Fig. 10, the operation of the printer thus constructed will be described. A description will first be given of a case where, as shown in Fig. 11, a pattern of a size greater than a print span H printable by scanning a recording head in one pass and smaller than a width 2 × H printable by two passes of the printing head, specifically, a pattern wider by two dots than the print span H, is printed. When print data for the first pass (the area I in Fig. 11) is transferred from the host computer (Step 140, Fig. 10), the type of data is checked. If it is determined to be raster image data (Step 141), the data is stored in the image buffer 23 via the switch unit 22 (Step 142). A description will further be given of a case by way of example where the dot density in the subscanning direction of the raster image data transferred from the host computer conforms to the dot space of the recording head 4, that is, where the image buffer 23 operates as one continuous buffer, in order to simplify the description. As discussed above, the raster image data from the host computer are stored in the image buffer 23 (Step 142) in such a state that they are rotated by 90° clockwise (I, Fig. 12). When the image data for one pass of the recording head are stored in the image buffer 23 (Step 143), and when the crosswise conversion process for rotating the data by 90° counterclockwise is completed, the scanning of the recording head 4 in the main scanning direction is started and the printing operation is carried out (Step 145) by feeding the data from the image buffer 23 to the dot forming elements P 1 , P 2 , P 3 , ..., P 24 while moving the recording head 4 dot by dot. As a result, dots in the original form in which they were received from the host computer are formed on the recording paper (I, Fig. 13). After the termination of printing the raster image data of the first pass in this manner (Step 146), the recording paper is fed through a distance corresponding to 24 dots, and the transfer of data from the host computer for the second pass is performed. With respect to the data of the second pass, the print data is contained in a section equivalent to two dots starting from the uppermost pin of the recording head 4, as shown in Fig. 11. Therefore, these data are stored in the image buffer 23 while the raster image data are transferred. Like the data of the first pass, those of the second pass are also rotated 90° clockwise before being stored (II, Fig. 12). The timer 20 starts to operate when the transfer of the raster image data is suspended after the termination of the transfer of the second of two dots. When the timer 20 times out after the state of suspension has continued for the predetermined time T (Step 144), the image assembling unit 21 performs the crosswise conversion process for rotating the data of two dots stored in the image buffer 23 by 90° counterclockwise and applies a start signal to the print unit. As a result, the recording head 4 is scanned in the main scanning direction, and bit image data are fed to the dot forming elements P 1 , P 2 to drive the upper two dots of the recording head 4, whereas null data are fed from the null data generator 16 to the other dot forming elements (P 3 - P 24 ), whereby the printing operation is carried out (Step 145). A printing operation thus can be carried out without having to wait for the assembly of the bit data in the non-dot forming areas (P 3 - P 24 ) in the image buffer 23. As a result, the waiting time from the time of initial data input to the commencement of the printing operation is shortened in proportion to the data amount. When the image buffer 23 is emptied of data after the printing of data in the second pass has been completed in this manner (Step 146), the paper is fed through a distance corresponding to 24 dots (Step 147), and the process steps described above are repeated until the transfer of data from the host computer stops (Step 148). A description will now be give of a case where the dot density in the subscanning direction of the raster image data transmitted from the host computer is twice as great as that of the recording head 4. The switch unit 22 divides the image buffer 23 into a first area 23a and a second area 23b, distributes data on the even-numbered lines of the raster image data transferred from the host computer to the first area 23a and data on the odd-numbered lines to the second area 23b, and stores the data in such a state that they are rotated 90° clockwise. After termination of the transfer of the raster image data, the crosswise conversion process for rotating the data in the first and second areas 23a and 23b by 90° counterclockwise is performed, and the rotated data is applied to drive to the recording head 4. As a result, the scanning of the recording head 4 is started and the bit data stored in the first area 23a are printed. Upon the completion of the printing of the bit data in the first area 23a, the bit data stored in the second area 23b are printed by feeding the recording paper by a pitch of half a dot, that is 0.0706 mm (1/360 in.) in the subscanning direction. When the printing of the bit data in the second area 23b is terminated, the paper is fed in such a way that the uppermost pin of the recording head 4 is located lower by half a dot pitch than the lowermost dot position of the preceding print path. The process steps above are repeated thereafter, so that it is made possible to print the raster image data at a dot pitch finer than the dot pitch of the recording head 4. Although one line of characters is printed with two passes of the recording head by dividing the image buffer into two areas in this embodiment, raster image data can obviously be printed at a still finer dot pitch by dividing the image buffer into M (M = an integer greater than 2) or more areas, feeding the paper at a dot pitch of 1/M, and carrying out the printing operation in M passes.

Claims: A raster image serial printer, comprising: a recording head (4) comprising a plurality of dot forming elements (P1-P24) in a sub-scanning direction, said recording head being movable over a recording medium in the main scanning direction to a plurality of print locations of a line; a buffer (13; 23) in which print image data is assembled and which has a variable capacity; and null data generating means (16) for generating null data to be supplied to the recording head corresponding to portions of said print image data not provided by said buffer (13; 23); characterized in that there are print data decision means (11) for determining whether or not the input data is raster image data; buffer capacity decision means (14) for determining the available capacity of said buffer (13; 23); number determining means (12, 101-106) for determining the number of dot forming elements that can be driven by the bits in the buffer in agreement with received raster image data and the limited capacity of said buffer; and image assembling means (12; 21) for assembling the print image data in said buffer, the print image data comprising for each print location of the line a number of bits corresponding to the determined number of dot forming elements. The raster image serial printer of claim 1, further comprising: timer means (20) for starting a timing operation at a point of time in which feeding of said input data is stopped, wherein said null data generating means (16) generate said null data after passage of a predetermined time and a print start information is output to a recording head (4). A method for operating a raster image serial printer having a recording head (4) with a plurality of dot forming elements (P1-P24) in a sub-scanning direction, the recording head being movable in a main scanning direction over a recording medium to a plurality of print locations of a line, the method comprising: (a) determining (101, 102) that the type of received input data is raster image data and that the available capacity of a print image buffer (13; 23) is too small in relation to the raster image data for the plurality of dots in a line to be printed; (b) determining (103) the number of dot forming elements, less than the plurality of dot forming elements, that can be driven by the bits in the print image buffer in accordance with the available capacity of said print image buffer; (c) storing in the print image buffer (13; 23) for each print location in the line, a number of bits corresponding to the determined number of dot forming elements; (d) providing null data for the dot forming elements that do not receive print image data from the print image buffer; (e) driving the recording head (4) as said recording head is scanned in the main scanning direction along the recording medium in accordance with data stored in said print image buffer to print dots on said recording medium (f) repeating steps (c) to (e) for remaining portions of said input data in said sub-scanning direction. The method for operating a raster image serial printer of claim 3, further comprising the step of setting a byte flag in accordance with the type of said received input data and said available capacity of said print image buffer (13, 23) indicative of a number of bytes of said input data in said sub-scanning direction to be stored in said print image buffer (13, 23), said amount of said input data in said sub-scanning direction stored in said print image buffer (13, 23) being determined in accordance with said byte flag. The method for operating a raster image serial printer of claim 3 or 4, further comprising the steps of moving said recording medium after each repetition of step (e) through a distance corresponding to said amount of said input data in said sub-scanning direction stored in said print image buffer (13, 23). The method for operating a raster image serial printer of any one of claims 3 to 5, further comprising the step of, after each repetition of step (e), changing the number of dot forming elements of said recording head (4) employed to print dots on said recording medium in accordance with said data stored in said print image buffer (13; 23). The method for operating a raster image serial printer of any one of claims 3 to 5, further comprising the steps of: distributing said input data stored in said print image buffer (13, 23) into a plurality of areas of said print image buffer (13, 23) corresponding to respective lines of said raster image data; and moving said recording medium after each repetition of step (e) through a distance corresponding to a pitch of 1/M dot size, where M is the number of said areas. The method for operating a raster image serial printer of claim 3, further comprising the step of rotating the data stored in said print image buffer (13; 23) prior to step (d).

Inventors: ENDOH MASAKATSU, ENDOH, MASAKATSU
Applicants: SEIKO EPSON CORP, SEIKO EPSON CORPORATION
Application year: 1993
Main classification: G06K15
IPC codes: G06K15, B41J2, G06F3, G06T11, B41J5