Simulation Core
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

109 linhas
2.6 KiB

  1. module CCloseSafetyValveLedNotification
  2. use COperationScenariosVariables
  3. implicit none
  4. contains
  5. subroutine Evaluate_CloseSafetyValveLed()
  6. implicit none
  7. ! if (DriveType == TopDrive_DriveType) then
  8. !#ifdef OST
  9. ! print*, 'Evaluate_CloseSafetyValveLed=TopDrive'
  10. !#endif
  11. ! endif
  12. !
  13. !
  14. !
  15. !
  16. !
  17. !
  18. !
  19. !
  20. !
  21. ! if (DriveType == Kelly_DriveType) then
  22. !#ifdef OST
  23. ! print*, 'Evaluate_CloseSafetyValveLed=Kelly'
  24. !#endif
  25. ! endif
  26. end subroutine
  27. ! subroutine Subscribe_CloseSafetyValveLed()
  28. ! use CDrillingConsoleVariables
  29. ! implicit none
  30. ! call OnCloseSafetyValvePress%Add(ButtonPress_CloseSafetyValve)
  31. ! call OnOperationConditionChangeInt%Add(Set_Operation_CloseSafetyValveLed)
  32. ! end subroutine
  33. subroutine Set_Operation_CloseSafetyValveLed(v)
  34. implicit none
  35. integer , intent(in) :: v
  36. #ifdef ExcludeExtraChanges
  37. if(operation_CloseSafetyValveLed == v) return
  38. #endif
  39. operation_CloseSafetyValveLed = v
  40. #ifdef deb
  41. print*, 'operation_CloseSafetyValveLed=', operation_CloseSafetyValveLed
  42. #endif
  43. end subroutine
  44. subroutine ButtonPress_CloseSafetyValve()
  45. implicit none
  46. if (DriveType == TopDrive_DriveType) then
  47. #ifdef OST
  48. print*, 'Evaluate_CloseSafetyValveLed=TopDrive'
  49. #endif
  50. !TOPDRIVE-CODE=57
  51. if (Get_SafetyValveHeight() >= 3.0 .and. Get_SafetyValveHeight() <= 12.0 .and.&
  52. Get_CloseSafetyValveLed() == .false. .and.&
  53. Get_OpenSafetyValveLed()) then
  54. call Set_OpenSafetyValveLed(.false.)
  55. call Set_CloseSafetyValveLed(.true.)
  56. return
  57. end if
  58. endif
  59. if (DriveType == Kelly_DriveType) then
  60. #ifdef OST
  61. print*, 'Evaluate_CloseSafetyValveLed=Kelly'
  62. #endif
  63. !OPERATION-CODE=59
  64. if (Get_SafetyValveHeight() >= 3.0 .and. Get_SafetyValveHeight() <= 12.0 .and.&
  65. Get_CloseSafetyValveLed() == .false. .and.&
  66. Get_OpenSafetyValveLed()) then
  67. call Set_OpenSafetyValveLed(.false.)
  68. call Set_CloseSafetyValveLed(.true.)
  69. return
  70. end if
  71. endif
  72. end subroutine
  73. end module CCloseSafetyValveLedNotification