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.
 
 
 
 
 
 

177 lines
5.6 KiB

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