Weight

Digital scale

4204197

Abstract

The invention relates to a scale system which employs a microcomputer forming an integral part of the analog to digital conversion means in which the microcomputer controls the sequence of operations for performing the conversion, accumulates and stores digital data derived during the conversion of the analog signal and combines and processes that data to provide the digital output data resulting from the conversion, all in addition to performing other scale functions. The invention relates to an improved multicapacity weighing and computing digital scale having a triple slope analog-to-digital conversion means. The analog weight signal is integrated for a time interval which is fixed for a given scale capacity range which would generate substantially the same integrator output level in response to a full capacity weight signal for the selected scale capacity as would be generated by a full capacity weight for all other scale capacities. In accordance with the invention, the time interval during which the first reference DC source is integrated is extended beyond the detection of the crossover of the integrator output with its reference level. The invention also provides an improved weight filtering arrangement which enables the full advantage of the improved converter to be obtained. The invention further provides for the tracking of the net zero indication by modification of the stored tare weight data by a predetermined amount to decrease the absolute value of the net weight in response to the net weight being within a preselected weight range.


Claims

What is claimed is:

1. In a digital scale an analog to digital converter means comprising in combination an integrator means having an input and an output, means for applying an analog input signal to the integrator input to drive the integrator output from a datum level to a level dependent upon the magnitude of the analog input signal, switch means for applying a reference signal to the integrator input, program controlled means interconnected with the integrator output and with the switch means, the program controlled means having a counting and timing program loop of instructions of fixed duration for counting the excursions around the loop during the time required for the reference signal to drive the integrator output back to a predetermined level near the datum level.

2. In a digital scale an analog to digital converter means in accordance with claim 1 wherein the program controlled means includes program means to continue the operation of the integrator means in response to the reference signal for an additional time interval after the integrator output is driven across the datum level.

3. In a digital scale an analog to digital converter means in accordance with claim 1 where in the means for applying an analog input signal to the integrator input includes counting means for counting predetermined intervals of time and the program controlled means includes program loops to control the counting means to control the time the analog input signal is applied to the input of the integrator.

4. In a digital scale an analog to digital converter means in accordance with claim 3 wherein the program controlled means includes storage means to store data for different scale capacities to condition the counting means to count different amounts for different scale capacities whereby the input analog signal is applied to the input of the integrator for different times for different scale capacities.

5. In a digital scale an analog to digital converter means comprising in combination an integrator having an input and an output, switch means for applying an analog input signal to the integrator input to drive the integrator output from a datum level to a level dependent upon the magnitude of the analog input signal, program controlled means interconnected with the integrator output and with the switch means, the program controlled means having a counting and timing program loop of instructions to control the time of operation of the switch means.

6. In a digital scale an analog to digital converter means in accordance with claim 5 wherein the program controlled means includes counting means controlled by the counting and timing program loop, storage means to store data for different scale capacities, and means controlled by the stored data for different scale capacities to set the counting means to count to different numbers for the different scale capacities.

7. In a digital scale an analog to digital converter means in accordance with claim 5 wherein the program controlled means includes counting means controlled by the counting program loop to count excursions around the loop, storage means to store data for different scale capacities, and means to condition the counting means to cause the integrator output to reach substantially the same level at full load for the different scale capacities.

8. In a digital scale a triple slope analog to digital converter means comprising in combination integrating means having an input and an output, means for applying an analog signal representing a weight on the scale to the input of the integrating means to drive the output of the integrating means from a datum level to a level controlled by the magnitude of the input analog signal, first switch means to apply a first reference signal to the input of the integrating means to drive the output of the integrating means toward the datum level at a first predetermined rate, second switch means to apply a second reference signal to the input of the integrating means to drive the output of the integrating means toward the datum level at a second predetermined rate, program controlled means interconnected with the first and second switch means and the output of the integrating means, the program controlled means including counting means for counting predetermined time intervals during the application of the first reference signal to the input of the integrating means during which interals the output of the integrating means changes by an amount representing a plurality of weight increments, the program controlled means also including counting means to count the predetermined time intervals during the application of the second reference signal to the input of the integrating means during which intervals the output of the integrator changes by an amount representing a different number of weight increments and arithmetic means for combining the counted number of intervals to obtain a digital representation of total weight increments.

9. In a digital scale, a triple slope analog to digital converter means comprising in combination, integrating means having an input and an output, first switch means for applying an analog signal to the input of the integrating means, second switch means for applying a first reference signal to the input of the integrating means, third switch means for applying a second reference signal to the input of the integrating means, program controlled means interconnected with the integrating output and with the first, second, and third switch means, the program controlled means including timing means to control the time of application of the input signals to the input of the integrating means for deriving a digital representation of the magnitude of the input analog signal.

10. In a digital scale in accordance with claim 9 wherein the program controlled means includes storage means for storing data for different scale capacities, means responsive to the stored data for the respective scale capacities to control the time of application of the input analog signal to the input of the integration means to produce substantially the same digital representation of a full load for each of the respective scale capacities, and arithmetic means to convert the digital representation of the magnitude of the input signal to respective weight indications for the respective scale capacities.

11. In a digital scale a triple slope analog to digital converter means in accordance with claim 9 wherein the output of the integrating means is driven from a datum level to a level representing the weight on the scale in response to the application of the analog input signal and is driven back to the datum level in response to the application of the first reference signal, and wherein the first reference signal is applied to the input of the integrating means for a further predetermined interval of time.

12. In a digital scale a triple slope analog to digital converter in accordance with claim 11 wherein the output of the integrating means is driven back to the datum level in response to the application of the second reference signal to the input of the integrating means.

13. In a digital scale a triple slope analog to digital converter means in accordance with claim 11 wherein the program controlled means includes means for preventing change in the output of the integrating means during the further interval of time from affecting the output digital representation of the weight on the scale.

14. In a digital scale in accordance with claim 9 comprising in combination means for correcting each digital representation of the magnitude of the analog input including means for comparing each digital representation with a previously corrected digital representation, means responsive to the difference being within a predetermined range to augument a fraction of the difference toward the last representation and means for combining the result with the last digital representation to obtain the corrected digital representation.

15. An analog to digital converter comprising, in combination, integrator means having an input and an output, first switch means for applying an analog signal to the input of the integrator means to drive the output of the integrator means from a datum level to a level representing the amplitude of the analog signal, second switch means for applying a reference signal to the integrator means to drive the output of the integrator means back to a level near the datum level, a computer interconnected with the output of the integrator means and with the first and second switch means, a program delay loop for controlling the computer, and counting means for counting excursions around the program delay loop to control one of the switch means.

16. An analog to digital converter comprising, in combination, integrating means having an input and an output, means for applying an analog signal to the input of the integrating means to drive the output of the integrating means from a datum level to a level representing the amplitude of the analog signal, first switch means for applying a first reference signal to the input of the integrating means to drive the output of the integrating means toward the datum level at a first predetermined rate, second switch means for applying a second reference signal to the input of the integrating means to drive the output of the integrating means toward the datum level at a second predetermined rate, program controlled means interconnected with the output of the integrating means and interconnected with the first switch means and with the second switch means for actuating the first switch means until the output of the integrator is driven back to a level near the datum level and for thereafter actuating the second switch means to drive the output of the integrator back to substantially the datum level, the program controlled means including a program loop for controlling the program controlled means for a predetermined interval of time, counting means for counting excursions around the program loop during the actuation of the first switch means and during the actuation of the second switch means, and combining means for deriving a digital representation of the amplitude of the input analog signal from the numbers of excursions around the program loop.

17. An analog to digital converter in accordance with claim 16 comprising, in combination, means for maintaining the first switch means actuated for an additional time interval after the output of the integrator crosses the datum level.


Description

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention concerns weight measuring apparatus. More particularly, the invention is concerned with a weighing scale system having an improved analog-to-digital conversion means including a microcomputer which forms an integral part thereof and to the automatic tracking of the net zero indication of such an apparatus.

2. Description of the Prior Art

Weighing and computing scales must meet several stringent requirements for performance and cost. The scales must be accurate enough to satisfy public weights and measures authorities, yet be available at a reasonably affordable price and perform their operations within a period of time which is convenient for sales transactions.

One of the important factors in digital scales upon which cost, accuracy and operation time depends, is the conversion of the unknown analog weight signal corresponding to an article weight to digital data representative of the article weight.

In the past, digital weighing and computing scales have typically performed the analog-to-digital conversion with a separate distinct and independently controlled analog-to-digital converter circuit which may provide its digital output to a data processing means. Typical examples are Williams, Jr. et al, U.S. Pat. No. 3,709,309 and Loshbough et al., U.S. Pat. No. 3,962,569. This prior art circuitry conventionally uses the dual slope method of analog-to-digital conversion, which method is illustrated in Gilbert, U.S. Pat. No. 3,051,939 and Ammann, U.S. Pat. No. 3,316,547. Triple slope analog-to-digital converters are shown in U.S. Pat. Nos. 3,577,140 Aasnacs; 3,582,947 Harrison; 3,678,506 Wheable; and Re 28706 Dorey. Reference is also made to U.S. Pat. No. 3,937,287 granted to E. G. Pryor and R. C. Loshbough on Feb. 10, 1976 relating to data filtering. The exemplary embodiment of the invention described herein describes features shown in U.S. Pat. Nos. 3,962,569 Loshbough et al; 3,962,570 Loshbough et al; 3,986,012, Loshbough et al; 4,004,139, Hall et al; and application Ser. No. 729,911, Hall et al now U.S. Pat. No. 4,159,521.

Prior art weight measuring apparatus has generally required circuitry separate from the data processing means for performing the integrating, counting, and control functions normally associated with an integrating type analog-to-digital conversion. Attendant with the requirement for separate circuitry is its cost and the relative inflexibility due to the limited number of functions performed by hardwired circuitry.

SUMMARY OF THE INVENTION

There is, therefore, a need for a weighting scale having a relatively simple design which is capable of more effectively utilizing the data processing means to reduce the number of components required to implement the analog-to-digital conversion and thereby reduce the cost of the weighing scale and allow the analog-to-digital conversion to avail itself of the flexibility afforded by the data processing means.

The present invention achieves the foregoing needs by providing a weighing scale system which employs a microcomputer data processing means which is integral to an analog-to-digital conversion and which is used for controlling the sequence of operations and computing the required data for the scale system. The requirement for separate control and counting circuitry associated solely with the analog-to-digital conversion is thereby eliminated, with the additional advantage of allowing the analog-to-digital conversion to be modified via a modification of the instructions of the microcomputer.

In a conventional triple slope analog-to-digital conversion, an analog signal is applied through a switching circuit to an integrator circuit for a first fixed time interval in order to drive its output from an initial level to a level which is proportional to the amplitude of the analog signal. Then a second integrating interval is begun in which a clock-driven digital timing counter begins counting time intervals and simultaneously a first reference DC source is applied through the switching circuit to the integrator to drive its output past a reference level. This level is detected by a threshold detector circuit. In accordance with the present invention, the second time interval is extended an additional time interval beyond the crossover of the reference level. Then during the third integrating interval, the elapse of time is counted. The slower rate permits the crossover to be more precisely detected. Upon detection of such crossover by the threshold detector, the counting of the elapsed time is halted.

In the prior art a separate single digital counter is used to count the clock pulses to accumulate a count of elapsed time for both the second and third integrating intervals. Its most significant digits are used to accumulate the elapsed time count during the second interval and its least significant digits are used to accumulate the elapsed time count during the third interval.

A unique feature of the present invention is that the control of the switching circuit is performed by a microcomputer and the output of the threshold detector is applied directly to the microcomputer so that all counting and arithmetic operations are performed by the microcomputer.

The analog to digital conversion system also affects other characteristics of a weighing and computing scale. For example, an improved digital input weight filtering arrangement is provided which permits the improved accuracy to be obtained by reducing the filter delay and at the same time reducing the effects of vibration or jitter.

In order for a weighing scale to be able to provide a choice of full scale capacities, it is necessary that the weight signal or data be modified in either its analog form or its digital form in a manner which is dependent upon the particular scale capacity and units of weight which are selected.

The weight can be detected according to a single one of several possible scale capacities and weight units and then multiplied by an appropriate conversion factor when another scale capacity is selected. This, however, requires that a computer of such a weighing scale have a more complex sequence of operations because for each selected scale capacity it must deal with substantially different numbers in performing all of its various checks and control functions.

