Availability:
     Level 3    , 'f'

  Quick Help:
     Real Time Servo Trace, f[SubCmd],[SubPrm0],[SubPrm1],[SubPrm2]

  Description:
    The Real Time Servo Trace command executes the specified Real Time Servo Data Collection
    function which collects specified data at every servo burst and then sends out the result
    in binary or ASCII data format.

    3>f0 collects PES (16-bits) data at the current track for the speficied revs (or until
    the maximum data allowed).

    3>f2 (read seek profile) and 3>f102 (write seek profile) seek for the specified length,
    read/write one sector at the target track, and collect 3 data elements in the following
    order: 16 bit Servo Loop Code, 16 bit (in binary mode) or 32 bit (in ASCII mode) PES,
    and 16 bit Servo Unsafe status. The collection is from the beginning of the seek until
    specified extra revs after the head is settled. (Note: In binary format, 2 extra 0FFFFh
    are added at the end of data collected).
 
    3>f3 writes the full track at the current location and collects 4 words in the following
    order: Servo Loop Code, PES (16-bits), Servo Burst Number, and Servo Unsafe Code for
    the whole writing process. (Note: 2 extra 0FFFFh are added at the end of data collected).

  Input Parameters:

    0 - Sub-command ID.
    
        The low byte of this parameter specifies the ID of the Real Time Servo Trace command
        to be executed and the high byte is used to determine operation type that will be
        performed before collecting servo data.
    
              0 = PES Collection
    
              2 = Seek Profile, read seek.
    
            102 = Seek Profile, write seek.
    
              3 = Write And Collect Servo Data
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 0
    
    If Parameter 0's low byte is equal to 0 (PES Collection):

       1 - Revs to Collect.
       
           This parameter specifies the revs to collect the PES data.  If this parameter is
           not entered, the default value is 100 revs.
       
             Type:    Unsigned 16-bit value
       
             Range:   0 to 0xffff
       
             Default: 100
       
    If Parameter 0's low byte is equal to 2 (Seek Profile):

       1 - Seek Length
       
           This parameter specifies the seek length for the seek operation.
        
             Type:    Signed 32-bit value
       
             Range:   0x80000000 to 0x7fffffff
       
             Default: 0
       
       2 - Number of extra revs to be collected after the head is settled
       
           This parameter specifies the number of extra revs to be collected after the head
           is settled. When this parameter is not entered, 3 extra revs of data will be
           collected after the head is settled.
        
             Type:    Unsigned 16-bit value
       
             Range:   0x0000 to 0xffff
       
             Default: 3
       
       3 - Output Format
       
           This parameter specifies the format of the output.  If the value is
           0, the output is binary.  Any other value indicates ASCII format.
       
             Type:    Unsigned 32-bit value
       
             Range:   0 to 0xffffffff
       
             Default: 0
       
  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 and seek profile ASCII data output is requested, the following data will be displayed.
       
             "aaaa   bbbb cccccc"
       
          where
       
             aaaa is the Servo Loop Code. Click here for documentation on servo loop
             codes.  Common values are:
                00 - track following
                43 - seek arrival
                47 - seek in progress
       
             bbbb is the Servo Unsafe Flag
       
             cccc is the signed decimal 32-bit Demod Position Error.  The low 12 bits are track PES,
             the upper 20 bits are track offset.  Divide the value shown by 4096 to get track offset.
             Mask the value shown with 0xFFF to get traditional PES.

       If no error occurred and seek profile ASCII data output is NOT requested, the following data
       will be displayed.
       
             "[[[[xxxxxxxx...]]]"
       
          where
       
             xx is a continuous stream of binary data.  The data is delimited by triple opening
             and closing brackets.

  Examples:

    Example #1:
    To collect 20h revs of PES data:

       F3 3>f0,20

    Example #2:
    To output ASCII seek profile data for a 20h track read seek:
 
       F3 3>f2,20,0,1

    Example #3:
    To output ASCII seek profile for a 30h track write seek and see two revs of settle data also:
 
       F3 3>f102,30,2,1

  Revision History:

    0001.0000   Initial revision.
    0011.0000   Combined the PSG Diagnostic Error Codes (PSGDEC) and the Diagnostic External
                Test Service Error Codes (DETSEC) into a single set of Diagnostic Error Codes
                (DiagError).
    0012.0000   Changed the output of 3>f2 command from 2 words (Servo Loop Code and PES) to
                3 words (Servo Loop Code, PES, and Servo Unsafe Status).
    0013.0000   Added ability to output data as ASCII instead of binary. Fixed request for '0'
                revs settle data.