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.

COperationScenariosVariables.f90 4.5 KiB

2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. module COperationScenariosVariables
  2. use CKellyConnectionEnumVariables
  3. use CElevatorConnectionEnumVariables
  4. use CCloseKellyCockLedNotificationVariables
  5. use CCloseSafetyValveLedNotificationVariables
  6. use CFillMouseHoleLedNotificationVariables
  7. use CIrIBopLedNotificationVariables
  8. use CIrSafetyValveLedNotificationVariables
  9. use CLatchLedNotificationVariables
  10. use COpenKellyCockLedNotificationVariables
  11. use COpenSafetyValveLedNotificationVariables
  12. use CSlipsNotificationVariables
  13. use CSwingLedNotificationVariables
  14. use CTongNotificationVariables
  15. use CUnlatchLedNotificationVariables
  16. use CInstallFillupHeadPermissionVariables
  17. use CInstallMudBucketPermissionVariables
  18. use CIrIbopPermissionVariables
  19. use CIrSafetyValvePermissionVariables
  20. use CRemoveFillupHeadPermissionVariables
  21. use CRemoveMudBucketPermissionVariables
  22. use CHookHeight
  23. use CIbopHeight
  24. use CNearFloorConnection
  25. use CSafetyValveHeight
  26. use CSlackOff
  27. use CStandRack
  28. use CStringPressure
  29. use CZeroStringSpeed
  30. use CStringUpdateVariables
  31. use CUnityInputs
  32. !, only: Get_OutOfMouseHole,&
  33. ! Get_Unlatch,&
  34. ! Get_Latch,&
  35. ! Get_SlipsUnSet,&
  36. ! Get_SlipsSet,&
  37. ! Get_BreakupTong,&
  38. ! Get_MakeupTong,&
  39. ! Get_NewHookHeight,&
  40. ! Get_ElevatorConnectionPossible,&
  41. ! Get_JointConnectionPossible,&
  42. ! Get_NearMonkeyBoardPosition,&
  43. ! Get_SingleSetInMouseHole,&
  44. ! Get_SwingCenter
  45. use CUnityOutputs, only: GetRotaryRpm
  46. use CBucketEnumVariables
  47. use CElevatorEnumVariables
  48. use CHeadEnumVariables
  49. use CIbopEnumVariables
  50. use CKellyEnumVariables
  51. use CMouseHoleEnumVariables
  52. use COperationConditionEnumVariables
  53. use CSafetyValveEnumVariables
  54. use CSlipsEnumVariables
  55. use CSwingEnumVariables
  56. use CTongEnumVariables
  57. use CFillupHeadPermissionVariables
  58. use CSwingDrillPermissionVariables
  59. use CSwingOffPermissionVariables
  60. use CSwingTiltPermissionVariables
  61. use CTdsStemJointHeight
  62. use CTdsConnectionModesEnumVariables
  63. use CTdsElevatorModesEnumVariables
  64. use CTdsSpineEnumVariables
  65. use CTdsSwingEnumVariables
  66. use CTdsTongEnumVariables
  67. use CTdsBackupClampVariables
  68. use CHoistingVariables
  69. use CTopDrivePanelVariables
  70. use CTdsPowerLedNotificationVariables
  71. use CTdsIbopLedNotificationVariables
  72. use CTdsTorqueWrenchLedNotificationVariables
  73. implicit none
  74. public
  75. type::OperationScenarioType
  76. real :: HKL = 63.76 ! Hook And Kelly Length
  77. real :: HL = 17.81 ! Hook Length
  78. real :: PL = 30.0 ! Pipe Length
  79. real :: SL = 90.0 ! Stand Length
  80. real :: LG = 8.0 ! Limit Gap
  81. real :: SG = 3.0 ! Slips Gap
  82. real :: TG = 4.0 ! Tong Gap
  83. real :: RE = 3.0 ! Release
  84. real :: ECG = 2.3 ! Elevator Connection Gap
  85. !moved from enum/CElevatorConnectionEnum
  86. integer :: ElevatorConnection = 0
  87. type(VoidEventHandlerCollection) :: OnElevatorConnectionChange
  88. !moved from enum/CKellyConnectionEnum
  89. end type OperationScenarioType
  90. type(OperationScenarioType)::OperationScenario
  91. contains
  92. real(8) function TJH()
  93. use TD_DrillStemComponents
  94. implicit none
  95. TJH = TD_TopJointHeight
  96. end function
  97. real function TL()
  98. implicit none
  99. TL = 26.97
  100. end function
  101. real function NFC()
  102. implicit none
  103. NFC = Get_NearFloorConnection()
  104. end function
  105. subroutine Set_ElevatorConnection(v)
  106. implicit none
  107. integer , intent(in) :: v
  108. #ifdef ExcludeExtraChanges
  109. if(OperationScenario%ElevatorConnection == v) return
  110. #endif
  111. OperationScenario%ElevatorConnection = v
  112. #ifdef deb
  113. print*, 'OperationScenario%ElevatorConnection=', OperationScenario%ElevatorConnection
  114. #endif
  115. call OperationScenario%OnElevatorConnectionChange%RunAll()
  116. end subroutine
  117. integer function Get_ElevatorConnection()
  118. implicit none
  119. Get_ElevatorConnection = OperationScenario%ElevatorConnection
  120. end function
  121. end module COperationScenariosVariables