Availability:
     Level E    , 'n'

  Quick Help:
     Dibit Extraction, n[sctr],[cnt],[dibit],[dibit],[dibit],[skip],[trim],[dsply]

  Description:
    This command collects dibit data ( QM mode 6 ) in a single disk revolution.  The
    user may specifiy up to three dibit indices to collect, or collect one sample of
    each dibit.

  Input Parameters:

    0 - Start Sector.
    
        This parameter specifies the sector on which to start the read.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to max wedge number on track (this command uses single
                   sector per wedge mode)
    
          Default: 0
    
    1 - Number of Sectors to Read.
    
        This parameter specifies the number of sectors to read.
        When 0, it means the whole track.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 or 2 to total number of wedges per track.
                   1 is not allowed.
    
          Default: 0
    
    2 - First Dibit Index.
    
        First dibit index indicates which of the 127 dibit samples should be returned.
        If FFFF is entered, increment the index seed at each wedge.  Note that if
        FFFF is entered, the statistical results will be meaningless.
    
          Type:    unsigned 16-bit value
    
          Range:   0 - 127 or 0xFFFF
    
          Default: none
    
    3 - Second Dibit Index.
    
        Dibit index indicates which of the 127 dibit samples should be returned.
    
          Type:    unsigned 16-bit value
    
          Range:   0 - 127
    
          Default: FFFF  ( no index requested )
    
    4 - Third Dibit Index.
    
        Dibit index indicates which of the 127 dibit samples should be returned.
    
          Type:    unsigned 16-bit value
    
          Range:   0 - 127
    
          Default: FFFF  ( no index requested )
    
    5 - Sectors to Ignore.
    
        This parameter specifies the number of beginning sectors to ignore
        during statistic calculation.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to Number of Sectors to Read
    
          Default: 0
    
    6 - Percentage to trim.
    
        This parameter specifies a percentage of the not-ignored
        sectors to exclude from average and standard deviation calculations.
        The percentage specified of the highest values will be thrown out,
        and the percentage specified of the lowest values will be thrown out.
    
        If this value is too large, too few untrimmed values will remain, causing
        an "Invalid Parameter" error.
    
          Type:    Unsigned 8-bit value
    
          Range:   0 to 32h
    
          Default: 0
    
    7 - Display Options.
    
        This parameter is a bit-significant value that allows the user to control
        the level of output detail.
    
          Bit 15-2:   Reserved
    
          Bit 1 ( value 2 ):   If this bit is set, display the statistical
                               results of the measured values in Decimal format.
    
          Bit 0 ( value 1 ):   If this bit is set, display the raw data of
                               the measured values in hex format
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: If parameter 2 is not FFFF, this parameter defaults to 0x2
                   ( display statistical results ).
                
                   If parameter 2 is FFFF, this parameter defaults to 0x1
                   ( display raw data ).
    
  Output Data:


    If an error occurred, the following information will be displayed.
    
          "DiagError aaaaaaaa"
    
       where
    
          aaaaaaaa is the Diagnostic Error Code
    
    If no error occurred, then the output of this command will be displayed as follows:
    
    If the statistical results display is requested ( input parameter 7 ), the following
    information will be displayed:
    
          "Register   Mean    Min        Max    StdDev"
          "   a       bbbb   cccc       dddd    eeee"  (repeated)
    
       where
    
          a is the hex register number
    
          bbbb is the average of the dibit values read for this register in decimal.  This
               average excludes sectors ignored ( input paramter 5 ) and values trimmed
              ( input parameter 6 ).
    
          cccc is the lowest dibit value read for this register in decimal.  This minimum
               excludes sectors ignored ( input parameter 5 ) but does include values
               trimmed ( input parameter 6 ).
    
          dddd is the greatest dibit value read for this register in decimal.  This
               maximum excludes sectors ignored ( input parameter 5 ) but does
               include values trimmed ( input parameter 6 ).
    
          eeee is the standard deviation of the dibit values read for this register in
               decimal.  The values used for this calculation exclude both sectors
               ignored ( input paramter 5 ) and values trimmed ( input parameter 6 )
    
    If the raw data display is requested ( input paramter 7 ), the following information
    will be displayed:
    
          "Sec#  Error QMCNT"
          "  q   rr    ssss"  (repeated)
    
       where
    
          q     is the sector number.
    
          rr    is the error code.
    
          ssss  is the raw value read from the channel.  This is the raw value.  No
                normalization or DC correction has been applied.
    
          Note that the statistics are meaningless when 'incrementing seed index' is selected
          in parameter 2.
    
  Examples:

    There are prerequisites for issuing this diag command.
    First, user should issue a diag command to set the next target location to where the
    dibit value readings should occur. A simple seek command could be used.
    Second, user should issue a Set Track Format (Level 7 'K') command to set the track
    format to single-sector-per-wedge format.  Finally, the user should write the track.
    A typical recommended sequence is:

       F3 2> P1616       (Set repeating 127 bit pattern in write buffer)
       F3 2> /T          (Change diagnostic command level to T)
       F3 T> A0          (Select User Area and do not update cylinder and head)
       F3 T> /7          (Change diagnostic command level to 7)
       F3 7> S1000,0     (Seek to the target track)
       F3 7> K2          (Set track format to single sector per wedge format)
       F3 7> W,,,1       (Write the track with physical sector address flag on)
       F3 7> /E          (Change diagnostic command level to E)
 
    Example #1:
    To get dibit values at index 7 on the current track and head:
    
       E> n,,7
 
    Example #2:
    To get dibit values at indices 7, 22h, and 35h on the current track and head:
 
       E> n,,7,22,35
 
    Example #3:
    To get dibit value at index 52h and exclude the lowest 8% and the largest 8% values read:
 
       E> n,,52,,,,8
 
    Example #4:
    To get dibit values at index 14h but not use the first 20h values read:
       
       E> n,,14,,,20
 
    Example #5:
    To get dibit value at index 7Ah and display both statistical results and counter values:
 
       E> n,,7A,,,,,3
 
  Potential Error Conditions:

    "Invalid Parameter" can occur if the number of sectors to read ( parameter 1 ) is
    1 ( not allowed by statistics routine ).

    "Invalid Parameter" can also occur if the number of sectors to read is low and the trim percentage
    ( parameter 6 ) is large.
 
  Revision History:

    0001.0000   Initial revision.