Buffering control for accommodating variable data exchange rates

Abstract: Digital data produced by a document scanner (15) or other data source is sequentially stored in a memory (40). A remote data receiver (45) generates requests for data (43) causing communication of the data (44) from the memory (40) in the same sequence in which it was stored but at a rate substantially asynchronous with respect to the rate of scanner (10) data production. Data (19) from the scanner (15) is sequentially loaded into the memory (40) in recycling sequences until there are no available memory storage sections (0-N). The scanner (15) is then caused to stop scanning and to cease data production until transfer of data from a memory (40) storage section to the remote receiver (45). The scanner 15 is thereafter enabled so as to resume with production of the next data following that which was last loaded into the memory (40). For a scanner, the data interruption and resumption is obtained by stopping and repositioning of the scanner bar (27) relative to the document (11).

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to devices and methods for handling digital data interchanges between assemblies which have differing data exchange rates. More particularly, the present invention relates to processes and apparatus which permit production of digital information from a source at a rate which does not match the rate of information demand from a system intended to ultimately receive the data produced by that source. While not so limited, the present invention is especially useful for allowing a scanner which converts an image into a stream of digital data to successfully communicate with a data receiving device that requests the data from the scanner at a rate differing from the rate the data is produced by the scanner. Description of the Prior Art In an ideal system, digital data for transfer to a receiving device is produced at the same rate that the receiving device can accept it. Such a system does not need any buffering of data. However, many system configurations are such that the digital data is produced at its source at a rate quite different from the rate which the receiver can accept it. Data transfer to a remote processor often entails accumulation of the data so that a large block of that data is communicated to the remote processor on command. While the remote processor might have the capability of accepting data at a rate much greater than it is produced at the source, the enablement of transfer communication by the remote receiver occurs only sporadically and asynchronously to the data origination. The problem is particularly apparent in systems employing a document scanner as the data source and a remote data processor as the ultimate receiver. While it is possible under some circumstances that the remote processor can accept data at a far greater rate than the scanner can produce it, in other situations the scanner produces data faster that the host can accept it. Rather than to waste the capabilities of the processor while the scanner is producing its data, the processor releases its interface with the scanner and only periodically inquires as to whether data is ready for transfer. Therefore buffer memories are often used to accumulate data for subsequent transfer to the remote processor on demand. Unfortunately, if the data for whatever reason is not requested before the buffer is full, it is necessary to stop generation of data from the scanner to prevent loss of the data. Some prior art systems have attempted to resolve the problem by utilizing dual data memories so that the remote processor receives data from one memory while the scanner is loading data into the other memory. This does not prevent loss of data when the remote unit is delayed for a period long enough for the scanner to fill both buffer memories. Another arrangement to accommodate the differing data interfacing rates is shown in U.S. Patent US-A-4,748,514 by Bell wherein the speed of the scanner motor is slowed and stopped as the data buffer approaches and reaches capacity. However it is highly undesirable to significantly vary the speed of the scanning bar of a scanner because of the distortion of the data thus collected. US-A-4 743 975 discloses an image processing apparatus, such as a facsimile system, which has a CCD sensor for reading an original image, a detection circuit for detecting if a one-line image signal is a nearly black or white signal, a buffer memory for temporarily storing the image signal from the CCD sensor, and a microprocessor CPU for controlling the reading/recording operation in accordance with the detection result of the detection circuit. Image boundaries due to switching between reading and recording operations are eliminated from the reproduced image. A low-torque single motor may be used as a drive source in any of the transmission, reception and copying modes. DISCLOSURE OF THE INVENTION Features of the invention are defined by Claims 1 and 3. In a preferred embodiment of the invention, in order to keep the scanning mechanism moving independently of the host transfer rate, a buffer is used internally to accept the scanned data and to deliver it to the host as it is requested by the host. The whole scanning window is scanned in anticipation that the host will ask for all the data, though in portions at a time. The buffer is filled at the same time it is emptied by the host avoiding a start/ stop of the scanning mechanism after just a buffers worth of data is scanned. If the buffer does fill before the entire window is scanned, the scanning bar is backed up to a position for resuming scanning when the buffer is emptied by the host. By anticipating the host requests, the scanned information is available at the rate the host can accept it. Allowing the host to empty the buffer at the same time it is filled by scanned data avoids stopping and restarting the scanning mechanism if the host is fast enough. Those having normal skill in the art will recognize the foregoing and other objects, features, advantages and applications of the invention from the following more detailed description of the preferred embodiments as illustrated in the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a partially schematic side view of the environment of a scanner device in which this invention is useful. FIG. 2 is a linearized presentation of the optical path of the FIG. 1 scanner. FIG. 3 is a partially broken schematic view of the circuitry for handling and digitizing sensed analog data received from a scanner. FIG. 4 is a block diagram of the circuit elements associated with the present invention. FIG. 5 is a illustration of a buffer memory organization. FIG. 6 is a representation of the scan head movement relative to a document as determined in conjunction with the present invention. FIG. 7 is a flow chart of the system operation in accordance with the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A typical document scanning machine environment for implementing the present invention is shown in FIGS. 1-3 in the form of scanner 10. While this scanner is of the general type in which the present invention finds utility, the invention is not limited to this machine. In this exemplary scanner, document 11 is positioned with one side facing downwards on transparent platen 12. The downward facing side of document 11 is then scanned so as to convert the visual images contained thereon into an electronic image form that is useable by data processing machines and the like. The scanning is accomplished in a FIG. 1 type device by movable carriage 15 which contains a linear light source 16 and an array 17 of reflecting mirrors. Motor 18 is mechanically coupled to carriage 15 as by gears, cables or the like, to move carriage 15 along the length of platen 12. The light reflected from platen 12 is redirected into lens 20 and thence into sensor 21. Note that alternative scanning arrangements are available. For instance, lamp 16 could remain fixed with its light directed onto scan line 24 by yet another mirror on carriage 15. Further, a similar scanning result is possible by maintaining lamp 16 as well as mirror array 17 fixed while propelling document 11 past a fixed scanning location corresponding to line 24. Dual mirror carriages with one carriage moving at half the speed of the other to direct reflected light into a stationary sensor 21 is still another prospective alternative configuration. Sensor 21 is preferably a charge coupled device (CCD) assembly configured as a linear serial array of discrete detector cells. Each detector cell of sensor array 21 defines a document picture element (PEL) or pixel. CCD's which can distinguish a variety of cell densities (eg: 300 cells per inch) on the document are readily available from contemporary commercial sources and can provide good quality resolution. In FIG. 2, the typical image scan line 24 (note FIG. 1) is optically reduced in length as it passes through lens 20 in a predetermined ratio (eg: 7.5:1) before reaching the CCD detector array 21. The analog electrical signal content of sensor 21 is periodically read out, document line by document line, as carriage 15 moves along the length of document 11 on platen 12. The output scan signals from sensor array 21 are coupled through flexible cable 19 to electronic controller 22 after conversion to digital form as described below in conjunction with FIG. 3. Controller 22 introduces drive signals to motor 18 and can function in an open loop manner with no feedback. However, it may also receive position or movement feedback information relative to carriage 15 such as from the output of a tachometer detector arrangement 23. Controller 22 incorporates the data processing and handling elements for exchanging data and signals with a remote processor in communication with the output cable 14 in accordance with the present invention. The operation of controller unit 22 is described in greater detail below in conjunction with FIGS. 4 et seq. FIG. 3 illustrates one arrangement for reading out the contents of sensor 21. By means of gating signal controls (not shown) typically from controller 22, the analog signal content of every other detector cell of photocell array 27 is coupled in parallel into analog shift register 25 while the signals present in the other, intervening cells are coupled in parallel into analog shift register 26. That is, in the example shown, the contents of the odd numbered cells of array 27 are periodically transferred to shift register 25 whereas the even numbered cells have their contents transferred to shift register 26 at the same time. The signals loaded into registers 25 and 26 are analog signals representative of various reflected light levels from individual pixels of document 11 into photocell array 27. Their electrical analog magnitude corresponds to the average of the light reflected from a small incremental area or pixel on the surface of document 11 over a predetermined period of time. Subsequent to transfer into registers 25 and 26, these signals are shifted serially through multiplexer 28 into an analog to digital converter (A/D) 29. A variety of appropriate analog to digital converters are commercially available for this purpose. The output 30 of A/D 29 is a sequence of bytes of data, for example, one byte of data for each document 11 pixel or PEL. Each of those bytes is encoded so as to correspond digitally to the magnitude of a discrete one of the analog signals retrieved from shift registers 25 and 26, and thus each byte corresponds to the magnitude of reflected light present at one of the cells of array 27. That is, if array 27 images 300 cells or pixels per inch, output 30 of A/D 29 comprises a similar 300 bytes per inch. The organization of the major electrical and electronic elements associated with the preferred embodiment of this invention is set forth in block diagram form in FIG. 4. The master central processing unit (CPU) 35 controls movement of the carriage 15 (note FIG. 1) by appropriate activation signals on connection 33 for motor 18 in conjunction with carriage positioning feedback from tachometer 23 detected on connection 34. In addition, master CPU 35 turns on and off the CCD sampling and analog to digital conversion of sensor/converter 21 via control signal dialog over lines 31 and 32. The digital data result of unit 21 operation is presented in parallel on multiple line cable 30 to slave processor 36 which inserts the bytes of data into a storage location in buffer memory 40 over cable 41. Slave processor 36 receives and stores data in response to initiating commands from master CPU 35 via connection 38 and continuously informs CPU 35 of its status and operations over line 39. Slave processor 36 is also in communication with a host data handling unit 45 via communication links 43 and 44. While parallel bit multiple line cables could provide the interface between host 45 and slave processor 36, a variety of data transmission disciplines are available for this purpose including modems, fiber optic communications, etc. Buffer memory 40 is represented in FIG. 5 as a table with a sequence of data storage locations 0 through N. As a byte, block or group of data is received from sensor/converter unit 21 over cable 30, it is inserted in the next available location starting with location 0. As host 45 notifies slave processor 36 that it is ready to receive data, processor 36 begins transmitting blocks of data to host 45 over link 44 starting with the data contained in buffer memory 40 location 0. Loading of location N completes filling of memory 40 at which point processor 36 immediately begins again loading data into location 0 as long as it is then available. Processor 36 can concurrently handle entry of data blocks into memory 40 from sensor unit 21 and transmission of data blocks from memory 40 to host 45. As long as host 45 requests data from processor 36 as fast as, or faster than, data is inserted into memory 40, the system proceeds smoothly until data corresponding to the entire document 11 is scanned by the scanning mechanism. The transmission of data to host 45 begins with the content of location 0 and proceeds sequentially to location N so that memory 40 is loaded and unloaded on a recycling first in, first out basis. Typically processor 36 is loading data in a downstream location of memory 40 such as at location "X" at the same time data is extracted from a prior memory location (eg: 0, 1, 2, 3, etc.) for transfer to the host 45 interface. Processor 36 notifies CPU 35 whenever host 45 fails to request data from storage before the last available memory 40 location is loaded. By way of example, this might occur if processor 36 has loaded location N but host 45 has failed to request data contained in location 0. Or host 45 may have received data from location 0 through location X, but processor 36 has loaded through location N and wrapped around so that it has reloaded locations 0 through X-1. At this time, CPU 35 notes the location of the scanning head relative to the document and stops the drive motor. It further reverses the drive motor to return the carriage to a point ahead of the noted stop location where it remains until host 45 begins recovering data from memory 40 locations. The movement of the scanning mechanism 15 relative to the platen 12 and document 11 under consideration in accordance with the foregoing is depicted in FIG. 6. Processor 35 actuates the drive motor so that carriage 15 is at a predetermined velocity as it reaches the leading edge of document 11. For this example, assume that memory 40 is full when carriage 15 reaches line 46 of its scanning of document 11. CPU 35 causes the drive motor to stop so that carriage 15 halts as it reaches position 47 beyond 46. CPU 35 reverses the drive motor so that carriage 15 returns to position 48 where it remains until CPU 35 determines that processor 36 can now load more data into memory 40. The distance from 48 to 46 is such that carriage 15 is again at full velocity as it reached position 46 to start producing more scan data. The foregoing stop/start sequence repeats each time memory 40 is loaded and awaiting a data request from host 45. Two more such sequences are illustrated in FIG. 6 at 50-52 and 54-56. Eventually the complete document 11 defining data is loaded into memory 40 and transferred over interface 14 to remote host 45. FIG. 7 is a flow chart presenting the sequence of decisions and actions associated with the operation of the elements described herein in conjunction with the preferred embodiment. That is, FIG. 7 is a flow chart of a scan as it relates to buffer control. The right half of FIG. 7 is the host 45 which demands to receive data a portion at a time. The left side shows the scanner 10 which is doing two operations simultaneously: filling buffer 40 with scanned data and emptying buffer 40 as it fulfills the host requests. Otherwise FIG. 7 is straightforward and readily understood by those having normal skill in the art.

