|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- module CSwingEnum
- use OperationScenariosModule
- implicit none
- contains
-
- subroutine Evaluate_Swing()
- implicit none
-
- ! if (DriveType == TopDrive_DriveType) then
- !#ifdef OST
- ! print*, 'Evaluate_Swing=TopDrive'
- !#endif
- ! endif
- !
- !
- !
- !
- !
- !
- !
- !
- !
- ! if (DriveType == Kelly_DriveType) then
- !#ifdef OST
- ! print*, 'Evaluate_Swing=Kelly'
- !#endif
- ! endif
-
- end subroutine
-
- ! subroutine Subscribe_Swing()
- ! use CDrillingConsoleVariables
- ! use ConfigurationVariables
- ! use ConfigurationVariables
- ! implicit none
- ! call OnSwingPress%Add(ButtonPress_Swing)
- ! end subroutine
-
- subroutine ButtonPress_Swing()
- implicit none
-
-
-
-
- if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Swing=TopDrive'
- #endif
- endif
-
-
-
-
-
-
-
-
-
- if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'ButtonPress_Swing=Kelly'
- #endif
-
-
- !!OPERATION-CODE=84
- !if (Get_OperationCondition() == OPERATION_DRILL .and.&
- ! Get_HookHeight() >= (HKL + Get_NearFloorConnection() + RE) .and.&
- ! Get_Swing() == SWING_RAT_HOLE_END) then
- ! call Set_Swing(SWING_WELL_BEGIN)
- ! return
- !endif
-
- !OPERATION-CODE=26
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.&
- Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.&
- Get_Swing() == SWING_WELL_END .and.&
- Get_SwingLed() .and.&
- Get_FillMouseHoleLed() == .false.) then
-
- call Set_Swing(SWING_MOUSE_HOLE_BEGIN)
- return
- endif
-
-
-
-
- !OPERATION-CODE=27
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.&
- Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.&
- Get_Swing() == SWING_MOUSE_HOLE_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_WELL_BEGIN)
- return
- endif
-
-
-
-
- !OPERATION-CODE=28
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection()) .and.&
- Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_WELL_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_MOUSE_HOLE_BEGIN)
- return
- endif
-
-
-
- !OPERATION-CODE=29
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HKL + data%State%OperationScenario%SG) .and.&
- Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_MOUSE_HOLE_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_RAT_HOLE_BEGIN)
- return
- endif
-
-
- !OPERATION-CODE=30
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection()) .and.&
- Get_Swing() == SWING_RAT_HOLE_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_WELL_BEGIN)
- return
- endif
-
-
-
- !OPERATION-CODE=31
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection()) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_WELL_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_MOUSE_HOLE_BEGIN)
- return
- endif
-
-
-
- !OPERATION-CODE=32
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= 27.41 .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- !Get_Swing() == SWING_WELL_END .and.&
- Get_Swing() == SWING_MOUSE_HOLE_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_RAT_HOLE_BEGIN)
- return
- endif
-
-
-
- !OPERATION-CODE=33
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- (Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection()) .and. Get_HookHeight() <= 27.41) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_MOUSE_HOLE_END .and.&!Get_Swing() == SWING_MOUSE_HOLE_END .and.&!Get_Swing() /= SWING_WELL_END
- Get_SwingLed()) then
-
- call Set_Swing(SWING_WELL_BEGIN)
- return
- endif
-
-
-
- !OPERATION-CODE=34
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.&
- Get_Swing() == SWING_WELL_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_MOUSE_HOLE_BEGIN)
- return
- endif
-
-
-
-
-
- !OPERATION-CODE=35
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + data%State%OperationScenario%RE) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.&
- Get_Swing() == SWING_MOUSE_HOLE_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_WELL_BEGIN)
- return
- endif
-
- !OPERATION-CODE=80
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= 27.41 .and. Get_HookHeight() <= (27.41 + 10) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- Get_Swing() == SWING_RAT_HOLE_END .and.&
- Get_SwingLed()) then
-
- call Set_Swing(SWING_WELL_BEGIN)
- return
- end if
-
-
-
-
- endif
-
-
-
-
-
-
-
-
-
-
-
-
-
- end subroutine
-
- end module CSwingEnum
|