|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- module CIrSafetyValveLedNotification
- use COperationScenariosVariables
- !use COperationConditionEnumVariables
- implicit none
- contains
-
- subroutine Evaluate_IrSafetyValveLed()
- implicit none
-
-
-
-
-
- if (Hoisting%DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'Evaluate_IrSafetyValveLed=TopDrive'
- #endif
-
-
-
-
-
-
-
-
- endif
-
-
-
-
-
-
-
- if (Hoisting%DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'Evaluate_IrSafetyValveLed=Kelly'
- #endif
-
- !OPERATION-CODE=56
- if (Get_OperationCondition() == OPERATION_DRILL) then
- call Set_IrSafetyValveLed(.true.)
- return
- end if
-
-
-
-
- !call Set_IrSafetyValveLed(.false.)
-
- endif
-
-
-
-
-
-
-
-
-
-
-
-
- end subroutine
-
- ! subroutine Subscribe_IrSafetyValveLed()
- ! use CDrillingConsoleVariables
- ! implicit none
- ! call OnIRSafetyValvePress%Add(ButtonPress_IrSafetyValve)
- ! call OnOperationConditionChangeInt%Add(Set_Operation_IrSafetyValveLed)
- ! end subroutine
-
- subroutine Set_Operation_IrSafetyValveLed(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(Notifications%operation_IrSafetyValveLed == v) return
- #endif
- Notifications%operation_IrSafetyValveLed = v
- #ifdef deb
- print*, 'operation_IrSafetyValveLed=', Notifications%operation_IrSafetyValveLed
- #endif
- end subroutine
-
- subroutine ButtonPress_IrSafetyValve()
- implicit none
-
-
-
-
- if (Hoisting%DriveType == TopDrive_DriveType) then
- #ifdef OST
- print*, 'Evaluate_IrSafetyValveLed=TopDrive'
- #endif
-
-
-
- !TOPDRIVE-CODE=53
- if (Get_IrSafetyValvePermission() .and.&
- Get_IrSafetyValveLed()) then
-
- call Set_IrSafetyValveLed(.false.)
- return
- end if
-
-
-
-
-
-
-
-
- !TOPDRIVE-CODE=54
- if (Get_IrSafetyValvePermission() .and.&
- Get_IrSafetyValveLed() == .false.) then
-
- call Set_IrSafetyValveLed(.true.)
- return
- end if
-
-
- endif
-
-
-
-
-
-
-
- if (Hoisting%DriveType == Kelly_DriveType) then
- #ifdef OST
- print*, 'Evaluate_IrSafetyValveLed=Kelly'
- #endif
-
- !OPERATION-CODE=54
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_IrSafetyValvePermission() .and.&
- Get_IrSafetyValveLed()) then
- call Set_IrSafetyValveLed(.false.)
- return
- end if
-
-
- !OPERATION-CODE=55
- if (Get_OperationCondition() == OPERATION_TRIP .and.&
- Get_IrSafetyValvePermission() .and.&
- Get_IrSafetyValveLed() == .false. ) then
- call Set_IrSafetyValveLed(.true.)
- return
- end if
-
- endif
-
-
-
-
-
-
-
-
- end subroutine
-
- end module CIrSafetyValveLedNotification
|