Simulation Core
Não pode escolher mais do que 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.
 
 
 
 
 
 

108 linhas
2.9 KiB

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