Abstract:
A method and apparatus for determining a representative average weight reading is disclosed, based on a series of weight readings from a scale subject to vibrations. Signals are generated at regular intervals, representative of the weight readings from said scale. Each new weight signal is compared with the previous weight signal, and one of two alternative labels is assigned to each new weight signal according to whether it is greater or less than the previous weight signal, and the opposite of the previous label is assigned if the signals are equal. The weight signals occurring in a weight averaging interval, which extends from a label change in one direction to the next label change in the same direction, are then averaged.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to a weighing scale with reduced susceptibility to vibration. 
     In a typical load-cell scale, an analog voltage from the load-cell element of the scale is filtered by a low-pass analog filter and sampled at regular intervals by an analog-to-digital converter. The resultant digital signals are transmitted to circuit means for computing the weight and performing various other functions, such as calculating price. 
     When a weight is placed on the scale (or removed from it), successive digital signals initially increase (or decrease) continuously for a short time. In the absence of mechanical vibration and electrical noise, the value of these digital signals eventually becomes constant, and the scale is then said to be &#34;out of motion&#34;. Computations of the weight of the object on the scale are based on this final constant value of the weight signal. The determination of when the scale is out of motion is particularly important in preventing weighing errors due to premature transmission of signals to a utilization device such as an electronic cash register (ECR) or printer. 
     If the scale is subject to vibration at frequencies which are passed through or only partially attenuated by the analog filter, successive digital signals may continue to fluctuate in an oscillatory manner after the initial unidirectional variation has ceased. In order to weigh the object on the scale it is then necessary to identify the constant value of the signals underlying the fluctuations. The &#34;out-of-motion&#34; condition is then redefined as existing when the variation in the successive signals has become small enough to permit such identification of the constant underlying value. 
     When signals of constant magnitude recur with sufficient frequency, a limited number of intervening signals which deviate slightly from the constant value can be ignored, and the constant or targe value of the remaining signals identified. In combination with the analog filter, this affords a limited amount of protection against moderate vibration. 
     U.S. Pat. No. 3,921,736 discloses a motion detector in which a weighing scale (not necessarily a load-cell scale) is designated as being in motion when a specified number of signal magnitude changes occur in one direction without an intervening change in the opposite direction. This criterion is applied without regard to any intervening signals which have the same magnitude as their predecessors. This prior art device can similarly afford a limited degree of protection against moderate vibration when used with a suitable low-pass filter or with a scale having appreciable mechanical damping. 
     However, with either of these approaches, a representative target value cannot be identified in the presence of substantial vibration, and therefore an accurate value of the weight cannot be computed unless the response of the scale is very sluggish. 
     In some commercial applications, for example, supermarket scales, rapid response of the scale when a weight is placed on it is also an important requirement. Indeed, competition of the market place impedes minimum acceptable standards of weighing speed, and there is a demand for faster weighing capabilities. Thus, the extent to which the vibration-susceptibility of a scale can be reduced by reducing the range of frequencies transmitted by the low-pass analog filter is limited by the fact that this also reduces the speed of response when a weight is placed on the scale. 
     For example, in one commercial supermarket scale in which the analog filter was designed to provide the best compromise between vibration susceptibility and weighing speed characteristics, a steady weight reading may be obtained in about 0.5 to 1 second (depending on the magnitude of the weight applied) when the scale rests on a rigid, vibration-free surface, such as a concrete floor. On a table or laboratory bench, this time required to reach an accurate weight is increased by up to a factor of 2 or 3 due to the vibration induced in the table by the application of the weight. In the presence of significant externally-induced vibration having a frequency below 10 Hz, it is not possible to achieve a steady weight reading at all. 
     The demands of the market place require the development of scales having even faster speeds of response. In such scales, the analog filter will afford even less protection against vibration. 
     SUMMARY OF THE INVENTION 
     This invention relates to a method and apparatus for enabling a load-cell scale to yield a steady accurate weight reading even in a severely vibrating environment. Alternatively, in a moderately vibrating environment, the invention permits the use of a faster analog filter (i.e., a filter having higher cut-off frequency), thus reducing the time required to reach an accurate weight reading after the application of a weight to the scale. 
     Furthermore, a scale incorporating the present invention may be operated on a non-rigid surface in a moderately vibrating environment with relatively little reduction in weighing speed compared with the weighing speed on a rigid surface. 
     This invention achieves these improvements by enabling the scale to identify an out-of-motion condition and to yield a steady weight reading even when the output voltage from the analog filter is oscillating with moderately large amplitude. 
     As an initial step in processing the signals, the present invention distinguishes between unidirectional and oscillatory variations in the digital signals developed by the analog-to-digital converter from the filtered output voltage of the load cell. Unidirectional motion is identified by the occurrence of a specified number of consecutive changes in the signal magnitude all occurring in the same direction. This differs from the method of detecting motion in U.S. Pat. No. 3,921,736 in that in the present invention successive identical signals are treated as representing reversals in the direction of change, whereas they are disregarded in the motion detector described in the above patent. 
     When this test does not indicate the occurrence of unidirectional motion or when unidirectional motion ceases to occur, the successive signals may either vary in an oscillatory manner (i.e., consist of an oscillatory component superimposed on a constant or slowly-varying underlying signal), or they may be constant. Under these conditions, groups of successive signals are averaged, and successive averages are compared. Rather than averaging an arbitary number of signals, which might result in the inclusion of one or two signals from a partial cycle, not necessarily symmetrically arranged about the underlying constant signal value, or averaging a large number of readings, which would therefore be needed to achieve the required degree of accuracy and which would be prohibitively time-consuming, the present invention selects the groups of signals to be averaged in a special manner. In the present invention, each group of digital signals to be averaged consists of all the digital signals derived from one complete cycle of the oscillating analog signal. In this way, a high degree of accuracy is achieved by averaging a relatively small number of signals. 
     These groups of signals are identified by comparing each new digital weight signal with the previous digital weight signal and assigning one of two contrasting labels to the new weight signal, depending on whether it is greater than, less than, or equal to the preceding signal. For convenience, the labels will be referred to as positive (+) and negative (-). However, any other pair of labels, for example, 0 &amp; 1, A &amp; B, yes &amp; no, up &amp; down, black &amp; white, etc., could equally well be used without changing the nature of the invention. In using positive and negative labels, it must be understood that a negative label does not confer a negative value on the signal.) Thus, if the new weight signal is greater than the previous signal, then a positive label (+) is assigned to it; if less, a negative label (-); and if equal to the previous signal, a sign opposite from the previous label is assigned to it. 
     A weight-averaging interval, corresponding to one complete cycle of the oscillating analog signal, then extends from a sign change occurring in one direction to the next sign change occurring in the same direction (with one intervening sign change in the opposite direction). 
     In the preferred embodiment of the invention, a counter is employed to count the number of digital weight signals occurring during the weight-averaging interval. An addition register totals the magnitudes of the weight signals which are generated during this weight-averaging interval, and means are employed to divide the accumulated total by the number of weight signals occurring during the weight-averaging interval. 
     This invention therefore provides a method and apparatus for identifying a representative average weight reading from a series of weight readings from a scale when it is subject to vibrations (as well as when it is not subject to vibrations). The method in its simplest form comprises the following steps: 
     (a) Generating weight signals representing the output of the scale at regular intervals, 
     (b) comparing each new weight signal with the previous signal and assigning one of two labels to each new weight signal according to whether it is greater or less than the previous weight reading, the opposite of the previous label being assigned if the weights are equal, and 
     (c) averaging the weight signals occurring in a weight averaging interval which extends from a label change in one direction to the next label change in the same direction. 
     More specifically, the method may include the following additional steps: 
     (d) Designating the scale as being in unidirectional motion if more than a specified number of signals all having the same label have been received, 
     (e) if not in unidirectional motion, counting the number of weight signals occurring in a weight-averaging interval extending from a label change in one direction to the next label change in the same direction, 
     (f) accumulating a total of the weight signal magnitudes generated during the weight-averaging interval, 
     (g) dividing the accumulated total of the weight signal magnitudes by the number of weight signals occurring during the weight-averaging interval, thereby to provide an average weight reading, and 
     (h) comparing successive averages to determine whether the scale is out of motion. 
     It is therefore an object of this invention to provide a method for determining a representative average weight reading based on a series of weight readings from a scale subject to vibrations comprising the steps of generating signals at regular intervals representative of the weight reading from said scale, and averaging the weight signals occurring during one complete vibrational cycle, or integral multiple thereof. More specifically, the step of averaging includes comparing each new weight signal with the previous weight signal, assigning one of two alternative labels to each new weight signal according to whether it is greater or less than the previous weight signal, assigning the opposite of the previous label if the signals are equal, and averaging the weight signals occurring in a weight averaging interval which extends from a label change in one direction to the next label change in the same direction. 
     It is a further object of this invention to provide an apparatus for determining a representative average weight reading from a series of weight readings from a scale subject to vibrations comprising means for generating signals at regular intervals representative of a weight placed on said scale, means for comparing each new weight signal with the previous weight signal, means for assigning one of two alternative labels to each new weight signal according to whether it is greater or less than the previous weight signal, and for assigning the opposite of the previous label if the signals are equal, and means for averaging the weight signal occurring in a weight averaging interval extending from a label change in one direction to the next label change in the same direction. 
     Other objects and advantages of the invention will be apparent from the following description, the accompanying drawings and the appended claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is an electrical block diagram showing the basic components which make up that portion of a load-cell scale incorporating the present invention; 
     FIG. 2 is a block diagram of the major items of information storage used in the scale-in-motion and weight averaging circuit; 
     FIG. 3 is a memory map which identifies the locations within a random access memory of the various components shown in FIG. 2; 
     FIG. 4a is a chart showing weight readings with respect time when a weight has been placed upon the load-cell; 
     FIG. 4b is a chart showing weight readings which are oscillating due to vibrations applied to the scale; 
     FIG. 4c is a chart showing a steady state series of weight readings; produced by a constant scale output. 
     FIGS. 5a-5h together comprise a flow chart illustrating the decisions which are made by the circuits shown in FIGS. 1 and 2 in deriving a scale-in-motion output and an average weight reading; 
     FIG. 6 illustrates the arrangement of FIGS. 5a-5h. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to the drawings which illustrate a preferred embodiment of the invention, and particularly to FIG. 1, a load-cell scale 10 includes a load-cell 20 on which a weight 25 may be placed. The output of the load cell 20 is an analog voltage which is applied through an amplifier 30 and filter circuit 40 to an analog-to-digital (A-D) converter circuit 50. The A-D converter 50 samples the analog signal at regular intervals and supplies a digital representation of the scale output to a scale-in-motion and weight averaging circuit 50. The output of the circuit 60 is an average reading corresponding to the weight on the load cell and an in-motion or out-of-motion decision. A reading corresponding to zero weight must be subtracted from the average reading in order to compute the weight. 
     The scale-in-motion and weight averaging circuit 60, shown more completely in FIG. 2, includes a microprocessor 70, a program read-only memory (ROM) 80, and several other components defined within a random-access memory (RAM) 90 which functions under the control of the microprocessor. These components include a scale-in motion indicator 101, an optional matching average counter 102, a half cycle counter 103, a full cycle counter 104, a phase indicator 106, a first cycle indicator 107, a unidirectional motion indicator 108, a sign indicator 109, an average weight register 111, a present weight signal register 112, an addition register 113, a temporary register 114, a secondary target register 116, a primary target weight register 117, a previous weight signal register 118, an A-D reading counter 119, a state code register 120, a mode indicator 121, a check flag register 122, and an update indicator 123. 
     FIG. 3 is a memory map showing the locations of the components 101-123 of the scale-in-motion and weight averaging circuit 60 within the random access memory 90. Each memory component in FIG. 2 is labelled with the address of the corresponding memory location(s) in FIG. 3, in the form X:Y for a single 4-bit location, X:Y 1  -Y 2  for a group of adjacent 4-bit locations, and X:Y,N for a single bit (bit N) within a memory location. 
     In analyzing the sequence of digital signals developed by the A-D converter from the filtered output voltage of the load cell, this circuitry first distinguishes between unidirectional variations (as illustrated by FIG. 4a) and oscillatory variations (as illustrated by FIG. 4b). When the signal variation is oscillatory in character, groups of successive signals are averaged and the successive averages are compared. 
     Each group of digital signals to be averaged consists of all the digital signals derived from one complete cycle of the oscillating analog signal (See FIG. 4b). In this way, a high degree of accuracy is achieved on the basis of a relatively small number of signals. 
     A determination of whether the scale is in motion or out of motion is then based on comparison of the successive averages using one of a number of possible alternative criteria which are described later. 
     For the purposes of this invention, one cycle is defined as the interval between two successive maxima or between two successive minima in the analog signal, as shown in FIG. 4b. For simplicity, the analog signal is represented as a simple sine wave in this figure. However, in practice, it may often be more complex than this, consisting of a number of underlying sinusoidal components of different frequencies, and thus the resultant signal waveform may not be as regular and symmetrical as that shown in FIG. 4b. Under these circumstances, a cycle is defined as the interval between successive maxima or between successive minima in the overall resultant waveform for the purposes of this invention. This is not necessarily the same as the interval between successive maxima or minima (the duration of a cycle) of any one specific sinusoidal component. If the analog signal is constant so that all of the digital signals are exactly equal to one another, as shown in FIG. 4c, each successive pair of such digital signals is treated as a cycle. 
     The number of digital signals to be averaged is therefore variable. It depends, for example, on the frequency of the vibration to which the scale is subjected and the time interval between successive digital signals. It therefore changes whenever either of these parameters changes. In addition, if the analog signal consists of a number of underlying sinusoidal components of different frequencies, the time interval between successive maxima or minima of the composite signal, and therefore also the number of digital signals to be included in the corresponding average, may vary from one cycle to the next. 
     Even when each successive cycle is of the same duration, the number of digital signals per cycle may vary by one from cycle to the next. For example, if the duration of each cycle were 4.5 times the interval between digital signals, some cycles would generate 4 digital signals and others would generate 5 digital signals. 
     Since the invention identifies each maximum and minimum in the signal variation individually, it is able to recognize these variations in the number of signals to be averaged, and incorporate them in the computation automatically. 
     In this invention, the foregoing analysis of the variation of the incoming digital signals (A,B,C, . . . etc., see FIG. 4), is accomplished in the following manner. Each time a fresh signal is received from the A-D converter, it is compared with the previous signal and labelled. If the new weight signal is larger than the previous signal, a distinctive label, for example a positive label (+) is assigned. If the new signal is smaller than the previous signal, an opposite label, for example, a negative label (-), is assigned. If the new weight signal equals the previous signal, the new label is the opposite of the previous label, (i.e., if the previous label was negative (-), then a positive label (+) is assigned to the new signal, and vice versa.) In the following description, positive and negative labels are used, but it is understood that any pair of alternative (opposite) labels may be used to obtain the same result. In the preferred embodiment of the microcomputer, the labels are actually represented by a bit (sign indicator 109) which is &#34;set&#34; to 1 (corresponding to a negative sign) or &#34; reset&#34; to 0 (corresponding to a positive sign). 
     The sequence of sign labels assigned to the successive readings (i.e., digital signals) is then interpreted as follows: 
     (a) If the scale is in continuous motion in one direction, i.e., weight readings increasing continuously or decreasing continuously (see FIG. 4a), as when weight is applied or removed, all the signs will be the same. In practice, the scale is considered to be in undirectional motion if the number of successive signals all having the same sign label exceeds a predetermined constant C. 
     (b) If the signals are oscillating due to vibration, as shown in FIG. 4b, there will be groups of successive readings, each group consisting of one or more (but not more than C) readings all having the same sign label, but with the sign alternating from one group to the next (e.g.+++---+++---). The number of readings in each group is determined by the frequency of the vibration and the time interval between successive signals from the A-D converter 50. Two successive groups of readings, one having a positive sign label and the other having a negative label, represent one complete cycle of oscillation, and these are the readings to be included in one average. The sign label changes from positive to negative each time a maximum value of the signals occurs, and from negative to positive each time a minimum occurs. Thus, every second change of sign represents the completion of a cycle. 
     (c) If the scale is completely steady, as shown in FIG. 4c, so that successive weight readings are all identical, the sign labels for successive weight signals will alternate between positive and negative (+-+-+-). In this case each group to be averaged is selected just as in the case of an oscillating analog signal and consists of two readings, one with a positive label (+), and one with a negative label (-). 
     The value assigned to the constant C, together with the A-D conversion time interval t between successive digital signals, determines the cutoff frequency f, below which the microcomputer no longer considers the signal to be oscillating, i.e., f is approximately equal to 1/(2 Ct). It also sets a limit on the speed with which the scale can respond to a change in weight. Thus, an optimum value of C can be assigned for any given application, depending on the vibration frequencies to be expected, the speed of response desired, and the conversion speed of the A-D converter. In the preferred embodiment, values of C=7 and t=20 to 40 milliseconds are used. 
     The incoming signals are analyzed, as described above, by the circuitry shown in FIGS. 2 and 3. The weight reading represented by the most recent signal from the A-D converter is stored in register 112. The previous weight reading is stored in register 118. The sign label assigned to the previous weight reading is recorded in register 109. The most recently-computed average of the weight signals is placed in register 111. 
     The previous average or target is stored in register 117. An addition register 113 accumulates the sum of the weight readings to be included in each successive average. 
     A full-cycle counter 104 counts the number of readings which have been received in the current cycle of oscillation. A half-cycle counter 103 counts the number of consecutive signals that have all had the same sign label. 
     A phase indicator 106 indicates whether the most recent signals are associated with the first or second half of a complete cycle. Unidirectional motion, when it occurs, is indicated in register 108. A &#34;first cycle&#34; indicator 107 is set immediately after a period of unidirectional motion to indicate that there is no previous average from a cycle of oscillatory signals with which to compare the average now being computed. 
     In order to analyze the sequence of sign labels, the half-cycle counter 103 is incremented by one each time a signal having the same sign label as the previous signal is received, and is set back to one each time the sign label changes. When the half-cycle count exceeds the predetermined constant C, the unidirectional motion indicator 108 is set, and remains set as long as the succeeding signals continue to have the same sign label. When this condition exists, the scale is always in motion. 
     When a signal having the opposite sign label is eventually received, the unidirectional motion indicator 108 is cancelled, and the first cycle indicator 107 is set. If more than C consecutive readings having the same sign are subsequently again received, the unidirectional motion indicator 108 will be reinstated. However, ordinarily, this change in sign represents the onset of oscillatory signal variation (FIG. 4b) or a constant signal (FIG. 4c). At this time, the circuit 60 begins to accumulate the data which will be needed in order to compute the average of the signals associated with the ensuing cycle of oscillation. Initially, the full-cycle counter 104 and the half-cycle counter 103 are each set to one, the phase indicator 106 is set to indicate the first half of cycle, the addition register or weight accumulator 113 is set to zero, and then the value of the new signal is entered into this register 113. 
     As each subsequent signal is received, it is added to the total in the addition register 113, and the full-cycle and half-cycle counters are both incremented by one. Since the sign label changes twice in each cycle of oscillation, an average is not computed at the next change in sign label. Instead, the phase indicator 106 is changed to indicate second half cycle. (The half-cycle counter 103 is always reduced to one when the sign changes.) 
     The next change in sign label after this represents the completion of a cycle of oscillation (or a pair of signals if the signals are all identical), and is identified by the fact that the phase indicator 106 already indicates the second half of a cycle. The average of the signals included in the cycle is then computed by dividing the contents of the addition register 113 by the contents of the full-cycle counter 104. The latest signal is not included in this average since it is actually the first reading of the next cycle. 
     The addition register 113 is then returned to zero, the value of the latest signal is entered in it, the full-cycle and half-cycle counters are each set to one, and the phase indicator 106 is changed back to indicate first half cycle in preparation for the next cycle of signals. 
     This same procedure is repeated for each successive cycle as long as the half-cycle count never exceeds the predetermined constant C. When the average of the first cycle of signals is computed, it is stored as a target in the primary target weight register 117 (both primary and secondary target registers 117 and 116 if the scale is in the special mode of operation) for future comparison, and the first-cycle indicator 107 is cancelled. As each subsequent average is computed, it is compared with the target (primary target in the normal mode of operation, both primary and secondary targets in the special mode). 
     In the simplest forms of the invention if the difference between the new average weight and the target is equal to or greater than a predetermined limit, the scale is in motion, and the previous target is replaced by the new average. If the difference is less than the predetermined limit, the scale is out of motion, and in this case, the target may or may not be replaced by the new average for future comparison, depending on the particular form of the motion criterion which is being used, and on whether the scale was previously in motion. More sophisticated motion criteria based entirely or predominantly on this comparison of successive averages can also be incorporated into the invention. Some examples will be described later. 
     The averaging procedure is discontinued and the unidirectional motion indicator is again set any time that the onset of unidirectional motion is indicated by the occurrence of a half-cycle count greater than the predetermined constant C. 
     In the course of the foregoing analysis, the scale-in-motion indicator 101 is set or remains set whenever the scale is found to be in motion and whenever the unidirectional motion indicator 108 is set; and the scale-in-motion indicator 101 is reset (i.e., cancelled) or remains reset whenever the scale is found to be out of motion. 
     Reference is now made to the flow chart in FIGS. 5a to 5h illustrates the analysis made each time a new weight signal is received from the A-D converter. The major steps performed in this analysis are also listed chronologically below. 
     First, the new digital weight signal is compared with the previous signal, and a sign label is assigned to the new reading in accordance with the scheme described above. 
     The sign label is then compared with the label already assigned to the previous weight reading and stored in register 109, which is then discarded, and replaced by the new label. 
     If the signs are the same, the half-cycle counter 103 is incremented by one, and checked to see if its count has exceeded the predetermined constant C. 
     If it has not exceeded C, the new weight reading is added to the previous total of the weight readings in the addition register 113, and the full-cycle counter 104 is incremented by one. 
     If the half-cycle count has exceeded C, it is only necessary to set the unidirectional motion indicator 108 and the scale-in-motion indicator 101. (If they are already set, they remain set.) It is not necessary to perform any further computation with the signals received from the A-D converter during such unidirectional motion, since they are not representative of the weight on the scale. However, if desired, the signal may be processed and displayed in any of a number of ways for cosmetic purposes. 
     If the sign label of the new weight signal is opposite to that of the previous signal, the half-cycle counter 103 is set back to one, and the unidirectional motion indicator 108 is checked. 
     If the unidirectional motion indicator 108 is set, then this change of sign represents the end of a period of unidirectional motion. The unidirectional motion indicator is therefore cancelled, and the first cycle indicator 107 is set. The addition register 113 is set back to zero, and the new weight signal is entered in it. The full-cycle counter 104 is set back to one, and the phase indicator 106 is reset to indicate the first half of a cycle. 
     If the unidirectional motion indicator 108 is not found to be set, then the change of sign represents the end of a half cycle of oscillatory motion. The phase indicator 106 is, therefore, checked to determine whether it is the first or second half of the cycle. 
     If it is the end of the first half cycle, the full-cycle counter 104 is incremented by one, the new weight signal is added to the previous total of the weight readings in the addition register 113, and the phase indicator 106 is changed to indicate second half of a cycle. 
     On the other hand, if the phase indicator 106 is found to already indicate second half cycle, then this change of sign represents the completion of a full cycle of oscillation. The average of the completed cycle of readings is then computed by dividing the contents of the addition register 113 by the contents of the full-cycle counter 104. (This average does not include the new weight signal, which constitutes the first reading of the next cycle). The addition register 113 is then set back to zero, and the new weight reading is entered into the addition register to become the first reading of the next cycle. The full-cycle counter is set back to one, and the phase indicator is reset to indicate the first half of a cycle. 
     The first-cycle indicator 107 is then checked to see if this is the first cycle of oscillatory motion following a period of unidirectional motion. 
     If this is a first cycle, then the scale is still in motion since there is no average from a previous cycle with which to compare the new average. The new average is, therefore, simply retained in register 117 for future comparison when another average is subsequently obtained, and the first cycle indicator 107 is cancelled in preparation for that event. 
     On the other hand, if this is not a first cycle (i.e., if the first-cycle indicator has already been cancelled), then the new average is compared with the previous average or with a target average. 
     One of a number of possible criteria, based on the difference between the new average and the previous average, or between the new average and the target, is then used to determine whether the scale is in or out of motion, and to compute the true weight if out of motion. These criteria are applied only when the scale is not in unidirectional motion, since it is always in motion (unidirectional motion) whenever the half-cycle count is greater than the critical value C. 
     Criterion No. 1. In the simplest form of the invention, the new average is compared with the previous average. If the difference between the two averages is equal to or greater than a predetermined limit Δ, the scale is in motion; if the difference is less than Δ, the scale is out of motion, and the current average represents the true weight. A suitably small value is assigned to Δ to achieve the required degree of precision in weighing. This criterion has the disadvantage that if the weight on the platter is increased gradually, motion may not be detected if the rate of increase is small enough. Even though the rate of change must be very small, a considerable total change in weight may build up over an extended period of time without motion being detected. 
     Criterion No. 2. The simple criterion described above can be significantly improved by comparing each successive computed average with a target instead of with the previous average. Whenever the difference between the new average and the target is equal to or greater than the predetermined limit Δ, the scale is in motion, and the target is updated by installing a new target in register 117 equal to the new average. Under these circumstances, each successive average is, in effect, compared with the previous average, as in Criterion No. 1, described above. 
     However, if the difference is less than Δ, the scale is out of motion. Under these circumstances, the target is not updated, but remains constant as long as the scale is out of motion. Its value is established when the scale changes from the in-motion condition to the out-of-motion condition, and is the first of the two averages which are compared at that time. The scale remains out of motion as long as each successive average matches this fixed target within the prescribed limit Δ. It goes back into motion, and updating of the target is resumed, whenever a computed average differs from the fixed target by an amount equal to or greater than Δ. When the scale is out of motion, the target is considered to represent the true weight. 
     This criterion has the advantage that it readily detects the motion associated with slow gradual changes in weight which were mentioned in connection with Criterion No. 1. 
     Criterion No. 2A. A small improvement in the accuracy of the weight computations resulting from Criterion No. 2 can be achieved by updating the target the first time that two successive averages are found to differ by an amount less than Δ after the scale has been in motion. The target still remains constant as long as the scale is out of motion, but its value is equal to the second of the two averages which are compared at the time that the scale changes from the in-motion to the out-of-motion condition, instead of the first. The target is still updated whenever a computed average differs from it by an amount equal to or greater than Δ (i.e., whenever the scale is in motion). 
     Criterion No. 3. Criteria Nos. 2 and 2A can be further modified to ignore a single average which differs from the target by an amount equal to or greater than Δ if the scale was out of motion immediately before the computation of that average. Thus, once the scale is out of motion, two successive averages, both differing from the target by an amount equal or or greater than Δ, are required in order for the scale to get back into motion. This makes the scale less susceptible to transient disturbances of very short duration, such as may occur, for example, when there is a sudden change in the level of vibration to which the scale is exposed. (Of course, the scale always goes into motion immediately if the half-cycle count exceeds the critical value C.) 
     Criterion No. 4. Any of the foregoing criteria can be further modified to require that a number of successive averages must all match the target within the prescribed limit Δ in order for the scale to go out of motion after being in motion. This can be accomplished, for example, by including a matching-average counter 102 in the memory 60. This counter is set back to zero whenever an average is found to differ from the target by an amount equal to or greater than Δ (except when the average is being ignored as described under Criterion No. 3), and is incremented by one whenever the difference is found to be less than Δ. The scale is then considered to be out of motion when the number in this counter equals or exceeds the required number of matching averages. It is considered to be still in motion as long as this matching-average count is less than the required number, even though the currently-computed average may match the target within the required limit. 
     The purpose of this modification is to provide some protection against &#34;thumbweighing&#34; (i.e., incorrect weighing caused by the operator touching the platter with his hand). However, it makes the operation of the scale significantly slower. 
     Criterion No. 5. In certain special situations, there may be reasons for knowing that the first few cycles of oscillation after the end of unidirectional motion are not an accurate representation of the weight on the scale. For example, if a large weight near the capacity limit of the scale is slammed down hard on the scale, it may cause the moving parts to bounce against a stop during the initial oscillations. Alternatively, it may cause the load cell to operate intermittently in an overload condition where its output is non-linear during the first few cycles of oscillation. Under these conditions, the scale might occasionally go out of motion with an incorrect weight reading. 
     This problem can be counteracted by not permitting the scale to go out of motion until a certain number of cycles of oscillation, or a certain length of time, after the end of unidirectional motion if the weight signals exceed a specified magnitude W c . Thus, an A-D reading counter 119 or a timer is started at the moment of transition from unidirectional motion to oscillatory signal variation. Each time an average is subsequently found to match the target within the prescribed limit, the magnitude of the average is compared with W c . If it is less than W c , the scale is out of motion. If it is greater than W c , the cycle counter or timer is checked. If the specified time has elapsed or the required number of cycles of oscillation have occurred, the scale is again out of motion. Otherwise it is still in motion. This significantly reduces the weighing speed for weights greater than W c , but does not affect the weighing speed for weights less than W c . 
     Criterion No. 6. Any of the foregoing criteria can be modified by prescribing alternative limits, Δ 1  or Δ 2 , depending on whether the scale was previously in motion or out of motion. Thus, if the scale is initially in motion, it is considered to go out of motion when two successive averages differ by an amount less than Δ 1 . In the case of Criterion No. 4, the scale would be considered to go out of motion when the required number of successive averages all differ from the target by an amount less than Δ 1 . If the scale is out of motion, it will go back into motion when any average (two successive averages in the case of Criterion No. 3) differs from the target by an amount equal to or greater than Δ 2 . It remains out of motion as long as the difference is less than Δ 2 . 
     This modification, with Δ 2  greater than Δ 1 , may be useful in certain circumstances; for example, when the scale is subject to intermittent mild shocks, which might otherwise cause the scale to go back into motion intermittently under a constant weight. 
     Criterion No. 7. Any of the foregoing criteria can be modified by imposing an additional requirement that the scale cannot be considered to be out of motion if the amplitude of the oscillations (i.e., the difference between the largest and the smallest reading within a cycle of readings) or the difference between any two successive readings exceeds a certain limit L (which can be many times greater than Δ). 
     This modification is related to a special situation where the platter is supported on the scale through a flexible structure which can execute violent and irregular oscillations at low frequencies when a heavy weight is slammed down hard on it, and a fast analog filter (i.e., one with relatively high cut-off frequency) is used. It is intended to prevent incorrect weight readings which might otherwise occasionally occur in this special situation. The acceptable limit L for the difference between the largest and smallest signal within a cycle or between successive signals can be set large enough so that this modification does not have any effect on the operation of the scale in normal circumstances. 
     The preferred embodiment of this invention uses a TMS 1300 MOS/LSI one-chip microcomputer made by Texas Instruments, Inc. A listing of the portion of the program used in this microcomputer to accomplish the objectives of this invention follows. This listing includes both the object code and the source code, together with explanatory comments. This program is stored in the ROM (read only memory) 70. The pages of program are not necessarily executed in numerical order. In the present instance, the execution begins at Chapter 1, page 15, line 2153, and subsequently continues on other pages as indicated by specific branch instructions. It ends at Chapter 1, page 6, line 1433. ##SPC1## ##SPC2## 
     In the normal operating mode of this embodiment, Criterion No. 2A with Δ=±11/2 counts, together with the modifications described in Criteria Nos. 5 and 7, are used to determine whether the scale is in or out of motion and to control the updating of the primary target. (A count is the smallest possible increment in the digital signal from the A-D converter; a fraction of a count can occur in the computed average of several such signals.) 
     By setting the mode indicator register 121 [bit 2 of memory location M (7, 6)] equal to 1 through an external switch and the K-inputs to the microcomputer, the scale can be switched to an optional operating mode in which the motion indicator 101 and the updating of the secondary target are controlled by Criterion No. 2A, modified as described in Criteria Nos. 5, 6, and 7 with Δ 1  = ±11/2 counts and Δ 2  =-4.0 or +3 15/16 counts. Updating of the primary target is still controlled by the criterion used in the normal operating mode. 
     In both operating modes a code 5 is inserted in the state code register 120 [memory location M (3,6)] if the scale is in unidirectional motion or if an average differs from the target by 12 counts or more, and code 0 is inserted if the difference is less than 12 counts but the scale is in motion. (Code 15 is inserted if the scale is out of motion.) This is in effect a third motion criterion included in the program, and is used to activate a printer. 
     With respect to the modification of Criterion No. 5, an out-of-motion status is not permitted until fourteen signals have been received after the end of unidirectional motion if the average of a group of signals is greater than 11,263 counts. 
     With respect to the modification of Criterion No. 7, the limit L, applied to the difference between successive signals, is -16 or +15 counts if the latest signal is less than 4096 counts and -32 or +31 counts if the latest signal is equal to or greater than 4096 counts. 
     In this embodiment, the microcomputer is required to perform other functions from time to time in addition to those required to implement the invention. This can cause irregularities in the timing of successive signals. In order to avoid errors which might otherwise result from such irregularities, the check flag register 122 [bit 2 of memory location M (0,7)] is normally maintained equal to 1, but is reset to 0 whenever such a timing irregularity occurs. On completion of the cycle of oscillation (averaging interval), this bit is tested in subroutine &#34;MOV2CK&#34; (Ch. 1, p. 13) and if such an irregularity is found to have occurred during the cycle, all of the signals which occurred during that cycle are discarded and ignored instead of being averaged. 
     While the form of apparatus herein described constitutes a preferred embodiment of this invention, it is to be understood that the invention is not limited to this precise form of apparatus, and that changes may be made therein without departing from the scope of the invention which is defined in the appended claims.