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.
 
 
 
 
 
 

130 lines
5.1 KiB

  1. module CBopControlPanel
  2. ! use CBopControlPanel
  3. use SimulationVariables
  4. implicit none
  5. public
  6. contains
  7. subroutine BopControlPanelToJson(parent)
  8. type(json_value),pointer :: parent
  9. type(json_core) :: json
  10. type(json_value),pointer :: p
  11. ! 1. create new node
  12. call json%create_object(p,'BopControl')
  13. call json%add(p,"AnnularRegulatorSetControl",data%EquipmentControl%BopControlPanel%AnnularRegulatorSetControl)
  14. call json%add(p,"AirMasterValve",data%EquipmentControl%BopControlPanel%AirMasterValve)
  15. call json%add(p,"ByePassValve",data%EquipmentControl%BopControlPanel%ByePassValve)
  16. call json%add(p,"AnnularValve",data%EquipmentControl%BopControlPanel%AnnularValve)
  17. call json%add(p,"UpperRamsValve",data%EquipmentControl%BopControlPanel%UpperRamsValve)
  18. call json%add(p,"MiddleRamsValve",data%EquipmentControl%BopControlPanel%MiddleRamsValve)
  19. call json%add(p,"KillLineValve",data%EquipmentControl%BopControlPanel%KillLineValve)
  20. call json%add(p,"ChokeLineValve",data%EquipmentControl%BopControlPanel%ChokeLineValve)
  21. call json%add(p,"LowerRamsValve",data%EquipmentControl%BopControlPanel%LowerRamsValve)
  22. call json%add(p,"ManifoldPressureGauge",data%EquipmentControl%BopControlPanel%ManifoldPressureGauge)
  23. call json%add(p,"AirSupplyPressureGauge",data%EquipmentControl%BopControlPanel%AirSupplyPressureGauge)
  24. call json%add(p,"AccumulatorPressureGauge",data%EquipmentControl%BopControlPanel%AccumulatorPressureGauge)
  25. call json%add(p,"AnnularPressureGauge",data%EquipmentControl%BopControlPanel%AnnularPressureGauge)
  26. call json%add(p,"AnnularOpenLED",data%EquipmentControl%BopControlPanel%AnnularOpenLED)
  27. call json%add(p,"AnnularCloseLED",data%EquipmentControl%BopControlPanel%AnnularCloseLED)
  28. call json%add(p,"UpperRamsOpenLED",data%EquipmentControl%BopControlPanel%UpperRamsOpenLED)
  29. call json%add(p,"UpperRamsCloseLED",data%EquipmentControl%BopControlPanel%UpperRamsCloseLED)
  30. call json%add(p,"MiddleRamsOpenLED",data%EquipmentControl%BopControlPanel%MiddleRamsOpenLED)
  31. call json%add(p,"MiddleRamsCloseLED",data%EquipmentControl%BopControlPanel%MiddleRamsCloseLED)
  32. call json%add(p,"KillLineOpenLED",data%EquipmentControl%BopControlPanel%KillLineOpenLED)
  33. call json%add(p,"KillLineCloseLED",data%EquipmentControl%BopControlPanel%KillLineCloseLED)
  34. call json%add(p,"ChokeLineOpenLED",data%EquipmentControl%BopControlPanel%ChokeLineOpenLED)
  35. call json%add(p,"ChokeLineCloseLED",data%EquipmentControl%BopControlPanel%ChokeLineCloseLED)
  36. call json%add(p,"LowerRamsOpenLED",data%EquipmentControl%BopControlPanel%LowerRamsOpenLED)
  37. call json%add(p,"LowerRamsCloseLED",data%EquipmentControl%BopControlPanel%LowerRamsCloseLED)
  38. call json%add(p,"AnnularStatus",data%EquipmentControl%BopControlPanel%AnnularStatus)
  39. call json%add(p,"UpperRamsStatus",data%EquipmentControl%BopControlPanel%UpperRamsStatus)
  40. call json%add(p,"MiddleRamsStatus",data%EquipmentControl%BopControlPanel%MiddleRamsStatus)
  41. call json%add(p,"LowerRamsStatus",data%EquipmentControl%BopControlPanel%LowerRamsStatus)
  42. call json%add(parent,p)
  43. end subroutine
  44. subroutine OpenAnnular()
  45. use CManifolds
  46. implicit none
  47. call ChangeValve(52, .true.)
  48. end subroutine
  49. subroutine CloseAnnular()
  50. use CManifolds
  51. implicit none
  52. call ChangeValve(52, .false.)
  53. end subroutine
  54. subroutine OpenUpperRams()
  55. use CManifolds
  56. implicit none
  57. call ChangeValve(51, .true.)
  58. end subroutine
  59. subroutine CloseUpperRams()
  60. use CManifolds
  61. implicit none
  62. call ChangeValve(51, .false.)
  63. end subroutine
  64. subroutine OpenMiddleRams()
  65. use CManifolds
  66. implicit none
  67. call ToggleMiddleRams(.true.)
  68. end subroutine
  69. subroutine CloseMiddleRams()
  70. use CManifolds
  71. implicit none
  72. call ToggleMiddleRams(.false.)
  73. end subroutine
  74. subroutine OpenKillLine()
  75. use CManifolds
  76. implicit none
  77. call ChangeValve(46, .true.)
  78. end subroutine
  79. subroutine CloseKillLine()
  80. use CManifolds
  81. implicit none
  82. call ChangeValve(46, .false.)
  83. end subroutine
  84. subroutine OpenChokeLine()
  85. use CManifolds
  86. implicit none
  87. call ChangeValve(47, .true.)
  88. !WRITE (*,*) ' valve 47 true '
  89. end subroutine
  90. subroutine CloseChokeLine()
  91. use CManifolds
  92. implicit none
  93. call ChangeValve(47, .false.)
  94. !WRITE (*,*) ' valve 47 false '
  95. end subroutine
  96. subroutine OpenLowerRams()
  97. use CManifolds
  98. implicit none
  99. call ChangeValve(49, .true.)
  100. !WRITE (*,*) ' valve 49 true '
  101. end subroutine
  102. subroutine CloseLowerRams()
  103. use CManifolds
  104. implicit none
  105. call ChangeValve(49, .false.)
  106. !WRITE (*,*) ' valve 49 false '
  107. end subroutine
  108. end module CBopControlPanel