|
- module CDataDisplayConsole
- ! use CDataDisplayConsole
- use SimulationVariables
- implicit none
- public
- contains
-
- subroutine DataDisplayConsoleToJson(parent)
-
- type(json_value),pointer :: parent
- type(json_core) :: json
- type(json_value),pointer :: p
-
- ! 1. create new node
- call json%create_object(p,'DataDisplay')
- call json%add(p,"TripAlarmLow",data%EquipmentControl%DataDisplayConsole%TripAlarmLow)
- call json%add(p,"TripAlarmHigh",data%EquipmentControl%DataDisplayConsole%TripAlarmHigh)
- call json%add(p,"RetFlowAlarmLow",data%EquipmentControl%DataDisplayConsole%RetFlowAlarmLow)
- call json%add(p,"RetFlowAlarmHigh",data%EquipmentControl%DataDisplayConsole%RetFlowAlarmHigh)
- call json%add(p,"PitAlarmLow",data%EquipmentControl%DataDisplayConsole%PitAlarmLow)
- call json%add(p,"PitAlarmHigh",data%EquipmentControl%DataDisplayConsole%PitAlarmHigh)
- call json%add(p,"PortWeightOnBit",data%EquipmentControl%DataDisplayConsole%PortWeightOnBit)
- call json%add(p,"PortHookLoad",data%EquipmentControl%DataDisplayConsole%PortHookLoad)
- call json%add(p,"PortCasingPressure",data%EquipmentControl%DataDisplayConsole%PortCasingPressure)
- call json%add(p,"PortPumpPressure",data%EquipmentControl%DataDisplayConsole%PortPumpPressure)
- call json%add(p,"TripTankSetAlarmLow",data%EquipmentControl%DataDisplayConsole%TripTankSetAlarmLow)
- call json%add(p,"TripTankSetAlarmHigh",data%EquipmentControl%DataDisplayConsole%TripTankSetAlarmHigh)
- call json%add(p,"TripTankSetAlarmSwitch",data%EquipmentControl%DataDisplayConsole%TripTankSetAlarmSwitch)
- call json%add(p,"TripTankPowerSwitch",data%EquipmentControl%DataDisplayConsole%TripTankPowerSwitch)
- call json%add(p,"TripTankPumpSwitch",data%EquipmentControl%DataDisplayConsole%TripTankPumpSwitch)
- call json%add(p,"TripTankHornSwitch",data%EquipmentControl%DataDisplayConsole%TripTankHornSwitch)
- call json%add(p,"AcidGasDetectionHornSwitch",data%EquipmentControl%DataDisplayConsole%AcidGasDetectionHornSwitch)
- call json%add(p,"TotalStrokeCounterResetSwitch",data%EquipmentControl%DataDisplayConsole%TotalStrokeCounterResetSwitch)
- call json%add(p,"DrillingTrippingSelectorSwitch",data%EquipmentControl%DataDisplayConsole%DrillingTrippingSelectorSwitch)
- call json%add(p,"MVTSetAlarmLowKnob",data%EquipmentControl%DataDisplayConsole%MVTSetAlarmLowKnob)
- call json%add(p,"MVTSetAlarmHighKnob",data%EquipmentControl%DataDisplayConsole%MVTSetAlarmHighKnob)
- call json%add(p,"MVTSetAlarmSwitch",data%EquipmentControl%DataDisplayConsole%MVTSetAlarmSwitch)
- call json%add(p,"MudTank1Switch",data%EquipmentControl%DataDisplayConsole%MudTank1Switch)
- call json%add(p,"MudTank2Switch",data%EquipmentControl%DataDisplayConsole%MudTank2Switch)
- call json%add(p,"MudTank3Switch",data%EquipmentControl%DataDisplayConsole%MudTank3Switch)
- call json%add(p,"MudTank4Switch",data%EquipmentControl%DataDisplayConsole%MudTank4Switch)
- call json%add(p,"MVTFineKnob",data%EquipmentControl%DataDisplayConsole%MVTFineKnob)
- call json%add(p,"MVTCoarseKnob",data%EquipmentControl%DataDisplayConsole%MVTCoarseKnob)
- call json%add(p,"MVTHornSwitch",data%EquipmentControl%DataDisplayConsole%MVTHornSwitch)
- call json%add(p,"MVTDeviationTripSelectionSwitch",data%EquipmentControl%DataDisplayConsole%MVTDeviationTripSelectionSwitch)
- call json%add(p,"MVTPowerSwitch",data%EquipmentControl%DataDisplayConsole%MVTPowerSwitch)
- call json%add(p,"MFFIResetTotalStrokes",data%EquipmentControl%DataDisplayConsole%MFFIResetTotalStrokes)
- call json%add(p,"MFFIResetFillCounter",data%EquipmentControl%DataDisplayConsole%MFFIResetFillCounter)
- call json%add(p,"MFFIPumpSelectorSwitch",data%EquipmentControl%DataDisplayConsole%MFFIPumpSelectorSwitch)
- call json%add(p,"MFFIFillSPMSelectorSwitch",data%EquipmentControl%DataDisplayConsole%MFFIFillSPMSelectorSwitch)
- call json%add(p,"MFFISetAlarmLowKnob",data%EquipmentControl%DataDisplayConsole%MFFISetAlarmLowKnob)
- call json%add(p,"MFFISetAlarmHighKnob",data%EquipmentControl%DataDisplayConsole%MFFISetAlarmHighKnob)
- call json%add(p,"MFFISetAlarmSwitch",data%EquipmentControl%DataDisplayConsole%MFFISetAlarmSwitch)
- call json%add(p,"MFFIPowerSwitch",data%EquipmentControl%DataDisplayConsole%MFFIPowerSwitch)
- call json%add(p,"MFFIHornSwitch",data%EquipmentControl%DataDisplayConsole%MFFIHornSwitch)
- call json%add(p,"ResetWob",data%EquipmentControl%DataDisplayConsole%ResetWob)
- call json%add(p,"Clutch",data%EquipmentControl%DataDisplayConsole%Clutch)
- call json%add(p,"WOBPointer",data%EquipmentControl%DataDisplayConsole%WOBPointer)
- call json%add(p,"HookLoadPointer",data%EquipmentControl%DataDisplayConsole%HookLoadPointer)
- call json%add(p,"TripTankGauge",data%EquipmentControl%DataDisplayConsole%TripTankGauge)
- call json%add(p,"TripTankAlarmLED",data%EquipmentControl%DataDisplayConsole%TripTankAlarmLED)
- call json%add(p,"TripTankPumpLED",data%EquipmentControl%DataDisplayConsole%TripTankPumpLED)
- call json%add(p,"StandPipePressureGauge",data%EquipmentControl%DataDisplayConsole%StandPipePressureGauge)
- call json%add(p,"CasingPressureGauge",data%EquipmentControl%DataDisplayConsole%CasingPressureGauge)
- call json%add(p,"MP1SPMGauge",data%EquipmentControl%DataDisplayConsole%MP1SPMGauge)
- call json%add(p,"MP2SPMGauge",data%EquipmentControl%DataDisplayConsole%MP2SPMGauge)
- call json%add(p,"ReturnLineTempGauge",data%EquipmentControl%DataDisplayConsole%ReturnLineTempGauge)
- call json%add(p,"RotaryTorqueGauge",data%EquipmentControl%DataDisplayConsole%RotaryTorqueGauge)
- call json%add(p,"RotaryRPMGauge",data%EquipmentControl%DataDisplayConsole%RotaryRPMGauge)
- call json%add(p,"AcidGasDetectionLED",data%EquipmentControl%DataDisplayConsole%AcidGasDetectionLED)
- call json%add(p,"TotalStrokeCounter",data%EquipmentControl%DataDisplayConsole%TotalStrokeCounter)
- call json%add(p,"PitGainLossGauge",data%EquipmentControl%DataDisplayConsole%PitGainLossGauge)
- call json%add(p,"MudTanksVolumeGauge",data%EquipmentControl%DataDisplayConsole%MudTanksVolumeGauge)
- call json%add(p,"MVTAlarmLED",data%EquipmentControl%DataDisplayConsole%MVTAlarmLED)
- call json%add(p,"ReturnMudFlowGauge",data%EquipmentControl%DataDisplayConsole%ReturnMudFlowGauge)
- call json%add(p,"FillStrokeCounter",data%EquipmentControl%DataDisplayConsole%FillStrokeCounter)
- call json%add(p,"MFFITotalStrokeCounter",data%EquipmentControl%DataDisplayConsole%MFFITotalStrokeCounter)
- call json%add(p,"MFFIAlarmLED",data%EquipmentControl%DataDisplayConsole%MFFIAlarmLED)
- call json%add(p,"MFFIPumpLED",data%EquipmentControl%DataDisplayConsole%MFFIPumpLED)
- call json%add(p,"TotalWellDepth",data%EquipmentControl%DataDisplayConsole%TotalWellDepth)
- call json%add(p,"BitDepth",data%EquipmentControl%DataDisplayConsole%BitDepth)
- call json%add(p,"HookLoad",data%EquipmentControl%DataDisplayConsole%HookLoad)
- call json%add(p,"StandPipePressure",data%EquipmentControl%DataDisplayConsole%StandPipePressure)
- call json%add(p,"CasingPressure",data%EquipmentControl%DataDisplayConsole%CasingPressure)
- call json%add(p,"MP1SPM",data%EquipmentControl%DataDisplayConsole%MP1SPM)
- call json%add(p,"MP2SPM",data%EquipmentControl%DataDisplayConsole%MP2SPM)
- call json%add(p,"RTTorque",data%EquipmentControl%DataDisplayConsole%RTTorque)
- call json%add(p,"RTRPM",data%EquipmentControl%DataDisplayConsole%RTRPM)
- call json%add(p,"WOP",data%EquipmentControl%DataDisplayConsole%WOP)
- call json%add(p,"ROP",data%EquipmentControl%DataDisplayConsole%ROP)
- call json%add(p,"MudWeightIn",data%EquipmentControl%DataDisplayConsole%MudWeightIn)
- call json%add(p,"MudWeightOut",data%EquipmentControl%DataDisplayConsole%MudWeightOut)
- call json%add(p,"Buzzer1",data%EquipmentControl%DataDisplayConsole%Buzzer1)
- call json%add(p,"Buzzer2",data%EquipmentControl%DataDisplayConsole%Buzzer2)
- call json%add(p,"Buzzer3",data%EquipmentControl%DataDisplayConsole%Buzzer3)
- call json%add(p,"Buzzer4",data%EquipmentControl%DataDisplayConsole%Buzzer4)
-
-
- call json%add(parent,p)
- end subroutine
-
-
- subroutine Set_TotalDepth(v)
- use SimulationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Depth
- ! use CSimulationVariables, only: SetDistanceDrilled
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%TotalWellDepth = v
- data%EquipmentControl%DrillingWatch%Depth = v
- ! call SetDistanceDrilled(v)
- end subroutine
-
- subroutine Set_BitPosition(v)
- use SimulationVariables !@!!, only: data%EquipmentControl%DrillingWatch%BitPosition
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%BitDepth = v
- data%EquipmentControl%DrillingWatch%BitPosition = v
- end subroutine
-
- subroutine Set_RotaryTorque(v)
- use SimulationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Torque
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%RotaryTorqueGauge = v
- data%EquipmentControl%DrillingWatch%Torque = v
- data%EquipmentControl%DataDisplayConsole%RTTorque = v
- end subroutine
-
-
- subroutine Set_MudWeightIn(v)
- use SimulationVariables !@!, only: MudWeightInDw => data%EquipmentControl%DataDisplayConsole%MudWeightIn
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%MudWeightIn = v
- data%EquipmentControl%DrillingWatch%MudWeightIn = v
- end subroutine
-
- subroutine Set_MudWeightOut(v)
- use SimulationVariables !@!, only: MudWeightOutDw => data%EquipmentControl%DataDisplayConsole%MudWeightOut
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%MudWeightOut = v
- data%EquipmentControl%DrillingWatch%MudWeightOut = v
- end subroutine
-
- subroutine Set_TripTankVolume(v)
- use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%TripTankVolume
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DrillingWatch%TripTankVolume = v
- end subroutine
-
- subroutine Set_FillVolume(v)
- use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%FillVolume
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DrillingWatch%FillVolume = v
- end subroutine
-
- subroutine Set_HookLoad(v)
- use SimulationVariables !@!, only: HookLoadDw => data%EquipmentControl%DataDisplayConsole%HookLoad
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%HookLoadPointer = v
- data%EquipmentControl%DrillingWatch%HookLoad = v * 1000
- data%EquipmentControl%DataDisplayConsole%HookLoad = v
- end subroutine
-
- subroutine Set_WeightOnBit(v)
- use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%WeightOnBit
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%WOBPointer = v
- data%EquipmentControl%DrillingWatch%WeightOnBit = v
- data%EquipmentControl%DataDisplayConsole%WOP = v
- end subroutine
-
- subroutine Set_ROP(v)
- use SimulationVariables !@!, only: ROPDw => data%EquipmentControl%DataDisplayConsole%ROP
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%ROP = v
- data%EquipmentControl%DrillingWatch%ROP = v
- end subroutine
-
- subroutine Set_CasingPressure(v)
- use SimulationVariables !@!, only: CasingPressureDw => CasingPressure
- use CChokeControlPanelVariables
- use SimulationVariables!, only: CasingPressureChoke => CasingPressure
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%CasingPressureGauge = v
- data%EquipmentControl%DrillingWatch%CasingPressure = v
- data%EquipmentControl%ChokeControlPanel%CasingPressure = v
- data%EquipmentControl%DataDisplayConsole%CasingPressure = v
- end subroutine
-
- subroutine Set_StandPipePressure(v)
- use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%PumpPressure
- use CChokeControlPanelVariables
- use SimulationVariables!, only: StandPipePressureChoke => data%EquipmentControl%DataDisplayConsole%StandPipePressure
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%StandPipePressureGauge = v
- data%EquipmentControl%DrillingWatch%PumpPressure = v
- data%EquipmentControl%ChokeControlPanel%StandPipePressure = v
- data%EquipmentControl%DataDisplayConsole%StandPipePressure = v
-
-
-
- end subroutine
-
-
- subroutine Set_RotaryRPMGauge(v)
- use SimulationVariables !@!, only: data%EquipmentControl%DrillingWatch%RPM
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%RotaryRPMGauge = v
- data%EquipmentControl%DrillingWatch%RPM = v
- data%EquipmentControl%DataDisplayConsole%RTRPM = v
- ! call data%EquipmentControl%DataDisplayConsole%OnRotaryRpmChange%RunAll(v)
- end subroutine
-
-
-
-
- subroutine Set_MP1SPMGauge(v)
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%MP1SPMGauge = v
- data%EquipmentControl%DataDisplayConsole%MP1SPM = v
- !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%EquipmentControl%DataDisplayConsole%MP1SPMGauge, data%EquipmentControl%DataDisplayConsole%MP2SPMGauge)
- #ifdef deb
- print*, 'MP1SPMGauge=', data%EquipmentControl%DataDisplayConsole%MP1SPMGauge
- #endif
- end subroutine
-
- subroutine Set_MP2SPMGauge(v)
- implicit none
- real(8), intent(in) :: v
- data%EquipmentControl%DataDisplayConsole%MP2SPMGauge = v
- data%EquipmentControl%DataDisplayConsole%MP2SPM = v
- !@data%State%unitySignals%(PumpsSpmChanges)) call PumpsSpmChanges(data%EquipmentControl%DataDisplayConsole%MP1SPMGauge, data%EquipmentControl%DataDisplayConsole%MP2SPMGauge)
- #ifdef deb
- print*, 'MP2SPMGauge=', data%EquipmentControl%DataDisplayConsole%MP2SPMGauge
- #endif
- end subroutine
- end module CDataDisplayConsole
|