|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- module CSlipsNotification
- use COperationScenariosVariables
- implicit none
- contains
-
- subroutine Evaluate_SlipsNotification()
- implicit none
-
-
-
-
- if (Hoisting%DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'Evaluate_SlipsNotification=TopDrive'
- #endif
-
- !TOPDRIVE-CODE=28
- if (Get_ZeroStringSpeed() .and.&
- GetRotaryRpm() == 0.0d0 .and.&
- Get_Slips() == SLIPS_UNSET_END .and.&
- Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0) then
-
- call Set_SlipsNotification(.true.)
- return
- end if
-
-
-
- !TOPDRIVE-CODE=29
- if (Get_ZeroStringSpeed() .and.&
- GetRotaryRpm() == 0.0d0 .and.&
- (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .or.&
- Get_TdsConnectionModes() == TDS_CONNECTION_STRING) .and.&
- Get_Slips() == SLIPS_SET_END .and.&
- Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0) then
-
- call Set_SlipsNotification(.true.)
- return
- end if
-
-
-
-
- endif
-
-
-
-
-
-
-
-
-
-
- if (Hoisting%DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'Evaluate_SlipsNotification=Kelly'
- #endif
-
- !OPERATION-CODE=53
- if (Get_ZeroStringSpeed() .and.&
- GetRotaryRpm() == 0.0d0 .and.&
- !Get_KellyConnection() == KELLY_CONNECTION_STRING
- Get_Slips() == SLIPS_UNSET_END .and.&
- Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0) then
- call Set_SlipsNotification(.true.)
- return
- end if
-
-
-
-
-
- !OPERATION-CODE=77
- if (Get_ZeroStringSpeed() .and.&
- GetRotaryRpm() == 0.0d0 .and.&
- Get_Slips() == SLIPS_SET_END .and.&
- Get_IsKellyBushingSetInTable() == .false. .and.&
- Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.&
- (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .or. Get_KellyConnection() == KELLY_CONNECTION_STRING)) then
- call Set_SlipsNotification(.true.)
-
- return
- end if
-
-
-
-
-
- !if (Get_OperationCondition() == OPERATION_DRILL .and.&
- ! Get_ZeroStringSpeed() .and.&
- ! Get_SlackOff() .and.&
- ! Get_KellyConnection() == KELLY_CONNECTION_STRING) then
- ! call Set_SlipsNotification(.true.)
- ! return
- !end if
- !
- !
- !if (Get_OperationCondition() == OPERATION_TRIP .and.&
- ! Get_ZeroStringSpeed() .and.&
- ! Get_NearFloorConnection() >= 21 .and. Get_NearFloorConnection() <= 25 .and.&
- ! Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING) then
- ! call Set_SlipsNotification(.true.)
- ! return
- !end if
-
-
-
-
- call Set_SlipsNotification(.false.)
-
- endif
-
-
-
-
-
-
- end subroutine
-
- ! subroutine Subscribe_SlipsNotification()
- ! implicit none
-
- ! call OnOperationConditionChange%Add(Evaluate_SlipsNotification)
- ! call OnSlackOffChange%Add(Evaluate_SlipsNotification)
- ! call OnZeroStringSpeedChange%Add(Evaluate_SlipsNotification)
- ! call OnNearFloorConnectionChange%Add(Evaluate_SlipsNotification)
- ! call OperationScenario%OnElevatorConnectionChange%Add(Evaluate_SlipsNotification)
- ! call OnKellyConnectionChange%Add(Evaluate_SlipsNotification)
- ! call OnSlipsChange%Add(Evaluate_SlipsNotification)
-
- ! end subroutine
-
- end module CSlipsNotification
|