Alternatively, the analog weight signal may be amplified by an amplification factor which is unique for each scale capacity. This selective modification of the analog gain has the disadvantage that it requires the use of either adjustable or multiple circuit elements, such as resistors, in the analog circuitry, one of which must be manually switched into the circuit for each selected amplification factor corresponding to each selected scale capacity. The use of such alternatively selectable circuit elements requires a substantial additional expense and creates problems in calibration.

These problems can be reduced by causing the full capacity analog weight signal for each scale capacity to produce the same digital number at the output of the analog-to-digital converter. This also permits a single span control to set the full capacity output for all selectable scale capacities. For example, in the exemplary embodiment of the present invention, a full scale weight for each scale capacity will produce a digital output of 30,000 net effective weight increments which are termed raw weight increments. The number of raw weight increments is then multiplied by a factor, depending upon the scale capacity to obtain the proper weight units.

It is a unique feature of the present invention that it provides substantially the same digital data with a full capacity weight for all selected scale capacities without requiring multiple circuit elements and without requiring modification of the analog circuit gain. This unique aspect of the present invention is provided by the microcomputer implementation of the analog-to-digital conversion.

Another unique feature of the present invention relates to the computing and displaying of a net weight. The prior art includes weighing and computing scales upon which a food container or other tare weight may be placed, weighed and have the tare weight entered into memory. This stored tare weight is available for later subtraction from the gross weight of the filled container to compute and display the net weight of the contents.

Whenever such a tare weight container is placed on the platter of a scale operating in such a net mode, the digital display should indicate a zero weight. However, drift and hysteresis effects may cause the digital data representing the subsequent measurement of the weight of the container to be different from the previously measured weight data which was stored as the tare weight. Consequently, a subtraction of the earlier stored tare weight from the currently measured weight may cause an erroneous non-zero numer to be displayed.

It is a unique feature of the present invention that such drift or wandering in the digital tare weight data is automatically tracked and the stored tare weight is automatically updated so that an accurate net zero indication is maintained.

The objects and features of the invention will be apparent from the specification and claims when considered in connection with the accompanying drawings illustrating the exemplary embodiment of the invention.

The means, apparatus, and structure, by which the above novel improvements, in accordance with the present invention, are achieved in the exemplary embodiment described herein, comprises various registers, counters, timers, flags, storage spaces, together with specific routines and routine loops for the control of the respective apparatus or means by the central controlled unit. In addition, numerous switches, lamps and display devices cooperate with the central control unit and the various storage spaces, counters, timers, etc., which apparatus comprises input and output means for the system.

DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating the apparatus of the exemplary embodiment of the invention.

FIG. 2 is a diagram illustrating the layout and relative interrelationship of the circuit diagrams of FIGS. 3 through 8 and is shown on the same sheet as FIG. 10.

FIGS. 3 through 8 show the detailed circuitry of an exemplary embodiment of the invention.

FIGS. 9 through 11 are block diagrams of the integrated circuits forming the central processor, memory and general purpose keyboard and display interface devices used in combination with the circuitry of the exemplary embodiment of the invention.

FIG. 12 is a diagram illustrating the operation of the exemplary embodiment of the invention.

FIG. 13 is a random access memory assignment table illustrating the assignments for the memory of the exemplary embodiment of the invention.

FIGS. 14A through 14Z are flow diagrams illustrating the operation of the preferred embodiment of the invention (FIG. numbers 14Q and 14U are not used for clarity).

In describing the preferred embodiment of the invention illustrated in the drawings, specific terminology will be resorted to for the sake of clarity. However, it is not intended to be limited to the specific terms so selected, and it is to be understood that each specific term includes all technical equivalents which operate in a similar manner to accomplish a similar purpose. For example, the term connection is not necessarily limited to direct connection but also includes connection through other circuit elements.

GENERAL DESCRIPTION

The exemplary embodiment of the invention is illustrated in the block diagram of FIG. 1. A load cell 40 mechanically supports a platter 12 and is supplied with electrical energy by a power source 42. The load cell applies an analog weight signal through a preamplifier 44 and filter 46 to a switching circuit 50. The analog weight signal has an amplitude which is dependent upon the weight supported by the load cell 40.

The switching circuit 50 is also connected to the power supply so that not only the analog signal but also two reference DC sources can be sequentially applied to the integrator 51 during the performance of a triple slope A/D conversion. The output of the integrator is amplified by an amplifier 52 and applied to a threshold detector so that the crossover of the integrator output with its reference output level is detected by the threshold detector 53. The output of the amplifier is also connected to the switching means 50 for use in resetting the integrator 51. The output of the threshold detector 53 is applied to a microcomputer 54 which is also connected to the switching circuit 50 for controlling its switching functions.

The microcomputer 54 is connected to a printer 28 and through latch decoder and driver circuitry 56 to indicator lamp displays 26. Operational mode selector switches 22 are also connected to data input terminals of the microcomputer 54.

The microcomputer is further connected to a general purpose keyboard and display interface 58 for receiving data from a keyboard 20 and transmitting data through a decoder/driver 60 to digit displays 24. The "PREPACK ON/OFF" switch 16 and the "Z" key 17 are individually connected to discrete inputs to the microcomputer 54.

In this exemplary embodiment, the analog-to-digital conversion is performed by the combination of the switching circuit 50, the reference DC sources derived from the power source 42, the integrator 51, the threshold detector 53 and the microcomputer 54. The amplifier 52 is provided to amplify the integrator output so that the threshold detector will more accurately determine when the integrator output crosses the threshold voltage.

The microcomputer 54 includes storage registers in which the elapsed time counts, which are derived from a microcomputer program or instruction loop, are accumulated. It also includes stored data for each scale capacity. The microcomputer 54 includes a central processor, associated memory and stored data for controlling the switching circuit 50 to appropriately apply the inputs to the integrator 51 in the proper sequence and at the proper time, for interrogating the output of the threshold detector 53, and for arithmetically processing the accumulated elapsed time intervals or counts.

FIG. 12 illustrates, in simplified form, the signal relationships which are most significant in describing the invention. The vertical axes represent amplitudes which are not drawn to scale in order that the principles of operation may be more clearly illustrated. The horizontal axis represents time.

The top most graph 12A depicts the computer interrogation and counting cycles and in the exemplary embodiment have a 65 microsecond period. These are not drawn to scale because several thousand such cycles would be needed. Each cycle represents the length of time required for the microcomputer to loop through its interrogation and indexing sequence of operations.

Below that is a graph 12B illustrating in a solid line the output of the integrator 51 and also illustrating, with broken lines, portions of alternative outputs from the integrator 51.

Finally, the lowest graph 12C illustrates the output state of the threshold detector 53. Its threshold level is set to correspond to the initial level V.sub.0 at the output of the integrator 51 and its output is high when the output of the integrator is negative and is low when the output of the integrator is positive.

Referring to FIGS. 1 and 12, at time T.sub.0 the microcomputer 54 switches the switching circuit 50 to apply the analog signal, which was derived from the load cell, to the input of the integrator 51. This analog signal continues to be applied and is integrated for the entire time interval T.sub.1. This input causes the output of the integrator to be driven from its initial level V.sub.0 along slope S.sub.1 to level V.sub.1. The magnitude of V.sub.1 -V.sub.0 is directly proportional function of the amplitude of the analog signal and is also a function of its integration time T.sub.1.

The time interval T.sub.1 is a different but fixed and constant time for each different scale capacity and is controlled by the microcomputer 54 and is obtained by reading permanently stored timing data from the computer memory, loading it into suitable registers and sequentially setting the registers in accordance with selected timing loop instructions.

One unique feature of the present invention is that this first integrating interval T.sub.1, during which the analog signal is integrated, is different for each scale capacity and therefore different data is stored in memory and loaded into the time delay registers for each scale capacity.

A particular T.sub.1 time is chosen for each scale capacity so that whatever scale capacity is selected, a full scale weight on the platter for that scale capacity will always drive the integrator output to substantially the same level. Assume for example that the above described integration along integrator output slope S.sub.1 represents a 20 pound weight on the platter 12 with a 30 pound scale capacity selected, then a 30 pound weight on the platter 12 would integrate along slope S.sub.B to arrive at V.sub.MAX at the time T.sub.1A after time interval T.sub.1. If, for example, a 15 kg scale capacity were then selected, a shorter analog signal integrating the time would be provided by the microcomputer 54 so that a 15 kg weight on the scale platter would drive the integrator output along the slope S.sub.C to reach V.sub.MAX at a time T.sub.1B. In the examplary embodiment, the following analog signal time intervals are used:

6 kg.times.2 g-239.660 milliseconds

15 kg.times.5 g-95.790 milliseconds

30 lb.times.0.01 lb-105.625 milliseconds

At time T.sub.1A which is the end of the first integrating time interval T.sub.1, the microcomputer 54 switches the switching circuit 50 to begin the second integrating time interval T.sub.2 by applying a first reference DC source I.sub.1 to the input of the integrator 51. This first reference DC source I.sub.1 is then integrated to drive the integrator output level, which represents the sum of the integral obtained during T.sub.1 and the integral being performed during T.sub.2, along slope S.sub.2 back towards and past the initial integrator output level V.sub.0.

After initiating this second integrating interval T.sub.2, the microcomputer begins periodically interrogating the output of the threshold detector 53 looking for the transition which indicates the crossover of the integrator output level with its initial level V.sub.0.

Each time the microcomputer interrogates the output of the threshold detector 53 and finds that crossover has not occurred, it increments a memory register referred to as the T.sub.2 register or T.sub.2 counter which is assigned to accumulate such interrogation counts. Each such interrogation and counting cycle or instruction loop requires the identical time to perform which in the exemplary embodiment, is 65 m sec.

Eventually, at a time labelled T.sub.2A in FIG. 12B, the output of the integrator 51 crosses over its initial level V.sub.0 causing the output of the threshold detector to switch from a high state to a low state. This transition may occur anywhere within an interrogation and indexing cycle or the end or beginning of such a cycle. However, because of the digital ambiguity the microcomputer 54 will not detect this transition until it interrogates the output of the threshold detector 53 at time T.sub.2B.

When the switching of the output of the threshold detector 53 is detected at T.sub.2B by the microcomputer 54, no more interrogation and indexing cycle counts are accumulated in the memory register. Therefore, the digital count accumulated in the first memory register at time T.sub.2B represents the sum of the amplitude (V.sub.1 -V.sub.0) plus any overshoot V.sub.2 -V.sub.0 of slope S.sub.2, beyond level V.sub.0.

On occasion, the coincidence of the integrator output with the threshold level V.sub.0 will occur relatively near the end of a counting cycle. The possibility then exists that circuit switching, which occurs at the end of the computer interrogating cycles, may cause transients which might cause erroneous operation. For example, if the crossover occurs just before an interrogation of the output of the threshold detector 53 by the microcomputer 54 so that very little overshoot occurs, then the output level of the integrator will be close to the level V.sub.0. If the next integrating interval T.sub.3 were then begun, a computer clock pulse may cause the threshold detector 53 to switch states prematurely.

A unique feature of the present invention is that these crosstalk problems can be eliminated by providing an extra delay at the end of the T.sub.2 interval after the microcomputer 54 has detected the V.sub.0 crossover. Conveniently, this delay interval, labelled T.sub.2C, can be made equal to one interrogation cycle and will cause the integrator output to be driven further along S.sub.2 from V.sub.2 and V.sub.3. However, the count accumulating memory is not incremented so that no count is added to the memory register for that extra cycle.

After delay time T.sub.2C, the computer 54 switches the switching circuit 50 to apply a second reference DC source I.sub.2 to the integrator 51. This second reference DC source I.sub.2 is substantially less than the first reference DC source I.sub.1 which was integrated during interval T.sub.2 because it is desired to integrate at a reduced slope S.sub.2 in order to obtain more precisely the time of the coincidence of the integrator output with its initial level V.sub.0. In the exemplary embodiment of the invention, the reference source which is integrated during the T.sub.2 interval is 32 times greater than the reference source which is integrated during the T.sub.3 interval. Therefore, the magnitude of the slope S.sub.2 of the integrator output during interval T.sub.2 is 32 times greater than the magnitude of the slope S.sub.3 during interval T.sub.3.

