|
- module COperationConditionEnum
- use CLog4
- use COperationScenariosVariables
- implicit none
- contains
-
- subroutine Evaluate_OperationCondition()
- implicit none
-
- ! if (DriveType == TopDrive_DriveType) then
- !#ifdef OST
- ! print*, 'Evaluate_OperationCondition=TopDrive'
- !#endif
- ! endif
- !
- !
- !
- !
- !
- !
- !
- !
- ! if (DriveType == Kelly_DriveType) then
- !#ifdef OST
- ! print*, 'Evaluate_OperationCondition=Kelly'
- !#endif
- ! endif
-
- end subroutine
-
- ! subroutine Subscribe_OperationCondition()
- ! use CDrillingConsoleVariables
- ! implicit none
- ! call OnLatchPipePress%Add(ButtonPress_Latch_OperationCondition)
- ! call OnUnlatchPipePress%Add(ButtonPress_Unlatch_OperationCondition)
- ! end subroutine
-
- subroutine ButtonPress_Latch_OperationCondition()
- use CHoistingVariables, only: DriveType, Kelly_DriveType
- use CManifolds, only: InstallKellyCock
- implicit none
-
-
- if (DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Latch_OperationCondition=TopDrive'
- #endif
- endif
-
-
-
-
-
-
-
-
- if (DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Latch_OperationCondition=Kelly'
- #endif
-
- !OPERATION-CODE=17
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_RAT_HOLE_END .and.&
- Get_LatchLed() .and.&
- Get_UnlatchLed() == .false.) then
-
- call Set_OperationCondition(OPERATION_DRILL)
- call Set_LatchLed(.false.)
- call Set_UnlatchLed(.true.)
- call Set_Kelly(KELLY_INSTALL)
- if(DriveType == Kelly_DriveType) then
- call InstallKellyCock() !drill mode
- endif
- return
- end if
-
- endif
-
-
-
-
-
-
-
-
-
- end subroutine
-
- subroutine ButtonPress_Unlatch_OperationCondition()
- use CHoistingVariables, only: DriveType, Kelly_DriveType
- use CManifolds, only: RemoveKellyCock
- implicit none
-
- if (DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Unlatch_OperationCondition=TopDrive'
- #endif
- endif
-
-
-
-
-
-
-
-
- if (DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Unlatch_OperationConditions=Kelly'
- #endif
-
-
- !OPERATION-CODE=18
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_RAT_HOLE_END .and.&
- Get_LatchLed() == .false. .and.&
- Get_UnlatchLed()) then
-
- call Set_Kelly(KELLY_REMOVE)
- call Set_Swing(SWING_WELL_BEGIN)
- call Set_OperationCondition(OPERATION_TRIP)
- call Set_LatchLed(.true.)
- call Set_UnlatchLed(.false.)
- call Set_IrSafetyValveLed(.false.)
- if(DriveType == Kelly_DriveType) then ! top drive mode
- call RemoveKellyCock() !trip mode
- endif
- return
- end if
-
-
-
- endif
-
-
-
-
-
-
- end subroutine
-
- end module COperationConditionEnum
|