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: Hoisting%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(Hoisting%DriveType == TopDrive_DriveType) call CloseSafetyValve_TopDrive() if(Hoisting%DriveType == Kelly_DriveType .and. operation_CloseSafetyValveLed == 0) call CloseSafetyValve_KellyMode() if(Hoisting%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