Upon the beginning of interval T.sub.3, the microcomputer 54 again goes through interrogating and counting cycles just as it did during interval T.sub.2. However, during interval T.sub.3, the interrogating and counting cycles are counted by incrementing a memory register referred to as the T.sub.3 counter or T.sub.3 register. Then, as during interval T.sub.2, counts continue to be accumulated in the second memory register until the first interrogation of the threshold detector 53 by the computer 54 which occurs after coincidence of the integrator output with the threshold level V.sub.0. When the computer detects the resultant output level change of the threshold detector 53 at time T.sub.4, the T.sub.3 integrating interval and the count accumulation is stopped by the microcomputer 54.

At time T.sub.4, the count accumulated in the second register during interval T.sub.3, is directly proportional to and represents the difference between the integrator output level V.sub.3 at T.sub.2C which is at the beginning of interval T.sub.3 and the integrator output level at T.sub.4 at the end of interval T.sub.3. For computational purposes, the integrator output level at the end of T.sub.3 is assumed to be V.sub.0. Since this is a digital ambiguity within one of the counting cycles for the integration along the lesser slope S.sub.3, it will be apparent from the following discussion that the error is less than one part in 30,000 at full scale capacity in the exemplary embodiment.

Nonetheless the time T.sub.4, when the microcomputer detects the crossover, there will again be some overshoot past the initial level V.sub.0 if the crossover occurs between periodic interrogations of the output of the threshold detector 53.

In order to remove the affect of this overshoot and accurately reset the integrator precisely to the identical V.sub.0 prior to each integration, the microcomputer 54 switches the switching circuit 50 to effectively connect the integrator output to its input. This negative feedback drives the integrator output to V.sub.0 following T.sub.4 by effectively discharging the capacitor of the integrator 51. This is desirable because the current may drift prior to the next integrating cycle and because the overshoot and the end of the interval T.sub.3 may produce an error in the time of crossover during the T.sub.2 interval in which the integration is done along the steeper slope S.sub.2.

The integration functions of the triple slope A/D conversion are completed with the accumulation in each of two memory registers of the digital count data taken along slopes S.sub.2 and S.sub.3. The microcomputer must now take this data and derive a digital number which is proportional to V.sub.1 -V.sub.0 and which therefore is proportional to the amplitude of the analog input signal which was integrated during time interval T.sub.1.

The counts in the T.sub.2 register are proportional to V.sub.1 -V.sub.2. The counts accumulated in the T.sub.3 register are proportional to V.sub.3 -V.sub.0. However, these counts were derived from the integration of two different reference DC sources of substantially different amplitudes. Therefore each T.sub.2 count represents a different and greater quantity of integrator output amplitude and thus a greater weight increment than is represented by each T.sub.3 count. In the exemplary embodiment, the first reference DC source I.sub.1 is 32 times greater than the second reference DC source I.sub.2 and therefore each T.sub.2 count represents 32 times as much amplitude (32 raw weight increments) as does each T.sub.3 count.

In order to equalize the value of each count in the T.sub.2 and T.sub.3 counters, the microcomputer 54 first multiplies the T.sub.2 count by the ratio of I.sub.1 /I.sub.2 which in the exemplary embodiment is 32. There upon the result represents the raw weight increments.

By way of example, 600 interrogating and counting cycle counts may have been accumulated in the T.sub.2 register in driving the integrator output from V.sub.1 to V.sub.2 and 45 interrogating and counting cycle counts may have been accumulated in the T.sub.3 counter in driving the integrator output from V.sub.3 to V.sub.0 during interval T.sub.3. Consequently, in accordance with the invention, the microcomputer will multiply 600 by 32 to obtain a product of 19,200 raw weight increments represented by V.sub.1 -V.sub.2.

The microcomputer then processes the T.sub.3 count to convert it from a number representing V.sub.3 -V.sub.0 to a number representing V.sub.2 -V.sub.0. This is done by subtracting from the T.sub.3 count a number of counts representing V.sub.3 -V.sub.2. Since the integration along slope S.sub.2 from V.sub.2 to V.sub.3 required one interrogating and counting cycle during time T.sub.2, that interval T.sub.2C represents the same amplitude as is represented by a number of T.sub.3 counts which is equal to the ratio of the first reference DC source I.sub.1 to the second constant DC source I.sub.2. Consequently, the microscomputer subtracts that ratio I.sub.1 /I.sub.2 from the accumulated T.sub.3 count.

In the above example for the exemplary embodiment, the number 32 is the ratio which is subtracted from the T.sub.3 count of 45 yield a difference of 13 counts. These 13 counts represent 13 raw weight increments represented by V.sub.2 -V.sub.0.

Therefore, the microcomputer can now arithmetically derive the number of raw weight increments represented by V.sub.1 -V.sub.0 by subtracting this difference of T.sub.3 counts which represents V.sub.2 -V.sub.0 from 32 times the number of T.sub.2 counts. In the example, the microcomputer subtracts 13 from 19,200 to yield 19,187 raw weight increments.

This digital number is proportional to the amplitude of the analog weight signal which was integrated during T.sub.1. In the exemplary embodiment this digital represents weight increments which are referred to as raw weight increments herein.

Each weight indication is then filtered by an improved digital filter. Each weight, when obtained, is subtracted from the filtered weight and the difference divided by two. A one is then added or subtracted from the result to make the result approach the last weight and the last weight corrected by the final result.

This digital number of raw weight units is multiplied by the computer at a later time by the computer by a factor, depending upon the scale capacity to obtain the weight in the proper units for display.

The present invention maintains an accurate zero indication when the scale is not operating in the net mode and also maintains an accurate net zero indication in addition by updating the data stored in a tare weight register.

Tare weight data may be entered into a tare memory register by either of two methods. The digits of a tare weight may be keyed in through the keyboard 20 and this is referred to as a keyboard tare. The tare weight data may also be entered into memory by placing an empty container or other tare weight on the platter and depressing the "T" key. This is referred to as manual tare and causes the scale to read the tare weight and store it in the tare memory.

After a tare weight is properly entered by either of these operations, the computing and weighing scale displays the net weight, which is the difference between the weight of an object on the platter and the weight data stored in the tare register. Consequently, an object weighing the same as the tare weight, for example, the same empty container, should cause a zero net weight to be displayed. A lessor weight on the platter will generate the display of a negative weight.

Unfortunately, creep, hysteresis effects and drift may cause an object on the platter to generate slightly different tare weight data at different times. Similar difficulties have been observed in the maintenance of a gross zero indication as described in Loshbough et al, U.S. Pat. No. 3,986,012. In that situation, a separate auto zero register is used to store a correction factor for automatically correcting the gross zero indication. However, it has been discovered that the same auto zero register cannot be used for net zero tracking because whenever the scale reverts from a net mode of operation back to its gross mode, the auto zero register would still contain net zero tracking data and be erroneous for gross auto zero correction purposes.

The invention involves the periodic updating of the tare weight data to track such wander in order to maintain the display of a zero net weight under the conditions for which a zero net weight should be displayed and in order to use the most recently detected and most accurate tare weight data as a reference which is subtracted from total gross weight to compute net weight.

Each time the microcomputer 54 computes a net weight, it examines that weight data to determine whether the tare weight data should be modified. If the net weight is found to be exactly zero, then no drift has occurred and no tracking is necessary. Since a zero indication already exists, the microcomputer skips the remaining net zero tracking sequence of operations.

However, if the computed net weight is not exactly zero, it is then examined to determine whether it is close enough to a net weight of zero that its departure from zero can be attributed to creep, drift or hysteresis effects rather than to a change in the weight placed on the platter.

This decision, whether the net zero tracking should actually be performed, is made by determining whether the net weight is within a preselected, narrow, weight range or band centered about a net weight indication of zero. Therefore if the computed but non-zero net weight is outside this range, the remainder of the net zero tracking sequence of operations is skipped. However, if it is within the range, net zero tracking is performed by modifying the previously stored tare weight data to compensate for the shift or wander of the net zero.

Data representing the preselected range within which net zero tracking is performed is permanently stored in the memory of the microcomputer 54. In the exemplary embodiment of the invention this range is a predetermined number of increments which represent different weights for each scale capacity so the net zero tracking sequence of operations is done with data which has already been multiplied by a scale conversion factor to represent output increments of weight rather than units of raw weight increments.

For example, in the exemplary embodiment, for the following scale capacities, the net weight must be within the following ranges in order for the tare weight data to be modified to track the net zero:

    ______________________________________
    Scale Capacity     Range
    ______________________________________
     6kg .times. 0.002kg
                       .+-. 0.0008kg
    15kg .times. 0.005Kg
                       .+-.00.0002kg
    30 lb .times. 0.01 lb
                       .+-.00.004 lb
    ______________________________________


If the net weight is within the preselected range for the selected scale capacity, then the microcomputer modifies the tare weight register in a direction which will reduce the next computed net weight by one increment of its least significant digit.

If the net weight is within the preselected range for the selected scale capacity, then the microcomputer modifies the tare weight register in a direction which will reduce the next computed net weight by one increment of its least significant digit.

This is done by algebraically adding to the tare weight data a one having the same sign as the previously computed net weight.

For example, for the 30 lb.times.0.01 lb capacity, a computed net weight of +00.002 pounds will cause a +1 to be added to the least significant digit of the tare weight data, any carry being appropriately propagated. If the stored tare weight was 00.192 pounds it will become 00.193 pounds. Therefore, the next time a net weight is computed for the identical gross weight data, the net weight will be +00.001 pounds.

If the gross weight data does not change, continued repetition of the above sequence of operations will continue to increment the stored tare weight data ultimately to cause a net weight indication of 00.000 pounds. Thus, in the exemplary embodiment 00.00 will be displayed when only the 4 most significant digits are displayed. The repetition of these net weight tracking operations occur approximately five times per second in the exemplary embodiment.

The exemplary embodiment of the invention incorporates and cooperates with many features shown in U.S. Pat. Nos. 3,962,569; 3,962,570; and 3,986,012; and in U.S. applications Ser. Nos. 573,162 and 729,911 which are incorporated herein.

However, these features are briefly described to the extent which is helpful to enable those skilled in the art to construct an embodiment of the invention and to practice the invention.

The exemplary embodiment comprises a digital weighing and computing scale to determine the weight of merchandise, to compute the total price or value of the merchandise and to display, and optionally to print, the price per unit weight, the weight of the merchandise and the total value or total price of the merchandise.

FIG. 1 is a block diagram of the exemplary embodiment of the invention and was broadly described above. The exemplary embodiment has input and output structures which may be explained in more detail.

The first input device is the load cell 40 linked to a platter 12 upon which merchandise is supported. The load cell 40 provides the analog output signal which is related to the weight of the merchandise.

The second group of inputs comprises operator accessible switches 20 including a "PREPACK on/off" switch 16 for selecting a prepack mode of operation and a keyboard 20 having keys labelled and physically arranged as illustrated in FIG. 1. The "PREPACK on/off" switch is not provided for UK modes of operation when Half Pence pricing is used. While the "PREPACK on/off" switch 16 is not electrically a part of the keyboard, it is conveniently positioned adjacent the keyboard for ease of access by the operator.

The third group of inputs comprises a plurality of programmable mode selector switches 22 which are selectively switched at the factory or by a service technician in the field and are inaccessible to the operator. These mode selector switches 22 are labelled as indicated in FIG. 1 and are switched to those operational modes which are appropriate for the weight and currency units, legal standards and requirements and to the merchandising and pricing methods of the particular store in which the weighing and computing scale will be used.

The weighing and computing scale embodying the present invention also has three groups of output devices. The first group consists of two identical sets of three numerical display devices 24. One set is mounted so that it is visible to the scale operator and a duplicate set is mounted to be visible to the customer or purchaser of the merchandise.

Each display device contains five, cold cathode, gas discharge display digits with three lower commas, each digit having seven segments to display any number from zero through nine. The three displays of each duplicate set ordinarily display price per unit, net or gross weight and total value.

The second output group comprises a pair of duplicate front and back indicator lamp displays, one facing the operator and one facing the purchasing customer. Each indicator lamp display has six translucent windows upon which labels are printed and which are at times backlighted by suitable lamps for making the labels visible. As illustrated in FIG. 1, the labels include "Zero", "NET", "PREPACK", "1/4", "1/2" and a sixth legend which is alternatively labelled at the factory either "LB" or "KG".

