|
- module CDataDisplayConsoleVariables
- use CIActionReference
- ! !**use CDoubleEventHandlerCollection
- implicit none
- public
-
- Type :: DataDisplayConsoleType
- !portable
- real(8) :: TripAlarmLow
- real(8) :: TripAlarmHigh
- real(8) :: RetFlowAlarmLow
- real(8) :: RetFlowAlarmHigh
- real(8) :: PitAlarmLow
- real(8) :: PitAlarmHigh
-
- real(8) :: PortWeightOnBit
- real(8) :: PortHookLoad
- real(8) :: PortCasingPressure
- real(8) :: PortPumpPressure
-
- ! Input vars
- real(8) :: TripTankSetAlarmLow
- real(8) :: TripTankSetAlarmHigh
- integer :: TripTankSetAlarmSwitch
- logical :: TripTankPowerSwitch
- logical :: TripTankPumpSwitch
- logical :: TripTankHornSwitch
- logical :: AcidGasDetectionHornSwitch
- logical :: TotalStrokeCounterResetSwitch
- logical :: DrillingTrippingSelectorSwitch
- real(8) :: MVTSetAlarmLowKnob
- real(8) :: MVTSetAlarmHighKnob
- integer :: MVTSetAlarmSwitch
- logical :: MudTank1Switch
- logical :: MudTank2Switch
- logical :: MudTank3Switch
- logical :: MudTank4Switch
- real(8) :: MVTFineKnob
- real(8) :: MVTCoarseKnob
- logical :: MVTHornSwitch
- logical :: MVTDeviationTripSelectionSwitch
- logical :: MVTPowerSwitch
- logical :: MFFIResetTotalStrokes
- logical :: MFFIResetFillCounter
- integer :: MFFIPumpSelectorSwitch
- logical :: MFFIFillSPMSelectorSwitch
- real(8) :: MFFISetAlarmLowKnob
- real(8) :: MFFISetAlarmHighKnob
- integer :: MFFISetAlarmSwitch
- logical :: MFFIPowerSwitch
- logical :: MFFIHornSwitch
-
- logical :: ResetWob
- logical :: Clutch
-
- ! Output vars
- real(8) :: WOBPointer
- real(8) :: HookLoadPointer
- real(8) :: TripTankGauge
- integer :: TripTankAlarmLED
- integer :: TripTankPumpLED
- real(8) :: StandPipePressureGauge
- real(8) :: CasingPressureGauge
- real(8) :: MP1SPMGauge
- real(8) :: MP2SPMGauge
- real(8) :: ReturnLineTempGauge
- real(8) :: RotaryTorqueGauge
- real(8) :: RotaryRPMGauge
- ! !**type(DoubleEventHandlerCollection) :: OnRotaryRpmChange
- integer :: AcidGasDetectionLED
- real(8) :: TotalStrokeCounter
- !real(8) :: TotalStrokeCounter_temp
- real(8) :: PitGainLossGauge
- real(8) :: MudTanksVolumeGauge
- integer :: MVTAlarmLED
- real(8) :: ReturnMudFlowGauge
- real(8) :: FillStrokeCounter
- real(8) :: MFFITotalStrokeCounter
- integer :: MFFIAlarmLED
- integer :: MFFIPumpLED
- real(8) :: TotalWellDepth
- real(8) :: BitDepth
- real(8) :: HookLoad
- real(8) :: StandPipePressure
- real(8) :: CasingPressure
- real(8) :: MP1SPM
- real(8) :: MP2SPM
- real(8) :: RTTorque
- real(8) :: RTRPM
- real(8) :: WOP
- real(8) :: ROP
- real(8) :: MudWeightIn
- real(8) :: MudWeightOut
- logical :: Buzzer1
- logical :: Buzzer2
- logical :: Buzzer3
- logical :: Buzzer4
- End Type DataDisplayConsoleType
- Type(DataDisplayConsoleType) :: DataDisplayConsole
-
- ! events
- procedure (ActionDualDouble), pointer :: PumpsSpmChanges => null()
-
- contains
-
-
- subroutine Set_TotalDepth(v)
- use CDrillWatchVariables!!, only: DrillingWatch%Depth
- ! use CSimulationVariables, only: SetDistanceDrilled
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%TotalWellDepth = v
- DrillingWatch%Depth = v
- ! call SetDistanceDrilled(v)
- end subroutine
-
- subroutine Set_BitPosition(v)
- use CDrillWatchVariables!!, only: DrillingWatch%BitPosition
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%BitDepth = v
- DrillingWatch%BitPosition = v
- end subroutine
-
- subroutine Set_RotaryTorque(v)
- use CDrillWatchVariables!!, only: DrillingWatch%Torque
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%RotaryTorqueGauge = v
- DrillingWatch%Torque = v
- DataDisplayConsole%RTTorque = v
- end subroutine
-
-
- subroutine Set_MudWeightIn(v)
- use CDrillWatchVariables!, only: MudWeightInDw => DataDisplayConsole%MudWeightIn
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%MudWeightIn = v
- DrillingWatch%MudWeightIn = v
- end subroutine
-
- subroutine Set_MudWeightOut(v)
- use CDrillWatchVariables!, only: MudWeightOutDw => DataDisplayConsole%MudWeightOut
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%MudWeightOut = v
- DrillingWatch%MudWeightOut = v
- end subroutine
-
- subroutine Set_TripTankVolume(v)
- use CDrillWatchVariables!, only: DrillingWatch%TripTankVolume
- implicit none
- real(8), intent(in) :: v
- DrillingWatch%TripTankVolume = v
- end subroutine
-
- subroutine Set_FillVolume(v)
- use CDrillWatchVariables!, only: DrillingWatch%FillVolume
- implicit none
- real(8), intent(in) :: v
- DrillingWatch%FillVolume = v
- end subroutine
-
- subroutine Set_HookLoad(v)
- use CDrillWatchVariables!, only: HookLoadDw => DataDisplayConsole%HookLoad
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%HookLoadPointer = v
- DrillingWatch%HookLoad = v * 1000
- DataDisplayConsole%HookLoad = v
- end subroutine
-
- subroutine Set_WeightOnBit(v)
- use CDrillWatchVariables!, only: DrillingWatch%WeightOnBit
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%WOBPointer = v
- DrillingWatch%WeightOnBit = v
- DataDisplayConsole%WOP = v
- end subroutine
-
- subroutine Set_ROP(v)
- use CDrillWatchVariables!, only: ROPDw => DataDisplayConsole%ROP
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%ROP = v
- DrillingWatch%ROP = v
- end subroutine
-
- subroutine Set_CasingPressure(v)
- use CDrillWatchVariables!, only: CasingPressureDw => CasingPressure
- use CChokeControlPanelVariables!, only: CasingPressureChoke => CasingPressure
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%CasingPressureGauge = v
- DrillingWatch%CasingPressure = v
- ChokeControlPanel%CasingPressure = v
- DataDisplayConsole%CasingPressure = v
- end subroutine
-
- subroutine Set_StandPipePressure(v)
- use CDrillWatchVariables!, only: DrillingWatch%PumpPressure
- use CChokeControlPanelVariables!, only: StandPipePressureChoke => DataDisplayConsole%StandPipePressure
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%StandPipePressureGauge = v
- DrillingWatch%PumpPressure = v
- ChokeControlPanel%StandPipePressure = v
- DataDisplayConsole%StandPipePressure = v
-
-
-
- end subroutine
-
-
- subroutine Set_RotaryRPMGauge(v)
- use CDrillWatchVariables!, only: DrillingWatch%RPM
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%RotaryRPMGauge = v
- DrillingWatch%RPM = v
- DataDisplayConsole%RTRPM = v
- ! call DataDisplayConsole%OnRotaryRpmChange%RunAll(v)
- end subroutine
-
-
-
-
- subroutine Set_MP1SPMGauge(v)
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%MP1SPMGauge = v
- DataDisplayConsole%MP1SPM = v
- if(associated(PumpsSpmChanges)) call PumpsSpmChanges(DataDisplayConsole%MP1SPMGauge, DataDisplayConsole%MP2SPMGauge)
- #ifdef deb
- print*, 'MP1SPMGauge=', DataDisplayConsole%MP1SPMGauge
- #endif
- end subroutine
-
- subroutine Set_MP2SPMGauge(v)
- implicit none
- real(8), intent(in) :: v
- DataDisplayConsole%MP2SPMGauge = v
- DataDisplayConsole%MP2SPM = v
- if(associated(PumpsSpmChanges)) call PumpsSpmChanges(DataDisplayConsole%MP1SPMGauge, DataDisplayConsole%MP2SPMGauge)
- #ifdef deb
- print*, 'MP2SPMGauge=', DataDisplayConsole%MP2SPMGauge
- #endif
- end subroutine
-
- end module CDataDisplayConsoleVariables
|