Level 4    , 'c'

  Quick Help:
     Find Min Or Max Cylinders c[Head],[Mode],[RangeMultiplier],[RetryCountLimit],[FilterTimeConstant]

    This command performs the Find Min Or Max Cylinders operation.

    Find Min (Or Max) Cylinder Algorithm:
    The head will be moved towards the OD (or ID) while looking for either a seek failure or an
    abrupt change (avalanche) in a measured parameter called Test Data. The measured parameter
    may be Acff Magnitude or Bias Current, depending on the type of drive under test. Avalanche
    detection is complicated by the fact that the Test Data will have some statistical variation
    (range) around an average value, and that the average value will vary over the cylinder stroke
    of the drive.
    Before hunting for the avalanche cylinder, the statistical variation and average must be
    characterized. To do this, the head is moved to a safe starting location, which is well
    away from the likely avalanche cylinder, and the average and range of the Test Data are
    measured over a band of cylinders. To estimate the average value, a low-pass filter is used
    to reject the statistical variation and only track the average value. Range is estimated by
    capturing the min and max values of Test Data over the that band of cylinders.
    The test limit used for avalanche detection is recalculated for each cylinder tested based
    on the estimated average value and a scaled estimate of the statistical variation.
    (n)   designates the current sample
    (n-1) designates the previous sample
    Range = Max(TestDataValue) - Min(TestDataValue)             (measured over a band of cylinders)
    K1 = ( 1 / FilterTimeConstant )
    K2 = ( 1 - K1 )
    Average(n) = TestDataValue(n) * K1  + Average(n-1) * K2     (this is the filter equation)
    TestLimit(n) = Average(n) + RANGE_GAIN * Range(n)
    To find the avalanche cylinder, the head is stepped towards the OD (or ID) and comparing the
    measured Test Data to the Tst Limit. If the limit is exceeded, or if the seek fails, then the
    measurement is retried. When the number of retries exceeds the limit, then the current cylinder
    is designated the Min (or Max) Cylinder.
    At each cylinder tested, the Cylinder Number, TestData, Average, and Limit data are collected
    into a circular buffer (pointed to by *TestData). After the Min (or Max) Cylinder has been
    located, the buffer will be rotated so that the Min (or Max) Cylinder is the last entry in
    the buffer.
  Input Parameters:

    0 - Test Head.
          If entered, this parameter is the address of the head to use for the test.
          Type:    Unsigned 8-bit value
          Range:   0 to Maximum number of heads supported.
          Default: 0
    1 - Operation Type.
          If entered, this parameter specifies which mode operation is to be performed.
          0x00: FIND MIN CYLINDER - specifies that the minimum cylinder will be located.
          0x01: FIND MAX CYLINDER - specifies that the maximum cylinder will be located.
          Type:    Unsigned 8-bit hexadecimal value
          Range:   0 to Maximum valid operation type
          Default: 0x00
    2 - Range Multiplier.
          If entered, this parameter specifies the range multiplier, which is used during
          the determination of the test limit.
          Type:    Decimal Floating Point Value
          Range:   0.0 to 5.0
          Default: 0.5
    3 - Retry Count Limit.
          If entered, this parameter specifies the retry count limit used during determination
          of the avalanche point.
          Type:    Unsigned 32-bit hexadecimal value
          Range:   0x00 to 0xFFFFFFFF
          Default: 0x0A
    4 - Filter Time Constant.
          If entered, this parameter specifies time constant in samples of the tracking filter.
          Type:    Unsigned 32-bit hexadecimal value
          Range:   0x01 to 0xFFFFFFFF (cannot equal zero)
          Default: 0x20
  Output Data:

    If an error occurred, the following information will be displayed.
          "DiagError aaaaaaaa"
          aaaaaaaa is the Diagnostic Error Code
    If no error occurred, then the following will be displayed.
          "Cylinder     Value   Average     Limit"
          "  aaaaaa       bbb       ccc       ddd"
                . (repeated until all data is displayed)
          "  aaaaaa       bbb       ccc       ddd"
          aaaaa is the cylinder number for the test data.
          bbb   is the test data for that cylinder (Acff Magnitude Squared or Bias Current).
          ccc   is the average value of the test data.
          ddd   is the test limit in use for this cylinder.
    NOTE: the last cylinder number displayed is the Min (or Max) cylinder found.
    Example #1:
    To find Min Cylinder and Max Cylinder using default values:
       F3 4>c
    Example #2:
    To find Min Cylinder using Head 1, with a range gain of 0.75:
       F3 2>c1,,0.75
  Revision History:

    0001.0000   Initial revision.