The third output is a printer 28 which is optional.

The "Z" key 17 is operated to zero or null the scale. After power is first applied to the weighing and computing scale embodying the present invention or after a power interruption, no unit price data or tare weight data will be accepted and no total price or value will be displayed until the exemplary embodiment has been so zeroed. The scale may also be zeroed at other times using the "Z" key.

The scale is zeroed in response to depression of the "Z" key 17 when no substantial weight is on the scale by loading the presently detected weight into a memory register for subsequent use as a correction factor. In subsequent weight measurements this correction factor is subtracted from the detected weight to provide a corrected weight. Consequently a zero weight indication will be displayed when there is no weight on the scale.

In order for the exemplary embodiment to perform the zero operation in response to depression of the "Z" pushbutton 17, all of the following four conditions must exist. These interlocks prevent the customer from being defrauded by intentional or accidental creation of an erroneous zero. First, the "Z" pushbutton 17 must be depressed continuously for at least 1.5 seconds. Second, the platform of the scale must have been motionless for a predetermined interval of time. Third, there must be no tare weight data stored in the memory registers of the exemplary embodiment. Fourth, there must be no significant weight on the platter.

Shortly after the exemplary embodiment has been zeroed in this manner the lamp behind the "ZERO" legend of the indicator lamp display 26 will be illuminated.

The keyboard 20 is a 4.times.5 matrix in which 15 of its key positions are used. The 10 keys labelled "0" through "9" are used to key in price per unit information and, under conditions subsequently described, may be used to key in a tare weight.

Tare weight data may be entered into memory registers in one of two ways. First, a known tare weight may be keyed in by using the keys labelled "0" through "9" of the keyboard 20 and then subsequently depressing the "T" key within two seconds after entry of the last tare weight digit. Such a keyboard entry of tare weight data is accepted only if the corresponding mode of operation is selected by the appropriate mode selector switches 22. Second, an empty container or other object of unknown tare weight may be positioned on the platter 12 and the "T" key then depressed to cause the exemplary embodiment of the invention to automatically store in memory the weight of that object as the tare weight. This is termed a manual tare operation. A tare weight will be accepted and entered into memory only when certain conditions exist which are described in connection with FIGS. 14A-14Z in the detailed description of the operation of the exemplary embodiment.

If an operator discovers that erroneous tare weight data has been entered, the tare data may be cleared by pressing the key with the numeral "0" and then pressing the "T" key within 2 seconds of the operation of the "0" key. However, such a clearing of the tare data will only be accepted and the tare data will be cleared only if the net weight on the scale is less than 10 scale increments. This prevents the defrauding of a customer by the erroneous clearing or changing of the tare data while an object is on the platter.

After the entry and acceptance of tare weight data, the "NET" legends of the indicator lamp displays will be backlighted to signify that the exemplary embodiment is in a net mode of operation and therefore that its displayed data is a net weight.

If tare weight data has been entered by a manual tare, then the removal of the container will cause the exemplary embodiment to display the tare weight preceded by a negative sign.

The ten digit keys 0 through 9 are used to enter the price per unit weight either after tare data has been entered into memory or, under no tare conditions, by keying in the price per unit and failing to depress the "T" key.

The fraction keys 21 and 23 bear, respectively, the legends "1/2" and "1/4". These fraction keys are depressed to input the information that the pricing is per 1/2 unit or 1/4 unit of weight. Depression of a fraction key 21 or 23 at the appropriate time will cause the corresponding fractional legend on the indicator lamp displays 26 to be illuminated.

The "CLEAR" key of the keyboard 20 may perform two different functions. First, any price data which has been entered may be cleared by depressing the "CLEAR" key. Second, when the "CLEAR" key is pressed and held in a depressed position, all output displays will be blanked or held off. If the pushbutton is released and subsequently again held in a depressed state, all display segments and all display indicating lamps will be turned on.

These two modes permit the displays to be checked to make certain that there are no short circuits which are erroneously turning on display segments and no open circuits which are preventing display sigements from being turned on.

When the weighing and computing scale embodying the present invention is used with a printer 28, the operator may depress the "PRINT" key to initiate the printing of an appropriate label bearing the price per unit, the total weight and the total value.

The manually programmable mode selector switches 22 comprise a plurality of individually operable, single pole, single throw switches. Their functions are enabled, that is their labelled conditions exist, when the switches are on or made.

The exemplary embodiment of the present invention has three selectable scale capacities, these are: 15.000 kg.times.0.005 kg., 30.00 lbs..times.0.01 lbs. and 6.000 kg.times.0.002 kg. For selecting the particular scale capacity which is desired, two capacity-enabled mode selector switches are provided, a first switch 1 for selecting the 6 kg scale and a second switch 2 for selecting the 30 lb capacity. If both of these mode selector switches are off, then 15 kg scale capacity is chosen.

Under most conditions, the price per unit and the total price will be four digit numbers from 0 to 99.99. However, mode selector switches are provided to permit either or both of the price per unit and the total price to be displayed as a five digit number. Selection of these modes is accomplished by switching to the on position the mode selector switch 3 labelled "5 digit unit price" and/or the mode selector switch PG,28 4 labelled "5 digit total price."

A mode selector switch 5 labelled "x10 EXPAND" provides a mode which increases displayed resolution by causing the display of the raw weight increment data. This mode may be used when calibrating, servicing or testing the exemplary embodiment.

A mode selector switch 6 labelled "PRINT INHIBIT", when switched to its on position, will cause printing to be inhibited for weights less than 20 scale increments. A mode selector switch 7 labelled "KEYBOARD TARE ENABLE" is switched on to permit tare weights to be entered on the keyboard as described above.

The mode selector switch 8 labelled "AUTO-CLEAR PRICE AND TARE" may be switched to its on position so that whenever the scale weight goes above ten scale increments and remains above ten increments for one second or longer and then returns below ten scale increments, the price per unit data and the tare weight data will be automatically cleared. This avoids the necessity of requiring the operator to manually clear the price per unit data and tare weight data each time merchandise is weighed.

A "TARE MANDATORY" mode selector switch 9 may be switched to its on position to require the input of a tare weight before the exemplary embodiment will compute and display the total price.

The mode selector switch 10, labelled "300 PRINTER ENABLE" is provided for use with the model Toledo/300 Automatic label printer manufactured by the Toledo Scale Division of Reliance Electric Company. When switched to its on position, it limits the printing of price per unit, weight and total value to four digits each.

Mode selector switch 12 labelled "UK" enables half penny pricing for the United Kingdom.

The mode selector switch 13, labelled "PRICE PER UNIT", is switched to its on position whenever it is desired to permit factor pricing (e.g., price per 1/4 and 1/2 pound), to be entered on the keyboard and yet have the price per pound displayed.

In some areas a "price by count" mode of operation is desired. To allow this mode to be elected, the "PREPACK on/off" switch 16 may be provided in an alternate embodiment with a third position labelled "price by count".

When the "PREPACK" switch 16 is switched to its on position, the previously entered price per unit data and tare weight data will not be automatically cleared regardless of the position of the mode selector switch 8. The "PREPACK" switch 16 causes the "PREPACK" legend to be backlighted and overrides the mode selector switch 8 so that re-entry of the identical price per unit and tare weight after each weighing operation will not be necessary.

In addition to the operational modes and functions already described above, the exemplary embodiment of the present invention automatically performs several other operations regardless of the selected mode.

Automatic gross zero compensation or auto zero tracking compensates the scale for minor off-sets from a zero weight after correction. Whenever the presently detected and corrected weight is within 4 raw weight increments of zero, the correction factor is modified to automatically bring the corrected weight to within one raw weight increment of zero. This automatic gross zero compensation will occur for variations in zero which occur at a rate of 5 raw weight increments per second or slower so long as the total compensation, that is the total correction factor, is within .+-.400 raw weight increments. The exemplary embodiment of the invention also provides net zero tracking as previously described.

It might be noted by way of further explanation, that the "Z" key 17 causes the capture range of the automatic gross zero tracking system to be extended from .+-.4 raw weight increments as described above to .+-.400 raw weight increments.

The exemplary embodiment of the invention is also provided with a motion detection system which detects weight changes greater than .+-.0.5 displayed increment per 1/5 second. The detection of such platter motion causes the display lamps behind the legend "LB" or "KG" to be turned off and signals to the remainder of the circuitry of the exemplary enbodiment that a motion condition exists.

A gross weight exceeding the scale capacity by more than 5 scale increments causes the weight display and the total value or total price display to be blanked.

A total price calculation in excess of the digit nine in all four character positions of the total price register (or alternatively all five if the five digit total price mode is selected) will cause the total price display to be blanked.

The circuitry of the weighing and computing scale illustrated in FIG. 1 is shown in detail in the schematic diagrams of FIGS. 3 through 11. FIG. 2 shows how FIGS. 3 through 8 are associated to illustrate the complete circuit. The random access memory assignments are illustrated in in FIG. 13 and are discussed in connection with the subsequent description of the detailed operation of the exemplary embodiment.

FIG. 3 illustrates a load cell 40 which is mechanically linked to the platter 12 and includes four resistive strain gage elements which are connected in a Wheatstone bridge arrangement 70. Typical scale mechanisms suitable for cooperating in the embodiment of the invention described herein are shown in U.S. Pat. No. 3,847,238 granted to D. L. Hall, et al., on Nov. 12, 1974 and in U.S. Pat. No. 3,074,496 granted to L. S. Williams on Jan. 22, 1963.

Electrical power from the regulated power supply 42 is applied across one pair of opposite terminals of the bridge 70. The other pair of opposite terminals of the strain gage bridge 70 forms the output of the strain gage bridge and is connected to the input of the preamplifier 44. With no strain, the bridge 70 would be balanced and the output would be zero volts. In this state each output terminal of the strain gage bridge is at the same potential intermediate the potentials of the terminals of the regulated power source 42. However, in practical application the strain gage bridge 70 will be under the stress of the platter and other mechanical linkages.

Any weight positioned on the platter 12 will further deform the resistive element of the bridge 70 causing a variation in their resistance and unbalancing of the bridge. In this manner an output analog voltage is obtained from the strain gage bridge 70 which is related to the weight of the object on the platter 12 and is applied and amplified by the preamplifier 44.

The preamplifier 44 has two differential operational amplifiers 72 and 74 which are connected to form a differential amplifier presenting a very high input impedence to the output of the strain gage bridge 70 so that there is substantially no current drain from the bridge 70 while still providing a preamplifier which is a true differential amplifier rejecting all common mode voltages such as drift or changes in the bridge excitation voltage.

The non-inverting input of the OP-AMP 72 is connected to one of the output terminals of the strain gage bridge 70. The other output terminal of the bridge 70 is connected to the non-inverting input of OP-AMP 74. The OP-AMP 74 provides a substantially unity gain amplifier with its output fed across to the inverting input of the OP-AMP 72. In addition, the inverting input of the OP-AMP 74 is connected to the wiper of a potentiometer 76 which is used to shift the output level of OP-AMP 72. The potentiometer 76 is manually adjusted to compensate for small differences in the mechanical and electrical parameters of production parts and circuits to provide a total effective analog signal component resulting primarily from loading of the strain gages 70 when the platter has no object placed thereon. Thus known analog signal component or analog offset is subsequently removed by a subtraction in the digital data processing circuitry.

Referring now to FIG. 4, the output 80 of the preamplifier 44 provides a voltage having an amplitude proportional to the sum of the analog offset and the signal change resulting from an object being placed on the platter 12 and is applied to an active filter circuit 46. This active filter circuit 46 is a low pass filter designed to filter out scale platform or platter vibration. The output circuit of the active filter 46 includes a span adjustment potentiometer 92 which is connected as a simple voltage divider for adjustably selecting the desired proportion of the filtered analog weight voltage to be applied through the switching circuit 50 to the integrator 52 at the appropriate time. This potentiometer adjusts the analog circuit gain to a value suitable for the various scale capacities.

