|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- 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
|