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.

DWMalfunction_ClutchEngage.f90 1.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. subroutine DWMalfunction_ClutchEngage
  2. use CDrillingConsoleVariables
  3. use CDataDisplayConsoleVariables
  4. use CHoistingVariables
  5. use Drawworks_VARIABLES
  6. use CSounds
  7. use CLog4
  8. IMPLICIT NONE
  9. ! Sound Generation
  10. if ( Drawworks%SoundClutch) then
  11. Drawworks%SoundClutch = .false.
  12. Call SetSoundDwClutch(Drawworks%SoundClutch)
  13. end if
  14. if ( DW_OldClutchMode/=0 .and. DrillingConsole%DWClutchLever==0 ) then
  15. Drawworks%SoundClutch = .true.
  16. Call SetSoundDwClutch(Drawworks%SoundClutch)
  17. end if
  18. DW_OldClutchMode = DrillingConsole%DWClutchLever
  19. ! Drawworks Malfunction ----> Clutch Engage
  20. if ( Drawworks%ClutchEngageMalf==1 ) then
  21. if ( Drawworks%ClutchMode==1 .or. Drawworks%ClutchMode==-1 ) then
  22. Drawworks%ClutchMode = Drawworks%ClutchMode
  23. else if ( Drawworks%ClutchMode==0 ) then
  24. Drawworks%ClutchMode = -1
  25. end if
  26. return
  27. end if
  28. ! Drawworks Malfunction ----> Clutch Disengage
  29. if ( Drawworks%ClutchDisengageMalf==1 ) then
  30. Drawworks%ClutchMode = 0
  31. return
  32. end if
  33. Drawworks%ClutchMode = DrillingConsole%DWClutchLever
  34. end subroutine