The switching circuit 50 under the control of the microcomputer 54 (see FIG. 1) may be used to selectively gate one of four possible inputs through four field effect transistors to the input 98 of the integrator 51. The four alternatively selectable inputs are: (1) the analog weight signal from the wiper of the potentiometer 92 which is applied through a resistor 85 and FET 94; (2) a reference DC source applied through resistor 87 and FET 95; (3) a second reference DC source which is applied through resistor 91 and FET 96; and (4) a reset signal applied through resistor 93 and FET 97. In the exemplary embodiment, resistors 85, 87, and 91 are all 500 K ohms.

The gates of four FETS 94, 95, 96, and 97 are connected to four discrete input-output terminals, 1, 42, 41, and 40 of the CPU as illustrated in FIGS. 5 and 9 so that the CPU can control these gates.

As previously described in the exemplary embodiment, the amplitude of the first reference DC source, which is integrated during the second integration interval T.sub.2 of the triple slope A/D conversion, is 32 times greater than the second reference DC source which is integrated during the third integration time interval T.sub.3.

This is accomplished in the exemplary embodiment by referencing the input to the integrator 51 to a particular non-zero potential rather than to ground. In particular, series resistors R and R/32 shown in FIG. 4 form a voltage divider between the power supply potential of -15 volts and ground. Resistor R is 32 K ohms and resistor R/32 is 1 K ohm. Therefore, the reference potential which is always applied to the noninverting input of OP-AMP 99 of the integrator 51 has an amplitude equal to 1/33 of the power supply potential and has the same polarity. In the exemplary embodiment this reference potential fixed is at -(15/33) volts relative to ground potential by resistors R and R/32.

During the first integrating interval T.sub.1 of the triple slope conversion, a positive analog weight signal is normally applied to the integrator 51. Then, during the second interval T.sub.2, the -15 volt power supply provides the first reference DC source having a polarity opposite to the polarity of the analog weight signal and having an amplitude of -(32/33).times.15 volts relative to the reference potential at the noninverting input of the OP-AMP 99.

During the third integrating interval T.sub.3, FET 96 is switched on to apply a second reference DC source to the integrator which is derived through resistor 91 from ground potential. Since ground potential is positive with respect to the reference voltage at the noninverting input of OP-AMP 99 and has an amplitude of 15/33 volts, the connection of the integrator input 98 to ground through resistor 91 effectively provides a second reference DC source during interval T.sub.3 which is both opposite in polarity to and 1/32 the amplitude of the reference DC source applied during interval T.sub.2.

Except for this manner of referencing the integrator 51, it is a conventional integrator circuit including an integrating capacitor 100.

The output of the integrator 51 is applied to the amplifier 52 and through it to the threshold detector 53. The amplifier 52 comprises an OP-AMP 104 and is provided to amplify the output of the integrator 51 to make the slope of the output of integrator 51 steeper so that the time of its crossover with its initial level can be more accurately determined.

The threshold detector circuit 53 includes an OP-AMP 106. It is simply a high gain amplifier which is driven from one saturation to the other when its input voltage crosses zero.

FIGS. 5-8 show the details of the input and output devices and circuitry and the digital data processing and control circuitry.

In accordance with the present invention the microcomputer 54 of FIG. 1 may be any of several suitable types of commercially available microcomputers or other similar control circuitry including wired components of types well known in the computer and electronics arts.

In the exemplary embodiment of the invention, the microcomputer 54 is essentially a PPS-4 parallel processing, microcomputer system developed by and using devices manufactured by Rockwell International Corporation. The microcomputer 54 is comprised essentially of a central processing unit or CPU which in the exemplary embodiment described herein is a Rockwell PPS-4/2 unit and a memory unit having both read only memory or ROM for storage of program and fixed constants and also random access memory or RAM for storage of data for use in processing. The preferred memory used with the exemplary embodiment of the invention is a Rockwell P/N A17XX device.

In addition to its connection to the output of the Threshold detector 53, the microcomputer 54 is also directly connected to the mode selector switches 22, the printer 28, the "Z" key 17, and the "PREPACK ON/OFF" switch 16. The microcomputer 54 is also connected to the front and back indicator lamp displays 26 through suitable interfacing latching, decoding and driving circuitry 56.

Finally, the microcomputer 54 is also connected to a general purpose keyboard and display interfacing device 58 for interfacing the keyboard 20 and the front and back digit displays 24 with the microcomputer 54. A general purpose keyboard and display interface or GPKD interface 58 is employed which is the exemplary embodiment described herein comprises a device manufactured by Rockwell International Corporation and designated P/N 10788. This unit, under the control of the microcomputer 54, receives and temporarily holds data keyed in on the keyboard 20 for subsequent transmission to the microcomputer 54. The GPKD interface unit 58 also receives data from the microcomputer 54 which is applied through decoder/drive logic 60 to the front and back digit displays 24 under control of the microcomputer 54. The Rockwell PPS 4 microcomputer system uses four bit data words, eight bit instruction words and in the exemplary embodiment of the present invention twelve bit address words all of which are parallel transferred within the system.

Referring now to FIGS. 5-8, at the top of FIG. 5 is shown the bus system 201 interconnecting the CPU 210 of FIG. 5, the memory 310 of FIG. 6 and the GPKD 410 of FIG. 7. The bus system 201 includes a twelve line address bus 203 which is connected only to the memory 310 for addressing the RAM and ROM memory. The bus 201 further includes an eight line instruction/data bus 205 which transfers, at different times, either eight bit instruction words or two four bit data words bidirectionally. The bus 201 further includes two clock lines, CLKA and CLKB, a write command line and an input/output enable line W/I0 for use during one clock phase time for instructing the RAM memory to write and for use during another clock phase time for disabling the RAM memory and enabling the input/output devices for the performance of an input/output instruction. The bus system also includes a "synchronized power on" CPU output line labelled SPO for use in initializing other devices in the circuit.

The CPU 210, which is shown as a single block in FIG. 5, is illustrated in greater detail in FIG. 9. FIG. 9 is a block diagram available with technical information from Rockwell International, Inc.

The CPU 210 as shown in FIG. 9 has an accumulator 810 which is the basic work register of the CPU. It also has an arithmetic logic unit 811 with a carry register 812 and an X register 813 all connected to the accumulator 810. The CPU 210 further has a data address register 814 and a program address register 815 which may be selectively interconnected with the address bus 203 output pins 27 through 38 through the multiplex driver circuits 816. The CPU 210 has two program address save registers 817 and 818 to provide two levels of subroutine stacking. The Rockwell CPU PPS 4/2 is provided with internal clock 819 when a suitable crystal 820 is connected to its pins 18 and 19. The instruction/data bus 205 is connected to pins 6 through 13 which in turn are connected to multiplex receivers 821 and 822 and the multiplex driver 823. Incoming instructions are decoded by the CPU in its instruction decode logic 824 and two separate flip-flops 825 and 826 are provided for program use.

In addition to the bus input/output capabilities, the CPU 210 is provided with 12 discrete input/output pins, four from each of the three registers 827, 828, and 829. These are connected as illustrated to pins 1-5, 23-26, and 40-42.

Referring back to FIG. 5, the discrete input/output register 828 of the CPU as shown in FIG. 9 is connected as shown in FIG. 5 to the four control lines labelled T.sub.1, T.sub.2, T.sub.3, and "Reset" which extend to the switching circuit 50 in order to control the integrations of the triple slope A/D conversion. The crystal 820, shown in FIG. 5, controls the frequency of its internal clock generator which is preferably 0.20 MHZ.

A time delay circuit 222 FIG. 5 is provided for delaying the CPU 210 and in particular its program counter (which must be returned to 0000) after power is first applied or after a brief power interruption or momentary power failure.

The "PREPACK ON/OFF" switch 16, the "Z" pushbutton 17 and the "x10 EXPAND" mode selector switch 5 are connected to the discrete input 827 (see FIG. 9) at pins 2, 3, 4, and 5 of the CPU 210 as shown in FIG. 5.

The front and back indicator lamps 26 are connected through lamp drivers 242 to addressable latches 240. The addressable latches 240 respond to the incoming data and apply the data to the appropriate indicator lamps 26. More specifically, the latches are addressed from output pins 23, 24, and 25 of the CPU 210. With three such address lines, any of the seven indicator lamps 26 may be selected or addressed. The addressable latches are enabled by the output of terminal 26 of the CPU 210 and enabled latch is then controlled by data transmitted over line 241 from the memory input/output port terminals 41 shown in FIGS. 6 and 10.

As illustrated in FIG. 5, output terminals 23-26 of the CPU 210 also provide four bit data to the printer.

FIG. 6 illustrates, in block form, the memory 310 which is illustrated in greater detail in FIG. 10. Referring to FIG. 10, the memory includes both RAM memory 911 and ROM memory 912. These are connected to the instruction/data or I/D bus 205 through a multiplexer 913 which is connected to pins 10-12 and 15-19. An address decoder 910 is connected to the address bus 203 through pins 14, 20, 21, 23, 24, and 28-34. The memory 310 further has sixteen discrete input/output ports connected at pins 1-8 and 35-42 through receiver buffers 917 to the multiplexer 913.

The read-only memory 912 has a storage capacity of 2k eight bit words, any of which may be addressed over the address bus 203 and its stored eight bit word returned to the CPU over the instruction/data bus 205.

The random access memory 911 has 128 four bit storage registers for storing four bit words. Dependent upon the clock phase and the state of the W/I0 line connected from terminal 14 of the CPU to terminal 13 of the memory, the addressed memory register will read its four bit contents out onto the instruction/data bus 205 and will write, if so instructed, a new four bit word from the CPU into the addressed register through the multiplexer 913.

Returning to FIG. 6, the output 102 from the threshold detector 53 illustrated in FIG. 4 is applied to one of the discrete input/output ports at pin 42 of the memory 310.

Eight other discrete input/output ports connected to pins 1-8 of the memory 310 are connected to the twelve manual mode selection switches 22 illustrated in FIG. 6. Half of the twelve switches, labelled SW-1, are connected between pin 2 and through diodes to pins 3-8 of the memory 310. The other half of the twelve switches, labelled SW-2, are connected between pin 1 and pins 3-8. Each of the individual switches of both switches SW-1 and SW-2 are individually and independently actuable and each is labelled with a number which corresponds to the function listed in block 22 on FIG. 1. Consequently, the microcomputer 54 can interrogate the condition of switches SW-1 by strobing pin 2 and examining the data of lines 3-8 and can interrogate switches SW-2 by strobing pin 1 and examining the data of pins 3-8. It is to be understood that any particular one of these switches may be assigned any particular operational mode function.

Printer control signals are applied to the printer from the five discrete input/output memory ports 35-39 of the memory 310 illustrated in FIG. 6. The "print complete" signal when received from the printer is applied to the discrete input/output port 40 of the memory 310.

FIG. 7 includes, in block diagram form, the general purpose keyboard and display interface 410. FIGS. 7 and 8 illustrate the keyboard 20 and display drivers connected thereto.

The GPKD interface 410 used in the exemplary embodiment is a device manufactured by Rockwell International Corporation and given their type number P/N 10788. It is interconnected with the memory 310 and the CPU 210 through the data bus 205 as well as the clock A, clock B, synchronized power on and write/input-output lines of the bus 201.

A block diagram of the circuit of the GPKD interface 410 is illustrated in FIG. 11. Referring to FIG. 11, chip select decode circuit 1012 compares the chip address data applied by the CPU 210 to pins 2, 4, and 42 of the GPKD over the instruction/data bus to the data on the chip select straps at pins 1, 3, and 41. If the strapped address is identical to the address on the instruction/data bus, if the instruction/data line connected to pin 6 is true and if the write/input-output mode has been selected by the CPU so that the CPU has trued the W/I0 input pin 5, then the GPKD is selected to execute the command.

The command is applied to the GPKD from the CPU 210 over that half of the instruction/data bus which is connected to pins 36 through 39. The command is decoded by the command decoding logic circuitry 1014. A bit time counter 1016 is provided to divide the clock frequency from the PPS clock and apply its output to a scan counter 1018. The scan counter 1018 provides timing signals for the display register control display bank select 1026, return sampling 1028, key buffer register 1032, and control 1030 and strobe select circuit 1024.

The GPKD of FIG. 11 includes two display registers A and B, which store display data. These display registers store data from the instruction/data bus and, upon command, output the data to their associated displays.

