|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- 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: Hoisting%DriveType, Kelly_DriveType
- use CManifolds, only: InstallKellyCock
- implicit none
-
-
- if (Hoisting%DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Latch_OperationCondition=TopDrive'
- #endif
- endif
-
-
-
-
-
-
-
-
- if (Hoisting%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(Hoisting%DriveType == Kelly_DriveType) then
- call InstallKellyCock() !drill mode
- endif
- return
- end if
-
- endif
-
-
-
-
-
-
-
-
-
- end subroutine
-
- subroutine ButtonPress_Unlatch_OperationCondition()
- use CHoistingVariables!, only: Hoisting%DriveType, Kelly_DriveType
- use CManifolds, only: RemoveKellyCock
- implicit none
-
- if (Hoisting%DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Unlatch_OperationCondition=TopDrive'
- #endif
- endif
-
-
-
-
-
-
-
-
- if (Hoisting%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(Hoisting%DriveType == Kelly_DriveType) then ! top drive mode
- call RemoveKellyCock() !trip mode
- endif
- return
- end if
-
-
-
- endif
-
-
-
-
-
-
- end subroutine
-
- end module COperationConditionEnum
|