|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- module CDataDisplayConsoleVariables
- use CIActionReference
- use CDoubleEventHandlerCollection
- implicit none
- public
-
- !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
-
- ! events
- procedure (ActionDualDouble), pointer :: PumpsSpmChanges => null()
-
- contains
-
-
- subroutine Set_TotalDepth(v)
- use CDrillWatchVariables, only: Depth
- use CSimulationVariables, only: SetDistanceDrilled
- implicit none
- real(8), intent(in) :: v
- TotalWellDepth = v
- Depth = v
- call SetDistanceDrilled(v)
- end subroutine
-
- subroutine Set_BitPosition(v)
- use CDrillWatchVariables, only: BitPosition
- implicit none
- real(8), intent(in) :: v
- BitDepth = v
- BitPosition = v
- end subroutine
-
- subroutine Set_RotaryTorque(v)
- use CDrillWatchVariables, only: Torque
- implicit none
- real(8), intent(in) :: v
- RotaryTorqueGauge = v
- Torque = v
- RTTorque = v
- end subroutine
-
-
- subroutine Set_MudWeightIn(v)
- use CDrillWatchVariables, only: MudWeightInDw => MudWeightIn
- implicit none
- real(8), intent(in) :: v
- MudWeightIn = v
- MudWeightInDw = v
- end subroutine
-
- subroutine Set_MudWeightOut(v)
- use CDrillWatchVariables, only: MudWeightOutDw => MudWeightOut
- implicit none
- real(8), intent(in) :: v
- MudWeightOut = v
- MudWeightOutDw = v
- end subroutine
-
- subroutine Set_TripTankVolume(v)
- use CDrillWatchVariables, only: TripTankVolume
- implicit none
- real(8), intent(in) :: v
- TripTankVolume = v
- end subroutine
-
- subroutine Set_FillVolume(v)
- use CDrillWatchVariables, only: FillVolume
- implicit none
- real(8), intent(in) :: v
- FillVolume = v
- end subroutine
-
-
-
-
-
-
-
-
-
- subroutine Set_HookLoad(v)
- use CDrillWatchVariables, only: HookLoadDw => HookLoad
- implicit none
- real(8), intent(in) :: v
- HookLoadPointer = v
- HookLoadDw = v * 1000
- HookLoad = v
- end subroutine
-
- subroutine Set_WeightOnBit(v)
- use CDrillWatchVariables, only: WeightOnBit
- implicit none
- real(8), intent(in) :: v
- WOBPointer = v
- WeightOnBit = v
- WOP = v
- end subroutine
-
- subroutine Set_ROP(v)
- use CDrillWatchVariables, only: ROPDw => ROP
- implicit none
- real(8), intent(in) :: v
- ROP = v
- ROPDw = v
- end subroutine
-
- subroutine Set_CasingPressure(v)
- use CDrillWatchVariables, only: CasingPressureDw => CasingPressure
- use CChokeControlPanelVariables, only: CasingPressureChoke => CasingPressure
- implicit none
- real(8), intent(in) :: v
- CasingPressureGauge = v
- CasingPressureDw = v
- CasingPressureChoke = v
- CasingPressure = v
- end subroutine
-
- subroutine Set_StandPipePressure(v)
- use CDrillWatchVariables, only: PumpPressure
- use CChokeControlPanelVariables, only: StandPipePressureChoke => StandPipePressure
- implicit none
- real(8), intent(in) :: v
- StandPipePressureGauge = v
- PumpPressure = v
- StandPipePressureChoke = v
- StandPipePressure = v
-
-
-
- end subroutine
-
-
- subroutine Set_RotaryRPMGauge(v)
- use CDrillWatchVariables, only: RPM
- implicit none
- real(8), intent(in) :: v
- RotaryRPMGauge = v
- RPM = v
- RTRPM = v
- call OnRotaryRpmChange%RunAll(v)
- end subroutine
-
-
-
-
- subroutine Set_MP1SPMGauge(v)
- implicit none
- real(8), intent(in) :: v
- MP1SPMGauge = v
- MP1SPM = v
- if(associated(PumpsSpmChanges)) call PumpsSpmChanges(MP1SPMGauge, MP2SPMGauge)
- #ifdef deb
- print*, 'MP1SPMGauge=', MP1SPMGauge
- #endif
- end subroutine
-
- subroutine Set_MP2SPMGauge(v)
- implicit none
- real(8), intent(in) :: v
- MP2SPMGauge = v
- MP2SPM = v
- if(associated(PumpsSpmChanges)) call PumpsSpmChanges(MP1SPMGauge, MP2SPMGauge)
- #ifdef deb
- print*, 'MP2SPMGauge=', MP2SPMGauge
- #endif
- end subroutine
-
- end module CDataDisplayConsoleVariables
|