anchor.diff:        CHARACTER(*),                   INTENT(  OUT)  :: ErrMsg      !< Error message if ErrStat /= ErrID_None
   
         CHARACTER(*), PARAMETER                        :: RoutineName = 'SrvD_UpdateDiscState'
  -      REAL(ReKi)                                     :: temp
         
            ! Initialize ErrStat
   
  
positive.code: 
     PRIVATE
  
     TYPE(ProgDesc), PARAMETER            :: SrvD_Ver = ProgDesc( 'ServoDyn', 'v1.06.00a-bjj', '17-Jun-2016' )
     
  #ifdef COMPILE_SIMULINK
     LOGICAL, PARAMETER, PUBLIC           :: Cmpl4SFun  = .TRUE.                            ! Is the module being compiled as an S-Function for Simulink?
  
negative.code:    REAL(ReKi)                                     :: GenTrq      ! generator torque 
     
     REAL(ReKi)                                     :: ComDenom, ComDenom_du  ! temporary variable (common denominator)
     REAL(ReKi)                                     :: PwrLossS_du ! Power loss in the stator (watts) and its derivative w.r.t. u%HSS_Spd 
     REAL(ReKi)                                     :: PwrLossR_du ! Power loss in the rotor (watts) and its derivative w.r.t. u%HSS_Spd 
     REAL(ReKi)                                     :: PwrMech_du  ! partial derivative of Mechanical power (watts) w.r.t. u%HSS_Spd
     REAL(ReKi)                                     :: Slip        ! Generator slip
     REAL(ReKi)                                     :: SlipRat     ! Generator slip ratio
     
     REAL(ReKi)                                     :: A, B, dAdu, dBdu
     REAL(ReKi)                                     :: SlipRat_du ! temporary variables for computing derivatives
        
     !REAL(ReKi)                                     :: S2          ! SlipRat**2
  