The strobe select circuit 1024, with its eight output pins, 27 through 34, sequentially outputs eight strobe signals to its eight output pins. These outputs may be used to strobe an 8.times.8 keyboard matrix or for multiplexing display characters.

The return sampling circuit 1028 receives data from the strobed keyboard indicating the states of the key matrix return lines from the keyboard. When a key closure is detected at the return sampling circuit 1028, the key buffer register control circuit 1030 loads the key code for that key into the buffer register 1032. Subsequent key closures which are detected may also be stored in the key buffer registers 1032 until they are called for by and transferred to the CPU on a first in, first out basis.

Returning to FIG. 7, the eight strobe select output pins 27 through 34 are applied four to the display driver 513 of FIG. 8 and four to the display driver 514 of FIG. 8. The outputs of the display drivers 513 and 514 are applied to the anode drive terminals of the front and back displays.

Referring to FIG. 7, since various decimal point locations are required by the various countries, a switch labelled SW-3 consisting of six individually operated single pole, single throw switches is associated with transistors Q3 and Q4 selectively enabling those digit positions in which decimals may be displayed.

Four of the strobe select lines at pins 27 through 30 of the GPKD 410 are additionally applied to the four input strobe lines of the keyboard matrix of the keyboard 20. The keyboard return lines are connected to pins 19 through 21, 23 and 24 of the return sampling inputs of the GPKD 410. These permit interrogation of the keyboard for key depressions.

OPERATION OF THE SYSTEM

The operation of the system can be most conveniently described in conjunction with FIGS. 14A through 14Z of the drawings (FIG. numbers 14Q and 14U are not used for clarity). The flow diagrams of FIGS. 14A through 14Z graphically describe the operation of the scale system utilizing the operating sequence represented by the program listing included herewith as an appendix in combination with the Rockwell PPS-4/2 microcomputer described above. However, it should be appreciated that the operating sequence of the system utilizing this operating sequence may be implemented on other types of commercially available computers in accordance with the principles described herein.

The present invention, as incorporated in the exemplary embodiment described herein is arranged to cooperate with many features and operations which are described and claimed in U.S. Pat. Nos. 3,984,667 to Loshbough, U.S. Pat. No. 3,869,005 to Williams, Jr., and U.S. Pat. No. 3,861,479 to Pryor, which patents are specifically incorporated by reference herein; and U.S. patent application Ser. No. 729,911 of Donivan L. Hall and Edward G. Pryor entitled "Digital Scale With Antifraud Features":, which patent application is also incorporated by reference herein. In order to more clearly set forth the precise invention for which this patent is solicited, in such a manner as to distinguish it from other inventions and from what is old, those operations which are disclosed in the incorporated references will only be generally described, with the primary emphasis being given those operations forming a part of the instant invention.

Many of the operations of the scale system utilizing the operating sequence are performed only partially by single pass through the operating sequence (hereinafter referred to as an operating sequence cycle), so that a plurality of passes or cycles through the operating sequence may be required in order to complete a particular operation. Such operations are clearly disclosed in the incorporated references and will be referred to in the instant disclosure only where necessary to clearly set forth the instant invention. The details of the operations are completely disclosed in the accompanying program listing in the appendix and in the flow diagrams FIGS. 14A through 14Z.

The flow diagrams of FIGS. 14A through 14Z disclose in graphical form an exemplary operating sequence of the scale system, including the operations required for implementing the analog-to-digital conversion and the net zero tracking described herein. The flow diagrams consist of a series of geometrical shapes, each of which corresponds to a particular type of operation. Each rectangular block represents the performance of a function which is generally indicated by the notation found within the rectangular block. Each diamond shaped geometrical figure represents a decision making operation where one of two alternatives is determined. The hexagons represent that a subroutine is performed at that particular point in the operating sequence, with the subroutine being performed indicated by the notation within the hexagon. The oval-shaped geometrical figures represent a branch back operation and are used in conjunction with a subroutine to indicate that the operating sequence continues at that point in the main operating sequence where the subroutine was entered. A rhomboid geometrical figure represents either an input or an output operation. The numbers placed in circles to the top and left of the geometrical figures represent input locations to those particular operations. The numbers in the circles to the right and below the blocks in the flow diagrams represent an output connected to a different location in the flow diagrams indicating a transfer in the operating sequence. The mneumonic designations found in parenthesis adjacent to the circles containing numbers, indicate labels which have been given to a particular group of operations. These mneumonics may be utilized in referring back to the detailed operating sequence disclosed in the appendix by referring to the symbol table found at the end of the appendix. The symbol table found in the appendix lists, in alphabetical order, the mneumonic labels and the corresponding location in the detailed program listing of the operating sequence where the particular operations represented by the mneumonic label may be found. Also a table is included showing the operations represented by the mneumonic labels.

In order to accomplish the operations illustrated in FIGS. 14A-14Z, data is assigned to and stored in various registers or memory cells in the random access memory or RAM 911 as illustrated in FIG. 13. Therefore, it is useful to define and explain the various flags, counters, timers and data registers which are used in the exemplary embodiment of the invention and which are referred to in the flow chart diagrams of FIGS. 14A-14Z.

The memory unit 310 which is shown in FIG. 6 and illustrated in more detail in FIG. 10, includes a random access memory or RAM with a capacity of 128 four-bit words and arranged as shown in FIG. 13. Each of the 128 four-bit words may contain any one of sixteen states. These states can represent numerical values of data or a status or condition.

In FIG. 13, the register addresses are referred to by the hexidecimal equivalents of their binary address. The two most significant hexidecimal digits of the address within the RAM define a particular column or grouping of four bit words and the least significant hexidecimal digit defines a row or particular four bit word within the RAM. The hexidecimal address designations are also used as reference numerals below. A tare done flag at address 002 is set to its binary eight state after a tare operation has been completed by the entry of tare weight data into the appropriate storage registers and otherwise is reset or cleared to a "zero" state when such a tare has not been completed.

A digit timer is provided at register 004. The digit timer is set to its binary "eleven" state upon the depression of a digit key on the keyboard. Thereafter it begins a timing cycle by decrementing one count each pass through an operating sequence cycle. The depression of any other digit key before the digit timer counts to zero will again set the digit timer to binary "eleven" state to reinitiate the counting cycle. If the digit timer counts down its "zero" state before all price digits are entered or the tare key is depressed, all previously entered keyboard digits will be cleared upon entry of any new digit. This feature requires that all digits be entered within a few seconds of each other and consequently avoids the retention by the apparatus of accidently entered data or of data entered a considerable time earlier and forgotten by the operator.

A manual tare flag having two states is provided at register 003. Whenever the "T" key is pressed, there is no motion of the platter and the digit timer of register 004 is at its "zero" state (i.e., is not running), the manual tare flag is set to its "eight" state. It is reset or cleared to its "zero" state after its condition has been sensed in subsequent operations.

The addresses of registers 005 through OOF are labelled as a result register and are used as a scratch pad.

A filter counter is provided at address 010 and is used to provide four states, "zero" through "three". Whenever, during the sequence of operations, no difference is found to exist between a most recently generated, fully processed weight and the weight currently being displayed, the filter counter is reset or cleared to its "zero" state. However, each time a difference is found to exist between the most recently generated fully processed weight and the weight being displayed, the filter counter counts up one count. If such a difference is found three times in succession, the filter counter counts one count at a time, to its "three" state to signal that the displayed weight should be updated with the most recently generated fully processed weight. This avoids a display blink from an unnecessary updating of the displayed weight with weight data which is identical to that which is currently being displayed.

A zero lamp flag is provided at address 011 and is used to provide three states "zero" through "two". Whenever a weight is detected which is not within a small range of the previously established scale zero, which range is different for different scale capacities, the zero lamp flag is set to its "two" state for purposes of causing the zero lamp to be turned off to indicate that the scale is not zeroed. However, each time a weight within this range is detected, the zero lamp flag is decremented. Consequently, if the scale is found to be within this range for two such detections in succession, the zero lamp flag gets decremented to its "zero" state so that the zero lamp is turned on to indicate that the scale is zeroed.

A net flag is provided at register 012 and is set to its "eight" state when the weighing scale is in its net mode of operation, that is, when a positive weight is stored in the tare memory register. Otherwise, the net flag is in its clear or reset state of "zero".

A factor flag is provided in register 013 which is reset or cleared to its "zero" state when there is no price factor, set to its "two" state when pricing is per 1/2 unit of weight and is set to its "four" state when pricing is per 1/4 unit of weight.

A verify test flag is provided in register 018. This flag is set to its "eight" state in response to depression of the "clear" key to signify that a verification test is in progress. The verify test flag is reset or cleared to its "zero" state when the sequence of operations pass through the reset operation III beginning on FIG. 14A.

Registers 01A through 01F provide six, binary coded decimal digits of temporary scratch pad data storage for use in carrying out the sequences of operations of the exemplary embodiment of the invention. The sign of that six digit number is stored as a fifteen or zero in register 019.

Registers 020 through 026 store, as an "eight" or "zero", on the "on" or "off" state of the indicator lamps labelled at those addresses in FIG. 13.

The presence or absence of a print command is stored as an "eight" or "zero" at register 027.

Registers 02A through 02F store the six binary coded decimal digits which represent a detected weight while register 029 stores the sign of that weight.

In order to require that the "Z" be depressed for a sufficient length of time before such depression is accepted and to thereby prevent accidental erroneous or fraudulent zeroing of the weighing scale, a zero key timer is provided at register 030. The zero key timer has even states "zero" through "fourteen". An initial depression of the "Z" key causes the zero key timer to switch to its "two" state. Thereafter, on each pass through the operating sequence cycles, the zero key timer is incremented to its next higher even state so long as the "Z" key remains depressed. If the "Z" key is depressed sufficiently long that the zero key timer counts through all its even states and returns to "zero", the depression of the "Z" key is then accepted, the scale is zeroed and the zero done flag at register 031 is set to its "fifteen" state to indicate that the scale has been zeroed. The zero done flag is reset or cleared to its "zero" state in the initial, main program power-up operation I beginning on FIG. 14A.

An auto clear flag is provided at register 033 to help in the automatic clearing of a previously entered tare weight and price each time a weighing operation is completed. The auto clear flag is a seven state counter which is reset to its "zero" state whenever the detected weight is greater than a weight corresponding to one hundred raw weight increments. Whenever the scale weight exceeds this 100 increment band, the auto clear flag begins counting towards its "six" state. This auto clear flag counter is incremented each pass through the sequence of operations. If the detected weight falls within the 100 increment band before the auto clear flag counter reaches its "six" state, the auto clear counter is reset to its "zero" state and the tare data is not automatically cleared. However, if the scale weight is above the 100 increment band long enough for the auto clear flag to reach its "six" state, it will remain in its six state to enable the auto clear function. After the scale weight returns to within the 100 increment band, the tare weight and price will then be cleared.

Registers 034 and 035 are provided to store the least significant binary coded decimal digits of a first previously detected and a second previously detected weight. These are utilized as described below in the filtering operation of the preferred embodiment of the invention.

Registers 039 through 03F are used for the sign and the six binary coded decimal digits of a partially processed weight which represents a previously detected weight.

Registers 040 through 045, 050, 051, and 053 through 055 are two-state registers which store each mode selector switch status as an "eight" state or a "zero" state. Registers 046 and 047 store data which represent a keyboard key which has been depressed and detected. Register 048 stores in its four bits the status of the switches or keys labelled in those positions in FIG. 13.

Registers 049 through 04F form the auto zero register in which the zero correction factor is stored.

Registers 050 through 055 are used to store data as indicated.

A recompute flag is provided at register 057. It is set to a non-zero value whenever there is a change in a price digit or output weight in order to signify, during the next pass through an operating sequence cycle, that a new total price should be computed. However, if no such change is detected, the recompute flag remains in its "zero" state so that no new total price is computed. The recompute flag is cleared immediately prior to the compute total price operation XX.

A verify mode flag is provided at register 058. This flag has two states and is switched from its "zero" state to its 15 state upon the first depression of the CLEAR key and is returned to its "zero" state upon depression of any other key.

Registers 059 through 05F store the tare weight. Registers 060 through 06E store the total price, price and output weight as indicated. Registers 070 through 07F are used as a work area and temporary scratch pad during the display and other routines.

