|
- module COperationScenariosVariables
-
- use CKellyConnectionEnumVariables
- use CElevatorConnectionEnumVariables
-
- use NotificationVariables
- ! use CCloseKellyCockLedNotificationVariables
- ! use CCloseSafetyValveLedNotificationVariables
- ! use CFillMouseHoleLedNotificationVariables
- ! use CIrIBopLedNotificationVariables
- ! use CIrSafetyValveLedNotificationVariables
- ! use CLatchLedNotificationVariables
- ! use COpenKellyCockLedNotificationVariables
- ! use COpenSafetyValveLedNotificationVariables
- ! use CSlipsNotificationVariables
- ! use CSwingLedNotificationVariables
- ! use CTongNotificationVariables
- ! use CUnlatchLedNotificationVariables
-
- use PermissionsVariables
- ! use CInstallFillupHeadPermissionVariables
- ! use CInstallMudBucketPermissionVariables
- ! use CIrIbopPermissionVariables
- ! use CIrSafetyValvePermissionVariables
- ! use CRemoveFillupHeadPermissionVariables
- ! use CRemoveMudBucketPermissionVariables
-
- use SoftwareInputsVariables
- !use CHookHeight
- !use CIbopHeight
- !use CNearFloorConnection
- !use CSafetyValveHeight
- !use CSlackOff
- !use CStandRack
- !use CStringPressure
- !use CZeroStringSpeed
-
- ! use CStringUpdateVariables
-
- use CUnityInputs
- !, only: Get_OutOfMouseHole,&
- ! Get_Unlatch,&
- ! Get_Latch,&
- ! Get_SlipsUnSet,&
- ! Get_SlipsSet,&
- ! Get_BreakupTong,&
- ! Get_MakeupTong,&
- ! Get_NewHookHeight,&
- ! Get_ElevatorConnectionPossible,&
- ! Get_JointConnectionPossible,&
- ! Get_NearMonkeyBoardPosition,&
- ! Get_SingleSetInMouseHole,&
- ! Get_SwingCenter
- use CUnityOutputs, only: GetRotaryRpm
- use UnitySignalVariables
- ! use CBucketEnumVariables
- ! use CElevatorEnumVariables
- ! use CHeadEnumVariables
- ! use CIbopEnumVariables
- ! use CKellyEnumVariables
- ! use CMouseHoleEnumVariables
- ! use COperationConditionEnumVariables
- ! use CSafetyValveEnumVariables
- ! use CSlipsEnumVariables
- ! use CSwingEnumVariables
- ! use CTongEnumVariables
-
- use PermissionsVariables
- ! use CFillupHeadPermissionVariables
- ! use CSwingDrillPermissionVariables
- ! use CSwingOffPermissionVariables
- ! use CSwingTiltPermissionVariables
- ! use CTdsStemJointHeight
- use CTdsConnectionModesEnumVariables
- use CTdsElevatorModesEnumVariables
- ! use CTdsSpineEnumVariables
- ! use CTdsSwingEnumVariables
- ! use CTdsTongEnumVariables
- ! use CTdsBackupClampVariables
-
- use CHoistingVariables
- use CTopDrivePanelVariables
-
- ! use CTdsPowerLedNotificationVariables
- ! use CTdsIbopLedNotificationVariables
- use NotificationVariables
-
- ! use CTdsTorqueWrenchLedNotificationVariables
-
- implicit none
- public
- type::OperationScenarioType
- real :: HKL = 63.76 ! Hook And Kelly Length
- real :: HL = 17.81 ! Hook Length
- real :: PL = 30.0 ! Pipe Length
- real :: SL = 90.0 ! Stand Length
- real :: LG = 8.0 ! Limit Gap
- real :: SG = 3.0 ! Slips Gap
- real :: TG = 4.0 ! Tong Gap
- real :: RE = 3.0 ! Release
- real :: ECG = 2.3 ! Elevator Connection Gap
-
- !moved from enum/CElevatorConnectionEnum
- integer :: ElevatorConnection = 0
- type(VoidEventHandlerCollection) :: OnElevatorConnectionChange
-
- !moved from SoftwareOutputs/CStringUpdateVariables
- integer :: StringUpdate = 0
- type(IntegerEventHandlerCollection) :: OnStringUpdateChange
-
- end type OperationScenarioType
-
- type(OperationScenarioType)::OperationScenario
-
- enum, bind(c)
- enumerator STRING_UPDATE_NEUTRAL
- enumerator STRING_UPDATE_ADD_SINGLE
- enumerator STRING_UPDATE_ADD_STAND
- enumerator STRING_UPDATE_REMOVE_SINGLE
- enumerator STRING_UPDATE_REMOVE_STAND
- end enum
-
-
- contains
-
- subroutine Set_StringUpdate(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(OperationScenario%StringUpdate == v) return
- #endif
- OperationScenario%StringUpdate = v
- call OperationScenario%OnStringUpdateChange%RunAll(v)
- end subroutine
-
- integer function Get_StringUpdate()
- implicit none
- Get_StringUpdate = OperationScenario%StringUpdate
- end function
-
- real(8) function TJH()
- use TD_DrillStemComponents
- implicit none
- TJH = TD_TopJointHeight
- end function
-
- real function TL()
- implicit none
- TL = 26.97
- end function
-
- real function NFC()
- implicit none
- NFC = Get_NearFloorConnection()
- end function
-
-
- subroutine Set_ElevatorConnection(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(OperationScenario%ElevatorConnection == v) return
- #endif
- OperationScenario%ElevatorConnection = v
-
- #ifdef deb
- print*, 'OperationScenario%ElevatorConnection=', OperationScenario%ElevatorConnection
- #endif
- call OperationScenario%OnElevatorConnectionChange%RunAll()
- end subroutine
-
- integer function Get_ElevatorConnection()
- implicit none
- Get_ElevatorConnection = OperationScenario%ElevatorConnection
- end function
-
- end module COperationScenariosVariables
|