Method and apparatus for reformatting print data

Abstract: Print heads 50, 60 are formed with spaced subheads having nozzles 51, 52, 53, 61, 62, 63 such that all of the lines or pixel rows on a print medium such as a sheet of paper are printed by scanning of the print head along the face of the sheet. The head structures include three subheads, each having nozzles for printing one or more adjacent lines with the subheads being spaced the same number of lines apart as the number of lines each prints; and three subheads spaced the equivalent of seven lines apart, each subhead having three nozzles spaced at the equivalent of alternate lines. The heads are advanced between scans by an equivalent number of lines generally equal to the number of nozzles in the head, whereby all print lines are addressed only once. Apparatus 70 for printing includes the use of pointers in registers 122, 124, 126, 128 to keep track of head structure and location on a print medium for calculating print addresses. A partial page memory 80 is used which wraps around to the beginning from the end. A positive printer carriage position encoder 180 uses an index marker 186 located in the middle of a strip 182 of incremental markers 184. Sensing of the index marker resets an up/down counter 198 with a value that gives a positive value for all count conditions.

Description: This invention relates to printing, and in particular, to reformatting image data for printing by a print head having a plurality of print nozzles. This invention is related to the invention disclosed in US Patent Application No 07/419,367 and in our copending European Patent Application Nos 90 311119.3 (EP-A-0 422 925) and 90 311120.1 (EP-A-0 422 926). The preferred apparatus for and method of practicing the present invention is associated with an ink jet printer wherein a print head scans a print medium, most typically a sheet of paper, by shuttling back and forth across the sheet of paper or by moving continuously along the sheet of paper which is held against a rotating drum. Images are formed by selectively depositing ink deposits or pixels which are located on lines and in columns. The present invention however is equally applicable to any printing process wherein a print head travels along parallel lines relative to a print medium to form a desired final image, whether that image be graphic or textual. Early scanning print heads contain a single nozzle per color of printing. This nozzle is positioned adjacent a sheet of paper. A print head carriage then moves relative to the paper one line at a time depositing ink pixels at selected pixel locations until the entire image area has been scanned. The length of time that it takes to make the image on the page depends on the rate of travel of the head relative to the paper and the density of pixels, and therefore lines, desired in the final image. In many commercial applications, it is desirable to make the pixels small and dense enough so that the human eye during normal unaided viewing is unable to distinguish between the pixels, thereby making the image appear to be formed of continuous lines. A pixel density of 11.81 x 10 3 dots per metre [300 dots per inch (DPI)] is common. This means that in order to print one inch of image across a page, 300 lines are required. Thus, for a page of 2.794 x 10 -1 metres (an 11 inch page), 3300 lines are required. If the print head can make ten passes over the page in one second, it would take 5.5 minutes to print the page one line at a time. This time can be reduced by printing a US standard 2.159 x 10 -1 metres x 2.794 x 10 -1 metres sheet (8.5 inch x 11 inch sheet) of paper lengthwise. This would reduce the printing time to 4.25 minutes. One approach which has been used to reduce the printing time even further is to put multiple printing nozzles on a single printing head so that a plurality of lines are printed simultaneously. An example of a thermal printer-plotter system which has thermal resistor elements which each form pixels and which are provided in an array of adjacent elements is described in US Patent No Re 30,743 (originally Patent No 4,070,680) reissued on September 15, 1981 to Shelley et al. The present invention is also usable in this type of system. It would appear that the printing time can be reduced to any figure, at least conceptually, by making heads with any desired number of nozzles. This is conceptually possible with thermally driven jets, although the structure becomes very complex. However, it is very difficult to mount piezoelectrically driven jets on the same head so that they print in the same column on adjacent lines. A conduit connected to a reservoir of ink and controls must be connected to each nozzle. When three colors plus black are used, four jets per line are required. As the number of jets is increased, the physical requirements of head construction becomes very limiting. In order to overcome the limitations of placing nozzles at single-line spacings, the concept of interlaced printing was developed. Representative of conventional interlaced printing are U.S. Patents 4,069,485 issued to Martin for "Bidirectional Ink Jet Printer With Moving Record Receiver"; 4,112,469 issued to Paranjpe et al. for "Jet Drop Copying Apparatus"; 4,131,898 issued to Gamblin for "Interlacing Recorder"; 4,272,771 issued to Furukawa for "Ink Jet Printer with Multiple Nozzle Print Head and Interlacing or Dither Means"; 4,593,295 issued to Matsufuji et al.; and 4,630,076 issued to Yoshimura for "Ink-On-Demand Color Ink Jet System Printer". Fig. 1 shows a simplified design of an exemplary printing head 20 having a plurality (five) of nozzles 22 spaced for printing simultaneously a plurality of spaced lines. Head 20 is positioned adjacent a drum 24 having a print medium, such as a sheet of paper 26, mounted on it. As the drum and sheet rotate, the head is moved at a constant velocity longitudinally along the drum so that all lines are printed. During each full revolution, the head advances the equivalent of 5 line spacings. Thus, on each subsequent revolution, the upper lines between lines printed on the prior revolution are printed in addition to new spaced lines, as shown. This head embodiment is also shown in Fig. 3 for printing by scanning back and forth across a planar print medium. In these figures, one line spacing between the centers of adjacent lines is the inverse of the dot-per-inch density, or 1/DPI, two line spacings is 2/DPI, etc. In Fig. 2, head 20 is shown in dashed lines at the position at the edge of the sheet after completing a series of lines. The head is also shown in solid lines, in the same position on drum 24, ready to begin the next set of lines. It can be seen by the arrows that two lines of the next set of lines are interlaced with the preceding set of lines. All of the preceding lines are printed. Continued drum rotation results in all of the lines on sheet 26 being printed. A printing system equivalent to that of Figs. 1 and 2 is shown in Fig. 3. In this embodiment a head 30 with nozzles 32 prints alternate lines on sheet 34. However, rather than sheet 34 being on a drum and rotated, it is moved both longitudinally and laterally relative to head 30. Normally, the head shuttles back and forth across the face of sheet 34 as the sheet is advanced. After each set of lines is printed, head 30 is shifted down the sheet by an amount shown by arrows 36 and 38 which are equal in length to the width of 5 lines of print. Thus, typically head 30 is stopped at the end of each scan pass, the sheet is shifted, and the head is driven across the sheet in a reverse direction. It can be seen that the embodiment of Fig. 3 provides in effect the same printing operation or method as that of Figs. 1 and 2. The letters at the top of the respective head positions represent the passes in alphabetical sequence. Corresponding letters are applied to the beginning of lines printed during each pass. In such systems, pixel data normally comes to a printer from a controller or data source in strict raster-scan format, in which the upper left-hand pixel is the first in the data stream, the next one to the right arrives next, and so on until the end of the line. The next pixel in the data stream is then the first one in the second line of the image, and the cycle repeats until the end of the image is reached. In the case of print heads which print on more than one line at a time, it is necessary to rearrange this data before it is sent to the print head so that the resultant print correctly duplicates the desired image. The resequencing scheme must be able to generate the data elements for each head nozzle at each head location. In order for the data reformatting unit to function, as a minimum, all of the data for printing a set of pixels for a given head position must exist in a memory. Conventionally, a memory is selected which is capable of storing the entire set of data elements defining the pixels for an entire image. In this way, there is a one-to-one correspondence between pixel location on the print medium and address locations within the memory. The selection of data elements for each head position then is based simply on a mapping of the printing element positions on the memory. Such memories, however, are very large and have a correspondingly high cost. It is desirable to provide printing in a manner which will require a reduced memory size while maintaining correspondence between the memory locations and head printing elements for each head position during printing. U. S. Patent No. 4,069,485 issued to Martin shows an alternative system wherein lines on a document are scanned, fed into a memory, and read out to a print head for printing in the same order per line as the document was scanned. Yet another system is shown in Paranjpe et al, US Patent No 4,112,469 in which the pixels are printed as soon as they are scanned. These systems required synchronization of scanning and printing. US-A-4 069 485 discloses an ink jet printer which includes a data storage means and which prints with multiple jets in an interlaced pattern on paper supported on a rotating drum. The printer is provided with a bidirectional ink jet transport for moving axially along the drum. The printing which takes place is bidirectional in the sense that on alternate documents the print head moves in the opposite direction. Printing of a document involves print head motion in one direction only. Print data is received from a scanner in a sequential line-by-line stream of pixels but has to be accessed in a different order for controlling the ink jets during printing. US-A-4 069 486 discloses that the arrays of printing nozzles in a similar arrangement need not necessarily be axially aligned to a common circumferential line. The following is a summary of the invention. The present invention provides for reformatting of the pixel information received in a simple and efficient fashion that is flexible enough to handle many conceivable printing element patterns. This is provided primarily by an apparatus and method for printing an image formed of pixels printed selectively at pixel locations over a predetermined area of a print medium, which pixel locations are distributed along lines having centers spaced a predetermined interline distance apart. This aspect of the invention is usable with a generator for generating a sequential line-by-line stream of data elements defining the image formed of pixels printed selectively at pixel locations. Included in the apparatus is a memory for storing the image-defining data elements in the order in which they are received from the data generator. A print head having a plurality of pixel-printing elements is disposed in a predetermined arrangement for printing selectively a corresponding plurality of pixels simultaneously. The print head is moved to align the pixel-printing elements with respective pixel locations relative to a print medium for printing the plurality of lines forming the image. The pixel lcoation corresponding to a selected one of the pixel-printing elements is determined for the current print head position. The addresses in the memory of all of the data elements corresponding to the pixel locations associated with the pixel-printing elements for the current print head position are calculated. The data stored in memory is then read to the print head in a sequence corresponding to the pixel locations associated with the pixel-printing elements. In the preferred embodiment of this aspect of the present invention, the print head has two sets or subheads of pixel-printing elements. The elements within each set are offset by a first predetermined number of pixel locations. The sets are a second predetermined number of pixel locations offset from each other, with the first and second predetermined numbers not being equal. These two offsets are stored. Arithmetic logic is used to calculate each succeeding printing element location. The address of a first element of the second set is determined by changing the value of an address of a pixel-printing element of the first set by an amount including the offset between the sets. The size of the memory for storing the pixel data elements is substantially less than that required to store the data for an entire image. This may be referred to as a partial page memory. This memory "wraps around" from the end back to the beginning with address selection control maintained through the use of dynamic read and write pointers. In particular, the present invention provides an image-data reformatting apparatus usable with a print head having a plurality of pixel-printing elements for printing an image formed by selectively printing pixels in an array of pixel locations within a predetermined area of a print medium. It is also usable with a source providing image-defining data elements in a predetermined sequence, with the print head being structured to require data elements in an order different from the predetermined sequence. The apparatus comprises an addressable memory for storing a predetermined number of the image data elements in the predetermined sequence. A write address pointer register or equivalent is coupled to the memory for assigning sequential addresses for storing the image data elements in the predetermined sequence. The addresses are repeated after a number of data elements equal to the predetermined number of data elements has been stored. A read address pointer register or equivalent is also coupled to the memory for reading data elements out of memory in a sequence corresponding to the pixel locations associated with the pixel-printing elements for each head position. The memory preferably is of sufficient size for reading the stored data elements out of the memory before being replaced with data elements written to the same addresses. This assures that unread data will not be replaced by new data for other pixel locations. It is known that floating read and write pointers have been used to generate audio time delays and other special audio effects. However, the data is not resequenced. Their use as in the present invention in a video pixel data element reformatting process is new. The invention in particular includes within its scope a method of bidirectionally printing an image formed of pixels printed selectively at pixel locations distributed over a print medium or a predetermined area thereof, the pixels being distributed along lines having their centers spaced apart one from another by a predetermined interline distance, which method comprises generating a sequential line-by-line data stream comprising data elements collectively defining the image, storing the image-defining data elements in memory means in the order in which they are received by the memory means and reading the stored data to a print head having a plurality of pixel-printing elements disposed in a line angled relative to a direction of print head motion, the stored data being read to the print head in a sequence corresponding to the sequence of the pixel locations associated with the pixel-printing elements for each of a sequence of positions of the head relative to the print medium and the relative positions of the head and print medium being advanced through the aforesaid sequence of positions so as to bring successively into alignment the respective pixel locations and the pixel-printing elements of the head for printing of the image, the read addresses in the memory means being calculated for all the data elements corresponding to the pixel locations associated with the pixel-printing elements for each relative position of the head and print medium to prepare the memory means for read output to the print head and the displacement of the print head being in the form of reciprocatory motion. Preferred embodiments of the invention will now be described, by way of example only, reference being made to the accompanying drawings in which:- Fig. 1 is a simplified illustration of a conventional drum printer. Fig. 2 is a face view of the head and print medium of Fig. 1. Fig. 3 is a view similar to that of Fig. 2 showing an alternative conventional embodiment. Fig. 4 is a view similar to that of Fig. 3 showing generally a head design of an apparatus made according to the present invention. Fig. 5 is a view similar to that of Fig. 4 showing a head design for interlaced printing of lines within bands. Fig. 6 is a general block diagram illustrating an apparatus made according to the present invention for printing as illustrated in the previous figures. Fig. 7 is a more detailed block diagram of the image data state machine shown in Fig. 6. Fig. 8 is a schematic of the address generator and sequencer of Fig. 7. Figs. 9A and 9B form a circuit schematic corresponding to the apparatus of Fig. 8. Fig. 10 is a further diagram of a specific ink-jet head array usable with the apparatus of Fig. 6. Fig. 11 is a flow chart illustrating the data reformatting operation of the apparatus of Fig. 6. Fig. 12 is a diagram illustrating the structure of a position encoder included in the apparatus of Fig. 6. The preferred embodiment of the present invention provides interlaced set printing as is shown in Fig. 4. A head 50 is formed of subheads 51, 52 and 53 (listed as 1, 2 and 3 in the figure). Each subhead prints a set of adjacent lines represented by the bracketed regions on a sheet 54 of a print medium. Again, the letters designate the alphabetical sequence of scans by head 50 across sheet 54. The solid arrows on the sheet indicate the direction of scan for the corresponding region. The subheads forming head 50 are spaced apart by the same distance as the region scanned by each subhead. The area of sheet 54 printed by subhead 52 during scan B is adjacent areas printed by subhead 51 during scan A and by subhead 53 during scan C to completely fill in the overall area. The head is advanced the equivalent of three subhead regions, between scans. A second embodiment of the subhead structure is illustrated by head 55 shown in dashed outline, including subheads 56, 57 and 58. The subheads print the same region width as the subheads of head 50. However, these subheads are the equivalent of four subhead widths apart. The corresponding scans are represented by the alphabet labels with a prime, such as A', and the scans are represented by arrows formed with dashed lines within each scan region. Even though the subheads are spaced farther apart, the head advances the same incremental distance relative to the sheet between scans. Printing incorporating interlaced line printing in the interwoven band or set printing of Fig. 4 is shown in Fig. 5. A head 60 formed of subheads 61, 62 and 63 is scanned over a sheet 64 of print medium. Each subhead has a series of three nozzles 65, 66 and 67 spaced the equivalent of two lines apart. The subheads are spaced the equivalent of seven lines apart. The head is advanced the equivalent of nine lines between scans, the same distance as the number of nozzles in the head. Yet another example, not illustrated, is a head having twelve subheads with the space of nine lines between two nozzles in each subhead and the space of 101 lines between subheads. Each nozzle prints alternate 100 lines. The head spacing is ample to facilitate nozzle location at the desired spacing. Fig. 6 is a block diagram of a printer 70 usable to perform the printing described with reference to Figs. 4 and 5. Printer 70 receives data from a data source 72 at a controller 74. This controller acts as a communication interface with the data source. From controller 74, the data is input into an image data state machine 78 which writes the data by sequential address in a block buffer (RAM) 80, also referred to as a partial page memory. The incoming data is conventionally in a raster-scan format. It is read out of buffer 80 for printing by a print head 82 in a sequence corresponding to the physical configuration of the print head array. System processor 76 provides overall control of printer 70. It typically includes an operating program stored in a ROM 84 and retrievably stores information being processed in a RAM 86. The system processor receives dynamic information from the printer mechanical systems 88, thermal systems 90 and front panel controls 92. State machine 78 also exchanges positional information with a print head carriage servo 94 for coordinating data reading with print head position relative to a print medium. Fig. 7 shows in further detail the structure of state machine 78 which controls writing and reading of pixel data. The information is received in a command separator 96 from controller 74. The command separator identifies the information as either data or system commands. The commands are routed to system processor 76. The data is fed into and out of block buffer 80 at addresses determined by an address generator 98. The data is read out into an interlace ROM 99 which functions, using a look-up table, to select the appropriate bit from each stored 8-bit data word to be used to control whether each jet will print. In special circumstances, the interlace ROM can be replaced by combination logic using the same inputs and outputs. The eight bits of data coming from the block buffer contain two 4-bit pixels, each of which has 1 bit for each of the primary colors black, cyan, magenta and yellow. The eight bits of input to ROM 99 consist of seven bits of jet number, one bit of read address, and a mode selection. The seven bits of jet number select which of the four color bits are routed to the one-bit serial output. Printer nozzle print suppression, which provides printing only on the image region of a print medium, is controlled through an edge sequence logic circuit 100 receiving position and direction (forward/reversing) signals from a position counter circuit 102. This circuit sends control information to the carriage servo circuit and receives position information from an encoder attached to the carriage. This 1-bit data path continues through the edge sequence logic to a serial head buffer 104. This buffer functions as temporary storage of the 98-bit serial data stream coming from logic circuit 100 prior to sending it to the head. A sequencer 106, also referred to as a timing and control signal generator, responds to supervisory commands from the system processor under the direction of a microcode stored in a ROM 108. The sequencer controls the generation of read and write addresses in address generator 98 to provide the data reformatting necessary to send the corresponding pixel data to the print head. This is coordinated with the print head carriage position provided through carriage motion logic and position counter circuit 102. Fig. 8 shows in further detail the structure of address generator 98, with a portion of the specific circuit schematic shown in Figs. 9A and 9B. This embodiment is designed to control printing of a head nozzle array 110 shown in Fig. 10. Array 110 includes a first set 112 of nozzles 114 wherein each nozzle within the set is offset from each adjacent nozzle a horizontal distance A and a vertical distance of the width of one line. A second set 116 has the same number of nozzles 114 and same relative positioning of nozzles within the set. However, the top nozzle of the second set is offset from the bottom nozzle of the first set by a horizontal distance B (in pixel spacings or addresses) and a vertical distance of one line. The address offset of the top nozzle of the second set is thus equal to the total number of pixel locations in a line + B from the last nozzle of the first set. In the actual embodiment, the distance A is equal to the width of ten pixels (or pixel locations). If a line contains 3000 pixels, then each nozzle is 2990 pixel locations sequentially from the next preceding pixel location within the set. The preferred head also prints with alternate nozzles when the head scans one direction and with the remaining nozzles when the head scans the other direction. Thus, it is only necessary to move the actual head relative to the print sheet on alternate scans. However, the addressing of printing heads in any scan direction then accommodates this increase in the effective spacing of the heads. The set interlaced printing illustrated in Figs. 4 and 5 is provided by increasing the spacing between sets 112 and 114. Also, in the actual embodiment, each set contains 48 nozzles, and the two sets are spaced horizontally from each other rather than vertically, as shown. This embodiment is useful for providing a capability of both black (one subhead) and color (the other subhead) printing. Within the color subhead, three basic colors, such as the three subtractive printing colors of cyan, magenta and yellow, can be provided by multiple sets of three consecutive nozzles within the subhead or by three blocks of nozzles within the subhead. This then is a form of interlaced printing. Printer 70 can accommodate either design. With little modification, it will be seen that other designs can also be accommodated. For instance, the designs of Figs. 4 and 5 are accommodated by adjusting both the increment value within a subhead, and the offset between subheads. Incoming raster-scan format data is written into block buffer 80. The addresses that govern the memory locations that the incoming data is written into are generated by a simple write address up-counter 118 that is incremented each time that a data byte is written into memory. Thus the pixel data is written into the memory starting at location 0 in the same order in which it comes in from the controller or data source. The system processor can at any time read the current value of the addres counter to determine how much data is stored in the memory. When the block buffer memory contains enough data to allow printing to begin, the data reformatting process begins. From this point on the reformatting process and memory access are under control of the sequence and control logic of sequencer 106. This control is provided by the microprogram stored in ROM 108. Reformatting the pixel data is accomplished by computing the addresses from which the pixel data is to be read in a particular order, different from the sequential order in which the data was written. This address calculation is performed by a binary full adder 120 using numbers from a column number register 122, an increment register 124, a pointer P0 register 126, and a pointer P1 register 128 in combination with the previous calculated address, stored in a latch 130. An address selector 132 selects between the address in write address counter 118 and latch 130, depending on whether data is being written into or read out of block buffer 80. The column number register stores a number provided by logic circuit 102 which controls the print head position, and is defined as the number of the pixel location (column) in from the left edge of the image that lies under the right-most nozzle of the first set of nozzles of the print head. The numbers in the other three registers are calculated and stored by the system processor. The number in the increment register remains constant for the entire image, and is related to the image width and print head design. For the particular print head mention previously, it is equal to the image width (in pixel locations) - A. In the embodiment described above, it is 3000 pixel locations - 10, or 2990. In the embodiment shown in Fig. 10 where A is equal to the width of one pixel location, the increment value is 2999 if all nozzles are used. The numbers in the pointer registers are used to relate the current read address to the address at which the data was originally written. When the first printing position of the print head is established for the current pass in an image printing operation, the number in pointer P0 register is the memory address of the first pixel location in the top line of the portion of the image to be printed. For a split head array as actually used in this embodiment having vertically spaced nozzle sets, the value in the pointer P1 register corresponds to the value in the P0 register minus the horizontal offset B, which is the offset between the two rows of jets in the print head. For the head array shown in Fig. 10, the value in the pointer P1 register corresponds to the line length in pixel locations plus the offset B. Fig. 11 is a flow chart showing the various steps in printing an image. Incoming data elements are written at block 140. The write address counter is incremented at block 142 and a decision is made at decision block 144 on whether enough data is written to begin printing. If not, then another incoming data element is written at the last incremented address. If the initial batch of data is written into memory, the increment A is calculated and written into the increment register at block 146. The values for pointers P0 and P1 are calculated and entered into the corresponding registers at block 148. The print head location, as a column number, is entered into the column number register. An initial read address is entered into latch 130 which is equal to the sum of the column number and pointer P0 registers at block 150. The memory element having this address is read from memory at block 152. If the first set of data elements, as determined at decision block 154, has not been read, then the new read address in latch 130 is set equal to the prior address plus the increment value, at block 156. Concurrent with this process, another incoming data element, if available, is written into memory and the write address counter incremented at blocks 158 and 160. The newly addressed memory data element is then read at block 52 and a determination made again whether the first set of pixel data elements has been read. If so, a determination is made at decision block 162 as to whether this next data element to be read is the first data element of the second set. If it is, then the address in latch 130 is set equal to the column number plus the value of pointer P1 register, for the actual head embodiment having two vertically spaced nozzle sets. For the embodiment of Fig. 10, the latch is set equal to its prior value plus the offset of pointer P1. The data element at this memory location is then read and the address values incremented and read as with the first set of data elements until the end of the second set is reached. This determination is made at decision block 166. Once the end of the second set of nozzle positions is reached, a determination as to whether the current pass of the print head is complete is made at block 168. If so, and the image has not been completed, as determined at block 170, then the print head is moved to a new column for the current pass at block 172. The new column number is written in register 122 at block 149 and the process continued until the had pass is completed. At the end of each head pass a determination is made at block 170 to determine if the image is complete. If not, the head is moved to position for a new set of lines and a new pass at a block 174. The steps previously outlined beginning with setting the P0 and P1 pointers at block 148 is continued until the image is completed, at which point the printing process is terminated. The design of the memory array, referred to as block buffer 80, used with the above pixel reformatting logic poses some special challenges. It was not considered desirable to make the memory array large enough to store an entire image at one time, due to the very large size and consequent high cost of such a memory. It was therefore necessary to find a way to use a smaller and partial-page memory for temporary storage during the pixel reformatting process. The reformatting must be accomplished without losing the relationship between the write and read addresses, and without complicating the algorithm used to handle the pixel reformatting. Memory 80 has a size which is less than enough to print an entire page or image. When sufficient data has been entered to fill the memory, it wraps around from the end back to the beginning, together with dynamic read and write pointers. The wrap-around feature of the memory is achieved by generating the write addresses with a simple up-counter that is matched in length to the memory length. For example, if the memory is structured as 256K of 8-bit words, the associated write counter is configured to overflow at a count of 256K (262144). Thus, when the last byte of memory is written, the next byte to be written will be at address 0. To use a memory such as this, it is necessary to keep track of the pointers. Memory addresses have significance only with respect to these pointers. In other words, data is written at locations starting with or relative to a write pointer, and data is read at locations related to or starting with a read pointer. Keeping the correct relationship between the read and written data thus reduces to a problem of keeping the two pointers the correct number of address locations apart in memory. In the preferred embodiment described, this is done by the system processor. The read pointer starts at location 0. External logic allows data to be written to the memory and the write pointer counter 118 is incremented as described with reference to Fig. 11, until the write pointer is a set number of pixel data element beyond the read pointer. In the preferred embodiment, this set number is 50 lines times the number of pixel locations that the image is wide, such as 3000 pixel locations. Since the print head prints on 48 consecutive lines, this assures enough data elements for a complete pass. This is the value of the initial batch of data elements read into memory as described in the flow chart of Fig. 11. During the reading and printing cycle, enough new data bytes are written to memory to allow the next head pass also to take place. At the end of the current pass, the system processor checks the value of the write pointer, inputting additional data as required, so that it is again at least the same set distance ahead of the read pointer. Thus, pixel data is always decoded with respect to the read pointer stored in the pointer P0 register 126, and the pixel reformatting logic need not be concerned with absolute memory addresses at all. By using this partial page memory concept, the minimum size for a memory is much reduced from that for a full page. The minimum size for the memory becomes approximately two times the number of addresses between the read and write pointer. Since two pixel data elements can be stored at each 8-bit address location, this is equivalent to 300K of storage elements, or 150K of memory. Thus, the 256K memory is ample to accommodate this method. A key requirement for the proper operation of the memory as described is that any logic devices or software operations that can affect the memory address must be arranged so as to overflow all at the same value. Thus, if the memory consists of 256K words, the memory address counter, the binary full-adder 120, and the software algorithms that compute read pointers must all be designed so as to overflow to 0 when the count reaches 256K. Fig. 12 illustrates the structure of an encoder 180 made according to the invention. The encoder includes a linear relative position strip 182 having a plurality of incrementally spaced markers 184 positioned along it. Strip 182 is long enough to more than cover the maximum width that a print medium image will have. Strip 182 is attached to a frame which stays fixed relative to the print medium. An index marker 186 or flag is preferably positioned centrally of the strip to identify this fixed position on the strip. This index marker is used to calibrate the carriage position sensing system, as described in the Summary of the Invention in order to correct for any errors in position sensing due to mechanical vibration or electronic noise, and to assure that these variances are not cumulative. A position marker sensing unit 188 is fixed relative to the print head on the printer carriage and travels along strip 182 so that markers 184 and 186 are sensed. Included is a light emitting diode 190 and corresponding photodiodes 191, 192 and 193. Diodes 191 and 193 are positioned to sense the incremental markers 184 in such a way that they produce signals that are 90° out of phase. Diode 191 is shown to produce a sine wave signal relative to the cosine wave signal of diode 193. Diode 192 senses the occurrence of index marker 186 in a way that is synchronous with the sine wave signal generated by diode 191. The photodiode signals pass through appropriate amplifiers 194. The sine wave and index signals pass through a NAND gate 196 and the resultant signal is input into the load port of a 16-bit counter 198. The counter has the 16 bits of input preset to a position value that represents the position of index marker 186. The two cosine and sine wave signals also pass through a quadrature encoder logic circuit 200 to obtain a signal identifying the occurrences of markers 184, which is input into the clock port of counter 198. A second signal indicative of the direction of the carriage is fed into the up/down count control port of the counter, so that the count in the counter changes in a manner consistent with the direction of travel of the carriage. In operation, when the marker sensing unit moves past the index marker, a "high" signal is generated at the "index" output. Because the width of the index mark is equal to the width of the incremental marker spacing, it overlaps two adjacent output clock transitions. By including the NAND gate as shown, only one of these clocks is selected and is sent to the counter. Because of the nature of the 16-bit counter, the data present at the "preset" inputs of the counter will be preset into the counter and will appear at its output on the next rising edge of the clock after the load input goes low. The number present at the preset inputs of the counter can be chosen so that any possible position of the carriage corresponds to a positive count position greater than 0. This greatly simplifies the position control system. Once the carriage has passed the index marker causing the counter to be preset, it can move forward and back as desired, and the outputs of the counter count up and down accordingly. In the absence of noise, interference, etc., the next time the counter moves past the index marker the value in the counter outputs equals the value that gets preset by the marker, resulting in no net effect caused by the presence of the marker. However, if the counter has accumulated any net position errors for any reason, these errors are removed and the counter again preset to the proper value upon passing the index marker. As shown in Fig. 12, index marker 186 is preferably located in the middle of strip 182 which represents the middle of travel of the carriage between the sides of images to be printed. Thus, regardless how narrow an image is printed, so long as it is printed at least at the center of the page of print medium, the index marker will be sensed with every scan of the carriage. Certainly other positions would produce the same result, depending on the minimum image width printed. An alternative embodiment of the generation of the "load" signal for the counter is shown in dashed lines in Fig. 12. In this embodiment, an AND gate 202 is located between NAND gate 196 and the load port of the counter. The AND gate receives the output of gate 196 as well as the direction signal from quadrature encoder 200. This allows the presetting of the counter to only take place during the reverse direction pass of the carriage, and inhibits it during the forward pass, which may be desirable in some circumstances. It will be seen that this encoder provides incremental counting with an absolute position reference that is rechecked every time the encoder passes the center (or other equivalent point) of travel, and that positive only position values are generated for any position within the range of the carriage. Such a position referencing scheme eliminates the need for the counter to ever reach a value of zero. It will be appreciated from the foregoing that the invention provides an apparatus for printing an image formed of pixels printed selectively at pixel locations over a predetermined area of a print medium which pixel locations are distributed along lines having centers spaced a predetermined interline distance apart, and usable with means for generating a sequential line-by-line stream of data elements defining the image formed of pixels printed selectively at pixel locations comprising; memory means for storing the image-defining data elements in the order in which they are received from the data generating means; a print head having a plurality of pixel-printing elements disposed in a predetermined arrangement for printing selectively a corresponding plurality of pixels simultaneously; means for positioning the print head to align the pixel-printing elements with respective pixel locations relative to a print medium for printing the plurality of lines forming the image; and means for calculating the addresses in said memory means of all of the data elements corresponding to the pixel locations associated with the pixel-printing elements for each print head position and for reading to the print head the data stored in memory in a sequence corresponding to the pixel locations associated with the pixel-printing elements for each print head position. It is preferred that the apparatus be one in which the pixel-printing elements are spaced on the print head so that each pixel-printing element is associated with a predetermined number of sequential pixel locations from an adjacent pixel-printing element wherein the calculating means arithmetically calculates the addresses corresponding to each pixel-printing element from the pixel location defined by the defining means and the spacing of pixel-printing elements on the print head.

