Simulation Core
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CCloseSafetyValveLedNotification.f90 2.9 KiB

il y a 1 an
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. module CCloseSafetyValveLedNotification
  2. use OperationScenariosModule
  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. !@ use ConfigurationVariables
  30. !@ use ConfigurationVariables
  31. ! implicit none
  32. ! call OnCloseSafetyValvePress%Add(ButtonPress_CloseSafetyValve)
  33. ! call OnOperationConditionChangeInt%Add(Set_Operation_CloseSafetyValveLed)
  34. ! end subroutine
  35. subroutine Set_Operation_CloseSafetyValveLed(v)
  36. implicit none
  37. integer , intent(in) :: v
  38. #ifdef ExcludeExtraChanges
  39. if(data%State%notifications%operation_CloseSafetyValveLed == v) return
  40. #endif
  41. data%State%notifications%operation_CloseSafetyValveLed = v
  42. #ifdef deb
  43. print*, 'operation_CloseSafetyValveLed=', data%State%notifications%operation_CloseSafetyValveLed
  44. #endif
  45. end subroutine
  46. subroutine ButtonPress_CloseSafetyValve()
  47. implicit none
  48. if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
  49. #ifdef OST
  50. print*, 'Evaluate_CloseSafetyValveLed=TopDrive'
  51. #endif
  52. !TOPDRIVE-CODE=57
  53. if (Get_SafetyValveHeight() >= 3.0 .and. Get_SafetyValveHeight() <= 12.0 .and.&
  54. Get_CloseSafetyValveLed() == .false. .and.&
  55. Get_OpenSafetyValveLed()) then
  56. call Set_OpenSafetyValveLed(.false.)
  57. call Set_CloseSafetyValveLed(.true.)
  58. return
  59. end if
  60. endif
  61. if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
  62. #ifdef OST
  63. print*, 'Evaluate_CloseSafetyValveLed=Kelly'
  64. #endif
  65. !OPERATION-CODE=59
  66. if (Get_SafetyValveHeight() >= 3.0 .and. Get_SafetyValveHeight() <= 12.0 .and.&
  67. Get_CloseSafetyValveLed() == .false. .and.&
  68. Get_OpenSafetyValveLed()) then
  69. call Set_OpenSafetyValveLed(.false.)
  70. call Set_CloseSafetyValveLed(.true.)
  71. return
  72. end if
  73. endif
  74. end subroutine
  75. end module CCloseSafetyValveLedNotification