The various means and apparatus for performing the functions and improvements in accordance with the exemplary embodiment of the invention comprise the scale mechanism, keys, switches, flags, registers, counters, timers, and storage spaces together with program sequences or routines and routine loops in combination with the computer, and the output or display apparatus and the control thereof.

Thus the means for controlling the time the integrator means is connected to the scale means comprises gate 94 and the control thereof including program sequences of blocks 14A17, 14A20, or 14A22 and the program loops or sequences of FIG. 14W in combination with the computer.

The means for reading the weight includes the flow diagrams beginning at B8 of FIG. 14B of the drawing.

The structure of the timing and counting arrangements operative during the T2 and T3 intervals comprise counter 1, counter 2, and counter 3 together with the program sequences and loops beginning at B9 of FIG. 14B which sequences and loops comprise the structure of the corresponding sections of the ROM storage. These sequences and loops together with the computer determine the T2 and T3 times.

The program sequences employed to derive the raw weight from the T2 and T3 times are shown in the drawing beginning with block 14B22 of FIG. 14B and extend through block 14C11 of FIG. 14C.

The operation of the exemplary embodiment of the invention is now described with reference to the flow chart diagrams of FIGS. 14A-14Z. The first two digits of the alphanumeric reference numerals for the individual steps of the operation are the Figure numbers on which the particular steps are illustrated. The latter alphanumeric digits refer to the particular step in that Figure. The labels which are shown in parentheses on the drawings are the labels used in the program and therefore provide cross references to the appended program listing.

MAIN PROGRAM POWER-UP

The power-up sequence is an initialization sequence which is performed when power is first applied to the central processor or there is an interruption of power to the central processor.

During step 14A2 various registers within the computer are cleared to an initial state to provide a known starting state for the operating sequence.

After the main program power-up sequence the operating sequence then proceeds to the X10 CLEAR sequence beginning at step 14E1 which causes a clearing operation to take place with respect to the tare and auto-zero. The operating sequence then proceeds to the output sequence beginning at 14M19.

The main program then advances through the remaining sequences shown in FIG. 14M and then transfers to the sequences of FIGS. 14N and 140 and through the various sequences of FIG. 14P through 14P15. These output and printer sequences are analogous to the output sequences such as described in the above identified patents and applications. The main program then advances through the various keyboard sequences or routines beginning at 14P16. If no key is operated the program transfers to T19 of FIG. 14T and then to A8 assuming no verifying operation.

Upon transfer to block 14A8 via transfer A8, the various control and mode switches are scanned and the various registers in the RAM 911 conditioned or set in accordance with the condition of the various control and mode switches. These various operations are designated in blocks 14A8 through 14A11. These operations and the operations relating to the scanning and response to the keyboard digit keys are analogous to the corresponding operations described in the above patents and applications incorporated herein.

In the beginning under the assumed conditions, the digit timer was previously or already zero so control transfers from block 14A11 via transfer A15 to block 14A15.

Beginning with block 14A15, the read weight sequence of operations VI is perfomed in which the analog to digital conversion in accordance with the present invention is accomplished.

At the beginning of the read weight sequence of operations, a find scale capacity subroutine is performed. This subroutine is illustrated on FIG. 14V. It performs the interrogation of RAM registers 043 and 044 to determine what scale capacity is selected and returns to the main program data which is dependent upon which capacity is selected.

Referring to FIG. 14V, at step 14V1, the arithmetic scratch pad register 01A-01F is cleared and flag 1, i.e., flip flop 825 of the CPU 210 is set to make an initial assumption that the 15 kilogram scale is not selected. Similarly, the carry register 812 of the CPU 210 is set for an initial assumption that the 6 kilogram scale is not selected.

Then, in step 14V2, the 30 lb. enable RAM register 043 is examined to determine whether the 30 lb. scale is selected. If it is, operation jumps to step 14V6. However, if it is not, the carry is then reset in step 14V3 to assume that the 6 kilogram scale is selected. Then, in step 14V4 the 6 kilogram enable register RAM 044 is examined to determine whether the 6 kilogram scale is selected. If it is, operation jumps to step V6. However, if it is not, the carry register is set and flag 1 is reset to note that the 15 kilogram scale is selected.

Then, at step 14V6, the flag 1 (FF825) and carry register 812 are used to load into the X register 813 of the CPU 210 a 5 if the 15 kilogram scale was selected, a 3 if the 30 lb. scale is selected and a 6 if the 6 kilogram scale is selected. In step 14V7 there is loaded into the accumulator 810 a 5 if the 15 kilogram scale was selected, a 1 if the 30 lb. scale is selected, and a 2 if the 6 kilogram scale is selected. Then, in step 14V8 the address DD1A of the arithmetic scratch pad register ARI is loaded in the BL section of the address register 814 and operation returns to the next order in the sequence of operations at which the find scale capacity sequence of operations was called.

Referring now again to FIG. 14A, data returned in this manner is then used in steps 14A16 through 14A22 to set up a timing sequence for providing the time interval during which the analog weight signal is integrated as part of the analog to digital conversion.

In the exemplary embodiment of the present invention three, four bit, digital timers are employed; a "Long Timer" in RAM register 00A, a "Mid Timer" in RAM register 009, and a "Short Timer" in the accumulator and initialized to the values shown in steps 14A17, 14A20, or 14A22. These timers are then processed according to the subsequently described timing subroutines in order to provide the desired integrating time interval T.sub.1 illustrated in FIG. 12.

Although a single timer register having sufficient bit capacity could be used to provide the desired time interval, it is advantageous to use the short, mid and long timers described above.

As an example, if the scale has been set or conditioned to operate as 6 kilogram scale, the long timer 00A, is set to a 15 state, the mid-timer 009, is set to its 3 state, and the short timer in the accumulator is set to a 9 state.

After loading this initial timing data into the long, mid and short timers, the CPU 210 at step 14B1 switches the transistor 94 (FIG. 4) of the switching circuit 50 to its conduction state in order to apply the analog weight signal to the integrator circuit 51 and begin the integration.

The delay subroutine at step 14B2 then uses the previously loaded long, mid and short timers to provide the desired time-delay such as T.sub.1. This delay subroutine comprising a counting and timing program loop of instructions is illustrated in detail on FIG. 14W.

Referring now to FIG. 14W, upon entry into the delay subroutine at step 14W1, the four bit contents of the midtimer is loaded to register X813 of the CPU. The four bit contents of the short timer is then loaded at step 14W2 into the accumulator and decremented. The timer is checked at step 14W3 to determine whether it had previously been 0. If it was not 0, then at step 14W4 a 105 microsecond delay is obtained by causing the CPU 210 to perform some instructions causing the CPU to count cycles for the purpose of gaining the delay. Thereafter, the sequence of operation loops back again to step 14W2. Operation continues to loop through these 14W2 through 14W4 steps until the short timer is decremented to zero. Thus, it will loop through these steps a number of times equal to the number initially loaded into the short timer.

When a 0 is detected in step 14W3, the operation jumps to step 14W6 in which the mid-timer is loaded into the accumulator and decremented. The contents of the mid-timer is then checked at step 14W7 to determine whether it was a 0. If the mid-timer was not 0, a 1.3 millisecond delay is provided by setting the short timer to a 12 state and looping back to step 14W2. This causes the operations to loop through steps 14W2, 14W3, and 14W4 twelve tmes until the short timer again is decremented to 0.

Thereupon, steps 14W6, 14W7, and 14W8 will again be performed and the entire procedure repeated until the midtimer was found to be 0 at step 14W7. Upon finding the midtimer to be 0 at step 14W7, the operation jumps to step 14W10 which sets up a 14.3 millisecond time delay by loading an 11 state into the mid-timer. The previously set long timer is then loaded into the accumulator at step 14W11 and is decremented. Then, at step 14W12, the timer is checked to determine whether it was previously 0. If the long timer was not previously 0, operation loops back to step 14W8 and then to step 14W2 and repeats the previously described loop until operation arrives again at step 14W12 and finds that the long timer was decremented to zero. This will signify that the entire selected time delay such as T.sub.1, during which the analog signal was integrated has expired and operation can return to step 14B3 of FIG. 14B.

Returning to FIG. 14B, at step 14B3, the timing loop counters which are going to be used during the time intervals for integrating the reference DC source are cleared. The discrete outputs of the CPU 210 are disabled and the state of the output 102 of the threshold detector 53 is examined.

If, during the first integrating interval T.sub.1 then (See FIG. 12), the output of the integrator 51 becomes opposite in polarity from the initial level V.sub.0 along a slope such as S.sub.D to a level such as V.sub.3 such output represents a negative raw weight of relatively large magnitude. This might happen if the platter were removed if an operator lifted up on it. It will immediately cause the output of the threshold detector 53 to switch to its low state. If the comparator is found to be in a low state at step 14B5, then this indicates at step 14B6 that a large negative raw weight was detected and therefore all the discrete outputs of the CPU are enabled and operation jumps to step 14E14 at FIG. 14E and then to step 14M10. This results in skipping of many intermediate operations which check, filter, correct, or otherwise process the raw weight and which would not be meaningful with such negative weight data.

However, if a positive raw weight is found in step 14B5 such as would result from the integration along slope S.sub.1 to V.sub.1, operation proceeds to step 14B8 which stops the integration of the analog signal by switching transistor 94 to a non-conducting state and begins the first reference source integration, such as time interval T.sub.2, by switching the transistor 95 of FIG. 4 to its conducting state.

Steps 14B9 through 14B11 form the interrogation and counting cycle or instruction loop for the integration of the comparator or threshold detector during the T.sub.2 integration time of the first reference DC source. During each instruction loop, the output of the threshold detector 53 is periodically interrogated and a counter is incremented each time the output of the comparator has not changed sign. This counting for both the first and second reference DC source integrating intervals T.sub.2 and T.sub.3 is done in three, four-bit counters, one counter for each of three hexadecimal digits.

While each of these three, four-bit counters could be formed in three, four-bit RAM registers, it is more convenient to form them in the save register 817 forming a part of the CPU 210 illustrated in FIG. 9. The twelve bits of the save register 817 comprise three, four-bit counters referred to as counter 1, counter 2, and counter 3. This is convenient because the Rockwell PPS-4/2 CPU has an instruction, with the mnemonic CYS, which cycles the save register 817 and the accumulator. This convenient instruction provides a four-bit right shift of the save register 817 with the four-bits which are shifted off the right end of the save register 817 being transferred to the accumulator and with the contents of the accumulator being transferred into the left end of the save register 817.

As shown in steps 14B9-14B11, the counting begins by setting the carry register 812 of the CPU 210 (FIG. 9) to its 1 state. That carry is added to the contents of counter 1 with the results placed in counter 1. Then any carry generated from counter 1 is added to the contents of counter 2 with the result placed in counter 2. Then any carry produced by counter 2 is added to the contents of counter 3 and the result placed in counter 3.

At step 14B10, the output 102 of the threshold detector is then loaded to the accumulator and examined in step 14B12 to determine if it is yet low, that is whether the V.sub.o level has been crossed. If the comparator is not low, operation then loops back to step 14B9 where it passes again through steps 14B9-14B11. Each pass through this loop requires 65 microseconds using the specific selected CPU instructions. Operation continues to loop through steps 14B9-14B11 until the comparator is found at step 14B11 to have switched to its low state. This indicates that the output of the integrator circuit 51 has crossed its initial voltage level V.sub.o.

An additional 65 microsecond delay is then provided at step 14B12 to extend the second integrating time by the interval T.sub.2C shown on FIG. 12 and described above. Then, at step 14B13, transistor 95 of FIG. 4 is switched to its non-conducting state to halt the integration of the first reference DC source.

The count contained in the three timing loop counters for the second integrating time interval T.sub.2 is then stored in the scratch pad registers 70, 71, and 72 of the RAM memory and the counters (the SA register 817) are cleared for reuse. Then at step 14B15, the third timing interval T.sub.3 illustrated in FIG. 12 is begun by switching the transistor 96 of FIG. 3 to its conducting state to apply the second reference DC source to the integrator circuit 51.

