|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- module CCloseSafetyValveLedNotificationVariables
- use CVoidEventHandlerCollection
- implicit none
- logical :: CloseSafetyValveLed = .false.
- integer :: operation_CloseSafetyValveLed = 0
-
- public
- type(VoidEventHandlerCollection) :: OnCloseSafetyValveLedChange
-
- private :: CloseSafetyValveLed
-
- contains
-
- subroutine Set_CloseSafetyValveLed(v)
- use CDrillingConsoleVariables, only: CloseSafetyValveLedHw => CloseSafetyValveLed
- use CManifolds, only: CloseSafetyValve_TopDrive, CloseSafetyValve_KellyMode, CloseSafetyValve_TripMode
- use CHoistingVariables, only: DriveType, TopDrive_DriveType, Kelly_DriveType
- implicit none
- logical , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(CloseSafetyValveLed == v) return
- #endif
- CloseSafetyValveLed = v
-
- if(CloseSafetyValveLed) then
- !!call CloseSafetyValve()
- if(DriveType == TopDrive_DriveType) call CloseSafetyValve_TopDrive()
- if(DriveType == Kelly_DriveType .and. operation_CloseSafetyValveLed == 0) call CloseSafetyValve_KellyMode()
- if(DriveType == Kelly_DriveType .and. operation_CloseSafetyValveLed == 1) call CloseSafetyValve_TripMode()
- endif
-
- !if(CloseSafetyValveLed) then
- ! CloseSafetyValveLedHw = 1
- !else
- ! CloseSafetyValveLedHw = 0
- !endif
- call OnCloseSafetyValveLedChange%RunAll()
- end subroutine
-
- logical function Get_CloseSafetyValveLed()
- implicit none
- Get_CloseSafetyValveLed = CloseSafetyValveLed
- end function
-
-
-
-
-
-
- subroutine Set_CloseSafetyValveLed_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_CloseSafetyValveLed_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_CloseSafetyValveLed_WN' :: Set_CloseSafetyValveLed_WN
- implicit none
- logical , intent(in) :: v
- call Set_CloseSafetyValveLed(v)
- end subroutine
-
- logical function Get_CloseSafetyValveLed_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_CloseSafetyValveLed_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_CloseSafetyValveLed_WN' :: Get_CloseSafetyValveLed_WN
- implicit none
- Get_CloseSafetyValveLed_WN = CloseSafetyValveLed
- end function
-
-
-
- end module CCloseSafetyValveLedNotificationVariables
|