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