Then steps 14B16, 14B17, and 14B18 provide an interrogation and counting cycle or loop of steps 14B9-14B11. While the steps of the T.sub.3 counting loop are not identical with the steps of the T.sub.2 loops, they require the same overall time of 65 microseconds. During each pass through this T.sub.3 cycle, the output 102 of the threshold detector 53 is examined to determine whether it has returned to its high state. So long as it has not, operation continues looping through the T.sub.3 interrogating and counting cycle of steps 14B16-14B18. However, whenever in step 14B18 the output 102 has found to have shifted to its high state, then at step 14B19, the transistor 96 (FIG. 4) is turned off to stop the integration of the second reference DC source and the integrator 51 is reset by switching the transistor 97 to its conducting state.

Then, at step 14B20, the contents of counter 1 and counter 2 of the T.sub.3 counters is stored in RAM memory register spaces 73 and 74. At step 14B21, the scratch pad memories (i.e., register spaces 01A through 01F) illustrated in FIG. 13 are cleared for subsequent use.

Thus the contents of each four-bit register 70, 71, 72, 73, and 74 now represents a hexadecimal digit of the T.sub.2 and T.sub.3 count which in turn represent the raw weight on the scale. Next these counts are converted to decimal notation and then finally to raw weight increments. This is begun in step 14B22 by multiplying the contents of register 72 (which has stored in it the most significant hexadecimal of the T.sub.2 count) by 256 and moving the result to the weight register 02A through 02F illustrated in FIG. 13. Then, at step 14C1, the weight sign is cleared and the temporary scratch pad register is again cleared. The contents of register 71 (which has stored in it the next most significant hexadecimal of the T.sub.2 count) the T.sub.2 counter is multiplied in step 14C2 by 16 and the result moved to the arithmetic scratch pad register illustrated in FIG. 13. Then, at step 14C3, the results of these two multiplications are added together with the result being moved to the weight register. Then, at step 14C4 the least significant hexadecimal digit of the T.sub.2 count is converted to decimal form and added to the sum in the weight register. At 14C5 the resulting total is placed in the weight register and represents the total count during time interval T.sub.2 in decimal digits. The arithmetic scratch pad register is then cleared. While the digits of this decimal number are different from the digits of the hexadecimal number, both numbers represent the same number of counts or cycles obtained during the T.sub.2 interval and each count represents 32 raw weight increments.

The decimal conversion of the T.sub.3 count then begins at step 14C6 by moving the contents of register 74 (which has stored in it the most significant hexadecimal digit of the T.sub.3 count) to the arithmetic register. As stated previously, the reference signal level during time interval T.sub.3 is 1/32 the reference signal level which is integrated during time interval T.sub.2 and therefore each count during time interval T.sub.2 represents 32 times as much as analog weight signal (i.e., 32 raw weight increments) as does each T.sub.3 count. In order to eliminate the effect of the additional 65 microsecond delay provided at step 14B12 during time interval T.sub.2, (one additional T.sub.2 count) 32 counts are subtracted from the T.sub.3 count in step 14C6.

Conversion of the T.sub.3 count to decimal form then proceeds at step 14C7 by multiplying the result of the subtraction in step 14C6 by 16 and moving the result to the temporary scratch pad register (FIG. 13). The arithmetic register is also cleared and in step 14C8 the low digit of the T.sub.3 count is moved from register 74 (FIG. 13) to the arithmetic register and converted to decimal form. The result of the multiplication in step 14C7 which is stored in the temporary scratch pad register and the result of the decimal conversion of step 14C8 which is stored in the arithmetic register are then added together in step 14C8 to represent the total counts (raw weight increments) during time interval T.sub.3 reduced by 32 counts to compensate for the 65 microsecond delay as described above.

Because each T.sub.2 count represents 32 times as much analog weight signal amplitude as each T.sub.3 count, at step 14C9 the total of the T.sub.2 counts is multiplied by 32 and the result is moved to the weight register. Then, at step 14C10 the T.sub.3 count is subtracted from the T.sub.2 count in order to provide the net number of raw weight increments. This final number of raw weight increments, which is proportional to the sum of the weight on the scale platter and the analog offset, is then moved in step 14C11 to the weight register and is referred to as the raw weight.

PROCESS WEIGHT

In the process weight operation VII, the presence or absence of platter motion if first detected and noted, the digital weight data resulting from step 14C11 is then filtered or updated, the appropriate initial analog offset is digitally subtracted and finally the "x10 EXPAND" operations are performed if that mode is selected.

The detection of motion begins at step 14C12 with the subtraction of the filtered weight, which represents a previously detected and processed weight which was stored in the filtered weight register during a previous pass through an operation sequence cycle. It is subtracted from the most recently detected raw weight resulting from step 14C11. The sign of the result of this subtraction is moved to the arithmetic sign register 019 in step 14C13.

In step 14C14, a determination is made whether the result of the above substraction is less than or equal to five raw weight increments. If this result is less than or equal to five raw weight increments, then this is accepted as one detection of a no motion condition and operation goes to step 14C17 wherein a fifteen is loaded into the accumulator and then added to the motion flag to decrement the motion flag. It will be recalled that the motion flag is a three state flag which required two detections of no motion prior to concluding that no platter motion exists. Consequently, at step 14C18 the motion flag is examined to determine whether it had decremented to zero. If the motion flag had already been zero, then no motion existed for the last two passes through the operational sequence cycle and consequently operation proceeds to step 14C22. However, if the flag was not already zero, then operation advances to step 14C19.

If at step 14C14 the result of the subtraction was found to be greater than 5 counts, then a motion condition exists so in step 14C15 a two is loaded into the accumulator for purposes of subsequently setting the motion flag to its two state and operation proceeds to step 14C19.

At step 14C19 the motion flag is updated with either the 2 from step 14C15 or its decremented state from step 14C17. Then, at step 14C20 the output filter counter is set to its three state to indicate that new weight data has been detected. The recompute flag is also set to indicate that new price computations must be made subsequently and operation advances to step 14D5.

However, if at step 14C18 the motion flag was found to have been zero, so that a no motion condition was found to exist, then the initial raw weight filtering operation will occur at step 14C22. The purpose of raw weight filtering is to eliminate the effects of noise and random data shifts. In step 14C22 the least significant digit of the most recently detected raw weight from step 14C11 is written into RAM register 035. The least significant digit of the previously detected weight count is written into RAM register 034. Then, using the most recently detected raw weight and the two previous raw weights, a determination is made at step 14D1 whether the least significant digit of the second previous detected raw weight is equal to the least significant digit of the first previous raw weight. If these are not equal then the filtering operations must be performed beginning in step 14D3. If, however, at step 14D1 these digits are found to be equal, then at step 14D2 a determination is made whether the least significant digit of the first previous raw weight is equal to the least significant digit of the most recently detected raw weight. If these are not equal, then filtering must be performed beginning at step 14D3. However, if the least significant digits are found to be equal in both steps 14D1 and 14D2, filtering may be skipped and operation jumps to step 14D5.

The filtering operation which begins at step 14D3 consists essentially of forming a new filtered weight by adjusting the most recently detected weight toward the previously detected and modified weight which is stored in the filtered weight register (FIG. 13). The most recently detected raw weight is adjusted toward the previously filtered weight by one count more than one half the difference between the previously filtered raw weight and the most recently detected weight. Therefore, in step 14D3 the least significant digit of the difference between the most recently detected weight and the previous filtered weight is divided by 2 and then the integer part of the result added to 1.

If in step 14D3A this difference divided by 2 is found to be 0 (i.e., if the difference was 0 or 1, then the filtered raw weight is written into the weight register (FIG. 13).

However, if the difference is not 0 or 1 then at step 14D4 the most recently detected raw weight is adjusted toward the previously filtered weight by 1 count more than 1/2 the least significant digit of the above difference. This is then treated as a new filtered raw weight and is first moved to the weight register. Then, in step 14D5 this weight is moved to the filtered weight register to provide an updated filtered raw weight for subsequent use.

It was previously described that potentiometer 76 is adjusted to provide a fixed analog offset under no weight conditions. Therefore, this initial offset must be removed from the detected raw weight data. This is done in steps 14D6 through 14D14. However, because a different analog signal integrating time interval is used for different scale capacities and the load cell output voltage is interpreted differently for different capacities, a different number must be subtracted from the raw weight of each scale capacity.

Therefore, in step 14D6 the find scale capacity subroutine of FIG. 14V is performed which returns the data described above. The returned data is used to set the arithmetic scratch pad register to 003700 if the 6 Kg scale capacity is selected, to 001600 if the 15 kilogram scale capacity is selected, and to 001700 if the 30 pound scale capacity is selected.

After the arithmetic scratch pad register is set to one of these three numbers, which is the analog offset expressed in raw weight increments for the particular scale capacity selected, then in step 14D14 the chosen number of raw weight increments is subtracted from the raw weight and the result is moved to the weight register.

In step 14D15 a check is made to determine whether the "x10 EXPAND" mode has been selected. If it is not, which is the usual situation except when servicing, etc., operation jumps to step 14E3.

However, if the "x10 EXPAND" mode has been selected, a determination is made at step 14D16 whether the raw weight is less than or equal to 2 raw weight increments. If it is, operation proceeds to step 14D17 in which an 8 is loaded into the accumulator for subsequent use in turning on the zero lamp to indicate that the scale is zeroed. If, however, the weight is found to be greater than 2 raw weight increments, then operation proceeds to step 14D19 in which a 0 is loaded into the accumulator for subsequently turning off the zero lamp to indicate that the scale is not zeroed.

After steps 14D17 or 14D19, operation proceeds to step 14D20 in which the 0 or 8 from the accumulator is loaded into the zero lamp register 021 (FIG. 13) for later use in control of the zero lamp. Also flag 2, 825, of the CPU 210 illustrated in FIG. 9 is set to note that the "x10 EXPAND" mode has been selected. This flag is used in step 14D21 which is the subroutine for updating the output weight.

In the Update Output Operation XVII of step 14D21, the five most or five least significant digits of data in the weight register (FIG. 13) are moved to the output weight register (FIG. 13) unless a negative weight is found or the 300 printer enable mode 10 is selected. If either of these two latter conditions exist, operation jumps to the weight blanking sequence of operations beginning at step 14E14.

Referring in detail to the Update Output Weight operation in FIG. 14X, at step 14X1, the computer is set up to check the five most significant digits of the weight register for all zeroes and flag 1 of the CPU 210 is set. Then, in step 14X2 flag 2 of the CPU 210 is checked to determine whether it is set to indicate the normal mode of operation or whether it is reset to note the "x10 EXPAND" mode of operation. If flag 2 is found to be reset, then in step 14X3, the previous step 14X1 set up is changed to set up to check all 6 weight register digits as is appropriate for the "x10 EXPAND" mode. Otherwise, if flag 2 is found to be set in step 14X2, operation proceeds directly to step 14X4.

In step 14X4, the digits are checked to determine if they are all zero. If all digits are found to be zero, then in step 14X5 flag 1 of the CPU 210 is reset to note that the weight is zero. If, however, the digits are not all zero, then operation proceeds directly to step 14X6.

Then, in step 14X6, the weight register sign data is decremented to 15 if it is a plus and to 14 if it is a minus. Additionally, the carry is set if it is a minus. In step 14X7, the registers are set up to address the most significant digit of the 5 digit weight for the normal mode of operation. Then in step 14X8 flag 2 is interrogated to determine whether it is set to indicate a normal mode of operation. If it is set, operation jumps directly to step 14X10. However, if flag 2 is not set, then the "x10 EXPAND" mode is selected and the next lower significant digit is addressed for the "x10 EXPAND" mode.

In step 14X10, the weight is interrogated to determine if it is 0. If the weight is not 0 then a 15 is loaded into the appropriate digit position so that the negative sign is not displayed for a zero weight. If, however, a non-zero weight is detected at step 14X10, then operation proceeds to step 14X12.

In step 14X12 the proper sign is placed in the proper position and in step 14X13 the removed weight digit is examined to determine whether it is zero. If it is zero, operation jumps to step 14X17. If it was not zero, the digit is returned to the proper position in step 14X14 and the sign is forgotten. Then in step 14X15, the weight sign is examined. If the weight sign was minus, operation loops back to the blank weight step 14E14. If, however, the sign was not minus, then RAM register 040 is interrogated in step 14X16 to determine whether the Toledo Scale 300 printer is enabled. If the 300 printer is enabled, the operation loops back to the blank weight step 14E14 because the 300 printer cannot accommodate the required number of significant digits. If the 300 printer is found in step 14X16 not to b