Claims: Apparatus for coordinating the exchange of digital data sets between an image scanner (10) which produces a sequence of digital data sets (19) representing a scanned image (11) at a constant rate, and a host data receiver (45) which is capable of requesting data sets (62) at a rate different from the rate that date sets are produced by said scanner (10), and wherein said scanner (10) includes means (18,33,35) responsive to input signals for locating and moving a scanning device (15) relative to said image (11), said apparatus comprising: memory means (40) having a plurality of storage sections (O-N) arrayed in sequence from an initial said storage section (O) to a final said storage section (N), data set storage control means (36) including means (19,41) for placing data sets from the scanner (10) into said storage sections (O-N) in said sequence from said initial storage section (O) to said final storage section (N), and in a recycling sequence beginning at said initial storage section (O) when said final data storage section (N) is full, means (36,42,44) responsive to signals from said host data receiver (45) for transferring data sets from said memory means (40) storage sections (O-N) to said host data receiver (45), with said data set transfer occurring in said sequence from said initial storage section (O) to said final storage section (-N), and means (36,66) responsive to the storage state of said memory means (40), including means (66) detecting that said memory means (40) is full, for introducing a stop input signal (39,35,33,67) to said scanner (10) to thereby cease producing digital data sets, and to thereby reverse movement (68) of said scanning device (15) relative to said image (11) preparatory to scanning the next digital data set producing image position (46,50,54) of said image (11), said memory means state responsive means (36,66) further including sensing means (69) operable after introduction of said stop input signal to said scanner (10) for determining that data sets in at least one of said storage sections (O-N) was transferred to said host receiver (45) for introducing an input signal (70) to said scanner to cause said scanner (10) to resume production of digital data sets commencing with said next digital data set producing image position (46,50,54) of said image (11). Apparatus in accordance with Claim 1 wherein said data storage control means (19,36,41) and said host signal responsive means (42,36,44) are concurrently operable. The method for coordinating the transfer of data sets from a source (18,21) of sequential data sets that has a relatively high data set transfer rate, to a host device (45) that has a relatively lower data set transfer rate, said method utilizing a memory (409) that includes a plurality of sequential data storage locations (O-N) including an initial data storage location (O) and a last data storage location (N), said memory (40 enabling said transfer of data sets from said source (18,21) to said host device (45), and said host device (45) producing request signals for requesting transfer thereto of data sets from said data storage locations (O-N), the method comprising the steps of: loading data from said source (18,21) into said memory (40) at said relatively high data set exchange rate and in said sequence (O-N) of data storage locations, recycling said loading data sets step to said initial data storage location (O) if said initial data storage location (O) is available after loading said last data storage location (N), transferring data sets from the memory (40) to said host device (45) at said relatively lower data set exchange rate concurrently with said loading data sets step, and in response to said request signals from said host device (45), with said transferring data sets step occurring in the same sequence as said loading data sets step, detecting that all data storage locations (O-N) are full, responding to said detecting step by causing said source (18,21) to cease productions of said data sets at a last data set, responding to said detecting step by causing said source (18,21) to reset relative to said last data set that was transferred to said memory (40) by operation of said loading data sets step, and restarting the data set source (18,21) in a manner to begin production of said data sets at said relatively high data set exchange rate, and at the data set that follows said last data set, when the data sets that are contained in said data storage locations (O-N) of said memory (40) are less than the number of data sets that are requested by said host device (45).

Inventors: STEIN IRENE FAY, WEBB STEVEN LAWRANCE, STEIN, IRENE FAY, WEBB, STEVEN LAWRANCE
Applicants: HEWLETT PACKARD CO, HEWLETT-PACKARD COMPANY
Application year: 1990
Main classification: H04N1
IPC codes: H04N1, H04L13, G06T1