Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
2.1 KiB

  1. subroutine TopDrive_OffMode
  2. use TopDrive_VARIABLES
  3. !use CDataDisplayConsoleVariables
  4. !use CDrillingConsoleVariables
  5. use CSimulationVariables
  6. use CWarningsVariables
  7. use CSounds
  8. use CTopDrivePanelVariables
  9. IMPLICIT NONE
  10. !==================================================================
  11. ! Rate limit for off Mode
  12. Do while ( ((TDS%N_old-0.0d0)/TDS%time_step)>386.0d0 )
  13. TDS%N_ref = (-386.0d0*TDS%time_step)+TDS%N_old
  14. !else
  15. ! TDS%N_ref=0.0d0
  16. !end if
  17. CALL TopDrive_INPUTS
  18. CALL TopDrive_Solver
  19. TDS%N_old = TDS%N_ref
  20. !if ( TDS_OldTransMode==0 .and. TDS%w_new/=0.d0 ) then
  21. ! Call Activate_RotaryGearsAbuse()
  22. ! TDS%SoundGearCrash = .true.
  23. ! Call SetSoundRtGearCrash(TDS%SoundGearCrash)
  24. !else
  25. ! TDS%SoundGearCrash = .false.
  26. ! Call SetSoundRtGearCrash(TDS%SoundGearCrash)
  27. !end if
  28. !TDS_OldTransMode = RTTransmissionLever
  29. if ( (TopDriveTdsPowerState==0) .or. (IsStopped == .true.) ) then
  30. TopDriveTdsPowerLed = 0
  31. end if
  32. Call sleepqq (80) !?????????????????
  33. End Do
  34. !==================================================================
  35. TDS%N_ref = 0.
  36. TDS%N_new = 0.
  37. TDS%N_old = 0.
  38. TDS%ia = 0.
  39. TDS%ia_old = 0.
  40. TDS%ia_new = 0.
  41. TDS%x = 0.
  42. TDS%x_old = 0.
  43. TDS%x_new = 0.
  44. TDS%y = 0.
  45. TDS%y_old = 0.
  46. TDS%y_new = 0.
  47. TDS%w = 0.
  48. TDS%w_old = 0.
  49. TDS%w_new = 0.
  50. TDS%Speed = 0.
  51. TDS_wOld = 0.
  52. TopDriveOperationFaultLed = 0
  53. TDS%Speed = 0.d0 !Speed [RPM]
  54. TopDriveRpmGauge = TDS%Speed
  55. TD_RPMUnityOutput = -TopDriveRpmGauge
  56. TDS%SoundRPM = 0
  57. !Call SetSound( TDS%SoundRPM )
  58. TDS%Torque = 0.d0 ![ft.lbf]
  59. TopDriveTorqueGauge = 0.d0 ![ft.lbf]
  60. TDS_OldPowerMode = 1
  61. TDS_OldPowerMode = 0
  62. end subroutine