|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- module CSwingLedNotification
- use COperationScenariosVariables
- implicit none
- contains
-
- subroutine Evaluate_SwingLed()
- implicit none
-
-
-
-
-
- if (DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'Evaluate_SwingLed=TopDrive'
- #endif
-
-
-
- endif
-
-
-
-
-
-
-
-
-
- if (DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'Evaluate_SwingLed=Kelly'
- #endif
-
-
- !OPERATION-CODE=22
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= (HL + Get_NearFloorConnection()) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + LG) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.&
- Get_JointConnectionPossible() == .false. .and.&
- (Get_Swing() /= SWING_WELL_BEGIN .and.&
- Get_Swing() /= SWING_MOUSE_HOLE_BEGIN .and.&
- Get_Swing() /= SWING_RAT_HOLE_BEGIN) .and.&
- Get_Slips() == SLIPS_SET_END) then
-
- call Set_SwingLed(.true.)
- return
- end if
-
-
- !OPERATION-CODE=23
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_HookHeight() >= (HL + Get_NearFloorConnection() + PL) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + LG + PL) .and.&
- Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.&
- Get_JointConnectionPossible() == .false. .and.&
- (Get_Swing() /= SWING_WELL_BEGIN .and.&
- Get_Swing() /= SWING_MOUSE_HOLE_BEGIN .and.&
- Get_Swing() /= SWING_RAT_HOLE_BEGIN) .and.&
- Get_Slips() == SLIPS_SET_END) then
-
- call Set_SwingLed(.true.)
- return
- end if
-
-
- !OPERATION-CODE=24
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (HKL + Get_NearFloorConnection()) .and. Get_HookHeight() <= (HKL + Get_NearFloorConnection() + LG) .and.&
- Get_JointConnectionPossible() == .false. .and.&
- Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and.&
- (Get_Swing() /= SWING_WELL_BEGIN .and.&
- Get_Swing() /= SWING_MOUSE_HOLE_BEGIN .and.&
- Get_Swing() /= SWING_RAT_HOLE_BEGIN) .and.&
- Get_Slips() == SLIPS_SET_END) then
-
- call Set_SwingLed(.true.)
- return
- end if
-
- !OPERATION-CODE=25
- if (Get_OperationCondition() == OPERATION_DRILL .and.&
- Get_HookHeight() >= (HKL + Get_NearFloorConnection() + PL) .and. Get_HookHeight() <= (HKL + Get_NearFloorConnection() + LG + PL) .and.&
- Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.&
- Get_JointConnectionPossible() == .false. .and.&
- (Get_Swing() /= SWING_WELL_BEGIN .and.&
- Get_Swing() /= SWING_MOUSE_HOLE_BEGIN .and.&
- Get_Swing() /= SWING_RAT_HOLE_BEGIN) .and.&
- Get_Slips() == SLIPS_SET_END) then
-
- call Set_SwingLed(.true.)
- return
- end if
-
-
- call Set_SwingLed(.false.)
-
-
- endif
-
-
-
-
-
-
-
-
- end subroutine
-
- ! subroutine Subscribe_SwingLed()
- ! implicit none
-
- ! call OnOperationConditionChange%Add(Evaluate_SwingLed)
- ! call OnHookHeightChange%Add(Evaluate_SwingLed)
- ! call OnElevatorConnectionChange%Add(Evaluate_SwingLed)
- ! call OnKellyConnectionChange%Add(Evaluate_SwingLed)
- ! call OnSwingChange%Add(Evaluate_SwingLed)
- ! call OnSlipsChange%Add(Evaluate_SwingLed)
- ! call OnFillMouseHoleLedChange%Add(Evaluate_SwingLed)
-
- ! end subroutine
-
- end module CSwingLedNotification
|