Claims: An apparatus (70) for bi-directionally printing an image formed of pixels printed selectively at pixel locations over a predetermined area of a print medium (54, 64), the pixel locations being distributed along lines having centers spaced a predetermined interline distance apart and the apparatus being usable with means (72) for generating a sequential line-by-line stream of data elements defining the image formed of pixels printed selectively at pixel locations and the apparatus comprising memory means (80) for storing the image-defining data elements in the order in which they are received from the data generating means; a print head (82) having a plurality of pixel-printing elements (114) disposed in a line angled to a direction of print head motion for printing selectively a corresponding plurality of pixels simultaneously; means (94) for positioning the print head (82) with a reciprocating motion to align the pixel-printing elements (114) with respective pixel locations relative to a print medium for bi-directionally printing the plurality of lines forming the image; and means (98) for calculating the addresses in said memory means of all of the data elements corresponding to the pixel locations associated with the pixel-printing elements (114) for each print head position in relation to the print medium, and for reading to the print head (82) the data stored in memory in a sequence corresponding to the pixel locations associated with the pixel-printing elements (114) for each print head (82) position. An apparatus as claimed in Claim 1 wherein the pixel-printing elements (114) are spaced on the print head so that each pixel-printing element is associated with a pixel location at a predetermined number of sequential pixel locations from an adjacent pixel-printing element and wherein the calculating means (98) arithmetically calculates the addresses corresponding to the pixel locations associated with each pixel-printing element from a pixel location for which corresponding data elements are stored in said memory means (80) and the spacing of pixel printing elements on the print head. An apparatus as claimed in Claim 1 wherein at least a subset (112) of the pixel-printing elements (114) is associated with pixel locations a first predetermined number of sequential pixel locations apart, and the calculating means (98) includes means (122) for storing the pixel location associated with the one pixel-printing element, means (124) for storing the predetermined number of pixel locations between the pixel-printing elements of the subset, and arithmetic logic means (120) for changing a previously calculated read address by the first predetermined number of pixel locations to determine another read address. An apparatus as claimed in Claim 3 wherein the print head (82) has two subsets (112, 116) of pixel-printing elements (114), each subset being associated with pixel locations spaced apart one from another a first predetermined number of pixel locations and the subsets being spaced apart one from another by an offset defined by a second predetermined number of pixel locations, and the first and second predetermined numbers of pixel locations not being equal, wherein the calculating means (98) includes means (128) for storing the offset, and wherein the arithmetic logic means (120) changes an address of a pixel-printing element of one subset by an amount including the stored offset to determine an address of a pixel location associated with a pixel-printing element of the other subset. An apparatus as claimed in Claim 3 wherein the calculating means (98) generates data defining the area of the print medium on which to print an image, and recalculates the first predetermined number for each image. An apparatus as claimed in any preceding claim wherein the memory means (80) has a predetermined data element capacity and associated first and last memory addresses, and the calculating means calculates a read address that is the first memory address when the next address beyond the last memory address is calculated. An apparatus as claimed in any preceding claim wherein the calculating means (98) stores the memory address of a base pixel location on a line being printed by one of the pixel-printing elements for a predetermined position of the print head (82) relative to the print medium (54, 64) during a current pass of the print head (82), and the calculating means calculates the pixel location address for each position of the print head (82) during the current pass based on the position of the print head (82) at each position relative to the position of the print head (82) for printing at the base pixel location. A method of bi-directionally printing an image formed of an array of lines and columns of pixel locations printed selectively with pixels over a predetermined area of a print medium (54, 64) the lines having centers spaced a predetermined interline distance apart, using a print head (82) having a plurality of pixel-printing elements (114) in a predetermined configuration (110) angled to a direction of print head motion and definable in terms of associated positions of pixel locations on an image to be printed, the method comprising storing in an addressable memory (80) data elements corresponding to pixel locations of an image to be printed; positioning the print head (82) with a reciprocating motion and relative to the print medium (54, 64) so that at least one pixel-printing element (114) is positioned to print a pixel on a pixel location of the image for which corresponding data elements are stored in memory; determining the memory address corresponding to the pixel location of the one pixel-printing element (114); calculating from the memory address corresponding to the pixel location associated with the one pixel-printing element (114) the memory address corresponding to the pixel location associated with each of the other pixel-printing elements (114) using the defined configuration of pixel-printing elements (114); reading the data elements corresponding to the memory addresses for each of the pixel-printing elements (114); transmitting the read data elements to the associated pixel-printing elements (114); and printing with each of the pixel-printing elements (114) as defined by the transmitted data elements. A method as claimed in Claim 8 wherein the step of storing includes storing fewer data elements in the memory than are required to print the entire image. A method as claimed in Claim 9 wherein the step of storing includes storing data elements in the memory means (80) at addresses from which data elements have previously been stored and read during printing of the same image. A method of bi-directionally printing an image formed of pixels printed selectively at pixel locations distributed over a print medium (54, 64) or a predetermined area thereof, the pixels being distributed along lines having their centers spaced apart one from another by a predetermined interline distance, which method comprises generating a sequential line-by-line data stream comprising data elements collectively defining the image, storing the image-defining data elements in memory means (80) in the order in which they are received by the memory means (80) and reading the stored data to a print head (82) having a plurality of pixel-printing elements (114) disposed in a line angled relative to a direction of print head motion, the stored data being read to the print head in a sequence corresponding to the sequence of the pixel locations associated with the pixel-printing elements (114) for each of a sequence of positions of the head (82) relative to the print medium and the relative positions of the head (82) and print medium (54, 64) being advanced through the aforesaid sequence of positions so as to bring successively into alignment the respective pixel locations and the pixel-printing elements (114) of the head (82) for printing of the image, the read addresses in the memory means (80) being calculated for all the data elements corresponding to the pixel locations associated with the pixel-printing elements (114) for each relative position of the head (82) and print medium (54, 64) to prepare the memory means (80) for read output to the print head (82) and the displacement of the print head (82) being in the form of reciprocatory motion. A method as claimed in Claim 11 wherein the pixel-printing elements (114) are spaced on the print head so that each pixel-printing element is associated with a pixel location at a predetermined number of sequential pixel locations from an adjacent pixel-printing element, wherein calculating means (98) arithmetically calculates the addresses corresponding to each pixel-printing element from the pixel location defined by the image-defining data elements and the spacing of pixel-printing elements on the print head.

Inventors: GOETZ HOWARD V, SPRINGER RICHARD A, GOETZ, HOWARD V., SPRINGER, RICHARD A.
Applicants: TEKTRONIX INC, TEKTRONIX, INC.
Application year: 1990
Main classification: G06K15
IPC codes: H04N1, G06K15, B41J19