@@ -16,41 +16,41 @@ module CStringConfiguration | |||
type(CStringItem), intent(inout), target :: array(count) | |||
type(CBitInfo), intent(inout) :: bit | |||
type(CStringItem), pointer :: item | |||
Configuration%StringConfiguration%BitDefinition%BitType = bit%BitType | |||
Configuration%StringConfiguration%BitDefinition%BitSize = bit%BitSize | |||
Configuration%StringConfiguration%BitDefinition%BitCodeHundreds = bit%BitCodeHundreds | |||
Configuration%StringConfiguration%BitDefinition%BitCodeTens = bit%BitCodeTens | |||
Configuration%StringConfiguration%BitDefinition%BitCodeOnes = bit%BitCodeOnes | |||
Configuration%StringConfiguration%BitDefinition%BitNozzleSize = bit%BitNozzleSize | |||
Configuration%StringConfiguration%BitDefinition%BitLength = bit%BitLength | |||
Configuration%StringConfiguration%BitDefinition%BitWeightPerLength = bit%BitWeightPerLength | |||
Configuration%StringConfiguration%BitDefinition%BitNozzleNo = bit%BitNozzleNo | |||
Configuration%StringConfiguration%BitDefinition%FloatValve = bit%FloatValve | |||
Configuration%StringConfiguration%StringConfigurationCount = count | |||
data%Configuration%StringConfiguration%BitDefinition%BitType = bit%BitType | |||
data%Configuration%StringConfiguration%BitDefinition%BitSize = bit%BitSize | |||
data%Configuration%StringConfiguration%BitDefinition%BitCodeHundreds = bit%BitCodeHundreds | |||
data%Configuration%StringConfiguration%BitDefinition%BitCodeTens = bit%BitCodeTens | |||
data%Configuration%StringConfiguration%BitDefinition%BitCodeOnes = bit%BitCodeOnes | |||
data%Configuration%StringConfiguration%BitDefinition%BitNozzleSize = bit%BitNozzleSize | |||
data%Configuration%StringConfiguration%BitDefinition%BitLength = bit%BitLength | |||
data%Configuration%StringConfiguration%BitDefinition%BitWeightPerLength = bit%BitWeightPerLength | |||
data%Configuration%StringConfiguration%BitDefinition%BitNozzleNo = bit%BitNozzleNo | |||
data%Configuration%StringConfiguration%BitDefinition%FloatValve = bit%FloatValve | |||
data%Configuration%StringConfiguration%StringConfigurationCount = count | |||
if(Configuration%StringConfiguration%BitDefinition%FloatValve) then | |||
if(data%Configuration%StringConfiguration%BitDefinition%FloatValve) then | |||
call InstallFloatValve() | |||
else | |||
call RemoveFloatValve() | |||
endif | |||
if(size(Configuration%StringConfiguration%StringConfigurations) > 0) then | |||
deallocate(Configuration%StringConfiguration%StringConfigurations) | |||
if(size(data%Configuration%StringConfiguration%StringConfigurations) > 0) then | |||
deallocate(data%Configuration%StringConfiguration%StringConfigurations) | |||
end if | |||
if(count > 0) then | |||
allocate(Configuration%StringConfiguration%StringConfigurations(count)) | |||
allocate(data%Configuration%StringConfiguration%StringConfigurations(count)) | |||
!j = count | |||
do i = 1, count | |||
item => array(i) | |||
Configuration%StringConfiguration%StringConfigurations(i)%ComponentType = item%ComponentType | |||
Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint = item%NumberOfJoint | |||
Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint = item%LengthPerJoint | |||
Configuration%StringConfiguration%StringConfigurations(i)%NominalOd = item%NominalOd | |||
Configuration%StringConfiguration%StringConfigurations(i)%NominalId = item%NominalId | |||
Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength = item%WeightPerLength | |||
Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength = item%ComponentLength | |||
Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd = item%NominalToolJointOd | |||
Configuration%StringConfiguration%StringConfigurations(i)%Grade = item%Grade | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentType = item%ComponentType | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint = item%NumberOfJoint | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint = item%LengthPerJoint | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%NominalOd = item%NominalOd | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%NominalId = item%NominalId | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength = item%WeightPerLength | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength = item%ComponentLength | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd = item%NominalToolJointOd | |||
data%Configuration%StringConfiguration%StringConfigurations(i)%Grade = item%Grade | |||
!print*, 'type=', StringConfigurations(i)%ComponentType | |||
!print*, 'NumberOfJoint=', StringConfigurations(i)%NumberOfJoint | |||
!print*, '-----------------------------------------------------------' | |||
@@ -1,5 +1,5 @@ | |||
module CStringConfigurationVariables | |||
! use ConfigurationVariables, only: Configuration | |||
! !@use ConfigurationVariables, only: Configuration | |||
implicit none | |||
public | |||
!constants | |||
@@ -12,20 +12,20 @@ module CFormation | |||
integer :: i | |||
type(CFormationItem), intent(inout), target :: array(count) | |||
type(CFormationItem), pointer :: item | |||
Configuration%Formation%Count = count | |||
if(size(Configuration%Formation%Formations) > 0) then | |||
deallocate(Configuration%Formation%Formations) | |||
data%Configuration%Formation%Count = count | |||
if(size(data%Configuration%Formation%Formations) > 0) then | |||
deallocate(data%Configuration%Formation%Formations) | |||
end if | |||
if(count > 0) then | |||
allocate(Configuration%Formation%Formations(count)) | |||
allocate(data%Configuration%Formation%Formations(count)) | |||
do i = 1, count | |||
item => array(i) | |||
Configuration%Formation%Formations(i)%Top = item%Top | |||
Configuration%Formation%Formations(i)%Thickness = item%Thickness | |||
Configuration%Formation%Formations(i)%Drillablity = item%Drillablity | |||
Configuration%Formation%Formations(i)%Abrasiveness = item%Abrasiveness | |||
Configuration%Formation%Formations(i)%ThresholdWeight = item%ThresholdWeight | |||
Configuration%Formation%Formations(i)%PorePressureGradient = item%PorePressureGradient | |||
data%Configuration%Formation%Formations(i)%Top = item%Top | |||
data%Configuration%Formation%Formations(i)%Thickness = item%Thickness | |||
data%Configuration%Formation%Formations(i)%Drillablity = item%Drillablity | |||
data%Configuration%Formation%Formations(i)%Abrasiveness = item%Abrasiveness | |||
data%Configuration%Formation%Formations(i)%ThresholdWeight = item%ThresholdWeight | |||
data%Configuration%Formation%Formations(i)%PorePressureGradient = item%PorePressureGradient | |||
!print*, "===========================" | |||
!print*, "Formations(", i, ")%Top=", Formations(i)%Top | |||
!print*, "Formations(",i,")%Thickness", Formations(i)%Thickness | |||
@@ -1,5 +1,5 @@ | |||
module CFormationVariables | |||
! use ConfigurationVariables, only: Configuration | |||
! !@use ConfigurationVariables, only: Configuration | |||
implicit none | |||
public | |||
@@ -1,76 +1,8 @@ | |||
module CHoisting | |||
use CHoistingVariables | |||
implicit none | |||
use ConfigurationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
subroutine SetDriveType(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetDriveType | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDriveType' :: SetDriveType | |||
use CManifolds | |||
use NotificationVariables, only: Set_IrSafetyValveLed | |||
implicit none | |||
integer, intent(in) :: v | |||
Hoisting%DriveType = v | |||
#ifdef deb | |||
print*, 'DriveType=', Hoisting%DriveType | |||
#endif | |||
if(v == TopDrive_DriveType) then ! top drive mode | |||
call RemoveKellyCock() | |||
call InstallTopDriveIBop() | |||
call RemoveSafetyValve_TripMode() | |||
call RemoveSafetyValve_KellyMode() | |||
call Set_IrSafetyValveLed(.false.) | |||
endif | |||
if(v == Kelly_DriveType) then ! kelly mode | |||
call RemoveTopDriveIBop() | |||
call InstallKellyCock() | |||
endif | |||
end subroutine | |||
subroutine SetTravelingBlockWeight(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTravelingBlockWeight | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTravelingBlockWeight' :: SetTravelingBlockWeight | |||
implicit none | |||
real*8, intent(in) :: v | |||
Hoisting%TravelingBlockWeight = v | |||
end subroutine | |||
subroutine SetTopDriveWeight(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTopDriveWeight | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveWeight' :: SetTopDriveWeight | |||
implicit none | |||
real*8, intent(in) :: v | |||
Hoisting%TopDriveWeight = v | |||
end subroutine | |||
subroutine SetKellyWeight(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetKellyWeight | |||
!DEC$ ATTRIBUTES ALIAS: 'SetKellyWeight' :: SetKellyWeight | |||
implicit none | |||
real*8, intent(in) :: v | |||
Hoisting%KellyWeight = v | |||
end subroutine | |||
subroutine SetNumberOfLine(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetNumberOfLine | |||
!DEC$ ATTRIBUTES ALIAS: 'SetNumberOfLine' :: SetNumberOfLine | |||
implicit none | |||
integer, intent(in) :: v | |||
Hoisting%NumberOfLine = v | |||
#ifdef deb | |||
print*, 'NumberOfLine=', Hoisting%NumberOfLine | |||
#endif | |||
end subroutine | |||
subroutine SetDrillingLineBreakingLoad(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetDrillingLineBreakingLoad | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDrillingLineBreakingLoad' :: SetDrillingLineBreakingLoad | |||
implicit none | |||
real*8, intent(in) :: v | |||
Hoisting%DrillingLineBreakingLoad = v | |||
end subroutine | |||
contains | |||
end module CHoisting |
@@ -1,5 +1,5 @@ | |||
module CHoistingVariables | |||
implicit none | |||
implicit none | |||
public | |||
!constants | |||
integer :: TopDrive_DriveType = 0 | |||
@@ -15,5 +15,4 @@ module CHoistingVariables | |||
integer :: NumberOfLine | |||
real(8) :: DrillingLineBreakingLoad | |||
End type HoistingType | |||
Type(HoistingType)::Hoisting | |||
end module CHoistingVariables |
@@ -1,381 +1,150 @@ | |||
module CPumps | |||
use CPumpsVariables | |||
! use CPumps | |||
use CManifolds | |||
use CLog4 | |||
implicit none | |||
public | |||
contains | |||
subroutine SetMudPump1LinerDiameter(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1LinerDiameter | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1LinerDiameter' :: SetMudPump1LinerDiameter | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1LinerDiameter = v | |||
call CalcPump1OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'MudPump1LinerDiameter=', PumpsSpecification%MudPump1LinerDiameter) | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump1Stroke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1Stroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1Stroke' :: SetMudPump1Stroke | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1Stroke = v | |||
!call CalcMudPump1LinerDiameter() | |||
call CalcPump1OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'MudPump1Stroke=', v) | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump1MechanicalEfficiency(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1MechanicalEfficiency | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1MechanicalEfficiency' :: SetMudPump1MechanicalEfficiency | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1MechanicalEfficiency = v | |||
end subroutine | |||
subroutine SetMudPump1VolumetricEfficiency(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1VolumetricEfficiency | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1VolumetricEfficiency' :: SetMudPump1VolumetricEfficiency | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1VolumetricEfficiency = v | |||
!call CalcMudPump1LinerDiameter() | |||
call CalcPump1OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'MudPump1VolumetricEfficiency=', PumpsSpecification%MudPump1VolumetricEfficiency) | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump1Output(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1Output | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1Output' :: SetMudPump1Output | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1Output = v | |||
#ifdef deb | |||
print*, 'MudPump1Output=', PumpsSpecification%MudPump1Output | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump1OutputBblStroke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1OutputBblStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1OutputBblStroke' :: SetMudPump1OutputBblStroke | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1OutputBblStroke = v | |||
call CalcMudPump1LinerDiameter() | |||
#ifdef deb | |||
print*, 'MudPump1OutputBblStroke=', PumpsSpecification%MudPump1OutputBblStroke | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump1Maximum(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1Maximum | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1Maximum' :: SetMudPump1Maximum | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1Maximum = v | |||
end subroutine | |||
subroutine SetMudPump1ReliefValvePressure(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1ReliefValvePressure | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1ReliefValvePressure' :: SetMudPump1ReliefValvePressure | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump1ReliefValvePressure = v | |||
end subroutine | |||
subroutine SetMudPump2LinerDiameter(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2LinerDiameter | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2LinerDiameter' :: SetMudPump2LinerDiameter | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2LinerDiameter = v | |||
call CalcPump2OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'MudPump2LinerDiameter=', PumpsSpecification%MudPump2LinerDiameter) | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump2Stroke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2Stroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2Stroke' :: SetMudPump2Stroke | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2Stroke = v | |||
!call CalcMudPump2LinerDiameter() | |||
call CalcPump2OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'MudPump2Stroke=', PumpsSpecification%MudPump2Stroke) | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump2MechanicalEfficiency(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2MechanicalEfficiency | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2MechanicalEfficiency' :: SetMudPump2MechanicalEfficiency | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2MechanicalEfficiency = v | |||
end subroutine | |||
subroutine SetMudPump2VolumetricEfficiency(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2VolumetricEfficiency | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2VolumetricEfficiency' :: SetMudPump2VolumetricEfficiency | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2VolumetricEfficiency = v | |||
!call CalcMudPump2LinerDiameter() | |||
call CalcPump2OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'MudPump2VolumetricEfficiency=', PumpsSpecification%MudPump2VolumetricEfficiency) | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump2Output(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2Output | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2Output' :: SetMudPump2Output | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2Output = v | |||
#ifdef deb | |||
print*, 'MudPump2Output=', PumpsSpecification%MudPump2Output | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump2OutputBblStroke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2OutputBblStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2OutputBblStroke' :: SetMudPump2OutputBblStroke | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2OutputBblStroke = v | |||
call CalcMudPump2LinerDiameter() | |||
#ifdef deb | |||
print*, 'MudPump2OutputBblStroke=', PumpsSpecification%MudPump2OutputBblStroke | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump2Maximum(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2Maximum | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2Maximum' :: SetMudPump2Maximum | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2Maximum = v | |||
end subroutine | |||
subroutine SetMudPump2ReliefValvePressure(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2ReliefValvePressure | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2ReliefValvePressure' :: SetMudPump2ReliefValvePressure | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%MudPump2ReliefValvePressure = v | |||
end subroutine | |||
subroutine SetCementPumpLinerDiameter(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpLinerDiameter | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpLinerDiameter' :: SetCementPumpLinerDiameter | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpLinerDiameter = v | |||
call CalcPump3OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'CementPumpLinerDiameter=', PumpsSpecification%CementPumpLinerDiameter) | |||
#endif | |||
end subroutine | |||
contains | |||
subroutine SetCementPumpStroke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpStroke' :: SetCementPumpStroke | |||
subroutine OpenPump1() | |||
use CManifolds | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpStroke = v | |||
!call CalcMudPump3LinerDiameter() | |||
call CalcPump3OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'CementPumpStroke=', PumpsSpecification%CementPumpStroke) | |||
#endif | |||
call ChangeValve(16, .true.) | |||
end subroutine | |||
subroutine SetCementPumpMechanicalEfficiency(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpMechanicalEfficiency | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpMechanicalEfficiency' :: SetCementPumpMechanicalEfficiency | |||
subroutine ClosePump1() | |||
use CManifolds | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpMechanicalEfficiency = v | |||
call ChangeValve(16, .false.) | |||
end subroutine | |||
subroutine SetCementPumpVolumetricEfficiency(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpVolumetricEfficiency | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpVolumetricEfficiency' :: SetCementPumpVolumetricEfficiency | |||
subroutine OpenPump2() | |||
use CManifolds | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpVolumetricEfficiency = v | |||
!call CalcMudPump3LinerDiameter() | |||
call CalcPump3OutputBblStroke() | |||
#ifdef deb | |||
call Log_4( 'CementPumpVolumetricEfficiency=', PumpsSpecification%CementPumpVolumetricEfficiency) | |||
#endif | |||
call ChangeValve(17, .true.) | |||
end subroutine | |||
subroutine SetCementPumpOutput(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpOutput | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpOutput' :: SetCementPumpOutput | |||
subroutine ClosePump2() | |||
use CManifolds | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpOutput = v | |||
#ifdef deb | |||
print*, 'CementPumpOutput=', PumpsSpecification%CementPumpOutput | |||
#endif | |||
call ChangeValve(17, .false.) | |||
end subroutine | |||
subroutine SetCementPumpOutputBblStroke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpOutputBblStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpOutputBblStroke' :: SetCementPumpOutputBblStroke | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpOutputBblStroke = v | |||
call CalcMudPump3LinerDiameter() | |||
#ifdef deb | |||
print*, 'CementPumpOutputBblStroke=', PumpsSpecification%CementPumpOutputBblStroke | |||
#endif | |||
end subroutine | |||
subroutine SetCementPumpMaximum(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpMaximum | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpMaximum' :: SetCementPumpMaximum | |||
subroutine OpenCementPump() | |||
use CManifolds | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpMaximum = v | |||
call ChangeValve(18, .true.) | |||
end subroutine | |||
subroutine SetCementPumpReliefValvePressure(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpReliefValvePressure | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpReliefValvePressure' :: SetCementPumpReliefValvePressure | |||
subroutine CloseCementPump() | |||
use CManifolds | |||
implicit none | |||
real*8, intent(in) :: v | |||
PumpsSpecification%CementPumpReliefValvePressure = v | |||
end subroutine | |||
subroutine SetMudPump1ReliefValveIsSet(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump1ReliefValveIsSet | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump1ReliefValveIsSet' :: SetMudPump1ReliefValveIsSet | |||
implicit none | |||
logical, intent(in) :: v | |||
if (PumpsSpecification%MudPump1ReliefValveIsSet == v) return | |||
PumpsSpecification%MudPump1ReliefValveIsSet = v | |||
#ifdef deb | |||
print*, 'MudPump1ReliefValveIsSet=', PumpsSpecification%MudPump1ReliefValveIsSet | |||
#endif | |||
end subroutine | |||
subroutine SetMudPump2ReliefValveIsSet(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudPump2ReliefValveIsSet | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudPump2ReliefValveIsSet' :: SetMudPump2ReliefValveIsSet | |||
implicit none | |||
logical, intent(in) :: v | |||
if (PumpsSpecification%MudPump2ReliefValveIsSet == v) return | |||
PumpsSpecification%MudPump2ReliefValveIsSet = v | |||
#ifdef deb | |||
print*, 'MudPump2ReliefValveIsSet=', PumpsSpecification%MudPump2ReliefValveIsSet | |||
#endif | |||
end subroutine | |||
subroutine SetCementPumpReliefValveIsSet(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementPumpReliefValveIsSet | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementPumpReliefValveIsSet' :: SetCementPumpReliefValveIsSet | |||
implicit none | |||
logical, intent(in) :: v | |||
if (PumpsSpecification%CementPumpReliefValveIsSet == v) return | |||
PumpsSpecification%CementPumpReliefValveIsSet = v | |||
#ifdef deb | |||
print*, 'CementPumpReliefValveIsSet=', PumpsSpecification%CementPumpReliefValveIsSet | |||
#endif | |||
end subroutine | |||
subroutine SetManualPumpPower(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetManualPumpPower | |||
!DEC$ ATTRIBUTES ALIAS: 'SetManualPumpPower' :: SetManualPumpPower | |||
implicit none | |||
logical, intent(in) :: v | |||
PumpsSpecification%ManualPumpPower = v | |||
call ChangeValve(23, v) | |||
#ifdef deb | |||
print*, 'ManualPumpPower=', PumpsSpecification%ManualPumpPower | |||
#endif | |||
call ChangeValve(18, .false.) | |||
end subroutine | |||
subroutine SetValve1(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve1 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve1' :: SetValve1 | |||
implicit none | |||
logical, intent(in) :: v | |||
PumpsSpecification%Valve1 = v | |||
call ChangeValve(22, v) | |||
#ifdef deb | |||
print*, 'Valve1=', PumpsSpecification%Valve1 | |||
#endif | |||
subroutine SetMudPump1LinerDiameterN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump1LinerDiameterPtr)) call MudPump1LinerDiameterPtr(a) | |||
end subroutine | |||
subroutine SetMudPump2LinerDiameterN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump2LinerDiameterPtr)) call MudPump2LinerDiameterPtr(a) | |||
end subroutine | |||
subroutine SetMudPump3LinerDiameterN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump3LinerDiameterPtr)) call MudPump3LinerDiameterPtr(a) | |||
end subroutine | |||
subroutine SetMudPump1OutputBblStrokeN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump1OutputBblStrokePtr)) call MudPump1OutputBblStrokePtr(a) | |||
end subroutine | |||
subroutine SetMudPump2OutputBblStrokeN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump2OutputBblStrokePtr)) call MudPump2OutputBblStrokePtr(a) | |||
end subroutine | |||
subroutine SetMudPump3OutputBblStrokeN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump3OutputBblStrokePtr)) call MudPump3OutputBblStrokePtr(a) | |||
end subroutine | |||
subroutine CalcMudPump1LinerDiameter() | |||
use, intrinsic :: IEEE_ARITHMETIC | |||
implicit none | |||
real(8) :: a | |||
a = (MathPI / 4.d0) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0 | |||
a = dsqrt(PumpsSpecification%MudPump1OutputBblStroke / a) | |||
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then | |||
PumpsSpecification%MudPump1LinerDiameter = 0.0 | |||
else | |||
PumpsSpecification%MudPump1LinerDiameter = a | |||
endif | |||
call SetMudPump1LinerDiameterN(PumpsSpecification%MudPump1LinerDiameter) | |||
end subroutine | |||
subroutine CalcMudPump2LinerDiameter() | |||
use, intrinsic :: IEEE_ARITHMETIC | |||
implicit none | |||
real(8) :: a | |||
a = (MathPI / 4.d0) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0 | |||
a = dsqrt(PumpsSpecification%MudPump2OutputBblStroke / a) | |||
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then | |||
PumpsSpecification%MudPump2LinerDiameter = 0.0 | |||
else | |||
PumpsSpecification%MudPump2LinerDiameter = a | |||
endif | |||
call SetMudPump2LinerDiameterN(PumpsSpecification%MudPump2LinerDiameter) | |||
end subroutine | |||
subroutine CalcMudPump3LinerDiameter() | |||
use, intrinsic :: IEEE_ARITHMETIC | |||
implicit none | |||
real(8) :: a | |||
a = (MathPI / 4.d0) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0 | |||
a = dsqrt(PumpsSpecification%CementPumpOutputBblStroke / a) | |||
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then | |||
PumpsSpecification%CementPumpLinerDiameter = 0.0 | |||
else | |||
PumpsSpecification%CementPumpLinerDiameter = a | |||
endif | |||
call SetMudPump3LinerDiameterN(PumpsSpecification%CementPumpLinerDiameter) | |||
end subroutine | |||
subroutine CalcPump1OutputBblStroke() | |||
implicit none | |||
PumpsSpecification%MudPump1OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump1LinerDiameter**2) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0 | |||
call SetMudPump1OutputBblStrokeN(PumpsSpecification%MudPump1OutputBblStroke) | |||
end subroutine | |||
subroutine CalcPump2OutputBblStroke() | |||
implicit none | |||
PumpsSpecification%MudPump2OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump2LinerDiameter**2) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0 | |||
call SetMudPump2OutputBblStrokeN(PumpsSpecification%MudPump2OutputBblStroke) | |||
end subroutine | |||
subroutine CalcPump3OutputBblStroke() | |||
implicit none | |||
PumpsSpecification%CementPumpOutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%CementPumpLinerDiameter**2) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0 | |||
call SetMudPump3OutputBblStrokeN(PumpsSpecification%CementPumpOutputBblStroke) | |||
end subroutine | |||
subroutine SetValve2(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve2 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve2' :: SetValve2 | |||
implicit none | |||
logical, intent(in) :: v | |||
PumpsSpecification%Valve2 = v | |||
call ChangeValve(19, v) | |||
#ifdef deb | |||
print*, 'Valve2=', PumpsSpecification%Valve2 | |||
#endif | |||
end subroutine | |||
subroutine SetValve3(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve3 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve3' :: SetValve3 | |||
implicit none | |||
logical, intent(in) :: v | |||
PumpsSpecification%Valve3 = v | |||
call ChangeValve(21, v) | |||
#ifdef deb | |||
print*, 'Valve3=', PumpsSpecification%Valve3 | |||
#endif | |||
end subroutine | |||
subroutine SetValve4(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve4 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve4' :: SetValve4 | |||
implicit none | |||
logical, intent(in) :: v | |||
PumpsSpecification%Valve4 = v | |||
call ChangeValve(20, v) | |||
#ifdef deb | |||
print*, 'Valve4=', PumpsSpecification%Valve4 | |||
#endif | |||
end subroutine | |||
subroutine SetValve5(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve5 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve5' :: SetValve5 | |||
implicit none | |||
logical, intent(in) :: v | |||
PumpsSpecification%Valve5 = v | |||
call ChangeValve(24, v) | |||
#ifdef deb | |||
print*, 'Valve5=', PumpsSpecification%Valve5 | |||
#endif | |||
end subroutine | |||
end module CPumps |
@@ -56,208 +56,5 @@ module CPumpsVariables | |||
real(8) :: MathPI = 3.14159265358979d0 | |||
contains | |||
subroutine OpenPump1() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(16, .true.) | |||
end subroutine | |||
subroutine ClosePump1() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(16, .false.) | |||
end subroutine | |||
subroutine OpenPump2() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(17, .true.) | |||
end subroutine | |||
subroutine ClosePump2() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(17, .false.) | |||
end subroutine | |||
subroutine OpenCementPump() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(18, .true.) | |||
end subroutine | |||
subroutine CloseCementPump() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(18, .false.) | |||
end subroutine | |||
subroutine SubscribeMudPump1LinerDiameter(a) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudPump1LinerDiameter | |||
!DEC$ ATTRIBUTES ALIAS: 'SubscribeMudPump1LinerDiameter' :: SubscribeMudPump1LinerDiameter | |||
implicit none | |||
procedure (ActionDouble) :: a | |||
MudPump1LinerDiameterPtr => a | |||
end subroutine | |||
subroutine SubscribeMudPump2LinerDiameter(a) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudPump2LinerDiameter | |||
!DEC$ ATTRIBUTES ALIAS: 'SubscribeMudPump2LinerDiameter' :: SubscribeMudPump2LinerDiameter | |||
implicit none | |||
procedure (ActionDouble) :: a | |||
MudPump2LinerDiameterPtr => a | |||
end subroutine | |||
subroutine SubscribeMudPump3LinerDiameter(a) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudPump3LinerDiameter | |||
!DEC$ ATTRIBUTES ALIAS: 'SubscribeMudPump3LinerDiameter' :: SubscribeMudPump3LinerDiameter | |||
implicit none | |||
procedure (ActionDouble) :: a | |||
MudPump3LinerDiameterPtr => a | |||
end subroutine | |||
subroutine SubscribeMudPump1OutputBblStroke(a) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudPump1OutputBblStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SubscribeMudPump1OutputBblStroke' :: SubscribeMudPump1OutputBblStroke | |||
implicit none | |||
procedure (ActionDouble) :: a | |||
MudPump1OutputBblStrokePtr => a | |||
end subroutine | |||
subroutine SubscribeMudPump2OutputBblStroke(a) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudPump2OutputBblStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SubscribeMudPump2OutputBblStroke' :: SubscribeMudPump2OutputBblStroke | |||
implicit none | |||
procedure (ActionDouble) :: a | |||
MudPump2OutputBblStrokePtr => a | |||
end subroutine | |||
subroutine SubscribeMudPump3OutputBblStroke(a) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SubscribeMudPump3OutputBblStroke | |||
!DEC$ ATTRIBUTES ALIAS: 'SubscribeMudPump3OutputBblStroke' :: SubscribeMudPump3OutputBblStroke | |||
implicit none | |||
procedure (ActionDouble) :: a | |||
MudPump3OutputBblStrokePtr => a | |||
end subroutine | |||
subroutine SetMudPump1LinerDiameterN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump1LinerDiameterPtr)) call MudPump1LinerDiameterPtr(a) | |||
end subroutine | |||
subroutine SetMudPump2LinerDiameterN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump2LinerDiameterPtr)) call MudPump2LinerDiameterPtr(a) | |||
end subroutine | |||
subroutine SetMudPump3LinerDiameterN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump3LinerDiameterPtr)) call MudPump3LinerDiameterPtr(a) | |||
end subroutine | |||
subroutine SetMudPump1OutputBblStrokeN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump1OutputBblStrokePtr)) call MudPump1OutputBblStrokePtr(a) | |||
end subroutine | |||
subroutine SetMudPump2OutputBblStrokeN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump2OutputBblStrokePtr)) call MudPump2OutputBblStrokePtr(a) | |||
end subroutine | |||
subroutine SetMudPump3OutputBblStrokeN(a) | |||
implicit none | |||
real(8) :: a | |||
if(associated(MudPump3OutputBblStrokePtr)) call MudPump3OutputBblStrokePtr(a) | |||
end subroutine | |||
subroutine CalcMudPump1LinerDiameter() | |||
use, intrinsic :: IEEE_ARITHMETIC | |||
implicit none | |||
real(8) :: a | |||
a = (MathPI / 4.d0) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0 | |||
a = dsqrt(PumpsSpecification%MudPump1OutputBblStroke / a) | |||
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then | |||
PumpsSpecification%MudPump1LinerDiameter = 0.0 | |||
else | |||
PumpsSpecification%MudPump1LinerDiameter = a | |||
endif | |||
call SetMudPump1LinerDiameterN(PumpsSpecification%MudPump1LinerDiameter) | |||
end subroutine | |||
subroutine CalcMudPump2LinerDiameter() | |||
use, intrinsic :: IEEE_ARITHMETIC | |||
implicit none | |||
real(8) :: a | |||
a = (MathPI / 4.d0) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0 | |||
a = dsqrt(PumpsSpecification%MudPump2OutputBblStroke / a) | |||
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then | |||
PumpsSpecification%MudPump2LinerDiameter = 0.0 | |||
else | |||
PumpsSpecification%MudPump2LinerDiameter = a | |||
endif | |||
call SetMudPump2LinerDiameterN(PumpsSpecification%MudPump2LinerDiameter) | |||
end subroutine | |||
subroutine CalcMudPump3LinerDiameter() | |||
use, intrinsic :: IEEE_ARITHMETIC | |||
implicit none | |||
real(8) :: a | |||
a = (MathPI / 4.d0) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0 | |||
a = dsqrt(PumpsSpecification%CementPumpOutputBblStroke / a) | |||
if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then | |||
PumpsSpecification%CementPumpLinerDiameter = 0.0 | |||
else | |||
PumpsSpecification%CementPumpLinerDiameter = a | |||
endif | |||
call SetMudPump3LinerDiameterN(PumpsSpecification%CementPumpLinerDiameter) | |||
end subroutine | |||
subroutine CalcPump1OutputBblStroke() | |||
implicit none | |||
PumpsSpecification%MudPump1OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump1LinerDiameter**2) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0 | |||
call SetMudPump1OutputBblStrokeN(PumpsSpecification%MudPump1OutputBblStroke) | |||
end subroutine | |||
subroutine CalcPump2OutputBblStroke() | |||
implicit none | |||
PumpsSpecification%MudPump2OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump2LinerDiameter**2) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0 | |||
call SetMudPump2OutputBblStrokeN(PumpsSpecification%MudPump2OutputBblStroke) | |||
end subroutine | |||
subroutine CalcPump3OutputBblStroke() | |||
implicit none | |||
PumpsSpecification%CementPumpOutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%CementPumpLinerDiameter**2) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0 | |||
call SetMudPump3OutputBblStrokeN(PumpsSpecification%CementPumpOutputBblStroke) | |||
end subroutine | |||
contains | |||
end module CPumpsVariables |
@@ -1,5 +1,5 @@ | |||
module CPathGeneration | |||
use CPathGenerationVariables | |||
use ConfigurationVariables !@ | |||
implicit none | |||
public | |||
contains | |||
@@ -1,6 +1,6 @@ | |||
module CDownHoleVariables | |||
use CDownHoleTypes | |||
use CStringConfigurationVariables | |||
! use CStringConfigurationVariables | |||
! use CDownHoleActions | |||
use CLog4 | |||
implicit none | |||
@@ -39,258 +39,5 @@ module CDownHoleVariables | |||
real(8) :: Volume | |||
end type DownHoleType | |||
type(DownHoleType):: DownHole | |||
contains | |||
subroutine SetAnnalusFluids(count, array) | |||
implicit none | |||
integer, intent(in) :: count | |||
integer :: i, offset | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
DownHole%AnnalusFluidsCount = count | |||
print*, 'AnnalusFluidsCount = ', count | |||
if(size(DownHole%AnnalusFluids) > 0) then | |||
deallocate(DownHole%AnnalusFluids) | |||
end if | |||
if(count > 0) then | |||
offset = 0; | |||
item => array(1) | |||
if(item%StartMd > 0) then | |||
DownHole%AnnalusFluidsCount = DownHole%AnnalusFluidsCount + 1 | |||
offset = 1; | |||
allocate(DownHole%AnnalusFluids(DownHole%AnnalusFluidsCount)) | |||
DownHole%AnnalusFluids(1)%StartMd = 0 | |||
DownHole%AnnalusFluids(1)%EndMd = item%StartMd | |||
DownHole%AnnalusFluids(1)%Density = 0 | |||
DownHole%AnnalusFluids(1)%MudType = FLUID_NO_MUD | |||
endif | |||
!if(associated(AnnalusMudCountPtr)) then | |||
! call AnnalusMudCountPtr(AnnalusFluidsCount) | |||
!end if | |||
if(.not.allocated(DownHole%AnnalusFluids))allocate(DownHole%AnnalusFluids(DownHole%AnnalusFluidsCount)) | |||
!print*, '============START-AN============' | |||
if(item%StartMd < 0) DownHole%AnnalusFluids(1)%StartMd = 0 | |||
do i = 1, count | |||
item => array(i) | |||
DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) DownHole%AnnalusFluids(i)%StartMd = 0 | |||
!print*, 'AnnalusFluids(',i,')%StartMd=', AnnalusFluids(i)%StartMd | |||
DownHole%AnnalusFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'AnnalusFluids(',i,')%EndMd=', AnnalusFluids(i)%EndMd | |||
DownHole%AnnalusFluids(i + offset)%Density = item%Density | |||
!print*, 'AnnalusFluids(',i,')%Density=', AnnalusFluids(i)%Density | |||
DownHole%AnnalusFluids(i + offset)%MudType = item%MudType | |||
!print*, 'AnnalusFluids(',i,')%MudType=', AnnalusFluids(i)%MudType | |||
!print*, '----------------------------' | |||
end do | |||
!print*, '============END-AN============' | |||
!if(associated(AnnalusMudArrayPtr)) then | |||
! !AnnalusFluidsPtr => AnnalusFluids | |||
! call AnnalusMudArrayPtr(AnnalusFluids) | |||
!end if | |||
end if | |||
end subroutine SetAnnalusFluids | |||
subroutine SetStringFluids(count, array) | |||
implicit none | |||
integer, intent(in) :: count | |||
integer :: i, offset !, startArr | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
DownHole%StringFluidsCount = count | |||
print*, 'StringFluidsCount = ', count | |||
if(size(DownHole%StringFluids) > 0) then | |||
deallocate(DownHole%StringFluids) | |||
end if | |||
!startArr = 1 | |||
if(count > 0) then | |||
offset = 0; | |||
item => array(1) | |||
! | |||
!if(item%StartMd <= 0 .and. item%EndMd <= 0) then | |||
! StringFluidsCount = StringFluidsCount - 1 | |||
! count = count - 1 | |||
! offset = offset + 1 | |||
! startArr = startArr + 1 | |||
!endif | |||
! | |||
!if(count <= 0) return | |||
if(item%StartMd > 0) then | |||
DownHole%StringFluidsCount = DownHole%StringFluidsCount + 1 | |||
offset = offset + 1 | |||
allocate(DownHole%StringFluids(DownHole%StringFluidsCount)) | |||
DownHole%StringFluids(1)%StartMd = 0 | |||
DownHole%StringFluids(1)%EndMd = item%StartMd | |||
DownHole%StringFluids(1)%Density = 0 | |||
DownHole%StringFluids(1)%MudType = FLUID_NO_MUD | |||
endif | |||
!if(associated(StringMudCountPtr)) then | |||
! call StringMudCountPtr(count) | |||
!end if | |||
if(.not.allocated(DownHole%StringFluids))allocate(DownHole%StringFluids(DownHole%StringFluidsCount)) | |||
!print*, '============START-ST============' | |||
!print*, 'count=', count | |||
do i = 1, count | |||
item => array(i) | |||
DownHole%StringFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) DownHole%StringFluids(i)%StartMd = 0 | |||
!print*, 'StringFluids(i)%StartMd=', StringFluids(i)%StartMd | |||
DownHole%StringFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'StringFluids(i)%EndMd=', StringFluids(i)%EndMd | |||
DownHole%StringFluids(i + offset)%Density = item%Density | |||
DownHole%StringFluids(i + offset)%MudType = item%MudType | |||
!print*, '----------------------------' | |||
end do | |||
!!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | |||
!!print*, '============END-ST============' | |||
!if(associated(StringMudArrayPtr)) then | |||
! call StringMudArrayPtr(StringFluids) | |||
!end if | |||
end if | |||
end subroutine SetStringFluids | |||
subroutine SetString(count, array) | |||
use CLog3 | |||
implicit none | |||
integer, intent(in) :: count | |||
integer :: i !, j | |||
type(CStringComponents), intent(inout), target :: array(count) | |||
type(CStringComponents), pointer :: item | |||
DownHole%StringCount = count | |||
if(size(DownHole%String) > 0) then | |||
deallocate(DownHole%String) | |||
end if | |||
if(count > 0) then | |||
!if(associated(StringComponentCountPtr)) then | |||
! call StringComponentCountPtr(count) | |||
!end if | |||
allocate(DownHole%String(count)) | |||
!j = 0 | |||
!print*, '============CMP-ST============' | |||
!call Log_3( '============CMP-ST============') | |||
!do i = count, 1, -1 | |||
do i = 1, count | |||
item => array(i) | |||
!String(i)%Length = item%Length | |||
!String(i)%TopDepth = item%TopDepth | |||
!String(i)%DownDepth = item%DownDepth | |||
!String(i)%Od = item%Od | |||
!String(i)%Id = item%Id | |||
DownHole%String(i)%ComponentType= item%ComponentType | |||
!j = j + 1 | |||
DownHole%String(i)%StartMd = item%TopDepth | |||
DownHole%String(i)%EndMd = item%DownDepth | |||
DownHole%String(i)%ComponentType=0 | |||
!if(item%ComponentType > 4 ) then | |||
! String(i)%ComponentType=0 | |||
! String(i)%StartMd = 0 | |||
!endif | |||
if(item%ComponentType == 3) DownHole%String(i)%ComponentType=0 | |||
if(item%ComponentType == 4) DownHole%String(i)%ComponentType=1 | |||
if(item%ComponentType == 2) DownHole%String(i)%ComponentType=2 | |||
if(item%ComponentType == 1) DownHole%String(i)%ComponentType=3 | |||
!print*, 'item%ComponentType=', item%ComponentType | |||
!print*, 'String(i)%ComponentType=', String(i)%ComponentType | |||
!print*, 'String(i)%StartMd=', String(i)%StartMd | |||
!print*, 'String(i)%EndMd=', String(i)%EndMd | |||
!print*, '----------------------------' | |||
!call Log_3( 'item%ComponentType=', item%ComponentType) | |||
!call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | |||
!call Log_3( 'String(i)%StartMd=', String(i)%StartMd) | |||
!call Log_3( 'String(i)%EndMd=', String(i)%EndMd) | |||
!call Log_3( '----------------------------') | |||
end do | |||
!!print*, '============CMP-ST============' | |||
!!call Log_3( '============CMP-ST============') | |||
!if(associated(StringComponentArrayPtr)) then | |||
! call StringComponentArrayPtr(String) | |||
!end if | |||
end if | |||
end subroutine SetString | |||
subroutine SetBopElements(array) | |||
use CLog4 | |||
implicit none | |||
integer, parameter :: count = 4 | |||
integer :: i = 1 !, j | |||
type(CBopElement), intent(inout), target :: array(count) | |||
type(CBopElement), pointer :: item | |||
if(size(DownHole%BopElements) > 0) deallocate(DownHole%BopElements) | |||
allocate(DownHole%BopElements(count)) | |||
do i = 1, count | |||
item => array(i) | |||
!call Log_4('item%ElementStart', item%ElementStart) | |||
!call Log_4('item%ElementEnd', item%ElementEnd) | |||
!call Log_4('item%ElementType', item%ElementType) | |||
!call Log_4('=====================================================') | |||
DownHole%BopElements(i)%ElementStart = item%ElementStart | |||
DownHole%BopElements(i)%ElementEnd = item%ElementEnd | |||
DownHole%BopElements(i)%ElementType = item%ElementType | |||
end do | |||
!if(associated(BopElementsPtr)) call BopElementsPtr(BopElements) | |||
end subroutine SetBopElements | |||
subroutine GetAnnalusFluidInfo(md) | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetAnnalusFluidInfo | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnalusFluidInfo' :: GetAnnalusFluidInfo | |||
!use ElementFinderVars | |||
implicit none | |||
integer, intent(in) :: md | |||
call AnnulusPropertyCalculator(md, DownHole%Density, DownHole%Pressure, DownHole%Temperature) | |||
!ObservationPoint(2)%MeasureDepth = md | |||
!Density = md + Density - 10 | |||
!Pressure = md + Pressure - 20 | |||
!Temperature = md + Temperature - 30 | |||
!Height = Height * 100.0 | |||
!Volume = Volume * 200.0 | |||
! | |||
!call Log_4('GetAnnalusFluidInfo=', md) | |||
!call Log_4('A_Height=', Height) | |||
!call Log_4('A_Volume=', Volume) | |||
#ifdef deb | |||
print*, 'GetAnnalusFluidInfo=', md | |||
#endif | |||
end subroutine GetAnnalusFluidInfo | |||
subroutine GetStringFluidInfo(md) | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetStringFluidInfo | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStringFluidInfo' :: GetStringFluidInfo | |||
implicit none | |||
integer, intent(in) :: md | |||
call StringPropertyCalculator(md, DownHole%Density, DownHole%Pressure, DownHole%Temperature) | |||
!ObservationPoint(1)%MeasureDepth = md | |||
!Density = md + Density + 100 | |||
!Pressure = md + Pressure + 200 | |||
!Temperature = md + Temperature + 300 | |||
!Height = Height * 100.0 | |||
!Volume = Volume * 200.0 | |||
! | |||
!call Log_4('GetStringFluidInfo=', md) | |||
!call Log_4('S_Height=', Height) | |||
!call Log_4('S_Volume=', Volume) | |||
#ifdef deb | |||
print*, 'GetStringFluidInfo=', md | |||
#endif | |||
end subroutine GetStringFluidInfo | |||
contains | |||
end module CDownHoleVariables |
@@ -0,0 +1,204 @@ | |||
module DownHoleModule | |||
use ConfigurationVariables | |||
contains | |||
subroutine SetAnnalusFluids(count, array) | |||
implicit none | |||
integer, intent(in) :: count | |||
integer :: i, offset | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
DownHole%AnnalusFluidsCount = count | |||
print*, 'AnnalusFluidsCount = ', count | |||
if(size(DownHole%AnnalusFluids) > 0) then | |||
deallocate(DownHole%AnnalusFluids) | |||
end if | |||
if(count > 0) then | |||
offset = 0; | |||
item => array(1) | |||
if(item%StartMd > 0) then | |||
DownHole%AnnalusFluidsCount = DownHole%AnnalusFluidsCount + 1 | |||
offset = 1; | |||
allocate(DownHole%AnnalusFluids(DownHole%AnnalusFluidsCount)) | |||
DownHole%AnnalusFluids(1)%StartMd = 0 | |||
DownHole%AnnalusFluids(1)%EndMd = item%StartMd | |||
DownHole%AnnalusFluids(1)%Density = 0 | |||
DownHole%AnnalusFluids(1)%MudType = FLUID_NO_MUD | |||
endif | |||
!if(associated(AnnalusMudCountPtr)) then | |||
! call AnnalusMudCountPtr(AnnalusFluidsCount) | |||
!end if | |||
if(.not.allocated(DownHole%AnnalusFluids))allocate(DownHole%AnnalusFluids(DownHole%AnnalusFluidsCount)) | |||
!print*, '============START-AN============' | |||
if(item%StartMd < 0) DownHole%AnnalusFluids(1)%StartMd = 0 | |||
do i = 1, count | |||
item => array(i) | |||
DownHole%AnnalusFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) DownHole%AnnalusFluids(i)%StartMd = 0 | |||
!print*, 'AnnalusFluids(',i,')%StartMd=', AnnalusFluids(i)%StartMd | |||
DownHole%AnnalusFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'AnnalusFluids(',i,')%EndMd=', AnnalusFluids(i)%EndMd | |||
DownHole%AnnalusFluids(i + offset)%Density = item%Density | |||
!print*, 'AnnalusFluids(',i,')%Density=', AnnalusFluids(i)%Density | |||
DownHole%AnnalusFluids(i + offset)%MudType = item%MudType | |||
!print*, 'AnnalusFluids(',i,')%MudType=', AnnalusFluids(i)%MudType | |||
!print*, '----------------------------' | |||
end do | |||
!print*, '============END-AN============' | |||
!if(associated(AnnalusMudArrayPtr)) then | |||
! !AnnalusFluidsPtr => AnnalusFluids | |||
! call AnnalusMudArrayPtr(AnnalusFluids) | |||
!end if | |||
end if | |||
end subroutine SetAnnalusFluids | |||
subroutine SetStringFluids(count, array) | |||
implicit none | |||
integer, intent(in) :: count | |||
integer :: i, offset !, startArr | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
DownHole%StringFluidsCount = count | |||
print*, 'StringFluidsCount = ', count | |||
if(size(DownHole%StringFluids) > 0) then | |||
deallocate(DownHole%StringFluids) | |||
end if | |||
!startArr = 1 | |||
if(count > 0) then | |||
offset = 0; | |||
item => array(1) | |||
! | |||
!if(item%StartMd <= 0 .and. item%EndMd <= 0) then | |||
! StringFluidsCount = StringFluidsCount - 1 | |||
! count = count - 1 | |||
! offset = offset + 1 | |||
! startArr = startArr + 1 | |||
!endif | |||
! | |||
!if(count <= 0) return | |||
if(item%StartMd > 0) then | |||
DownHole%StringFluidsCount = DownHole%StringFluidsCount + 1 | |||
offset = offset + 1 | |||
allocate(DownHole%StringFluids(DownHole%StringFluidsCount)) | |||
DownHole%StringFluids(1)%StartMd = 0 | |||
DownHole%StringFluids(1)%EndMd = item%StartMd | |||
DownHole%StringFluids(1)%Density = 0 | |||
DownHole%StringFluids(1)%MudType = FLUID_NO_MUD | |||
endif | |||
!if(associated(StringMudCountPtr)) then | |||
! call StringMudCountPtr(count) | |||
!end if | |||
if(.not.allocated(DownHole%StringFluids))allocate(DownHole%StringFluids(DownHole%StringFluidsCount)) | |||
!print*, '============START-ST============' | |||
!print*, 'count=', count | |||
do i = 1, count | |||
item => array(i) | |||
DownHole%StringFluids(i + offset)%StartMd = item%StartMd | |||
if(i==1) DownHole%StringFluids(i)%StartMd = 0 | |||
!print*, 'StringFluids(i)%StartMd=', StringFluids(i)%StartMd | |||
DownHole%StringFluids(i + offset)%EndMd = item%EndMd | |||
!print*, 'StringFluids(i)%EndMd=', StringFluids(i)%EndMd | |||
DownHole%StringFluids(i + offset)%Density = item%Density | |||
DownHole%StringFluids(i + offset)%MudType = item%MudType | |||
!print*, '----------------------------' | |||
end do | |||
!!if(item%StartMd < 0) StringFluids(1)%StartMd = 0 | |||
!!print*, '============END-ST============' | |||
!if(associated(StringMudArrayPtr)) then | |||
! call StringMudArrayPtr(StringFluids) | |||
!end if | |||
end if | |||
end subroutine SetStringFluids | |||
subroutine SetString(count, array) | |||
use CLog3 | |||
implicit none | |||
integer, intent(in) :: count | |||
integer :: i !, j | |||
type(CStringComponents), intent(inout), target :: array(count) | |||
type(CStringComponents), pointer :: item | |||
DownHole%StringCount = count | |||
if(size(DownHole%String) > 0) then | |||
deallocate(DownHole%String) | |||
end if | |||
if(count > 0) then | |||
!if(associated(StringComponentCountPtr)) then | |||
! call StringComponentCountPtr(count) | |||
!end if | |||
allocate(DownHole%String(count)) | |||
!j = 0 | |||
!print*, '============CMP-ST============' | |||
!call Log_3( '============CMP-ST============') | |||
!do i = count, 1, -1 | |||
do i = 1, count | |||
item => array(i) | |||
!String(i)%Length = item%Length | |||
!String(i)%TopDepth = item%TopDepth | |||
!String(i)%DownDepth = item%DownDepth | |||
!String(i)%Od = item%Od | |||
!String(i)%Id = item%Id | |||
DownHole%String(i)%ComponentType= item%ComponentType | |||
!j = j + 1 | |||
DownHole%String(i)%StartMd = item%TopDepth | |||
DownHole%String(i)%EndMd = item%DownDepth | |||
DownHole%String(i)%ComponentType=0 | |||
!if(item%ComponentType > 4 ) then | |||
! String(i)%ComponentType=0 | |||
! String(i)%StartMd = 0 | |||
!endif | |||
if(item%ComponentType == 3) DownHole%String(i)%ComponentType=0 | |||
if(item%ComponentType == 4) DownHole%String(i)%ComponentType=1 | |||
if(item%ComponentType == 2) DownHole%String(i)%ComponentType=2 | |||
if(item%ComponentType == 1) DownHole%String(i)%ComponentType=3 | |||
!print*, 'item%ComponentType=', item%ComponentType | |||
!print*, 'String(i)%ComponentType=', String(i)%ComponentType | |||
!print*, 'String(i)%StartMd=', String(i)%StartMd | |||
!print*, 'String(i)%EndMd=', String(i)%EndMd | |||
!print*, '----------------------------' | |||
!call Log_3( 'item%ComponentType=', item%ComponentType) | |||
!call Log_3( 'String(i)%ComponentType=', String(i)%ComponentType) | |||
!call Log_3( 'String(i)%StartMd=', String(i)%StartMd) | |||
!call Log_3( 'String(i)%EndMd=', String(i)%EndMd) | |||
!call Log_3( '----------------------------') | |||
end do | |||
!!print*, '============CMP-ST============' | |||
!!call Log_3( '============CMP-ST============') | |||
!if(associated(StringComponentArrayPtr)) then | |||
! call StringComponentArrayPtr(String) | |||
!end if | |||
end if | |||
end subroutine SetString | |||
subroutine SetBopElements(array) | |||
use CLog4 | |||
implicit none | |||
integer, parameter :: count = 4 | |||
integer :: i = 1 !, j | |||
type(CBopElement), intent(inout), target :: array(count) | |||
type(CBopElement), pointer :: item | |||
if(size(DownHole%BopElements) > 0) deallocate(DownHole%BopElements) | |||
allocate(DownHole%BopElements(count)) | |||
do i = 1, count | |||
item => array(i) | |||
!call Log_4('item%ElementStart', item%ElementStart) | |||
!call Log_4('item%ElementEnd', item%ElementEnd) | |||
!call Log_4('item%ElementType', item%ElementType) | |||
!call Log_4('=====================================================') | |||
DownHole%BopElements(i)%ElementStart = item%ElementStart | |||
DownHole%BopElements(i)%ElementEnd = item%ElementEnd | |||
DownHole%BopElements(i)%ElementType = item%ElementType | |||
end do | |||
!if(associated(BopElementsPtr)) call BopElementsPtr(BopElements) | |||
end subroutine SetBopElements | |||
end module DownHoleModule |
@@ -1,250 +1,83 @@ | |||
module CBopControlPanel | |||
use CBopControlPanelVariables | |||
! use CBopControlPanel | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
subroutine OpenAnnular() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(52, .true.) | |||
end subroutine | |||
! Input routines | |||
subroutine SetAnnularRegulatorSetControl(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetAnnularRegulatorSetControl | |||
!DEC$ ATTRIBUTES ALIAS: 'SetAnnularRegulatorSetControl' :: SetAnnularRegulatorSetControl | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%AnnularRegulatorSetControl = v | |||
#ifdef deb | |||
print*, 'AnnularRegulatorSetControl=', BopControlPanel%AnnularRegulatorSetControl | |||
#endif | |||
subroutine CloseAnnular() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(52, .false.) | |||
end subroutine | |||
subroutine SetAirMasterValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetAirMasterValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetAirMasterValve' :: SetAirMasterValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%AirMasterValve = v | |||
#ifdef deb | |||
print*, 'AirMasterValve=', BopControlPanel%AirMasterValve | |||
#endif | |||
subroutine OpenUpperRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(51, .true.) | |||
end subroutine | |||
subroutine SetByePassValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetByePassValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetByePassValve' :: SetByePassValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%ByePassValve = v | |||
#ifdef deb | |||
print*, 'ByePassValve=', BopControlPanel%ByePassValve | |||
#endif | |||
subroutine CloseUpperRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(51, .false.) | |||
end subroutine | |||
subroutine SetAnnularValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetAnnularValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetAnnularValve' :: SetAnnularValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%AnnularValve = v | |||
#ifdef deb | |||
print*, 'AnnularValve=', BopControlPanel%AnnularValve | |||
#endif | |||
subroutine OpenMiddleRams() | |||
use CManifolds | |||
implicit none | |||
call ToggleMiddleRams(.true.) | |||
end subroutine | |||
subroutine SetUpperRamsValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetUpperRamsValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetUpperRamsValve' :: SetUpperRamsValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%UpperRamsValve = v | |||
#ifdef deb | |||
print*, 'UpperRamsValve=', BopControlPanel%UpperRamsValve | |||
#endif | |||
subroutine CloseMiddleRams() | |||
use CManifolds | |||
implicit none | |||
call ToggleMiddleRams(.false.) | |||
end subroutine | |||
subroutine SetMiddleRamsValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMiddleRamsValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMiddleRamsValve' :: SetMiddleRamsValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%MiddleRamsValve = v | |||
#ifdef deb | |||
print*, 'MiddleRamsValve=', BopControlPanel%MiddleRamsValve | |||
#endif | |||
subroutine OpenKillLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(46, .true.) | |||
end subroutine | |||
subroutine SetKillLineValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetKillLineValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetKillLineValve' :: SetKillLineValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%KillLineValve = v | |||
#ifdef deb | |||
print*, 'KillLineValve=', BopControlPanel%KillLineValve | |||
#endif | |||
subroutine CloseKillLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(46, .false.) | |||
end subroutine | |||
subroutine SetChokeLineValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeLineValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeLineValve' :: SetChokeLineValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%ChokeLineValve = v | |||
#ifdef deb | |||
print*, 'ChokeLineValve=', BopControlPanel%ChokeLineValve | |||
#endif | |||
subroutine OpenChokeLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(47, .true.) | |||
!WRITE (*,*) ' valve 47 true ' | |||
end subroutine | |||
subroutine SetLowerRamsValve(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetLowerRamsValve | |||
!DEC$ ATTRIBUTES ALIAS: 'SetLowerRamsValve' :: SetLowerRamsValve | |||
implicit none | |||
real*8, intent(in) :: v | |||
BopControlPanel%LowerRamsValve = v | |||
#ifdef deb | |||
print*, 'LowerRamsValve=', BopControlPanel%LowerRamsValve | |||
#endif | |||
subroutine CloseChokeLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(47, .false.) | |||
!WRITE (*,*) ' valve 47 false ' | |||
end subroutine | |||
subroutine OpenLowerRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(49, .true.) | |||
!WRITE (*,*) ' valve 49 true ' | |||
end subroutine | |||
subroutine CloseLowerRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(49, .false.) | |||
!WRITE (*,*) ' valve 49 false ' | |||
end subroutine | |||
! Output routines | |||
real(8) function GetManifoldPressureGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetManifoldPressureGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetManifoldPressureGauge' :: GetManifoldPressureGauge | |||
implicit none | |||
GetManifoldPressureGauge = BopControlPanel%ManifoldPressureGauge | |||
end function | |||
real(8) function GetAirSupplyPressureGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAirSupplyPressureGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAirSupplyPressureGauge' :: GetAirSupplyPressureGauge | |||
implicit none | |||
GetAirSupplyPressureGauge = BopControlPanel%AirSupplyPressureGauge | |||
end function | |||
real(8) function GetAccumulatorPressureGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAccumulatorPressureGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAccumulatorPressureGauge' :: GetAccumulatorPressureGauge | |||
implicit none | |||
GetAccumulatorPressureGauge = BopControlPanel%AccumulatorPressureGauge | |||
!GetAccumulatorPressureGauge = 2000.0d0 | |||
end function | |||
real(8) function GetAnnularPressureGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAnnularPressureGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnularPressureGauge' :: GetAnnularPressureGauge | |||
implicit none | |||
GetAnnularPressureGauge = BopControlPanel%AnnularPressureGauge | |||
end function | |||
integer function GetAnnularOpenLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAnnularOpenLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnularOpenLED' :: GetAnnularOpenLED | |||
implicit none | |||
GetAnnularOpenLED = BopControlPanel%AnnularOpenLED | |||
end function | |||
integer function GetAnnularCloseLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAnnularCloseLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnularCloseLED' :: GetAnnularCloseLED | |||
implicit none | |||
GetAnnularCloseLED = BopControlPanel%AnnularCloseLED | |||
end function | |||
integer function GetUpperRamsOpenLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetUpperRamsOpenLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetUpperRamsOpenLED' :: GetUpperRamsOpenLED | |||
implicit none | |||
GetUpperRamsOpenLED = BopControlPanel%UpperRamsOpenLED | |||
end function | |||
integer function GetUpperRamsCloseLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetUpperRamsCloseLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetUpperRamsCloseLED' :: GetUpperRamsCloseLED | |||
implicit none | |||
GetUpperRamsCloseLED = BopControlPanel%UpperRamsCloseLED | |||
end function | |||
integer function GetMiddleRamsOpenLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMiddleRamsOpenLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMiddleRamsOpenLED' :: GetMiddleRamsOpenLED | |||
implicit none | |||
GetMiddleRamsOpenLED = BopControlPanel%MiddleRamsOpenLED | |||
end function | |||
integer function GetMiddleRamsCloseLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMiddleRamsCloseLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMiddleRamsCloseLED' :: GetMiddleRamsCloseLED | |||
implicit none | |||
GetMiddleRamsCloseLED = BopControlPanel%MiddleRamsCloseLED | |||
end function | |||
integer function GetKillLineOpenLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetKillLineOpenLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetKillLineOpenLED' :: GetKillLineOpenLED | |||
implicit none | |||
GetKillLineOpenLED = BopControlPanel%KillLineOpenLED | |||
end function | |||
integer function GetKillLineCloseLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetKillLineCloseLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetKillLineCloseLED' :: GetKillLineCloseLED | |||
implicit none | |||
GetKillLineCloseLED = BopControlPanel%KillLineCloseLED | |||
end function | |||
integer function GetChokeLineOpenLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetChokeLineOpenLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChokeLineOpenLED' :: GetChokeLineOpenLED | |||
implicit none | |||
GetChokeLineOpenLED = BopControlPanel%ChokeLineOpenLED | |||
end function | |||
integer function GetChokeLineCloseLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetChokeLineCloseLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChokeLineCloseLED' :: GetChokeLineCloseLED | |||
implicit none | |||
GetChokeLineCloseLED = BopControlPanel%ChokeLineCloseLED | |||
end function | |||
integer function GetLowerRamsOpenLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetLowerRamsOpenLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetLowerRamsOpenLED' :: GetLowerRamsOpenLED | |||
implicit none | |||
GetLowerRamsOpenLED = BopControlPanel%LowerRamsOpenLED | |||
end function | |||
integer function GetLowerRamsCloseLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetLowerRamsCloseLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetLowerRamsCloseLED' :: GetLowerRamsCloseLED | |||
implicit none | |||
GetLowerRamsCloseLED = BopControlPanel%LowerRamsCloseLED | |||
end function | |||
real(8) function GetAnnularStatus() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAnnularStatus | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnularStatus' :: GetAnnularStatus | |||
implicit none | |||
GetAnnularStatus = BopControlPanel%AnnularStatus | |||
end function | |||
real(8) function GetUpperRamsStatus() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetUpperRamsStatus | |||
!DEC$ ATTRIBUTES ALIAS: 'GetUpperRamsStatus' :: GetUpperRamsStatus | |||
implicit none | |||
GetUpperRamsStatus = BopControlPanel%UpperRamsStatus | |||
end function | |||
real(8) function GetMiddleRamsStatus() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMiddleRamsStatus | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMiddleRamsStatus' :: GetMiddleRamsStatus | |||
implicit none | |||
GetMiddleRamsStatus = BopControlPanel%MiddleRamsStatus | |||
end function | |||
real(8) function GetLowerRamsStatus() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetLowerRamsStatus | |||
!DEC$ ATTRIBUTES ALIAS: 'GetLowerRamsStatus' :: GetLowerRamsStatus | |||
implicit none | |||
GetLowerRamsStatus = BopControlPanel%LowerRamsStatus | |||
end function | |||
end module CBopControlPanel |
@@ -35,82 +35,6 @@ module CBopControlPanelVariables | |||
real(8) :: MiddleRamsStatus | |||
real(8) :: LowerRamsStatus | |||
end type | |||
type(BopControlPanelType) :: BopControlPanel | |||
contains | |||
subroutine OpenAnnular() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(52, .true.) | |||
end subroutine | |||
subroutine CloseAnnular() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(52, .false.) | |||
end subroutine | |||
subroutine OpenUpperRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(51, .true.) | |||
end subroutine | |||
subroutine CloseUpperRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(51, .false.) | |||
end subroutine | |||
subroutine OpenMiddleRams() | |||
use CManifolds | |||
implicit none | |||
call ToggleMiddleRams(.true.) | |||
end subroutine | |||
subroutine CloseMiddleRams() | |||
use CManifolds | |||
implicit none | |||
call ToggleMiddleRams(.false.) | |||
end subroutine | |||
subroutine OpenKillLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(46, .true.) | |||
end subroutine | |||
subroutine CloseKillLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(46, .false.) | |||
end subroutine | |||
subroutine OpenChokeLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(47, .true.) | |||
!WRITE (*,*) ' valve 47 true ' | |||
end subroutine | |||
subroutine CloseChokeLine() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(47, .false.) | |||
!WRITE (*,*) ' valve 47 false ' | |||
end subroutine | |||
subroutine OpenLowerRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(49, .true.) | |||
!WRITE (*,*) ' valve 49 true ' | |||
end subroutine | |||
subroutine CloseLowerRams() | |||
use CManifolds | |||
implicit none | |||
call ChangeValve(49, .false.) | |||
!WRITE (*,*) ' valve 49 false ' | |||
end subroutine | |||
end module CBopControlPanelVariables |
@@ -1,5 +1,6 @@ | |||
module CChokeControlPanel | |||
use CChokeControlPanelVariables | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
@@ -10,9 +11,9 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokePanelPumpSelectorSwitch' :: SetChokePanelPumpSelectorSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
ChokeControlPanel%ChokePanelPumpSelectorSwitch = v | |||
data%EquipmentControl%ChokeControlPanel%ChokePanelPumpSelectorSwitch = v | |||
#ifdef deb | |||
print*, 'ChokePanelPumpSelectorSwitch=', ChokeControlPanel%ChokePanelPumpSelectorSwitch | |||
print*, 'ChokePanelPumpSelectorSwitch=', data%EquipmentControl%ChokeControlPanel%ChokePanelPumpSelectorSwitch | |||
#endif | |||
end subroutine | |||
@@ -21,9 +22,9 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokePanelStrokeResetSwitch' :: SetChokePanelStrokeResetSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeControlPanel%ChokePanelStrokeResetSwitch = v | |||
data%EquipmentControl%ChokeControlPanel%ChokePanelStrokeResetSwitch = v | |||
#ifdef deb | |||
print*, 'ChokePanelStrokeResetSwitch=', ChokeControlPanel%ChokePanelStrokeResetSwitch | |||
print*, 'ChokePanelStrokeResetSwitch=', data%EquipmentControl%ChokeControlPanel%ChokePanelStrokeResetSwitch | |||
#endif | |||
end subroutine | |||
@@ -32,9 +33,9 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeSelectorSwitch' :: SetChokeSelectorSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeControlPanel%ChokeSelectorSwitch = v | |||
data%EquipmentControl%ChokeControlPanel%ChokeSelectorSwitch = v | |||
#ifdef deb | |||
print*, 'ChokeSelectorSwitch=', ChokeControlPanel%ChokeSelectorSwitch | |||
print*, 'ChokeSelectorSwitch=', data%EquipmentControl%ChokeControlPanel%ChokeSelectorSwitch | |||
#endif | |||
end subroutine | |||
@@ -49,12 +50,12 @@ module CChokeControlPanel | |||
!character(5) :: zone | |||
!integer,dimension(8) :: values | |||
ChokeControlPanel%ChokeRateControlKnob = v | |||
data%EquipmentControl%ChokeControlPanel%ChokeRateControlKnob = v | |||
#ifdef deb | |||
!call date_and_time(date,time,zone,values) | |||
!!print '(a,2x,a,2x,a)', date, time, zone | |||
!print '(8i5)', values | |||
print*, 'ChokeRateControlKnob=', ChokeControlPanel%ChokeRateControlKnob | |||
print*, 'ChokeRateControlKnob=', data%EquipmentControl%ChokeControlPanel%ChokeRateControlKnob | |||
#endif | |||
end subroutine | |||
@@ -63,9 +64,9 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeControlLever' :: SetChokeControlLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
ChokeControlPanel%ChokeControlLever = v | |||
data%EquipmentControl%ChokeControlPanel%ChokeControlLever = v | |||
#ifdef deb | |||
print*, 'ChokeControlLever=', ChokeControlPanel%ChokeControlLever | |||
print*, 'ChokeControlLever=', data%EquipmentControl%ChokeControlPanel%ChokeControlLever | |||
#endif | |||
end subroutine | |||
@@ -74,9 +75,9 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokePanelRigAirSwitch' :: SetChokePanelRigAirSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeControlPanel%ChokePanelRigAirSwitch = v | |||
data%EquipmentControl%ChokeControlPanel%ChokePanelRigAirSwitch = v | |||
#ifdef deb | |||
print*, 'ChokePanelRigAirSwitch=', ChokeControlPanel%ChokePanelRigAirSwitch | |||
print*, 'ChokePanelRigAirSwitch=', data%EquipmentControl%ChokeControlPanel%ChokePanelRigAirSwitch | |||
#endif | |||
end subroutine | |||
@@ -86,9 +87,9 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetEnableAutoChoke' :: SetEnableAutoChoke | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeControlPanel%EnableAutoChoke = v | |||
data%EquipmentControl%ChokeControlPanel%EnableAutoChoke = v | |||
#ifdef deb | |||
print*, 'EnableAutoChoke=', ChokeControlPanel%EnableAutoChoke | |||
print*, 'EnableAutoChoke=', data%EquipmentControl%ChokeControlPanel%EnableAutoChoke | |||
#endif | |||
end subroutine | |||
@@ -108,21 +109,21 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipePressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStandPipePressure' :: GetStandPipePressure | |||
implicit none | |||
GetStandPipePressure = ChokeControlPanel%StandPipePressure | |||
GetStandPipePressure = data%EquipmentControl%ChokeControlPanel%StandPipePressure | |||
end function | |||
real(8) function GetCasingPressure() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCasingPressure' :: GetCasingPressure | |||
implicit none | |||
GetCasingPressure = ChokeControlPanel%CasingPressure | |||
GetCasingPressure = data%EquipmentControl%ChokeControlPanel%CasingPressure | |||
end function | |||
real(8) function GetChokePosition() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetChokePosition | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChokePosition' :: GetChokePosition | |||
implicit none | |||
GetChokePosition = ChokeControlPanel%ChokePosition | |||
GetChokePosition = data%EquipmentControl%ChokeControlPanel%ChokePosition | |||
end function | |||
real(8) function GetChokePanelSPMCounter() | |||
@@ -130,7 +131,7 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChokePanelSPMCounter' :: GetChokePanelSPMCounter | |||
implicit none | |||
!GetChokePanelSPMCounter = 0 | |||
GetChokePanelSPMCounter = ChokeControlPanel%ChokePanelSPMCounter | |||
GetChokePanelSPMCounter = data%EquipmentControl%ChokeControlPanel%ChokePanelSPMCounter | |||
end function | |||
real(8) function GetChokePanelTotalStrokeCounter() | |||
@@ -138,21 +139,21 @@ module CChokeControlPanel | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChokePanelTotalStrokeCounter' :: GetChokePanelTotalStrokeCounter | |||
implicit none | |||
!GetChokePanelTotalStrokeCounter = 0 | |||
GetChokePanelTotalStrokeCounter = ChokeControlPanel%ChokePanelTotalStrokeCounter | |||
GetChokePanelTotalStrokeCounter = data%EquipmentControl%ChokeControlPanel%ChokePanelTotalStrokeCounter | |||
end function | |||
integer function GetChoke1LED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetChoke1LED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChoke1LED' :: GetChoke1LED | |||
implicit none | |||
GetChoke1LED = ChokeControlPanel%Choke1LED | |||
GetChoke1LED = data%EquipmentControl%ChokeControlPanel%Choke1LED | |||
end function | |||
integer function GetChoke2LED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetChoke2LED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetChoke2LED' :: GetChoke2LED | |||
implicit none | |||
GetChoke2LED = ChokeControlPanel%Choke2LED | |||
GetChoke2LED = data%EquipmentControl%ChokeControlPanel%Choke2LED | |||
end function | |||
@@ -20,5 +20,4 @@ module CChokeControlPanelVariables | |||
integer :: Choke1LED | |||
integer :: Choke2LED | |||
End Type ChokeControlPanelType | |||
Type(ChokeControlPanelType)::ChokeControlPanel | |||
end module CChokeControlPanelVariables |
@@ -1,212 +1,41 @@ | |||
module CChokeManifold | |||
use CChokeManifoldVariables | |||
! use CChokeManifoldVariables | |||
use ConfigurationVariables | |||
use CManifolds | |||
use CLog2 | |||
implicit none | |||
public | |||
contains | |||
! Input routines | |||
subroutine SetChokeManifoldValve1(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve1 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve1' :: SetChokeManifoldValve1 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve1 = v | |||
call ChangeValve(61, v) | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve1=', ChokeManifoldValve1 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve2(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve2 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve2' :: SetChokeManifoldValve2 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve2 = v | |||
call ChangeValve(64, v) | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve2=', ChokeManifoldValve2 | |||
#endif | |||
end subroutine | |||
subroutine SetLeftManualChoke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetLeftManualChoke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetLeftManualChoke' :: SetLeftManualChoke | |||
implicit none | |||
real*8, intent(in) :: v | |||
!LeftManualChoke = abs(v-100) | |||
ChokeManifold%LeftManualChoke = v | |||
if(ChokeManifold%LeftManChokeOnProblem) then | |||
call ChangeValve(32, .true.) | |||
public | |||
contains | |||
subroutine SetHydraulicChock1(v) | |||
implicit none | |||
integer, intent(in) :: v | |||
data%EquipmentControl%ChokeManifold%HydraulicChock1 = v | |||
if(data%EquipmentControl%ChokeManifold%HyChock1OnProblem) then | |||
call ChangeValve(33, .true.) | |||
else | |||
if(v == 100) then | |||
if(Manifold%Valve(33)%Status) call ChangeValve(33, .false.) | |||
else | |||
if(ChokeManifold%LeftManualChoke > 99.9) then | |||
!call Log_2( 'valve 32 is closed=', LeftManualChoke) | |||
call ChangeValve(32, .false.) | |||
else | |||
!call Log_2( 'valve 32 is open=', LeftManualChoke) | |||
call ChangeValve(32, .true.) | |||
endif | |||
if(.not.Manifold%Valve(33)%Status) call ChangeValve(33, .true.) | |||
endif | |||
#ifdef deb | |||
!print*, 'LeftManualChoke=', LeftManualChoke | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve4(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve4 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve4' :: SetChokeManifoldValve4 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve4 = v | |||
call ChangeValve(62, v) | |||
!WRITE (*,*) ' valve 62 ', v | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve4=', ChokeManifoldValve4 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve5(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve5 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve5' :: SetChokeManifoldValve5 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve5 = v | |||
call ChangeValve(63, v) | |||
!WRITE (*,*) ' valve 63 ', v | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve5=', ChokeManifoldValve5 | |||
#endif | |||
end subroutine | |||
subroutine SetRightManualChoke(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetRightManualChoke | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRightManualChoke' :: SetRightManualChoke | |||
implicit none | |||
real*8, intent(in) :: v | |||
!RightManualChoke = abs(v -100) | |||
ChokeManifold%RightManualChoke = v | |||
if(ChokeManifold%RightManChokeOnProblem) then | |||
call ChangeValve(35, .true.) | |||
else | |||
if(ChokeManifold%RightManualChoke > 99.9) then | |||
!call Log_2( 'valve 35 is closed=', RightManualChoke) | |||
call ChangeValve(35, .false.) | |||
else | |||
!call Log_2( 'valve 35 is open=', RightManualChoke) | |||
call ChangeValve(35, .true.) | |||
endif | |||
endif | |||
!WRITE (*,*) ' valve 33 ', Valve(33)%Status, ' arg ', v | |||
end subroutine | |||
subroutine SetHydraulicChock2(v) | |||
implicit none | |||
integer, intent(in) :: v | |||
data%EquipmentControl%ChokeManifold%HydraulicChock2 = v | |||
if(data%EquipmentControl%ChokeManifold%HyChock2OnProblem) then | |||
call ChangeValve(34, .true.) | |||
else | |||
if(v==100) then | |||
if(Manifold%Valve(34)%Status) call ChangeValve(34, .false.) | |||
else | |||
if(.not.Manifold%Valve(34)%Status) call ChangeValve(34, .true.) | |||
endif | |||
#ifdef deb | |||
!print*, 'RightManualChoke=', RightManualChoke | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve7(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve7 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve7' :: SetChokeManifoldValve7 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve7 = v | |||
call ChangeValve(27, v) | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve7=', ChokeManifoldValve7 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve8(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve8 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve8' :: SetChokeManifoldValve8 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve8 = v | |||
call ChangeValve(28, v) | |||
!WRITE (*,*) ' valve 28 ', v | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve8=', ChokeManifoldValve8 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve9(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve9 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve9' :: SetChokeManifoldValve9 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve9 = v | |||
call ChangeValve(29, v) | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve9=', ChokeManifoldValve9 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve10(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve10 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve10' :: SetChokeManifoldValve10 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve10 = v | |||
call ChangeValve(30, v) | |||
!WRITE (*,*) ' valve 30 ', v | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve10=', ChokeManifoldValve10 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve11(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve11 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve11' :: SetChokeManifoldValve11 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve11 = v | |||
call ChangeValve(31, v) | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve11=', ChokeManifoldValve11 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve12(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve12 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve12' :: SetChokeManifoldValve12 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve12 = v | |||
call ChangeValve(25, v) | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve12=', ChokeManifoldValve12 | |||
#endif | |||
end subroutine | |||
subroutine SetChokeManifoldValve13(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetChokeManifoldValve13 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetChokeManifoldValve13' :: SetChokeManifoldValve13 | |||
implicit none | |||
logical, intent(in) :: v | |||
ChokeManifold%ChokeManifoldValve13 = v | |||
call ChangeValve(26, v) | |||
!WRITE (*,*) ' valve 26 ', v | |||
#ifdef deb | |||
!print*, 'ChokeManifoldValve13=', ChokeManifoldValve13 | |||
#endif | |||
end subroutine | |||
! Output routines | |||
integer function GetHydraulicChock1() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetHydraulicChock1 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetHydraulicChock1' :: GetHydraulicChock1 | |||
implicit none | |||
GetHydraulicChock1 = ChokeManifold%HydraulicChock1 | |||
!GetHydraulicChock1 = 23 | |||
end function | |||
integer function GetHydraulicChock2() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetHydraulicChock2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetHydraulicChock2' :: GetHydraulicChock2 | |||
implicit none | |||
GetHydraulicChock2 = ChokeManifold%HydraulicChock2 | |||
!GetHydraulicChock2 = 54 | |||
end function | |||
endif | |||
!WRITE (*,*) ' valve 34 ', Valve(34)%Status, ' arg ', v | |||
end subroutine | |||
end module CChokeManifold |
@@ -1,5 +1,4 @@ | |||
module CChokeManifoldVariables | |||
use CManifolds | |||
implicit none | |||
public | |||
Type :: ChokeManifoldType | |||
@@ -29,40 +28,9 @@ module CChokeManifoldVariables | |||
logical :: RightManChokeOnProblem = .false. | |||
End Type ChokeManifoldType | |||
Type(ChokeManifoldType)::ChokeManifold | |||
contains | |||
subroutine SetHydraulicChock1(v) | |||
implicit none | |||
integer, intent(in) :: v | |||
ChokeManifold%HydraulicChock1 = v | |||
if(ChokeManifold%HyChock1OnProblem) then | |||
call ChangeValve(33, .true.) | |||
else | |||
if(v == 100) then | |||
if(Manifold%Valve(33)%Status) call ChangeValve(33, .false.) | |||
else | |||
if(.not.Manifold%Valve(33)%Status) call ChangeValve(33, .true.) | |||
endif | |||
endif | |||
!WRITE (*,*) ' valve 33 ', Valve(33)%Status, ' arg ', v | |||
end subroutine | |||
contains | |||
subroutine SetHydraulicChock2(v) | |||
implicit none | |||
integer, intent(in) :: v | |||
ChokeManifold%HydraulicChock2 = v | |||
if(ChokeManifold%HyChock2OnProblem) then | |||
call ChangeValve(34, .true.) | |||
else | |||
if(v==100) then | |||
if(Manifold%Valve(34)%Status) call ChangeValve(34, .false.) | |||
else | |||
if(.not.Manifold%Valve(34)%Status) call ChangeValve(34, .true.) | |||
endif | |||
endif | |||
!WRITE (*,*) ' valve 34 ', Valve(34)%Status, ' arg ', v | |||
end subroutine | |||
endmodule CChokeManifoldVariables |
@@ -1,796 +1,153 @@ | |||
module CDataDisplayConsole | |||
use CDataDisplayConsoleVariables | |||
! use CDataDisplayConsole | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
!Portable | |||
subroutine SetTripAlarmLow(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripAlarmLow | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripAlarmLow' :: SetTripAlarmLow | |||
!use MudSystemVARIABLES, only: TripTank_MinVol_Allowded | |||
subroutine Set_TotalDepth(v) | |||
use ConfigurationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Depth | |||
! use CSimulationVariables, only: SetDistanceDrilled | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%TripAlarmLow = v | |||
!TripTank_MinVol_Allowded = v | |||
#ifdef deb | |||
print*, 'TripAlarmLow=', DataDisplayConsole%TripAlarmLow | |||
#endif | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DataDisplayConsole%TotalWellDepth = v | |||
data%EquipmentControl%DrillingWatch%Depth = v | |||
! call SetDistanceDrilled(v) | |||
end subroutine | |||
subroutine SetTripAlarmHigh(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripAlarmHigh | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripAlarmHigh' :: SetTripAlarmHigh | |||
!use MudSystemVARIABLES, only: TripTank_MaxVol_Allowded | |||
subroutine Set_BitPosition(v) | |||
use ConfigurationVariables !@!!, only: data%EquipmentControl%DrillingWatch%BitPosition | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%TripAlarmHigh = v | |||
!TripTank_MaxVol_Allowded = v | |||
#ifdef deb | |||
print*, 'TripAlarmHigh=', DataDisplayConsole%TripAlarmHigh | |||
#endif | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DataDisplayConsole%BitDepth = v | |||
data%EquipmentControl%DrillingWatch%BitPosition = v | |||
end subroutine | |||
subroutine SetRetFlowAlarmLow(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetRetFlowAlarmLow | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRetFlowAlarmLow' :: SetRetFlowAlarmLow | |||
!use MudSystemVARIABLES, only: MFFI_MinPercent_Allowded | |||
subroutine Set_RotaryTorque(v) | |||
use ConfigurationVariables !@!!, only: data%EquipmentControl%DrillingWatch%Torque | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%RetFlowAlarmLow = v | |||
!MFFI_MinPercent_Allowded = v | |||
#ifdef deb | |||
print*, 'RetFlowAlarmLow=', DataDisplayConsole%RetFlowAlarmLow | |||
#endif | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DataDisplayConsole%RotaryTorqueGauge = v | |||
data%EquipmentControl%DrillingWatch%Torque = v | |||
data%EquipmentControl%DataDisplayConsole%RTTorque = v | |||
end subroutine | |||
subroutine SetRetFlowAlarmHigh(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetRetFlowAlarmHigh | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRetFlowAlarmHigh' :: SetRetFlowAlarmHigh | |||
!use MudSystemVARIABLES, only: MFFI_MaxPercent_Allowded | |||
subroutine Set_MudWeightIn(v) | |||
use ConfigurationVariables !@!, only: MudWeightInDw => data%EquipmentControl%DataDisplayConsole%MudWeightIn | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%RetFlowAlarmHigh = v | |||
!MFFI_MaxPercent_Allowded = v | |||
#ifdef deb | |||
print*, 'RetFlowAlarmHigh=', DataDisplayConsole%RetFlowAlarmHigh | |||
#endif | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DataDisplayConsole%MudWeightIn = v | |||
data%EquipmentControl%DrillingWatch%MudWeightIn = v | |||
end subroutine | |||
subroutine SetPitAlarmLow(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetPitAlarmLow | |||
!DEC$ ATTRIBUTES ALIAS: 'SetPitAlarmLow' :: SetPitAlarmLow | |||
subroutine Set_MudWeightOut(v) | |||
use ConfigurationVariables !@!, only: MudWeightOutDw => data%EquipmentControl%DataDisplayConsole%MudWeightOut | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%PitAlarmLow = v | |||
!call Log_4('PitAlarmLow=', PitAlarmLow) | |||
#ifdef deb | |||
print*, 'PitAlarmLow=', DataDisplayConsole%PitAlarmLow | |||
#endif | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DataDisplayConsole%MudWeightOut = v | |||
data%EquipmentControl%DrillingWatch%MudWeightOut = v | |||
end subroutine | |||
subroutine SetPitAlarmHigh(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetPitAlarmHigh | |||
!DEC$ ATTRIBUTES ALIAS: 'SetPitAlarmHigh' :: SetPitAlarmHigh | |||
subroutine Set_TripTankVolume(v) | |||
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%TripTankVolume | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%PitAlarmHigh = v | |||
!call Log_4('PitAlarmHigh=', PitAlarmHigh) | |||
#ifdef deb | |||
print*, 'PitAlarmHigh=', DataDisplayConsole%PitAlarmHigh | |||
#endif | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DrillingWatch%TripTankVolume = v | |||
end subroutine | |||
! Input routines | |||
subroutine SetTripTankSetAlarmLow(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankSetAlarmLow | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankSetAlarmLow' :: SetTripTankSetAlarmLow | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%TripTankSetAlarmLow = v | |||
#ifdef deb | |||
print*, 'TripTankSetAlarmLow=', DataDisplayConsole%TripTankSetAlarmLow | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankSetAlarmHigh(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankSetAlarmHigh | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankSetAlarmHigh' :: SetTripTankSetAlarmHigh | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%TripTankSetAlarmHigh = v | |||
#ifdef deb | |||
print*, 'TripTankSetAlarmHigh=', DataDisplayConsole%TripTankSetAlarmHigh | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankSetAlarmSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankSetAlarmSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankSetAlarmSwitch' :: SetTripTankSetAlarmSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DataDisplayConsole%TripTankSetAlarmSwitch = v | |||
#ifdef deb | |||
print*, 'TripTankSetAlarmSwitch=', DataDisplayConsole%TripTankSetAlarmSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankPowerSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankPowerSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankPowerSwitch' :: SetTripTankPowerSwitch | |||
use CTanksVariables, only: Set_ManualPumpPower | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%TripTankPowerSwitch = v | |||
if(DataDisplayConsole%TripTankPowerSwitch) call Set_ManualPumpPower(DataDisplayConsole%TripTankPumpSwitch) | |||
#ifdef deb | |||
print*, 'TripTankPowerSwitch=', DataDisplayConsole%TripTankPowerSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankPumpSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankPumpSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankPumpSwitch' :: SetTripTankPumpSwitch | |||
use CTanksVariables, only: Set_ManualPumpPower | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%TripTankPumpSwitch = v | |||
if(DataDisplayConsole%TripTankPowerSwitch) call Set_ManualPumpPower(DataDisplayConsole%TripTankPumpSwitch) | |||
#ifdef deb | |||
print*, 'TripTankPumpSwitch=', DataDisplayConsole%TripTankPumpSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankHornSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankHornSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankHornSwitch' :: SetTripTankHornSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%TripTankHornSwitch = v | |||
#ifdef deb | |||
print*, 'TripTankHornSwitch=', DataDisplayConsole%TripTankHornSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetAcidGasDetectionHornSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetAcidGasDetectionHornSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetAcidGasDetectionHornSwitch' :: SetAcidGasDetectionHornSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%AcidGasDetectionHornSwitch = v | |||
#ifdef deb | |||
print*, 'AcidGasDetectionHornSwitch=', DataDisplayConsole%AcidGasDetectionHornSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetTotalStrokeCounterResetSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTotalStrokeCounterResetSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTotalStrokeCounterResetSwitch' :: SetTotalStrokeCounterResetSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%TotalStrokeCounterResetSwitch = v | |||
#ifdef deb | |||
print*, 'TotalStrokeCounterResetSwitch=', DataDisplayConsole%TotalStrokeCounterResetSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetDrillingTrippingSelectorSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetDrillingTrippingSelectorSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDrillingTrippingSelectorSwitch' :: SetDrillingTrippingSelectorSwitch | |||
use CCommonVariables | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%DrillingTrippingSelectorSwitch = v | |||
Common%DrillWatchOperationMode = v | |||
#ifdef deb | |||
print*, 'DrillingTrippingSelectorSwitch=', DataDisplayConsole%DrillingTrippingSelectorSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMVTSetAlarmLowKnob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTSetAlarmLowKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTSetAlarmLowKnob' :: SetMVTSetAlarmLowKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%MVTSetAlarmLowKnob = v | |||
#ifdef deb | |||
print*, 'MVTSetAlarmLowKnob=', DataDisplayConsole%MVTSetAlarmLowKnob | |||
#endif | |||
end subroutine | |||
subroutine SetMVTSetAlarmHighKnob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTSetAlarmHighKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTSetAlarmHighKnob' :: SetMVTSetAlarmHighKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%MVTSetAlarmHighKnob = v | |||
#ifdef deb | |||
print*, 'MVTSetAlarmHighKnob=', DataDisplayConsole%MVTSetAlarmHighKnob | |||
#endif | |||
end subroutine | |||
subroutine SetMVTSetAlarmSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTSetAlarmSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTSetAlarmSwitch' :: SetMVTSetAlarmSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DataDisplayConsole%MVTSetAlarmSwitch = v | |||
#ifdef deb | |||
print*, 'MVTSetAlarmSwitch=', DataDisplayConsole%MVTSetAlarmSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMudTank1Switch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudTank1Switch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudTank1Switch' :: SetMudTank1Switch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MudTank1Switch = v | |||
#ifdef deb | |||
print*, 'MudTank1Switch=', DataDisplayConsole%MudTank1Switch | |||
#endif | |||
end subroutine | |||
subroutine SetMudTank2Switch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudTank2Switch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudTank2Switch' :: SetMudTank2Switch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MudTank2Switch = v | |||
#ifdef deb | |||
print*, 'MudTank2Switch=', DataDisplayConsole%MudTank2Switch | |||
#endif | |||
end subroutine | |||
subroutine SetMudTank3Switch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudTank3Switch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudTank3Switch' :: SetMudTank3Switch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MudTank3Switch = v | |||
#ifdef deb | |||
print*, 'MudTank3Switch=', DataDisplayConsole%MudTank3Switch | |||
#endif | |||
end subroutine | |||
subroutine SetMudTank4Switch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMudTank4Switch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMudTank4Switch' :: SetMudTank4Switch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MudTank4Switch = v | |||
#ifdef deb | |||
print*, 'MudTank4Switch=', DataDisplayConsole%MudTank4Switch | |||
#endif | |||
end subroutine | |||
subroutine SetMVTFineKnob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTFineKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTFineKnob' :: SetMVTFineKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%MVTFineKnob = v | |||
#ifdef deb | |||
print*, 'MVTFineKnob=', DataDisplayConsole%MVTFineKnob | |||
#endif | |||
end subroutine | |||
subroutine SetMVTCoarseKnob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTCoarseKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTCoarseKnob' :: SetMVTCoarseKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%MVTCoarseKnob = v | |||
#ifdef deb | |||
print*, 'MVTCoarseKnob=', DataDisplayConsole%MVTCoarseKnob | |||
#endif | |||
end subroutine | |||
subroutine SetMVTHornSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTHornSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTHornSwitch' :: SetMVTHornSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MVTHornSwitch = v | |||
#ifdef deb | |||
print*, 'MVTHornSwitch=', DataDisplayConsole%MVTHornSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMVTDeviationTripSelectionSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTDeviationTripSelectionSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTDeviationTripSelectionSwitch' :: SetMVTDeviationTripSelectionSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MVTDeviationTripSelectionSwitch = v | |||
#ifdef deb | |||
print*, 'MVTDeviationTripSelectionSwitch=', DataDisplayConsole%MVTDeviationTripSelectionSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMVTPowerSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMVTPowerSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMVTPowerSwitch' :: SetMVTPowerSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MVTPowerSwitch = v | |||
#ifdef deb | |||
print*, 'MVTPowerSwitch=', DataDisplayConsole%MVTPowerSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMFFIResetTotalStrokes(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFIResetTotalStrokes | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFIResetTotalStrokes' :: SetMFFIResetTotalStrokes | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MFFIResetTotalStrokes = v | |||
#ifdef deb | |||
print*, 'MFFIResetTotalStrokes=', DataDisplayConsole%MFFIResetTotalStrokes | |||
#endif | |||
end subroutine | |||
subroutine SetMFFIResetFillCounter(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFIResetFillCounter | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFIResetFillCounter' :: SetMFFIResetFillCounter | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MFFIResetFillCounter = v | |||
#ifdef deb | |||
print*, 'MFFIResetFillCounter=', DataDisplayConsole%MFFIResetFillCounter | |||
#endif | |||
end subroutine | |||
subroutine SetMFFIPumpSelectorSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFIPumpSelectorSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFIPumpSelectorSwitch' :: SetMFFIPumpSelectorSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DataDisplayConsole%MFFIPumpSelectorSwitch = v | |||
#ifdef deb | |||
print*, 'MFFIPumpSelectorSwitch=', DataDisplayConsole%MFFIPumpSelectorSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMFFIFillSPMSelectorSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFIFillSPMSelectorSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFIFillSPMSelectorSwitch' :: SetMFFIFillSPMSelectorSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MFFIFillSPMSelectorSwitch = v | |||
#ifdef deb | |||
print*, 'MFFIFillSPMSelectorSwitch=', DataDisplayConsole%MFFIFillSPMSelectorSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMFFISetAlarmLowKnob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFISetAlarmLowKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFISetAlarmLowKnob' :: SetMFFISetAlarmLowKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%MFFISetAlarmLowKnob = v | |||
#ifdef deb | |||
print*, 'MFFISetAlarmLowKnob=', DataDisplayConsole%MFFISetAlarmLowKnob | |||
#endif | |||
end subroutine | |||
subroutine SetMFFISetAlarmHighKnob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFISetAlarmHighKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFISetAlarmHighKnob' :: SetMFFISetAlarmHighKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DataDisplayConsole%MFFISetAlarmHighKnob = v | |||
#ifdef deb | |||
print*, 'MFFISetAlarmHighKnob=', DataDisplayConsole%MFFISetAlarmHighKnob | |||
#endif | |||
end subroutine | |||
subroutine SetMFFISetAlarmSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFISetAlarmSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFISetAlarmSwitch' :: SetMFFISetAlarmSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DataDisplayConsole%MFFISetAlarmSwitch = v | |||
#ifdef deb | |||
print*, 'MFFISetAlarmSwitch=', DataDisplayConsole%MFFISetAlarmSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMFFIPowerSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFIPowerSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFIPowerSwitch' :: SetMFFIPowerSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MFFIPowerSwitch = v | |||
#ifdef deb | |||
print*, 'MFFIPowerSwitch=', DataDisplayConsole%MFFIPowerSwitch | |||
#endif | |||
end subroutine | |||
subroutine SetMFFIHornSwitch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetMFFIHornSwitch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMFFIHornSwitch' :: SetMFFIHornSwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%MFFIHornSwitch = v | |||
#ifdef deb | |||
print*, 'MFFIHornSwitch=', DataDisplayConsole%MFFIHornSwitch | |||
#endif | |||
subroutine Set_FillVolume(v) | |||
use ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%FillVolume | |||
implicit none | |||
real(8), intent(in) :: v | |||
data%EquipmentControl%DrillingWatch%FillVolume = v | |||
end subroutine | |||
subroutine SetTotalWellDepth(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTotalWellDepth | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTotalWellDepth' :: SetTotalWellDepth | |||
implicit none | |||
real(8), intent(in) :: v | |||
call Set_TotalDepth(v) | |||
#ifdef deb | |||
print*, 'TotalWellDepth=', v | |||
#endif | |||
subroutine Set_HookLoad(v) | |||
use ConfigurationVariables !@!, 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 SetResetWob(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetResetWob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetResetWob' :: SetResetWob | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%ResetWob = v | |||
#ifdef deb | |||
print*, 'ResetWob=', DataDisplayConsole%ResetWob | |||
#endif | |||
subroutine Set_WeightOnBit(v) | |||
use ConfigurationVariables !@!, 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 SetClutch(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetClutch | |||
!DEC$ ATTRIBUTES ALIAS: 'SetClutch' :: SetClutch | |||
implicit none | |||
logical, intent(in) :: v | |||
DataDisplayConsole%Clutch = v | |||
#ifdef deb | |||
print*, 'Clutch=', DataDisplayConsole%Clutch | |||
#endif | |||
subroutine Set_ROP(v) | |||
use ConfigurationVariables !@!, 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 | |||
! Output routines | |||
real(8) function GetWOBPointer() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetWOBPointer | |||
!DEC$ ATTRIBUTES ALIAS: 'GetWOBPointer' :: GetWOBPointer | |||
implicit none | |||
GetWOBPointer = DataDisplayConsole%WOBPointer | |||
end function | |||
real(8) function GetHookLoadPointer() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetHookLoadPointer | |||
!DEC$ ATTRIBUTES ALIAS: 'GetHookLoadPointer' :: GetHookLoadPointer | |||
implicit none | |||
GetHookLoadPointer = DataDisplayConsole%HookLoadPointer | |||
end function | |||
real(8) function GetTripTankGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTripTankGauge' :: GetTripTankGauge | |||
implicit none | |||
GetTripTankGauge = DataDisplayConsole%TripTankGauge / 42.0 | |||
!GetTripTankGauge = 23 | |||
end function | |||
integer function GetTripTankAlarmLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankAlarmLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTripTankAlarmLED' :: GetTripTankAlarmLED | |||
implicit none | |||
GetTripTankAlarmLED = DataDisplayConsole%TripTankAlarmLED | |||
!GetTripTankAlarmLED = 1 | |||
end function | |||
integer function GetTripTankPumpLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankPumpLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTripTankPumpLED' :: GetTripTankPumpLED | |||
implicit none | |||
GetTripTankPumpLED = DataDisplayConsole%TripTankPumpLED | |||
end function | |||
real(8) function GetStandPipePressureGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipePressureGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStandPipePressureGauge' :: GetStandPipePressureGauge | |||
implicit none | |||
GetStandPipePressureGauge = DataDisplayConsole%StandPipePressureGauge | |||
end function | |||
real(8) function GetCasingPressureGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressureGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCasingPressureGauge' :: GetCasingPressureGauge | |||
implicit none | |||
GetCasingPressureGauge = DataDisplayConsole%CasingPressureGauge | |||
end function | |||
real(8) function GetMP1SPMGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMP1SPMGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMP1SPMGauge' :: GetMP1SPMGauge | |||
implicit none | |||
GetMP1SPMGauge = DataDisplayConsole%MP1SPMGauge | |||
end function | |||
real(8) function GetMP2SPMGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMP2SPMGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMP2SPMGauge' :: GetMP2SPMGauge | |||
implicit none | |||
GetMP2SPMGauge = DataDisplayConsole%MP2SPMGauge | |||
end function | |||
real(8) function GetReturnLineTempGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetReturnLineTempGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetReturnLineTempGauge' :: GetReturnLineTempGauge | |||
implicit none | |||
GetReturnLineTempGauge = DataDisplayConsole%ReturnLineTempGauge | |||
end function | |||
real(8) function GetRotaryTorqueGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRotaryTorqueGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRotaryTorqueGauge' :: GetRotaryTorqueGauge | |||
implicit none | |||
GetRotaryTorqueGauge = DataDisplayConsole%RotaryTorqueGauge | |||
end function | |||
real(8) function GetRotaryRPMGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRotaryRPMGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRotaryRPMGauge' :: GetRotaryRPMGauge | |||
implicit none | |||
GetRotaryRPMGauge = DataDisplayConsole%RotaryRPMGauge | |||
end function | |||
integer function GetAcidGasDetectionLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAcidGasDetectionLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAcidGasDetectionLED' :: GetAcidGasDetectionLED | |||
implicit none | |||
GetAcidGasDetectionLED = DataDisplayConsole%AcidGasDetectionLED | |||
end function | |||
real(8) function GetTotalStrokeCounter() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTotalStrokeCounter | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTotalStrokeCounter' :: GetTotalStrokeCounter | |||
implicit none | |||
GetTotalStrokeCounter = DataDisplayConsole%TotalStrokeCounter | |||
!GetTotalStrokeCounter = 456.9 | |||
end function | |||
real(8) function GetPitGainLossGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPitGainLossGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPitGainLossGauge' :: GetPitGainLossGauge | |||
implicit none | |||
GetPitGainLossGauge = DataDisplayConsole%PitGainLossGauge | |||
!GetPitGainLossGauge = 44 | |||
end function | |||
real(8) function GetMudTanksVolumeGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMudTanksVolumeGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMudTanksVolumeGauge' :: GetMudTanksVolumeGauge | |||
implicit none | |||
GetMudTanksVolumeGauge = DataDisplayConsole%MudTanksVolumeGauge / 42.0 | |||
end function | |||
integer function GetMVTAlarmLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMVTAlarmLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMVTAlarmLED' :: GetMVTAlarmLED | |||
implicit none | |||
GetMVTAlarmLED = DataDisplayConsole%MVTAlarmLED | |||
!GetMVTAlarmLED = 1 | |||
end function | |||
real(8) function GetReturnMudFlowGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetReturnMudFlowGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetReturnMudFlowGauge' :: GetReturnMudFlowGauge | |||
implicit none | |||
GetReturnMudFlowGauge = DataDisplayConsole%ReturnMudFlowGauge | |||
!GetReturnMudFlowGauge = 12 | |||
end function | |||
real(8) function GetFillStrokeCounter() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetFillStrokeCounter | |||
!DEC$ ATTRIBUTES ALIAS: 'GetFillStrokeCounter' :: GetFillStrokeCounter | |||
implicit none | |||
GetFillStrokeCounter = DataDisplayConsole%FillStrokeCounter | |||
end function | |||
real(8) function GetMFFITotalStrokeCounter() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMFFITotalStrokeCounter | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMFFITotalStrokeCounter' :: GetMFFITotalStrokeCounter | |||
implicit none | |||
GetMFFITotalStrokeCounter = DataDisplayConsole%MFFITotalStrokeCounter | |||
end function | |||
integer function GetMFFIAlarmLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMFFIAlarmLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMFFIAlarmLED' :: GetMFFIAlarmLED | |||
implicit none | |||
GetMFFIAlarmLED = DataDisplayConsole%MFFIAlarmLED | |||
!GetMFFIAlarmLED = 1 | |||
end function | |||
integer function GetMFFIPumpLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMFFIPumpLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMFFIPumpLED' :: GetMFFIPumpLED | |||
implicit none | |||
GetMFFIPumpLED = DataDisplayConsole%MFFIPumpLED | |||
end function | |||
real(8) function GetTotalWellDepth() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTotalWellDepth | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTotalWellDepth' :: GetTotalWellDepth | |||
implicit none | |||
GetTotalWellDepth = DataDisplayConsole%TotalWellDepth | |||
end function | |||
real(8) function GetBitDepth() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBitDepth | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBitDepth' :: GetBitDepth | |||
implicit none | |||
GetBitDepth = DataDisplayConsole%BitDepth | |||
end function | |||
real(8) function GetHookLoad() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetHookLoad | |||
!DEC$ ATTRIBUTES ALIAS: 'GetHookLoad' :: GetHookLoad | |||
implicit none | |||
GetHookLoad = DataDisplayConsole%HookLoad | |||
end function | |||
real(8) function GetStandPipePressure2() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipePressure2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStandPipePressure2' :: GetStandPipePressure2 | |||
implicit none | |||
GetStandPipePressure2 = DataDisplayConsole%StandPipePressure | |||
end function | |||
real(8) function GetCasingPressure2() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressure2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCasingPressure2' :: GetCasingPressure2 | |||
implicit none | |||
GetCasingPressure2 = DataDisplayConsole%CasingPressure | |||
end function | |||
real(8) function GetMP1SPM() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMP1SPM | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMP1SPM' :: GetMP1SPM | |||
implicit none | |||
GetMP1SPM = DataDisplayConsole%MP1SPM | |||
end function | |||
real(8) function GetMP2SPM() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMP2SPM | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMP2SPM' :: GetMP2SPM | |||
implicit none | |||
GetMP2SPM = DataDisplayConsole%MP2SPM | |||
end function | |||
real(8) function GetRTTorque() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRTTorque | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRTTorque' :: GetRTTorque | |||
implicit none | |||
GetRTTorque = DataDisplayConsole%RTTorque | |||
end function | |||
real(8) function GetRTRPM() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRTRPM | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRTRPM' :: GetRTRPM | |||
implicit none | |||
GetRTRPM = DataDisplayConsole%RTRPM | |||
end function | |||
real(8) function GetWOP() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetWOP | |||
!DEC$ ATTRIBUTES ALIAS: 'GetWOP' :: GetWOP | |||
implicit none | |||
GetWOP = DataDisplayConsole%WOP | |||
end function | |||
real(8) function GetROP() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetROP | |||
!DEC$ ATTRIBUTES ALIAS: 'GetROP' :: GetROP | |||
implicit none | |||
GetROP = DataDisplayConsole%ROP | |||
end function | |||
real(8) function GetMudWeightIn() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMudWeightIn | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMudWeightIn' :: GetMudWeightIn | |||
implicit none | |||
GetMudWeightIn = DataDisplayConsole%MudWeightIn | |||
end function | |||
real(8) function GetMudWeightOut() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMudWeightOut | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMudWeightOut' :: GetMudWeightOut | |||
implicit none | |||
GetMudWeightOut = DataDisplayConsole%MudWeightOut | |||
end function | |||
logical function GetBuzzer1() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBuzzer1 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBuzzer1' :: GetBuzzer1 | |||
implicit none | |||
GetBuzzer1 = DataDisplayConsole%Buzzer1 | |||
!GetBuzzer1 = .true. | |||
end function | |||
logical function GetBuzzer2() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBuzzer2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBuzzer2' :: GetBuzzer2 | |||
implicit none | |||
GetBuzzer2 = DataDisplayConsole%Buzzer2 | |||
!GetBuzzer2 = .true. | |||
end function | |||
logical function GetBuzzer3() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBuzzer3 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBuzzer3' :: GetBuzzer3 | |||
subroutine Set_CasingPressure(v) | |||
use ConfigurationVariables !@!, only: CasingPressureDw => CasingPressure | |||
use CChokeControlPanelVariables | |||
use ConfigurationVariables!, only: CasingPressureChoke => CasingPressure | |||
implicit none | |||
GetBuzzer3 = DataDisplayConsole%Buzzer3 | |||
!GetBuzzer3 = .true. | |||
end function | |||
logical function GetBuzzer4() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBuzzer4 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBuzzer4' :: GetBuzzer4 | |||
implicit none | |||
GetBuzzer4 = DataDisplayConsole%Buzzer4 | |||
!GetBuzzer4 = .true. | |||
end function | |||
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 ConfigurationVariables !@!, only: data%EquipmentControl%DrillingWatch%PumpPressure | |||
use CChokeControlPanelVariables | |||
use ConfigurationVariables!, 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 ConfigurationVariables !@!, 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 | |||
!portable | |||
real(8) function GetPortWeightOnBit() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPortWeightOnBit | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPortWeightOnBit' :: GetPortWeightOnBit | |||
implicit none | |||
GetPortWeightOnBit = DataDisplayConsole%PortWeightOnBit | |||
end function | |||
real(8) function GetPortHookLoad() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPortHookLoad | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPortHookLoad' :: GetPortHookLoad | |||
implicit none | |||
GetPortHookLoad = DataDisplayConsole%PortHookLoad | |||
end function | |||
real(8) function GetPortCasingPressure() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPortCasingPressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPortCasingPressure' :: GetPortCasingPressure | |||
subroutine Set_MP1SPMGauge(v) | |||
implicit none | |||
GetPortCasingPressure = DataDisplayConsole%PortCasingPressure | |||
end function | |||
real(8) function GetPortPumpPressure() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPortPumpPressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPortPumpPressure' :: GetPortPumpPressure | |||
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 | |||
GetPortPumpPressure = DataDisplayConsole%PortPumpPressure | |||
end function | |||
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 |
@@ -96,157 +96,11 @@ module CDataDisplayConsoleVariables | |||
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 | |||
! procedure (ActionDualDouble), pointer :: PumpsSpmChanges => null() | |||
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 | |||
contains | |||
end module CDataDisplayConsoleVariables |
@@ -1,5 +1,7 @@ | |||
module CDrillingConsole | |||
use CDrillingConsoleVariables | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables | |||
! use CSimulationVariables | |||
use CLog4 | |||
use CLog3 | |||
@@ -13,9 +15,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetAssignmentSwitch' :: SetAssignmentSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DrillingConsole%AssignmentSwitch = v | |||
data%EquipmentControl%DrillingConsole%AssignmentSwitch = v | |||
#ifdef deb | |||
call Log_4( 'AssignmentSwitch=', DrillingConsole%AssignmentSwitch) | |||
call Log_4( 'AssignmentSwitch=', data%EquipmentControl%DrillingConsole%AssignmentSwitch) | |||
#endif | |||
end subroutine | |||
@@ -24,9 +26,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetEmergencySwitch' :: SetEmergencySwitch | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%EmergencySwitch = v | |||
data%EquipmentControl%DrillingConsole%EmergencySwitch = v | |||
#ifdef deb | |||
print*, 'EmergencySwitch=', DrillingConsole%EmergencySwitch | |||
print*, 'EmergencySwitch=', data%EquipmentControl%DrillingConsole%EmergencySwitch | |||
#endif | |||
end subroutine | |||
@@ -35,9 +37,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRTTorqueLimitKnob' :: SetRTTorqueLimitKnob | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%RTTorqueLimitKnob = v | |||
data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob = v | |||
#ifdef deb | |||
print*, 'RTTorqueLimitKnob=', DrillingConsole%RTTorqueLimitKnob | |||
print*, 'RTTorqueLimitKnob=', data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob | |||
#endif | |||
end subroutine | |||
@@ -47,12 +49,12 @@ module CDrillingConsole | |||
implicit none | |||
integer, intent(in) :: v | |||
if(DrillingConsole%MP1CPSwitch == v) return | |||
if(data%EquipmentControl%DrillingConsole%MP1CPSwitch == v) return | |||
if(SimulationState == SimulationState_Started) then | |||
DrillingConsole%MP1CPSwitchI = DrillingConsole%MP1CPSwitchI + 1 | |||
if(DrillingConsole%MP1CPSwitchI >= 1) DrillingConsole%MP1CPSwitch = v | |||
if(DrillingConsole%MP1CPSwitchI >= 100) DrillingConsole%MP1CPSwitchI = 1 | |||
data%EquipmentControl%DrillingConsole%MP1CPSwitchI = data%EquipmentControl%DrillingConsole%MP1CPSwitchI + 1 | |||
if(data%EquipmentControl%DrillingConsole%MP1CPSwitchI >= 1) data%EquipmentControl%DrillingConsole%MP1CPSwitch = v | |||
if(data%EquipmentControl%DrillingConsole%MP1CPSwitchI >= 100) data%EquipmentControl%DrillingConsole%MP1CPSwitchI = 1 | |||
!call Log_3( "MP1CPSwitchI=", MP1CPSwitchI) | |||
!call Log_3( "MP1CPSwitch=", MP1CPSwitch) | |||
@@ -78,10 +80,10 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMP1Throttle' :: SetMP1Throttle | |||
implicit none | |||
real*8, intent(in) :: v | |||
if(DrillingConsole%MP1Throttle == v) return | |||
if(data%EquipmentControl%DrillingConsole%MP1Throttle == v) return | |||
if(SimulationState == SimulationState_Started) then | |||
if( abs(v - DrillingConsole%MP1Throttle) > 0.1) DrillingConsole%MP1ThrottleUpdate = .true. | |||
if(DrillingConsole%MP1ThrottleUpdate) DrillingConsole%MP1Throttle = v | |||
if( abs(v - data%EquipmentControl%DrillingConsole%MP1Throttle) > 0.1) data%EquipmentControl%DrillingConsole%MP1ThrottleUpdate = .true. | |||
if(data%EquipmentControl%DrillingConsole%MP1ThrottleUpdate) data%EquipmentControl%DrillingConsole%MP1Throttle = v | |||
!call Log_3( 'v-mp1=', v) | |||
!call Log_3( 'MP1Throttle=', MP1Throttle) | |||
@@ -90,7 +92,7 @@ module CDrillingConsole | |||
!MP1Throttle = v | |||
endif | |||
#ifdef deb | |||
print*, 'MP1Throttle=', DrillingConsole%MP1Throttle | |||
print*, 'MP1Throttle=', data%EquipmentControl%DrillingConsole%MP1Throttle | |||
#endif | |||
end subroutine | |||
@@ -101,12 +103,12 @@ module CDrillingConsole | |||
logical, intent(in) :: v | |||
!call Log_3( 'v=', MP2SwitchT) | |||
if(DrillingConsole%MP2Switch == v) return | |||
if(data%EquipmentControl%DrillingConsole%MP2Switch == v) return | |||
if(SimulationState == SimulationState_Started) then | |||
DrillingConsole%MP2SwitchI = DrillingConsole%MP2SwitchI + 1 | |||
if(DrillingConsole%MP2SwitchI >= 1) DrillingConsole%MP2Switch = v | |||
if(DrillingConsole%MP2SwitchI >= 100) DrillingConsole%MP2SwitchI = 1 | |||
data%EquipmentControl%DrillingConsole%MP2SwitchI = data%EquipmentControl%DrillingConsole%MP2SwitchI + 1 | |||
if(data%EquipmentControl%DrillingConsole%MP2SwitchI >= 1) data%EquipmentControl%DrillingConsole%MP2Switch = v | |||
if(data%EquipmentControl%DrillingConsole%MP2SwitchI >= 100) data%EquipmentControl%DrillingConsole%MP2SwitchI = 1 | |||
!call Log_3( "MP1CPSwitchI=", MP1CPSwitchI) | |||
!call Log_3( "MP2Switch=", MP2Switch) | |||
@@ -134,10 +136,10 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetMP2Throttle' :: SetMP2Throttle | |||
implicit none | |||
real*8, intent(in) :: v | |||
if(DrillingConsole%MP2Throttle == v) return | |||
if(data%EquipmentControl%DrillingConsole%MP2Throttle == v) return | |||
if(SimulationState == SimulationState_Started) then | |||
if( abs(v - DrillingConsole%MP2Throttle) > 0.1) DrillingConsole%MP2ThrottleUpdate = .true. | |||
if(DrillingConsole%MP2ThrottleUpdate) DrillingConsole%MP2Throttle = v | |||
if( abs(v - data%EquipmentControl%DrillingConsole%MP2Throttle) > 0.1) data%EquipmentControl%DrillingConsole%MP2ThrottleUpdate = .true. | |||
if(data%EquipmentControl%DrillingConsole%MP2ThrottleUpdate) data%EquipmentControl%DrillingConsole%MP2Throttle = v | |||
!call Log_3( 'v-mp2=', v) | |||
!call Log_3( 'MP2Throttle=', MP2Throttle) | |||
@@ -146,7 +148,7 @@ module CDrillingConsole | |||
!MP2Throttle = v | |||
endif | |||
#ifdef deb | |||
print*, 'MP2Throttle=', DrillingConsole%MP2Throttle | |||
print*, 'MP2Throttle=', data%EquipmentControl%DrillingConsole%MP2Throttle | |||
#endif | |||
end subroutine | |||
@@ -155,9 +157,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDWSwitch' :: SetDWSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DrillingConsole%DWSwitch = v | |||
data%EquipmentControl%DrillingConsole%DWSwitch = v | |||
#ifdef deb | |||
print*, 'DWSwitch=', DrillingConsole%DWSwitch | |||
print*, 'DWSwitch=', data%EquipmentControl%DrillingConsole%DWSwitch | |||
#endif | |||
end subroutine | |||
@@ -166,9 +168,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDWThrottle' :: SetDWThrottle | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%DWThrottle = v | |||
data%EquipmentControl%DrillingConsole%DWThrottle = v | |||
#ifdef deb | |||
print*, 'DWThrottle=', DrillingConsole%DWThrottle | |||
print*, 'DWThrottle=', data%EquipmentControl%DrillingConsole%DWThrottle | |||
#endif | |||
end subroutine | |||
@@ -177,9 +179,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRTSwitch' :: SetRTSwitch | |||
implicit none | |||
integer, intent(in) :: v | |||
DrillingConsole%RTSwitch = v | |||
data%EquipmentControl%DrillingConsole%RTSwitch = v | |||
#ifdef deb | |||
print*, 'RTSwitch=', DrillingConsole%RTSwitch | |||
print*, 'RTSwitch=', data%EquipmentControl%DrillingConsole%RTSwitch | |||
#endif | |||
end subroutine | |||
@@ -188,9 +190,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRTThrottle' :: SetRTThrottle | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%RTThrottle = v | |||
data%EquipmentControl%DrillingConsole%RTThrottle = v | |||
#ifdef deb | |||
print*, 'RTThrottle=', DrillingConsole%RTThrottle | |||
print*, 'RTThrottle=', data%EquipmentControl%DrillingConsole%RTThrottle | |||
#endif | |||
end subroutine | |||
@@ -200,10 +202,10 @@ module CDrillingConsole | |||
implicit none | |||
real*8, intent(in) :: v | |||
!if(ForceBreak) return | |||
DrillingConsole%PreviousDWBreak = DrillingConsole%DWBreak | |||
DrillingConsole%DWBreak = v | |||
data%EquipmentControl%DrillingConsole%PreviousDWBreak = data%EquipmentControl%DrillingConsole%DWBreak | |||
data%EquipmentControl%DrillingConsole%DWBreak = v | |||
#ifdef deb | |||
print*, 'DWBreak=', DrillingConsole%DWBreak | |||
print*, 'DWBreak=', data%EquipmentControl%DrillingConsole%DWBreak | |||
#endif | |||
end subroutine | |||
@@ -212,9 +214,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDWAcceleretor' :: SetDWAcceleretor | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%DWAcceleretor = v | |||
data%EquipmentControl%DrillingConsole%DWAcceleretor = v | |||
#ifdef deb | |||
print*, 'DWAcceleretor=', DrillingConsole%DWAcceleretor | |||
print*, 'DWAcceleretor=', data%EquipmentControl%DrillingConsole%DWAcceleretor | |||
#endif | |||
end subroutine | |||
@@ -223,9 +225,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDWTransmisionLever' :: SetDWTransmisionLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%DWTransmisionLever = v | |||
data%EquipmentControl%DrillingConsole%DWTransmisionLever = v | |||
#ifdef deb | |||
print*, 'DWTransmisionLever=', DrillingConsole%DWTransmisionLever | |||
print*, 'DWTransmisionLever=', data%EquipmentControl%DrillingConsole%DWTransmisionLever | |||
#endif | |||
end subroutine | |||
@@ -234,9 +236,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDWPowerLever' :: SetDWPowerLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%DWPowerLever = v | |||
data%EquipmentControl%DrillingConsole%DWPowerLever = v | |||
#ifdef deb | |||
print*, 'DWPowerLever=', DrillingConsole%DWPowerLever | |||
print*, 'DWPowerLever=', data%EquipmentControl%DrillingConsole%DWPowerLever | |||
#endif | |||
end subroutine | |||
@@ -245,8 +247,8 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTongLever' :: SetTongLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
if (DrillingConsole%TongLever == v) return | |||
DrillingConsole%TongLever = v | |||
if (data%EquipmentControl%DrillingConsole%TongLever == v) return | |||
data%EquipmentControl%DrillingConsole%TongLever = v | |||
! if(dint(TongLever) == 1.0) then | |||
! call OnBreakoutLeverPress%RunAll() | |||
@@ -269,7 +271,7 @@ module CDrillingConsole | |||
! endif | |||
#ifdef deb | |||
print*, 'TongLever=', DrillingConsole%TongLever | |||
print*, 'TongLever=', data%EquipmentControl%DrillingConsole%TongLever | |||
#endif | |||
end subroutine | |||
@@ -278,9 +280,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRTTransmissionLever' :: SetRTTransmissionLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%RTTransmissionLever = v | |||
data%EquipmentControl%DrillingConsole%RTTransmissionLever = v | |||
#ifdef deb | |||
print*, 'RTTransmissionLever=', DrillingConsole%RTTransmissionLever | |||
print*, 'RTTransmissionLever=', data%EquipmentControl%DrillingConsole%RTTransmissionLever | |||
#endif | |||
end subroutine | |||
@@ -289,9 +291,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetDWClutchLever' :: SetDWClutchLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%DWClutchLever = v | |||
data%EquipmentControl%DrillingConsole%DWClutchLever = v | |||
#ifdef deb | |||
print*, 'DWClutchLever=', DrillingConsole%DWClutchLever | |||
print*, 'DWClutchLever=', data%EquipmentControl%DrillingConsole%DWClutchLever | |||
#endif | |||
end subroutine | |||
@@ -300,9 +302,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetEddyBreakLever' :: SetEddyBreakLever | |||
implicit none | |||
real*8, intent(in) :: v | |||
DrillingConsole%EddyBreakLever = v | |||
data%EquipmentControl%DrillingConsole%EddyBreakLever = v | |||
#ifdef deb | |||
print*, 'EddyBreakLever=', DrillingConsole%EddyBreakLever | |||
print*, 'EddyBreakLever=', data%EquipmentControl%DrillingConsole%EddyBreakLever | |||
#endif | |||
end subroutine | |||
@@ -311,9 +313,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetAutoDW' :: SetAutoDW | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%AutoDW = v | |||
data%EquipmentControl%DrillingConsole%AutoDW = v | |||
#ifdef deb | |||
print*, 'AutoDW=', DrillingConsole%AutoDW | |||
print*, 'AutoDW=', data%EquipmentControl%DrillingConsole%AutoDW | |||
#endif | |||
end subroutine | |||
@@ -322,9 +324,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetGEN1' :: SetGEN1 | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%GEN1 = v | |||
data%EquipmentControl%DrillingConsole%GEN1 = v | |||
#ifdef deb | |||
print*, 'GEN1=', DrillingConsole%GEN1 | |||
print*, 'GEN1=', data%EquipmentControl%DrillingConsole%GEN1 | |||
#endif | |||
end subroutine | |||
@@ -333,9 +335,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetGEN2' :: SetGEN2 | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%GEN2 = v | |||
data%EquipmentControl%DrillingConsole%GEN2 = v | |||
#ifdef deb | |||
print*, 'GEN2=', DrillingConsole%GEN2 | |||
print*, 'GEN2=', data%EquipmentControl%DrillingConsole%GEN2 | |||
#endif | |||
end subroutine | |||
@@ -344,9 +346,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetGEN3' :: SetGEN3 | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%GEN3 = v | |||
data%EquipmentControl%DrillingConsole%GEN3 = v | |||
#ifdef deb | |||
print*, 'GEN3=', DrillingConsole%GEN3 | |||
print*, 'GEN3=', data%EquipmentControl%DrillingConsole%GEN3 | |||
#endif | |||
end subroutine | |||
@@ -355,9 +357,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetGEN4' :: SetGEN4 | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%GEN4 = v | |||
data%EquipmentControl%DrillingConsole%GEN4 = v | |||
#ifdef deb | |||
print*, 'GEN4=', DrillingConsole%GEN4 | |||
print*, 'GEN4=', data%EquipmentControl%DrillingConsole%GEN4 | |||
#endif | |||
end subroutine | |||
@@ -433,12 +435,12 @@ module CDrillingConsole | |||
use CManifolds, OpenKellyCockSub => OpenKellyCock | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%OpenKellyCock == v) return | |||
DrillingConsole%OpenKellyCock = v | |||
if (data%EquipmentControl%DrillingConsole%OpenKellyCock == v) return | |||
data%EquipmentControl%DrillingConsole%OpenKellyCock = v | |||
! if (v) call OnOpenKellyCockPress%RunAll() | |||
if(v .and. DrillingConsole%Permission_OpenKellyCock) call OpenKellyCockSub() | |||
if(v .and. data%EquipmentControl%DrillingConsole%Permission_OpenKellyCock) call OpenKellyCockSub() | |||
#ifdef deb | |||
print*, 'OpenKellyCock=', DrillingConsole%OpenKellyCock | |||
print*, 'OpenKellyCock=', data%EquipmentControl%DrillingConsole%OpenKellyCock | |||
#endif | |||
end subroutine | |||
@@ -448,12 +450,12 @@ module CDrillingConsole | |||
use CManifolds, CloseKellyCockSub => CloseKellyCock | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%CloseKellyCock == v) return | |||
DrillingConsole%CloseKellyCock = v | |||
if (data%EquipmentControl%DrillingConsole%CloseKellyCock == v) return | |||
data%EquipmentControl%DrillingConsole%CloseKellyCock = v | |||
! if (v) call OnCloseKellyCockPress%RunAll() | |||
if(v .and. DrillingConsole%Permission_CloseKellyCock) call CloseKellyCockSub() | |||
if(v .and. data%EquipmentControl%DrillingConsole%Permission_CloseKellyCock) call CloseKellyCockSub() | |||
#ifdef deb | |||
print*, 'CloseKellyCock=', DrillingConsole%CloseKellyCock | |||
print*, 'CloseKellyCock=', data%EquipmentControl%DrillingConsole%CloseKellyCock | |||
#endif | |||
end subroutine | |||
@@ -463,12 +465,12 @@ module CDrillingConsole | |||
!use CManifolds, OpenSafetyValveSub => OpenSafetyValve | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%OpenSafetyValve == v) return | |||
DrillingConsole%OpenSafetyValve = v | |||
if (data%EquipmentControl%DrillingConsole%OpenSafetyValve == v) return | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValve = v | |||
! if (v) call OnOpenSafetyValvePress%RunAll() | |||
!if(v .and. Permission_OpenSafetyValve) call OpenSafetyValveSub() | |||
#ifdef deb | |||
print*, 'OpenSafetyValve=', DrillingConsole%OpenSafetyValve | |||
print*, 'OpenSafetyValve=', data%EquipmentControl%DrillingConsole%OpenSafetyValve | |||
#endif | |||
end subroutine | |||
@@ -478,12 +480,12 @@ module CDrillingConsole | |||
!use CManifolds, CloseSafetyValveSub => CloseSafetyValve | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%CloseSafetyValve == v) return | |||
DrillingConsole%CloseSafetyValve = v | |||
if (data%EquipmentControl%DrillingConsole%CloseSafetyValve == v) return | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValve = v | |||
! if (v) call OnCloseSafetyValvePress%RunAll() | |||
!if(v .and. Permission_CloseSafetyValve) call CloseSafetyValveSub() | |||
#ifdef deb | |||
print*, 'CloseSafetyValve=', DrillingConsole%CloseSafetyValve | |||
print*, 'CloseSafetyValve=', data%EquipmentControl%DrillingConsole%CloseSafetyValve | |||
#endif | |||
end subroutine | |||
@@ -494,14 +496,14 @@ module CDrillingConsole | |||
implicit none | |||
logical, intent(in) :: v | |||
logical :: prev | |||
if (DrillingConsole%IRSafetyValve == v) return | |||
prev = DrillingConsole%IRSafetyValve | |||
DrillingConsole%IRSafetyValve = v | |||
if (data%EquipmentControl%DrillingConsole%IRSafetyValve == v) return | |||
prev = data%EquipmentControl%DrillingConsole%IRSafetyValve | |||
data%EquipmentControl%DrillingConsole%IRSafetyValve = v | |||
! if (v) call OnIRSafetyValvePress%RunAll() | |||
!if(prev /= IRSafetyValve .and. v .and. Permission_IRSafetyValve) call ToggleSafetyValve() | |||
!if(prev /= IRSafetyValve .and. v) call ToggleSafetyValve() | |||
#ifdef deb | |||
print*, 'IRSafetyValve=', DrillingConsole%IRSafetyValve | |||
print*, 'IRSafetyValve=', data%EquipmentControl%DrillingConsole%IRSafetyValve | |||
#endif | |||
end subroutine | |||
@@ -512,14 +514,14 @@ module CDrillingConsole | |||
implicit none | |||
logical, intent(in) :: v | |||
logical :: prev | |||
if (DrillingConsole%IRIBop == v) return | |||
prev = DrillingConsole%IRIBop | |||
DrillingConsole%IRIBop = v | |||
if (data%EquipmentControl%DrillingConsole%IRIBop == v) return | |||
prev = data%EquipmentControl%DrillingConsole%IRIBop | |||
data%EquipmentControl%DrillingConsole%IRIBop = v | |||
! if (v) call OnIRIBopPress%RunAll() | |||
!if(prev /= IRIBop .and. v .and. Permission_IRIBop) call ToggleIBop() | |||
!if(prev /= IRIBop .and. v) call ToggleIBop() | |||
#ifdef deb | |||
print*, 'IRIBop=', DrillingConsole%IRIBop | |||
print*, 'IRIBop=', data%EquipmentControl%DrillingConsole%IRIBop | |||
#endif | |||
end subroutine | |||
@@ -530,11 +532,11 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetLatchPipe' :: SetLatchPipe | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%LatchPipe .eqv. v) return | |||
DrillingConsole%LatchPipe = v | |||
if (data%EquipmentControl%DrillingConsole%LatchPipe .eqv. v) return | |||
data%EquipmentControl%DrillingConsole%LatchPipe = v | |||
! if (v) call OnLatchPipePress%RunAll() | |||
#ifdef deb | |||
print*, 'LatchPipe=', DrillingConsole%LatchPipe | |||
print*, 'LatchPipe=', data%EquipmentControl%DrillingConsole%LatchPipe | |||
#endif | |||
end subroutine | |||
@@ -543,11 +545,11 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetUnlatchPipe' :: SetUnlatchPipe | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%UnlatchPipe .eqv. v) return | |||
DrillingConsole%UnlatchPipe = v | |||
if (data%EquipmentControl%DrillingConsole%UnlatchPipe .eqv. v) return | |||
data%EquipmentControl%DrillingConsole%UnlatchPipe = v | |||
! if (v) call OnUnlatchPipePress%RunAll() | |||
#ifdef deb | |||
print*, 'UnlatchPipe=', DrillingConsole%UnlatchPipe | |||
print*, 'UnlatchPipe=', data%EquipmentControl%DrillingConsole%UnlatchPipe | |||
#endif | |||
end subroutine | |||
@@ -556,11 +558,11 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetSwing' :: SetSwing | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%Swing .eqv. v) return | |||
DrillingConsole%Swing = v | |||
if (data%EquipmentControl%DrillingConsole%Swing .eqv. v) return | |||
data%EquipmentControl%DrillingConsole%Swing = v | |||
! if (v) call OnSwingPress%RunAll() | |||
#ifdef deb | |||
print*, 'Swing=', DrillingConsole%Swing | |||
print*, 'Swing=', data%EquipmentControl%DrillingConsole%Swing | |||
#endif | |||
end subroutine | |||
@@ -569,11 +571,11 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetFillMouseHole' :: SetFillMouseHole | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%FillMouseHole .eqv. v) return | |||
DrillingConsole%FillMouseHole = v | |||
if (data%EquipmentControl%DrillingConsole%FillMouseHole .eqv. v) return | |||
data%EquipmentControl%DrillingConsole%FillMouseHole = v | |||
! if (v) call OnFillMouseHolePress%RunAll() | |||
#ifdef deb | |||
print*, 'FillMouseHole=', DrillingConsole%FillMouseHole | |||
print*, 'FillMouseHole=', data%EquipmentControl%DrillingConsole%FillMouseHole | |||
#endif | |||
end subroutine | |||
@@ -582,10 +584,10 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetSlips' :: SetSlips | |||
implicit none | |||
logical, intent(in) :: v | |||
if (DrillingConsole%Slips .eqv. v) return | |||
DrillingConsole%Slips = v | |||
if (data%EquipmentControl%DrillingConsole%Slips .eqv. v) return | |||
data%EquipmentControl%DrillingConsole%Slips = v | |||
#ifdef deb | |||
print*, 'Slips=', DrillingConsole%Slips | |||
print*, 'Slips=', data%EquipmentControl%DrillingConsole%Slips | |||
#endif | |||
! if (v) call OnSlipsPress%RunAll() | |||
end subroutine | |||
@@ -596,9 +598,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetBrakeLeverCoefficient' :: SetBrakeLeverCoefficient | |||
implicit none | |||
real, intent(in) :: v | |||
DrillingConsole%BrakeLeverCoefficient = v | |||
data%EquipmentControl%DrillingConsole%BrakeLeverCoefficient = v | |||
#ifdef deb | |||
print*, 'BrakeLeverCoefficient=', DrillingConsole%BrakeLeverCoefficient | |||
print*, 'BrakeLeverCoefficient=', data%EquipmentControl%DrillingConsole%BrakeLeverCoefficient | |||
#endif | |||
end subroutine | |||
@@ -607,9 +609,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetHideDrillingBrake' :: SetHideDrillingBrake | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%HideDrillingBrake = v | |||
data%EquipmentControl%DrillingConsole%HideDrillingBrake = v | |||
#ifdef deb | |||
print*, 'HideDrillingBrake=', DrillingConsole%HideDrillingBrake | |||
print*, 'HideDrillingBrake=', data%EquipmentControl%DrillingConsole%HideDrillingBrake | |||
#endif | |||
end subroutine | |||
@@ -625,9 +627,9 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES ALIAS: 'SetParkingBrake' :: SetParkingBrake | |||
implicit none | |||
logical, intent(in) :: v | |||
DrillingConsole%ParkingBrakeBtn = v | |||
data%EquipmentControl%DrillingConsole%ParkingBrakeBtn = v | |||
#ifdef deb | |||
print*, 'ParkingBrakeBtn=', DrillingConsole%ParkingBrakeBtn | |||
print*, 'ParkingBrakeBtn=', data%EquipmentControl%DrillingConsole%ParkingBrakeBtn | |||
#endif | |||
end subroutine | |||
@@ -648,7 +650,7 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetParkingBrakeLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetParkingBrakeLed' :: GetParkingBrakeLed | |||
implicit none | |||
GetParkingBrakeLed = DrillingConsole%ParkingBrakeLed | |||
GetParkingBrakeLed = data%EquipmentControl%DrillingConsole%ParkingBrakeLed | |||
!GetParkingBrakeLed = .true. | |||
end function | |||
@@ -689,154 +691,154 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSCR1LED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSCR1LED' :: GetSCR1LED | |||
implicit none | |||
GetSCR1LED = DrillingConsole%SCR1LED | |||
GetSCR1LED = data%EquipmentControl%DrillingConsole%SCR1LED | |||
end function | |||
integer function GetSCR2LED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSCR2LED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSCR2LED' :: GetSCR2LED | |||
implicit none | |||
GetSCR2LED = DrillingConsole%SCR2LED | |||
GetSCR2LED = data%EquipmentControl%DrillingConsole%SCR2LED | |||
end function | |||
integer function GetSCR3LED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSCR3LED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSCR3LED' :: GetSCR3LED | |||
implicit none | |||
GetSCR3LED = DrillingConsole%SCR3LED | |||
GetSCR3LED = data%EquipmentControl%DrillingConsole%SCR3LED | |||
end function | |||
integer function GetSCR4LED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSCR4LED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSCR4LED' :: GetSCR4LED | |||
implicit none | |||
GetSCR4LED = DrillingConsole%SCR4LED | |||
GetSCR4LED = data%EquipmentControl%DrillingConsole%SCR4LED | |||
end function | |||
integer function GetMP1BLWR() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMP1BLWR | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMP1BLWR' :: GetMP1BLWR | |||
implicit none | |||
GetMP1BLWR = DrillingConsole%MP1BLWR | |||
GetMP1BLWR = data%EquipmentControl%DrillingConsole%MP1BLWR | |||
end function | |||
integer function GetMP2BLWR() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMP2BLWR | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMP2BLWR' :: GetMP2BLWR | |||
implicit none | |||
GetMP2BLWR = DrillingConsole%MP2BLWR | |||
GetMP2BLWR = data%EquipmentControl%DrillingConsole%MP2BLWR | |||
end function | |||
integer function GetDWBLWR() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetDWBLWR | |||
!DEC$ ATTRIBUTES ALIAS: 'GetDWBLWR' :: GetDWBLWR | |||
implicit none | |||
GetDWBLWR = DrillingConsole%DWBLWR | |||
GetDWBLWR = data%EquipmentControl%DrillingConsole%DWBLWR | |||
end function | |||
integer function GetRTBLWR() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRTBLWR | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRTBLWR' :: GetRTBLWR | |||
implicit none | |||
GetRTBLWR = DrillingConsole%RTBLWR | |||
GetRTBLWR = data%EquipmentControl%DrillingConsole%RTBLWR | |||
end function | |||
integer function GetPWRLIM() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPWRLIM | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPWRLIM' :: GetPWRLIM | |||
implicit none | |||
GetPWRLIM = DrillingConsole%PWRLIM | |||
GetPWRLIM = data%EquipmentControl%DrillingConsole%PWRLIM | |||
end function | |||
real(8) function GetPWRLIMMTR() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPWRLIMMTR | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPWRLIMMTR' :: GetPWRLIMMTR | |||
implicit none | |||
GetPWRLIMMTR = DrillingConsole%PWRLIMMTR | |||
GetPWRLIMMTR = data%EquipmentControl%DrillingConsole%PWRLIMMTR | |||
end function | |||
real(8) function GetRTTorqueLimitGauge() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRTTorqueLimitGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRTTorqueLimitGauge' :: GetRTTorqueLimitGauge | |||
implicit none | |||
GetRTTorqueLimitGauge = DrillingConsole%RTTorqueLimitGauge | |||
GetRTTorqueLimitGauge = data%EquipmentControl%DrillingConsole%RTTorqueLimitGauge | |||
end function | |||
integer function GetAutoDWLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetAutoDWLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAutoDWLED' :: GetAutoDWLED | |||
implicit none | |||
GetAutoDWLED = DrillingConsole%AutoDWLED | |||
GetAutoDWLED = data%EquipmentControl%DrillingConsole%AutoDWLED | |||
end function | |||
integer function GetGEN1BTNLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetGEN1BTNLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetGEN1BTNLED' :: GetGEN1BTNLED | |||
implicit none | |||
GetGEN1BTNLED = DrillingConsole%GEN1BTNLED | |||
GetGEN1BTNLED = data%EquipmentControl%DrillingConsole%GEN1BTNLED | |||
end function | |||
integer function GetGEN2BTNLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetGEN2BTNLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetGEN2BTNLED' :: GetGEN2BTNLED | |||
implicit none | |||
GetGEN2BTNLED = DrillingConsole%GEN2BTNLED | |||
GetGEN2BTNLED = data%EquipmentControl%DrillingConsole%GEN2BTNLED | |||
end function | |||
integer function GetGEN3BTNLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetGEN3BTNLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetGEN3BTNLED' :: GetGEN3BTNLED | |||
implicit none | |||
GetGEN3BTNLED = DrillingConsole%GEN3BTNLED | |||
GetGEN3BTNLED = data%EquipmentControl%DrillingConsole%GEN3BTNLED | |||
end function | |||
integer function GetGEN4BTNLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetGEN4BTNLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetGEN4BTNLED' :: GetGEN4BTNLED | |||
implicit none | |||
GetGEN4BTNLED = DrillingConsole%GEN4BTNLED | |||
GetGEN4BTNLED = data%EquipmentControl%DrillingConsole%GEN4BTNLED | |||
end function | |||
integer function GetOpenKellyCockLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetOpenKellyCockLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetOpenKellyCockLed' :: GetOpenKellyCockLed | |||
implicit none | |||
GetOpenKellyCockLed = DrillingConsole%OpenKellyCockLed | |||
GetOpenKellyCockLed = data%EquipmentControl%DrillingConsole%OpenKellyCockLed | |||
end function | |||
integer function GetCloseKellyCockLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCloseKellyCockLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCloseKellyCockLed' :: GetCloseKellyCockLed | |||
implicit none | |||
GetCloseKellyCockLed = DrillingConsole%CloseKellyCockLed | |||
GetCloseKellyCockLed = data%EquipmentControl%DrillingConsole%CloseKellyCockLed | |||
end function | |||
integer function GetOpenSafetyValveLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetOpenSafetyValveLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetOpenSafetyValveLed' :: GetOpenSafetyValveLed | |||
implicit none | |||
GetOpenSafetyValveLed = DrillingConsole%OpenSafetyValveLed | |||
GetOpenSafetyValveLed = data%EquipmentControl%DrillingConsole%OpenSafetyValveLed | |||
end function | |||
integer function GetCloseSafetyValveLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCloseSafetyValveLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCloseSafetyValveLed' :: GetCloseSafetyValveLed | |||
implicit none | |||
GetCloseSafetyValveLed = DrillingConsole%CloseSafetyValveLed | |||
GetCloseSafetyValveLed = data%EquipmentControl%DrillingConsole%CloseSafetyValveLed | |||
end function | |||
integer function GetIRSafetyValveLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetIRSafetyValveLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetIRSafetyValveLed' :: GetIRSafetyValveLed | |||
implicit none | |||
GetIRSafetyValveLed = DrillingConsole%IRSafetyValveLed | |||
GetIRSafetyValveLed = data%EquipmentControl%DrillingConsole%IRSafetyValveLed | |||
end function | |||
integer function GetIRIBopLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetIRIBopLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetIRIBopLed' :: GetIRIBopLed | |||
implicit none | |||
GetIRIBopLed = DrillingConsole%IRIBopLed | |||
GetIRIBopLed = data%EquipmentControl%DrillingConsole%IRIBopLed | |||
end function | |||
@@ -844,28 +846,28 @@ module CDrillingConsole | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetLatchPipeLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetLatchPipeLED' :: GetLatchPipeLED | |||
implicit none | |||
GetLatchPipeLED = DrillingConsole%LatchPipeLED | |||
GetLatchPipeLED = data%EquipmentControl%DrillingConsole%LatchPipeLED | |||
end function | |||
integer function GetUnlatchPipeLED() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetUnlatchPipeLED | |||
!DEC$ ATTRIBUTES ALIAS: 'GetUnlatchPipeLED' :: GetUnlatchPipeLED | |||
implicit none | |||
GetUnlatchPipeLED = DrillingConsole%UnlatchPipeLED | |||
GetUnlatchPipeLED = data%EquipmentControl%DrillingConsole%UnlatchPipeLED | |||
end function | |||
integer function GetSwingLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSwingLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSwingLed' :: GetSwingLed | |||
implicit none | |||
GetSwingLed = DrillingConsole%SwingLed | |||
GetSwingLed = data%EquipmentControl%DrillingConsole%SwingLed | |||
end function | |||
integer function GetFillMouseHoleLed() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetFillMouseHoleLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetFillMouseHoleLed' :: GetFillMouseHoleLed | |||
implicit none | |||
GetFillMouseHoleLed = DrillingConsole%FillMouseHoleLed | |||
GetFillMouseHoleLed = data%EquipmentControl%DrillingConsole%FillMouseHoleLed | |||
end function | |||
end module CDrillingConsole |
@@ -129,5 +129,5 @@ module CDrillingConsoleVariables | |||
integer :: SwingLed | |||
integer :: FillMouseHoleLed | |||
END TYPE DrillingConsoleType | |||
TYPE(DrillingConsoleType) :: DrillingConsole | |||
end module CDrillingConsoleVariables |
@@ -1,6 +1,64 @@ | |||
module CHook | |||
use CHookVariables | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
contains | |||
subroutine Set_HookHeight(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%EquipmentControl%Hook%HookHeight == v) return | |||
#endif | |||
data%EquipmentControl%Hook%HookHeight = v | |||
! if(associated(HookHeightPtr)) then | |||
! call HookHeightPtr(data%EquipmentControl%Hook%HookHeight) | |||
! end if | |||
#ifdef deb | |||
print*, 'HookHeight=', data%EquipmentControl%Hook%HookHeight | |||
#endif | |||
!**call data%EquipmentControl%Hook%OnHookHeightChange%RunAll(data%EquipmentControl%Hook%HookHeight) | |||
end subroutine | |||
subroutine Set_HookHeight_S(v) | |||
implicit none | |||
real , intent(in) :: v | |||
if(v == data%EquipmentControl%Hook%HookHeight) then | |||
return | |||
elseif (v > data%EquipmentControl%Hook%HookHeight) then | |||
loop1: do | |||
call Set_HookHeight(data%EquipmentControl%Hook%HookHeight + 0.2) | |||
if(abs(v - data%EquipmentControl%Hook%HookHeight) <= 0.1) then | |||
call Set_HookHeight(v) | |||
exit loop1 | |||
endif | |||
call sleepqq(100) | |||
enddo loop1 | |||
else ! v < HookHeight | |||
loop2: do | |||
call Set_HookHeight(data%EquipmentControl%Hook%HookHeight - 0.2) | |||
if(abs(data%EquipmentControl%Hook%HookHeight - v) <= 0.1) then | |||
call Set_HookHeight(v) | |||
exit loop2 | |||
endif | |||
call sleepqq(100) | |||
enddo loop2 | |||
endif | |||
end subroutine | |||
subroutine Update_HookHeight_From_Snapshot() | |||
implicit none | |||
call Set_HookHeight_S(data%EquipmentControl%Hook%HookHeight_S) | |||
end subroutine | |||
end module CHook |
@@ -7,74 +7,10 @@ module CHookVariables | |||
real :: HookHeight | |||
!**type(RealEventHandlerCollection) :: OnHookHeightChange | |||
end type HookType | |||
Type(HookType)::Hook | |||
contains | |||
subroutine Set_HookHeight(v) | |||
use CDrillingConsoleVariables | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(Hook%HookHeight == v) return | |||
#endif | |||
Hook%HookHeight = v | |||
! if(associated(HookHeightPtr)) then | |||
! call HookHeightPtr(Hook%HookHeight) | |||
! end if | |||
#ifdef deb | |||
print*, 'HookHeight=', Hook%HookHeight | |||
#endif | |||
!**call Hook%OnHookHeightChange%RunAll(Hook%HookHeight) | |||
end subroutine | |||
subroutine Set_HookHeight_S(v) | |||
implicit none | |||
real , intent(in) :: v | |||
if(v == Hook%HookHeight) then | |||
return | |||
elseif (v > Hook%HookHeight) then | |||
loop1: do | |||
call Set_HookHeight(Hook%HookHeight + 0.2) | |||
if(abs(v - Hook%HookHeight) <= 0.1) then | |||
call Set_HookHeight(v) | |||
exit loop1 | |||
endif | |||
call sleepqq(100) | |||
enddo loop1 | |||
else ! v < HookHeight | |||
loop2: do | |||
call Set_HookHeight(Hook%HookHeight - 0.2) | |||
if(abs(Hook%HookHeight - v) <= 0.1) then | |||
call Set_HookHeight(v) | |||
exit loop2 | |||
endif | |||
call sleepqq(100) | |||
enddo loop2 | |||
endif | |||
end subroutine | |||
subroutine Set_HookHeight_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_HookHeight_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_HookHeight_WN' :: Set_HookHeight_WN | |||
implicit none | |||
real , intent(in) :: v | |||
!call Set_HookHeight(v) | |||
Hook%HookHeight_S = v | |||
end subroutine | |||
subroutine Update_HookHeight_From_Snapshot() | |||
implicit none | |||
call Set_HookHeight_S(Hook%HookHeight_S) | |||
end subroutine | |||
end module CHookVariables |
@@ -1,5 +1,6 @@ | |||
module CStandPipeManifold | |||
use CStandPipeManifoldVariables | |||
use ConfigurationVariables | |||
use CManifolds | |||
implicit none | |||
public | |||
@@ -11,10 +12,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve1' :: SetStandPipeManifoldValve1 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve1 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve1 = v | |||
call ChangeValve(13, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve1=', StandPipeManifold%StandPipeManifoldValve1 | |||
print*, 'StandPipeManifoldValve1=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve1 | |||
#endif | |||
end subroutine | |||
@@ -23,10 +24,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve2' :: SetStandPipeManifoldValve2 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve2 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve2 = v | |||
call ChangeValve(14, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve2=', StandPipeManifold%StandPipeManifoldValve2 | |||
print*, 'StandPipeManifoldValve2=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve2 | |||
#endif | |||
end subroutine | |||
@@ -35,10 +36,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve3' :: SetStandPipeManifoldValve3 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve3 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve3 = v | |||
call ChangeValve(15, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve3=', StandPipeManifold%StandPipeManifoldValve3 | |||
print*, 'StandPipeManifoldValve3=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve3 | |||
#endif | |||
end subroutine | |||
@@ -47,10 +48,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve4' :: SetStandPipeManifoldValve4 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve4 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve4 = v | |||
call ChangeValve(11, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve4=', StandPipeManifold%StandPipeManifoldValve4 | |||
print*, 'StandPipeManifoldValve4=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve4 | |||
#endif | |||
end subroutine | |||
@@ -59,10 +60,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve5' :: SetStandPipeManifoldValve5 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve5 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve5 = v | |||
call ChangeValve(12, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve5=', StandPipeManifold%StandPipeManifoldValve5 | |||
print*, 'StandPipeManifoldValve5=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve5 | |||
#endif | |||
end subroutine | |||
@@ -71,10 +72,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve6' :: SetStandPipeManifoldValve6 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve6 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve6 = v | |||
call ChangeValve(9, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve6=', StandPipeManifold%StandPipeManifoldValve6 | |||
print*, 'StandPipeManifoldValve6=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve6 | |||
#endif | |||
end subroutine | |||
@@ -83,10 +84,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve7' :: SetStandPipeManifoldValve7 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve7 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve7 = v | |||
call ChangeValve(10, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve7=', StandPipeManifold%StandPipeManifoldValve7 | |||
print*, 'StandPipeManifoldValve7=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve7 | |||
#endif | |||
end subroutine | |||
@@ -95,10 +96,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve8' :: SetStandPipeManifoldValve8 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve8 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve8 = v | |||
call ChangeValve(6, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve8=', StandPipeManifold%StandPipeManifoldValve8 | |||
print*, 'StandPipeManifoldValve8=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve8 | |||
#endif | |||
end subroutine | |||
@@ -107,10 +108,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve9' :: SetStandPipeManifoldValve9 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve9 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve9 = v | |||
call ChangeValve(7, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve9=', StandPipeManifold%StandPipeManifoldValve9 | |||
print*, 'StandPipeManifoldValve9=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve9 | |||
#endif | |||
end subroutine | |||
@@ -119,10 +120,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve10' :: SetStandPipeManifoldValve10 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve10 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve10 = v | |||
call ChangeValve(8, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve10=', StandPipeManifold%StandPipeManifoldValve10 | |||
print*, 'StandPipeManifoldValve10=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve10 | |||
#endif | |||
end subroutine | |||
@@ -131,10 +132,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve11' :: SetStandPipeManifoldValve11 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve11 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve11 = v | |||
call ChangeValve(1, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve11=', StandPipeManifold%StandPipeManifoldValve11 | |||
print*, 'StandPipeManifoldValve11=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve11 | |||
#endif | |||
end subroutine | |||
@@ -143,10 +144,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve12' :: SetStandPipeManifoldValve12 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve12 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve12 = v | |||
call ChangeValve(2, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve12=', StandPipeManifold%StandPipeManifoldValve12 | |||
print*, 'StandPipeManifoldValve12=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve12 | |||
#endif | |||
end subroutine | |||
@@ -155,10 +156,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve13' :: SetStandPipeManifoldValve13 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve13 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve13 = v | |||
call ChangeValve(3, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve13=', StandPipeManifold%StandPipeManifoldValve13 | |||
print*, 'StandPipeManifoldValve13=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve13 | |||
#endif | |||
end subroutine | |||
@@ -167,10 +168,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve14' :: SetStandPipeManifoldValve14 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve14 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve14 = v | |||
call ChangeValve(4, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve14=', StandPipeManifold%StandPipeManifoldValve14 | |||
print*, 'StandPipeManifoldValve14=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve14 | |||
#endif | |||
end subroutine | |||
@@ -179,10 +180,10 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES ALIAS: 'SetStandPipeManifoldValve15' :: SetStandPipeManifoldValve15 | |||
implicit none | |||
logical, intent(in) :: v | |||
StandPipeManifold%StandPipeManifoldValve15 = v | |||
data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve15 = v | |||
call ChangeValve(5, v) | |||
#ifdef deb | |||
print*, 'StandPipeManifoldValve15=', StandPipeManifold%StandPipeManifoldValve15 | |||
print*, 'StandPipeManifoldValve15=', data%EquipmentControl%StandPipeManifold%StandPipeManifoldValve15 | |||
#endif | |||
end subroutine | |||
@@ -191,7 +192,7 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipeGauge1 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStandPipeGauge1' :: GetStandPipeGauge1 | |||
implicit none | |||
GetStandPipeGauge1 = StandPipeManifold%StandPipeGauge1 | |||
GetStandPipeGauge1 = data%EquipmentControl%StandPipeManifold%StandPipeGauge1 | |||
!GetStandPipeGauge1 = 567.4 | |||
end function | |||
@@ -199,7 +200,7 @@ module CStandPipeManifold | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetStandPipeGauge2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStandPipeGauge2' :: GetStandPipeGauge2 | |||
implicit none | |||
GetStandPipeGauge2 = StandPipeManifold%StandPipeGauge2 | |||
GetStandPipeGauge2 = data%EquipmentControl%StandPipeManifold%StandPipeGauge2 | |||
!GetStandPipeGauge2 = 1564.0 | |||
end function | |||
@@ -24,5 +24,5 @@ module CStandPipeManifoldVariables | |||
real(8) :: StandPipeGauge1 | |||
real(8) :: StandPipeGauge2 | |||
End type StandPipeManifoldType | |||
type(StandPipeManifoldType)::StandPipeManifold | |||
end module CStandPipeManifoldVariables |
@@ -1,5 +1,6 @@ | |||
module CTopDrivePanel | |||
use CTopDrivePanelVariables | |||
use ConfigurationVariables | |||
use CLog3 | |||
implicit none | |||
public | |||
@@ -11,9 +12,9 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveTdsPowerState' :: SetTopDriveTdsPowerState | |||
implicit none | |||
integer, intent(in) :: v | |||
TopDrivePanel%TopDriveTdsPowerState = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState = v | |||
#ifdef deb | |||
call Log_3( 'TopDriveTdsPowerState=', TopDrivePanel%TopDriveTdsPowerState) | |||
call Log_3( 'TopDriveTdsPowerState=', data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState) | |||
#endif | |||
end subroutine | |||
@@ -22,9 +23,9 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveTorqueWrench' :: SetTopDriveTorqueWrench | |||
implicit none | |||
logical, intent(in) :: v | |||
TopDrivePanel%TopDriveTorqueWrench = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrench = v | |||
#ifdef deb | |||
call Log_3( 'TopDriveTorqueWrench=', TopDrivePanel%TopDriveTorqueWrench) | |||
call Log_3( 'TopDriveTorqueWrench=', data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrench) | |||
#endif | |||
end subroutine | |||
@@ -33,9 +34,9 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveDrillTorqueState' :: SetTopDriveDrillTorqueState | |||
implicit none | |||
integer, intent(in) :: v | |||
TopDrivePanel%TopDriveDrillTorqueState = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveDrillTorqueState = v | |||
#ifdef deb | |||
call Log_3( 'TopDriveDrillTorqueState=', TopDrivePanel%TopDriveDrillTorqueState) | |||
call Log_3( 'TopDriveDrillTorqueState=', data%EquipmentControl%TopDrivePanel%TopDriveDrillTorqueState) | |||
#endif | |||
end subroutine | |||
@@ -44,9 +45,9 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveLinkTiltState' :: SetTopDriveLinkTiltState | |||
implicit none | |||
integer, intent(in) :: v | |||
TopDrivePanel%TopDriveLinkTiltState = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltState = v | |||
#ifdef deb | |||
call Log_3( 'TopDriveLinkTiltState=', TopDrivePanel%TopDriveLinkTiltState) | |||
call Log_3( 'TopDriveLinkTiltState=', data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltState) | |||
#endif | |||
end subroutine | |||
@@ -55,9 +56,9 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveIbop' :: SetTopDriveIbop | |||
implicit none | |||
logical, intent(in) :: v | |||
TopDrivePanel%TopDriveIbop = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveIbop = v | |||
#ifdef deb | |||
call Log_3( 'TopDriveIbop=', TopDrivePanel%TopDriveIbop) | |||
call Log_3( 'TopDriveIbop=', data%EquipmentControl%TopDrivePanel%TopDriveIbop) | |||
#endif | |||
end subroutine | |||
@@ -65,33 +66,35 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTopDriveTorqueLimitKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTopDriveTorqueLimitKnob' :: SetTopDriveTorqueLimitKnob | |||
! use CSimulationVariables, only: IsPortable | |||
use CDrillingConsoleVariables!, only: DrillingConsole%RTSwitch, DrillingConsole%RTTorqueLimitKnob | |||
use CWarningsVariables, only: Activate_TopdriveRotaryTableConfilict | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%RTSwitch, data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob | |||
use CWarnings, only: Activate_TopdriveRotaryTableConfilict | |||
use CScaleRange | |||
implicit none | |||
real, intent(in) :: v | |||
if (IsPortable) then | |||
if(TopDrivePanel%TopDriveTdsPowerState /= 0 .and. DrillingConsole%RTSwitch /= 0) call Activate_TopdriveRotaryTableConfilict() | |||
if(TopDrivePanel%TopDriveTdsPowerState /= 0 .and. DrillingConsole%RTSwitch == 0) then | |||
DrillingConsole%RTTorqueLimitKnob = 0 | |||
TopDrivePanel%TopDriveTorqueLimitKnob = v | |||
if(data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= 0 .and. data%EquipmentControl%DrillingConsole%RTSwitch /= 0) call Activate_TopdriveRotaryTableConfilict() | |||
if(data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= 0 .and. data%EquipmentControl%DrillingConsole%RTSwitch == 0) then | |||
data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob = 0 | |||
data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob = v | |||
#ifdef deb | |||
call Log_3( 'RTTorqueLimitKnob=', DrillingConsole%RTTorqueLimitKnob ) | |||
call Log_3( 'TopDriveTorqueLimitKnob=', TopDrivePanel%TopDriveTorqueLimitKnob ) | |||
call Log_3( 'RTTorqueLimitKnob=', data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob ) | |||
call Log_3( 'TopDriveTorqueLimitKnob=', data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob ) | |||
#endif | |||
endif | |||
if(TopDrivePanel%TopDriveTdsPowerState == 0 .and. DrillingConsole%RTSwitch /= 0) then | |||
TopDrivePanel%TopDriveTorqueLimitKnob = 0 | |||
DrillingConsole%RTTorqueLimitKnob = real(ScaleRange(v, 0.0, 10.0, 0.0, 6000.0), 8) | |||
if(data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState == 0 .and. data%EquipmentControl%DrillingConsole%RTSwitch /= 0) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob = 0 | |||
data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob = real(ScaleRange(v, 0.0, 10.0, 0.0, 6000.0), 8) | |||
#ifdef deb | |||
call Log_3( 'RTTorqueLimitKnob=', DrillingConsole%RTTorqueLimitKnob ) | |||
call Log_3( 'TopDriveTorqueLimitKnob=', TopDrivePanel%TopDriveTorqueLimitKnob ) | |||
call Log_3( 'RTTorqueLimitKnob=', data%EquipmentControl%DrillingConsole%RTTorqueLimitKnob ) | |||
call Log_3( 'TopDriveTorqueLimitKnob=', data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob ) | |||
#endif | |||
endif | |||
else | |||
TopDrivePanel%TopDriveTorqueLimitKnob = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob = v | |||
#ifdef deb | |||
call Log_3( 'TopDriveTorqueLimitKnob=', TopDrivePanel%TopDriveTorqueLimitKnob) | |||
call Log_3( 'TopDriveTorqueLimitKnob=', data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitKnob) | |||
#endif | |||
endif | |||
@@ -101,31 +104,33 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetRpmKnob | |||
!DEC$ ATTRIBUTES ALIAS: 'SetRpmKnob' :: SetRpmKnob | |||
! use CSimulationVariables, only: IsPortable | |||
use CDrillingConsoleVariables!, only: DrillingConsole%RTSwitch, DrillingConsole%RTThrottle | |||
use CWarningsVariables, only: Activate_TopdriveRotaryTableConfilict | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%RTSwitch, data%EquipmentControl%DrillingConsole%RTThrottle | |||
use CWarnings, only: Activate_TopdriveRotaryTableConfilict | |||
use CScaleRange | |||
implicit none | |||
real, intent(in) :: v | |||
if (IsPortable) then | |||
if(TopDrivePanel%TopDriveTdsPowerState /= 0 .and. DrillingConsole%RTSwitch /= 0) call Activate_TopdriveRotaryTableConfilict() | |||
if(TopDrivePanel%TopDriveTdsPowerState /= 0 .and. DrillingConsole%RTSwitch == 0) then | |||
DrillingConsole%RTThrottle = 0 | |||
TopDrivePanel%RpmKnob = v | |||
if(data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= 0 .and. data%EquipmentControl%DrillingConsole%RTSwitch /= 0) call Activate_TopdriveRotaryTableConfilict() | |||
if(data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= 0 .and. data%EquipmentControl%DrillingConsole%RTSwitch == 0) then | |||
data%EquipmentControl%DrillingConsole%RTThrottle = 0 | |||
data%EquipmentControl%TopDrivePanel%RpmKnob = v | |||
#ifdef deb | |||
call Log_3( 'RTThrottle=', DrillingConsole%RTThrottle ) | |||
call Log_3( 'RpmKnob=', TopDrivePanel%RpmKnob ) | |||
call Log_3( 'RTThrottle=', data%EquipmentControl%DrillingConsole%RTThrottle ) | |||
call Log_3( 'RpmKnob=', data%EquipmentControl%TopDrivePanel%RpmKnob ) | |||
#endif | |||
endif | |||
if(TopDrivePanel%TopDriveTdsPowerState == 0 .and. DrillingConsole%RTSwitch /= 0) then | |||
TopDrivePanel%RpmKnob = 0 | |||
DrillingConsole%RTThrottle = real(ScaleRange(v, 0.0, 965.0, 0.0, 250.0), 8) | |||
if(data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState == 0 .and. data%EquipmentControl%DrillingConsole%RTSwitch /= 0) then | |||
data%EquipmentControl%TopDrivePanel%RpmKnob = 0 | |||
data%EquipmentControl%DrillingConsole%RTThrottle = real(ScaleRange(v, 0.0, 965.0, 0.0, 250.0), 8) | |||
#ifdef deb | |||
call Log_3( 'RpmKnob=', TopDrivePanel%RpmKnob ) | |||
call Log_3( 'RTThrottle=', DrillingConsole%RTThrottle ) | |||
call Log_3( 'RpmKnob=', data%EquipmentControl%TopDrivePanel%RpmKnob ) | |||
call Log_3( 'RTThrottle=', data%EquipmentControl%DrillingConsole%RTThrottle ) | |||
#endif | |||
endif | |||
else | |||
TopDrivePanel%RpmKnob = v | |||
data%EquipmentControl%TopDrivePanel%RpmKnob = v | |||
endif | |||
@@ -133,9 +138,9 @@ module CTopDrivePanel | |||
if (IsPortable) then | |||
! | |||
else | |||
TopDrivePanel%RpmKnob = v | |||
data%EquipmentControl%TopDrivePanel%RpmKnob = v | |||
#ifdef deb | |||
call Log_3( 'RpmKnob=', TopDrivePanel%RpmKnob ) | |||
call Log_3( 'RpmKnob=', data%EquipmentControl%TopDrivePanel%RpmKnob ) | |||
#endif | |||
endif | |||
@@ -147,7 +152,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveOperationFaultLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveOperationFaultLed' :: GetTopDriveOperationFaultLed | |||
implicit none | |||
GetTopDriveOperationFaultLed = TopDrivePanel%TopDriveOperationFaultLed | |||
GetTopDriveOperationFaultLed = data%EquipmentControl%TopDrivePanel%TopDriveOperationFaultLed | |||
!GetTopDriveOperationFaultLed = 1 | |||
end function | |||
@@ -155,7 +160,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveTdsPowerLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveTdsPowerLed' :: GetTopDriveTdsPowerLed | |||
implicit none | |||
GetTopDriveTdsPowerLed = TopDrivePanel%TopDriveTdsPowerLed | |||
GetTopDriveTdsPowerLed = data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed | |||
!GetTopDriveTdsPowerLed = 1 | |||
end function | |||
@@ -163,7 +168,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveTorqueWrenchLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveTorqueWrenchLed' :: GetTopDriveTorqueWrenchLed | |||
implicit none | |||
GetTopDriveTorqueWrenchLed = TopDrivePanel%TopDriveTorqueWrenchLed | |||
GetTopDriveTorqueWrenchLed = data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrenchLed | |||
!GetTopDriveTorqueWrenchLed = 1 | |||
end function | |||
@@ -171,7 +176,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveLinkTiltLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveLinkTiltLed' :: GetTopDriveLinkTiltLed | |||
implicit none | |||
GetTopDriveLinkTiltLed = TopDrivePanel%TopDriveLinkTiltLed | |||
GetTopDriveLinkTiltLed = data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltLed | |||
!GetTopDriveLinkTiltLed = 1 | |||
end function | |||
@@ -179,7 +184,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveIbopLed | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveIbopLed' :: GetTopDriveIbopLed | |||
implicit none | |||
GetTopDriveIbopLed = TopDrivePanel%TopDriveIbopLed | |||
GetTopDriveIbopLed = data%EquipmentControl%TopDrivePanel%TopDriveIbopLed | |||
!GetTopDriveIbopLed = 1 | |||
end function | |||
@@ -187,7 +192,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveTorqueGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveTorqueGauge' :: GetTopDriveTorqueGauge | |||
implicit none | |||
GetTopDriveTorqueGauge = TopDrivePanel%TopDriveTorqueGauge | |||
GetTopDriveTorqueGauge = data%EquipmentControl%TopDrivePanel%TopDriveTorqueGauge | |||
!GetTopDriveTorqueGauge = 340 | |||
end function | |||
@@ -195,7 +200,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveTorqueLimitGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveTorqueLimitGauge' :: GetTopDriveTorqueLimitGauge | |||
implicit none | |||
GetTopDriveTorqueLimitGauge = TopDrivePanel%TopDriveTorqueLimitGauge | |||
GetTopDriveTorqueLimitGauge = data%EquipmentControl%TopDrivePanel%TopDriveTorqueLimitGauge | |||
!GetTopDriveTorqueLimitGauge = 442 | |||
end function | |||
@@ -203,7 +208,7 @@ module CTopDrivePanel | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTopDriveRpmGauge | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTopDriveRpmGauge' :: GetTopDriveRpmGauge | |||
implicit none | |||
GetTopDriveRpmGauge = TopDrivePanel%TopDriveRpmGauge | |||
GetTopDriveRpmGauge = data%EquipmentControl%TopDrivePanel%TopDriveRpmGauge | |||
!GetTopDriveRpmGauge = 67 | |||
end function | |||
@@ -40,6 +40,5 @@ module CTopDrivePanelVariables | |||
real :: TopDriveTorqueGauge | |||
real :: TopDriveRpmGauge | |||
end type TopDrivePanelType | |||
Type(TopDrivePanelType)::TopDrivePanel | |||
contains | |||
end module CTopDrivePanelVariables |
@@ -1,171 +0,0 @@ | |||
module CDrillWatch | |||
use CDrillWatchVariables | |||
!! use CSimulationVariables | |||
implicit none | |||
public | |||
contains | |||
! Input routines | |||
! Output routines | |||
real(8) function GetDepth() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetDepth | |||
!DEC$ ATTRIBUTES ALIAS: 'GetDepth' :: GetDepth | |||
implicit none | |||
GetDepth = DrillingWatch%Depth | |||
!GetDepth = Depth + 10 + SimulationTime | |||
end function | |||
real(8) function GetBitPosition() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBitPosition | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBitPosition' :: GetBitPosition | |||
implicit none | |||
GetBitPosition = DrillingWatch%BitPosition | |||
!GetBitPosition = BitPosition + 20 + SimulationTime | |||
end function | |||
real(8) function GetHookLoadD() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetHookLoadD | |||
!DEC$ ATTRIBUTES ALIAS: 'GetHookLoadD' :: GetHookLoadD | |||
implicit none | |||
GetHookLoadD = DrillingWatch%HookLoad | |||
!GetHookLoadD = HookLoad + 30 + SimulationTime | |||
end function | |||
real(8) function GetWeightOnBit() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetWeightOnBit | |||
!DEC$ ATTRIBUTES ALIAS: 'GetWeightOnBit' :: GetWeightOnBit | |||
implicit none | |||
GetWeightOnBit = DrillingWatch%WeightOnBit | |||
!GetWeightOnBit = WeightOnBit + 40 + SimulationTime | |||
end function | |||
real(8) function GetRPM() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetRPM | |||
!DEC$ ATTRIBUTES ALIAS: 'GetRPM' :: GetRPM | |||
implicit none | |||
GetRPM = DrillingWatch%RPM | |||
!GetRPM = RPM + 50 + SimulationTime | |||
end function | |||
real(8) function GetROP2() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetROP2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetROP2' :: GetROP2 | |||
implicit none | |||
GetROP2 = DrillingWatch%ROP | |||
!GetROP2 = ROP + 60 + SimulationTime | |||
end function | |||
real(8) function GetTorque() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTorque | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTorque' :: GetTorque | |||
implicit none | |||
GetTorque = DrillingWatch%Torque | |||
!GetTorque = Torque + 70 + SimulationTime | |||
end function | |||
real(8) function GetPumpPressureD() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPumpPressureD | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPumpPressureD' :: GetPumpPressureD | |||
implicit none | |||
GetPumpPressureD = DrillingWatch%PumpPressure | |||
!GetPumpPressureD = PumpPressure + 80 + SimulationTime | |||
end function | |||
real(8) function GetSPM1() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSPM1 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSPM1' :: GetSPM1 | |||
implicit none | |||
GetSPM1 = DrillingWatch%SPM1 | |||
!GetSPM1 = SPM1 + 90 + SimulationTime | |||
end function | |||
real(8) function GetSPM2() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSPM2 | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSPM2' :: GetSPM2 | |||
implicit none | |||
GetSPM2 = DrillingWatch%SPM2 | |||
!GetSPM2 = SPM2 + 100 + SimulationTime | |||
end function | |||
! real(8) function GetSPM3() | |||
!!DEC$ ATTRIBUTES DLLEXPORT :: GetSPM3 | |||
!!DEC$ ATTRIBUTES ALIAS: 'GetSPM3' :: GetSPM3 | |||
! implicit none | |||
! GetSPM3 = SPM3 | |||
!end function | |||
real(8) function GetCasingPressureD() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressureD | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCasingPressureD' :: GetCasingPressureD | |||
implicit none | |||
GetCasingPressureD = DrillingWatch%CasingPressure | |||
!GetCasingPressureD = CasingPressure + 110 + SimulationTime | |||
end function | |||
real(8) function GetPercentFlow() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPercentFlow | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPercentFlow' :: GetPercentFlow | |||
implicit none | |||
GetPercentFlow = DrillingWatch%PercentFlow | |||
!GetPercentFlow = PercentFlow + 120 + SimulationTime | |||
end function | |||
real(8) function GetPitGainLose() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPitGainLose | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPitGainLose' :: GetPitGainLose | |||
implicit none | |||
GetPitGainLose = DrillingWatch%PitGainLose | |||
!GetPitGainLose = PitGainLose + 130 + SimulationTime | |||
end function | |||
real(8) function GetPitVolume() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPitVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPitVolume' :: GetPitVolume | |||
implicit none | |||
GetPitVolume = DrillingWatch%PitVolume | |||
!GetPitVolume = PitVolume + 140 + SimulationTime | |||
end function | |||
real(8) function GetKillMudVolume() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetKillMudVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'GetKillMudVolume' :: GetKillMudVolume | |||
implicit none | |||
GetKillMudVolume = DrillingWatch%KillMudVolume | |||
!GetKillMudVolume = KillMudVolume + 150 + SimulationTime | |||
end function | |||
real(8) function GetTripTankVolume() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTripTankVolume' :: GetTripTankVolume | |||
implicit none | |||
GetTripTankVolume = DrillingWatch%TripTankVolume | |||
!GetTripTankVolume = TripTankVolume + 160 + SimulationTime | |||
end function | |||
real(8) function GetMudWeightInD() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMudWeightInD | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMudWeightInD' :: GetMudWeightInD | |||
implicit none | |||
GetMudWeightInD = DrillingWatch%MudWeightIn | |||
!GetMudWeightInD = MudWeightIn + 170 + SimulationTime | |||
end function | |||
real(8) function GetFillVolume() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetFillVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'GetFillVolume' :: GetFillVolume | |||
implicit none | |||
GetFillVolume = DrillingWatch%FillVolume | |||
!GetFillVolume = FillVolume + 180 + SimulationTime | |||
end function | |||
real(8) function GetMudWeightOutD() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetMudWeightOutD | |||
!DEC$ ATTRIBUTES ALIAS: 'GetMudWeightOutD' :: GetMudWeightOutD | |||
implicit none | |||
GetMudWeightOutD = DrillingWatch%MudWeightOut | |||
!GetMudWeightOutD = MudWeightOut + 190 + SimulationTime | |||
end function | |||
end module CDrillWatch |
@@ -29,6 +29,6 @@ module CDrillWatchVariables | |||
real(8) :: MudWeightOut | |||
End Type DrillingWatchType | |||
Type(DrillingWatchType)::DrillingWatch | |||
end module CDrillWatchVariables |
@@ -2,7 +2,10 @@ module CManifolds | |||
use CStack | |||
use CArrangement | |||
! use CPathChangeEvents | |||
use CDrillingConsoleVariables!, only: DrillingConsole%IRSafetyValveLed, DrillingConsole%IRIBopLed, DrillingConsole%OpenKellyCockLed, DrillingConsole%CloseKellyCockLed, DrillingConsole%OpenSafetyValveLed, DrillingConsole%CloseSafetyValveLed | |||
! use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
! use ConfigurationVariables, only: EquipmentControl | |||
implicit none | |||
public | |||
@@ -767,7 +770,7 @@ end subroutine PathFinding_Step | |||
print*, 'InstallSafetyValve_KellyMode()' | |||
#endif | |||
DrillingConsole%IRSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 1 | |||
call OpenSafetyValve_KellyMode() | |||
end subroutine | |||
@@ -784,10 +787,10 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(127)%AdjacentTo(128) | |||
call Manifold%Valve(128)%AdjacentTo(127) | |||
DrillingConsole%IRSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 0 | |||
call CloseSafetyValve_KellyMode() | |||
DrillingConsole%OpenSafetyValveLed = 0 | |||
DrillingConsole%CloseSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveSafetyValve_KellyMode()' | |||
@@ -798,8 +801,8 @@ end subroutine PathFinding_Step | |||
subroutine OpenSafetyValve_KellyMode() | |||
implicit none | |||
if(.not.Manifold%IsSafetyValveInstalled_KellyMode) return | |||
DrillingConsole%OpenSafetyValveLed = 1 | |||
DrillingConsole%CloseSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 0 | |||
Manifold%SafetyValve = .true. | |||
call ChangeValve(56, Manifold%SafetyValve) | |||
@@ -812,8 +815,8 @@ end subroutine PathFinding_Step | |||
subroutine CloseSafetyValve_KellyMode() | |||
implicit none | |||
if(.not.Manifold%IsSafetyValveInstalled_KellyMode) return | |||
DrillingConsole%CloseSafetyValveLed = 1 | |||
DrillingConsole%OpenSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 0 | |||
Manifold%SafetyValve = .false. | |||
call ChangeValve(56, Manifold%SafetyValve) | |||
@@ -855,7 +858,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(54)%AdjacentTo(69) | |||
call Manifold%Valve(69)%AdjacentTo(54) | |||
DrillingConsole%IRSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 1 | |||
call OpenSafetyValve_TripMode() | |||
#ifdef deb | |||
@@ -877,10 +880,10 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(124)%AdjacentTo(69) | |||
call Manifold%Valve(69)%AdjacentTo(124) | |||
DrillingConsole%IRSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 0 | |||
call CloseSafetyValve_TripMode() | |||
DrillingConsole%OpenSafetyValveLed = 0 | |||
DrillingConsole%CloseSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveSafetyValve_TripMode()' | |||
@@ -891,8 +894,8 @@ end subroutine PathFinding_Step | |||
subroutine OpenSafetyValve_TripMode() | |||
implicit none | |||
if(.not.Manifold%IsSafetyValveInstalled_TripMode) return | |||
DrillingConsole%OpenSafetyValveLed = 1 | |||
DrillingConsole%CloseSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 0 | |||
Manifold%SafetyValve = .true. | |||
call ChangeValve(54, Manifold%SafetyValve) | |||
@@ -905,8 +908,8 @@ end subroutine PathFinding_Step | |||
subroutine CloseSafetyValve_TripMode() | |||
implicit none | |||
if(.not.Manifold%IsSafetyValveInstalled_TripMode) return | |||
DrillingConsole%CloseSafetyValveLed = 1 | |||
DrillingConsole%OpenSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 0 | |||
Manifold%SafetyValve = .false. | |||
call ChangeValve(54, Manifold%SafetyValve) | |||
@@ -942,7 +945,7 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(54)%AdjacentTo(69) | |||
call Manifold%Valve(69)%AdjacentTo(54) | |||
DrillingConsole%IRSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 1 | |||
call OpenSafetyValve_TopDrive() | |||
#ifdef deb | |||
@@ -964,10 +967,10 @@ end subroutine PathFinding_Step | |||
call Manifold%Valve(124)%AdjacentTo(69) | |||
call Manifold%Valve(69)%AdjacentTo(124) | |||
DrillingConsole%IRSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 0 | |||
call CloseSafetyValve_TopDrive() | |||
DrillingConsole%OpenSafetyValveLed = 0 | |||
DrillingConsole%CloseSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveSafetyValve_TopDrive()' | |||
@@ -978,8 +981,8 @@ end subroutine PathFinding_Step | |||
subroutine OpenSafetyValve_TopDrive() | |||
implicit none | |||
if(.not.Manifold%IsSafetyValveInstalled_TopDrive) return | |||
DrillingConsole%OpenSafetyValveLed = 1 | |||
DrillingConsole%CloseSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 0 | |||
Manifold%SafetyValve = .true. | |||
#ifdef deb | |||
@@ -992,8 +995,8 @@ end subroutine PathFinding_Step | |||
subroutine CloseSafetyValve_TopDrive() | |||
implicit none | |||
if(.not.Manifold%IsSafetyValveInstalled_TopDrive) return | |||
DrillingConsole%CloseSafetyValveLed = 1 | |||
DrillingConsole%OpenSafetyValveLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseSafetyValveLed = 1 | |||
data%EquipmentControl%DrillingConsole%OpenSafetyValveLed = 0 | |||
Manifold%SafetyValve = .false. | |||
#ifdef deb | |||
@@ -1028,7 +1031,7 @@ end subroutine PathFinding_Step | |||
print*, 'InstallIBop()' | |||
#endif | |||
DrillingConsole%IRIBopLed = 1 | |||
data%EquipmentControl%DrillingConsole%IRIBopLed = 1 | |||
call OpenIBop() | |||
end subroutine | |||
@@ -1049,7 +1052,7 @@ end subroutine PathFinding_Step | |||
print*, 'RemoveIBop()' | |||
#endif | |||
DrillingConsole%IRIBopLed = 0 | |||
data%EquipmentControl%DrillingConsole%IRIBopLed = 0 | |||
Manifold%IBop = .false. | |||
call ChangeValve(55, Manifold%IBop) | |||
end subroutine | |||
@@ -1119,8 +1122,8 @@ end subroutine PathFinding_Step | |||
Manifold%KellyCock = .false. | |||
call ChangeValve(68, Manifold%KellyCock) | |||
DrillingConsole%CloseKellyCockLed = 0 | |||
DrillingConsole%OpenKellyCockLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseKellyCockLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenKellyCockLed = 0 | |||
#ifdef deb | |||
print*, 'RemoveKellyCock()' | |||
@@ -1131,8 +1134,8 @@ end subroutine PathFinding_Step | |||
subroutine OpenKellyCock() | |||
implicit none | |||
if(.not.Manifold%IsKellyCockInstalled) return | |||
DrillingConsole%OpenKellyCockLed = 1 | |||
DrillingConsole%CloseKellyCockLed = 0 | |||
data%EquipmentControl%DrillingConsole%OpenKellyCockLed = 1 | |||
data%EquipmentControl%DrillingConsole%CloseKellyCockLed = 0 | |||
Manifold%KellyCock = .true. | |||
#ifdef deb | |||
@@ -1145,8 +1148,8 @@ end subroutine PathFinding_Step | |||
subroutine CloseKellyCock() | |||
implicit none | |||
if(.not.Manifold%IsKellyCockInstalled) return | |||
DrillingConsole%CloseKellyCockLed = 1 | |||
DrillingConsole%OpenKellyCockLed = 0 | |||
data%EquipmentControl%DrillingConsole%CloseKellyCockLed = 1 | |||
data%EquipmentControl%DrillingConsole%OpenKellyCockLed = 0 | |||
Manifold%KellyCock = .false. | |||
#ifdef deb | |||
@@ -1,12 +1,12 @@ | |||
module CPathChangeEvents | |||
use CIntegerArrayEventHandlerCollection | |||
use CVoidEventHandlerCollection | |||
! use CIntegerArrayEventHandlerCollection | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
public | |||
type(VoidEventHandlerCollection) :: BeforeTraverse | |||
type(VoidEventHandlerCollection) :: AfterTraverse | |||
type(IntegerArrayEventHandlerCollection) :: OnPathOpen | |||
! type(VoidEventHandlerCollection) :: BeforeTraverse | |||
! type(VoidEventHandlerCollection) :: AfterTraverse | |||
! type(IntegerArrayEventHandlerCollection) :: OnPathOpen | |||
contains | |||
end module CPathChangeEvents |
@@ -1,5 +1,5 @@ | |||
module CStack | |||
use CPath | |||
use CPath,Only:Path | |||
implicit none | |||
public | |||
@@ -1,252 +1,20 @@ | |||
module CTanks | |||
use CTanksVariables | |||
! use CSimulationVariables | |||
use ConfigurationVariables | |||
use CManifolds | |||
implicit none | |||
public | |||
contains | |||
! Input routines | |||
subroutine SetWaterRate(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetWaterRate | |||
!DEC$ ATTRIBUTES ALIAS: 'SetWaterRate' :: SetWaterRate | |||
implicit none | |||
real*8, intent(in) :: v | |||
Tank%WaterRate = v | |||
#ifdef deb | |||
print*, 'WaterRate=', Tank%WaterRate | |||
#endif | |||
end subroutine | |||
subroutine SetCementTankVolume(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementTankVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementTankVolume' :: SetCementTankVolume | |||
implicit none | |||
real*8, intent(in) :: v | |||
Tank%CementTankVolume = v | |||
#ifdef deb | |||
print*, 'CementTankVolume=', Tank%CementTankVolume | |||
#endif | |||
end subroutine | |||
subroutine SetCementTankDensity(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetCementTankDensity | |||
!DEC$ ATTRIBUTES ALIAS: 'SetCementTankDensity' :: SetCementTankDensity | |||
implicit none | |||
real*8, intent(in) :: v | |||
Tank%CementTankDensity = v | |||
#ifdef deb | |||
print*, 'CementTankDensity=', Tank%CementTankDensity | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankVolume(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankVolume' :: SetTripTankVolume | |||
implicit none | |||
real*8, intent(in) :: v | |||
Tank%TripTankVolume = v | |||
#ifdef deb | |||
print*, 'TripTankVolume=', Tank%TripTankVolume | |||
#endif | |||
end subroutine | |||
subroutine SetTripTankDensity(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankDensity | |||
!DEC$ ATTRIBUTES ALIAS: 'SetTripTankDensity' :: SetTripTankDensity | |||
implicit none | |||
real*8, intent(in) :: v | |||
Tank%TripTankDensity = v | |||
#ifdef deb | |||
print*, 'TripTankDensity=', Tank%TripTankDensity | |||
#endif | |||
end subroutine | |||
! subroutine SetManualPumpPowerT(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: SetManualPumpPowerT | |||
! !DEC$ ATTRIBUTES ALIAS: 'SetManualPumpPowerT' :: SetManualPumpPowerT | |||
! implicit none | |||
! logical, intent(in) :: v | |||
! ManualPumpPower = v | |||
! call ChangeValve(43, v) | |||
!#ifdef deb | |||
! print*, 'ManualPumpPowerT=', ManualPumpPower | |||
!#endif | |||
! end subroutine | |||
subroutine SetValve1T(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve1T | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve1T' :: SetValve1T | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve1 = v | |||
call ChangeValve(40, v) | |||
#ifdef deb | |||
print*, 'Valve1T=', Tank%Valve1 | |||
#endif | |||
end subroutine | |||
subroutine SetValve2T(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve2T | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve2T' :: SetValve2T | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve2 = v | |||
call ChangeValve(41, v) | |||
#ifdef deb | |||
print*, 'Valve2T=', Tank%Valve2 | |||
#endif | |||
end subroutine | |||
subroutine SetValve3T(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve3T | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve3T' :: SetValve3T | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve3 = v | |||
call ChangeValve(45, v) | |||
#ifdef deb | |||
print*, 'Valve3T=', Tank%Valve3 | |||
#endif | |||
end subroutine | |||
subroutine SetValve4T(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve4T | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve4T' :: SetValve4T | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve4 = v | |||
call ChangeValve(58, v) | |||
#ifdef deb | |||
print*, 'Valve4T=', Tank%Valve4 | |||
#endif | |||
end subroutine | |||
subroutine SetValve5T(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve5T | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve5T' :: SetValve5T | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve5 = v | |||
call ChangeValve(42, v) | |||
#ifdef deb | |||
print*, 'Valve5T=', Tank%Valve5 | |||
#endif | |||
end subroutine | |||
subroutine SetValve6(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve6 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve6' :: SetValve6 | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve6 = v | |||
call ChangeValve(38, v) | |||
!WRITE (*,*) ' valve 38 ', v | |||
#ifdef deb | |||
print*, 'Valve6=', Tank%Valve6 | |||
#endif | |||
subroutine Set_ManualPumpPower(v) | |||
use CManifolds, only:ChangeValve | |||
implicit none | |||
logical, intent(in) :: v | |||
data%EquipmentControl%Tank%ManualPumpPower = v | |||
call ChangeValve(43, v) | |||
#ifdef deb | |||
print*, 'ManualPumpPower=', data%EquipmentControl%Tank%ManualPumpPower | |||
#endif | |||
end subroutine | |||
subroutine SetValve7(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve7 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve7' :: SetValve7 | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve7 = v | |||
call ChangeValve(59, v) | |||
#ifdef deb | |||
print*, 'Valve7=', Tank%Valve7 | |||
#endif | |||
end subroutine | |||
subroutine SetValve8(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve8 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve8' :: SetValve8 | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve8 = v | |||
call ChangeValve(39, v) | |||
#ifdef deb | |||
print*, 'Valve8=', Tank%Valve8 | |||
#endif | |||
end subroutine | |||
subroutine SetValve9(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve9 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve9' :: SetValve9 | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve9 = v | |||
call ChangeValve(36, v) | |||
!WRITE (*,*) ' valve 36 ', v | |||
#ifdef deb | |||
print*, 'Valve9=', Tank%Valve9 | |||
#endif | |||
end subroutine | |||
subroutine SetValve10(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve10 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve10' :: SetValve10 | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve10 = v | |||
call ChangeValve(37, v) | |||
#ifdef deb | |||
print*, 'Valve10=', Tank%Valve10 | |||
#endif | |||
end subroutine | |||
subroutine SetValve11(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetValve11 | |||
!DEC$ ATTRIBUTES ALIAS: 'SetValve11' :: SetValve11 | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%Valve11 = v | |||
call ChangeValve(44, v) | |||
#ifdef deb | |||
print*, 'Valve11=', Tank%Valve11 | |||
#endif | |||
end subroutine | |||
! Output routines | |||
real(8) function GetTripTankVolumeT() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankVolumeT | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTripTankVolumeT' :: GetTripTankVolumeT | |||
implicit none | |||
GetTripTankVolumeT = Tank%TripTankVolume | |||
!GetTripTankVolumeT = 50.0 + SimulationTime | |||
end function | |||
real(8) function GetTripTankDensity() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankDensity | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTripTankDensity' :: GetTripTankDensity | |||
implicit none | |||
GetTripTankDensity = Tank%TripTankDensity | |||
!GetTripTankDensity = 13.0 + SimulationTime | |||
end function | |||
logical function GetManualPumpPowerT() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetManualPumpPowerT | |||
!DEC$ ATTRIBUTES ALIAS: 'GetManualPumpPowerT' :: GetManualPumpPowerT | |||
implicit none | |||
GetManualPumpPowerT = Tank%ManualPumpPower | |||
!GetManualPumpPowerT = .true. | |||
end function | |||
end module CTanks |
@@ -22,19 +22,8 @@ module CTanksVariables | |||
logical :: Valve10 | |||
logical :: Valve11 | |||
End Type TankType | |||
Type(TankType)::Tank | |||
contains | |||
subroutine Set_ManualPumpPower(v) | |||
use CManifolds, only:ChangeValve | |||
implicit none | |||
logical, intent(in) :: v | |||
Tank%ManualPumpPower = v | |||
call ChangeValve(43, v) | |||
#ifdef deb | |||
print*, 'ManualPumpPower=', Tank%ManualPumpPower | |||
#endif | |||
end subroutine | |||
end module CTanksVariables |
@@ -2,28 +2,12 @@ module COperationScenariosMain | |||
use CIActionReference | |||
implicit none | |||
public | |||
procedure (ActionVoid), pointer :: UpdateUnityPtr | |||
! procedure (ActionVoid), pointer :: UpdateUnityPtr | |||
contains | |||
! subroutine OperationScenarios_Setup() | |||
! ! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(OperationScenarios_Init) | |||
! call OnSimulationStop%Add(OperationScenarios_Init) | |||
! !call OnOperationScenariosStep%Add(OperationScenarios_Step) | |||
! !call OnOperationScenariosOutput%Add(OperationScenarios_Output) | |||
! call OnOperationScenariosMain%Add(OperationScenariosMainBody) | |||
! end subroutine | |||
! subroutine OperationScenarios_Init | |||
! use COperationScenariosSettings, OperationScenariosInitialization => Initialization | |||
! implicit none | |||
! call OperationScenariosInitialization() | |||
! end subroutine OperationScenarios_Init | |||
subroutine OperationScenarios_Step | |||
! use CSimulationVariables | |||
use CKellyConnectionEnum | |||
use OperationScenariosModule | |||
use CElevatorConnectionEnum | |||
use CCloseKellyCockLedNotification | |||
use CCloseSafetyValveLedNotification | |||
@@ -58,13 +42,14 @@ module COperationScenariosMain | |||
Get_ElevatorPickup, & | |||
Get_NearFloorPosition, & | |||
Get_SingleSetInMouseHole | |||
use CBucketEnum | |||
! use CBucketEnum | |||
! use UnitySignalsModule | |||
use CElevatorEnum | |||
use CHeadEnum | |||
! use CHeadEnum | |||
use CIbopEnum | |||
use CKellyEnum | |||
use CMouseHoleEnum | |||
use COperationConditionEnum | |||
use UnitySignalsModule | |||
use CSafetyValveEnum | |||
use CSlipsEnum | |||
use CSwingEnum | |||
@@ -77,7 +62,7 @@ module COperationScenariosMain | |||
use CSwingOffPermission | |||
use CSwingTiltPermission | |||
! use CTdsStemJointHeight | |||
use CTdsConnectionModesEnum | |||
! use UnitySignalsModule !for CTdsConnectionModesEnum | |||
use CTdsElevatorModesEnum | |||
use CTdsSpineEnum | |||
use CTdsSwingEnum | |||
@@ -167,259 +152,19 @@ module COperationScenariosMain | |||
call Evaluate_TorqueWrenchLed() | |||
end subroutine OperationScenarios_Step | |||
subroutine OperationScenarios_Output | |||
implicit none | |||
end subroutine OperationScenarios_Output | |||
! subroutine OperationScenariosMainBody | |||
! ! use CSimulationVariables | |||
! use CKellyConnectionEnum | |||
! use CElevatorConnectionEnum | |||
! use CCloseKellyCockLedNotification | |||
! use CCloseSafetyValveLedNotification | |||
! use CFillMouseHoleLedNotification | |||
! use CIrIBopLedNotification | |||
! use CIrSafetyValveLedNotification | |||
! use CLatchLedNotification | |||
! use COpenKellyCockLedNotification | |||
! use COpenSafetyValveLedNotification | |||
! use CSlipsNotification | |||
! use CSwingLedNotification | |||
! use CTongNotification | |||
! use CUnlatchLedNotification | |||
! use CInstallFillupHeadPermission | |||
! use CInstallMudBucketPermission | |||
! use CIrIbopPermission | |||
! use CIrSafetyValvePermission | |||
! use CRemoveFillupHeadPermission | |||
! use CRemoveMudBucketPermission | |||
! ! use CHookHeight | |||
! ! use CIbopHeight | |||
! ! use CNearFloorConnection | |||
! ! use CSafetyValveHeight | |||
! ! use CSlackOff | |||
! ! use CStandRack | |||
! ! use CStringPressure | |||
! ! use CZeroStringSpeed | |||
! use CUnityInputs, only: & | |||
! Get_ElevatorConnectionPossible, & | |||
! Get_JointConnectionPossible, & | |||
! Get_ElevatorPickup, & | |||
! Get_NearFloorPosition, & | |||
! Get_SingleSetInMouseHole | |||
! use CBucketEnum | |||
! use CElevatorEnum | |||
! use CHeadEnum | |||
! use CIbopEnum | |||
! use CKellyEnum | |||
! use CMouseHoleEnum | |||
! use COperationConditionEnum | |||
! use CSafetyValveEnum | |||
! use CSlipsEnum | |||
! use CSwingEnum | |||
! use CTongEnum | |||
! ! use CStringUpdate | |||
! use CFlowPipeDisconnectEnum | |||
! use CFlowKellyDisconnectEnum | |||
! use CFillupHeadPermission | |||
! use CSwingDrillPermission | |||
! use CSwingOffPermission | |||
! use CSwingTiltPermission | |||
! ! use CTdsStemJointHeight | |||
! use CTdsConnectionModesEnum | |||
! use CTdsElevatorModesEnum | |||
! use CTdsSpineEnum | |||
! use CTdsSwingEnum | |||
! use CTdsTongEnum | |||
! use CTdsBackupClamp | |||
! use CTdsIbopLedNotification | |||
! use CTdsPowerLedNotification | |||
! use CTdsTorqueWrenchLedNotification | |||
! subroutine UpdateUnity() | |||
! implicit none | |||
! loop1: do | |||
! call Evaluate_KellyConnection() | |||
! call Evaluate_ElevatorConnection() | |||
! call Evaluate_CloseKellyCockLed() | |||
! call Evaluate_CloseSafetyValveLed() | |||
! call Evaluate_FillMouseHoleLed() | |||
! call Evaluate_IrIBopLed() | |||
! call Evaluate_IrSafetyValveLed() | |||
! call Evaluate_LatchLed() | |||
! call Evaluate_OpenKellyCockLed() | |||
! call Evaluate_OpenSafetyValveLed() | |||
! call Evaluate_SlipsNotification() | |||
! call Evaluate_SwingLed() | |||
! call Evaluate_TongNotification() | |||
! call Evaluate_UnlatchLed() | |||
! call Evaluate_InstallFillupHeadPermission() | |||
! call Evaluate_InstallMudBucketPermission() | |||
! call Evaluate_IrIbopPermission() | |||
! call Evaluate_IrSafetyValvePermission() | |||
! call Evaluate_RemoveFillupHeadPermission() | |||
! call Evaluate_RemoveMudBucketPermission() | |||
! call Evaluate_MudBucket() | |||
! call Evaluate_Elevator() | |||
! call Evaluate_FillupHead() | |||
! call Evaluate_Ibop() | |||
! call Evaluate_Kelly() | |||
! call Evaluate_MouseHole() | |||
! call Evaluate_MouseHole() | |||
! call Evaluate_OperationCondition() | |||
! call Evaluate_SafetyValve() | |||
! call Evaluate_Slips() | |||
! call Evaluate_Swing() | |||
! call Evaluate_Tong() | |||
! ! call Evaluate_StringUpdate() | |||
! call Evaluate_FlowKellyDisconnect() | |||
! call Evaluate_FlowPipeDisconnect() | |||
! !if(Get_FillMouseHoleLed()) then | |||
! ! call Set_MouseHole(MOUSE_HOLE_FILL) | |||
! !else | |||
! ! if((Get_KellyConnection() == KELLY_CONNECTION_SINGLE .or.& | |||
! ! Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) .and.& | |||
! ! Get_HookHeight() >= 95.0 ) then | |||
! ! call Set_MouseHole(MOUSE_HOLE_NEUTRAL) | |||
! ! else | |||
! ! call Set_MouseHole(MOUSE_HOLE_EMPTY) | |||
! ! endif | |||
! !endif | |||
! !topdrive | |||
! call Evaluate_TdsElevatorModes() | |||
! call Evaluate_TdsConnectionModes() | |||
! call Evaluate_SwingTiltPermission() | |||
! call Evaluate_SwingOffPermission() | |||
! call Evaluate_SwingDrillPermission() | |||
! call Evaluate_FillupHeadPermission() | |||
! call Evaluate_TdsTong() | |||
! call Evaluate_TdsBackupClamp() | |||
! call Evaluate_TdsSwing() | |||
! call Evaluate_TdsSpine() | |||
! call Evaluate_PowerLed() | |||
! call Evaluate_IbopLed() | |||
! call Evaluate_TorqueWrenchLed() | |||
! !if (IsStopped==.true.) exit loop1 | |||
! if(IsStopped) call Quit() | |||
! call sleepqq(100) | |||
! enddo loop1 | |||
! end subroutine OperationScenariosMainBody | |||
! subroutine SubscribeUpdateUnity(a) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeUpdateUnity | |||
! !DEC$ ATTRIBUTES ALIAS: 'SubscribeUpdateUnity' :: SubscribeUpdateUnity | |||
! implicit none | |||
! procedure (ActionVoid) :: a | |||
! UpdateUnityPtr => a | |||
! end subroutine | |||
subroutine UpdateUnity() | |||
implicit none | |||
if(associated(UpdateUnityPtr)) call UpdateUnityPtr() | |||
end subroutine | |||
! subroutine PreProcessingSnapshot | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: PreProcessingSnapshot | |||
! !DEC$ ATTRIBUTES ALIAS: 'PreProcessingSnapshot' :: PreProcessingSnapshot | |||
! use CSwingEnumVariables | |||
! use CSlipsEnumVariables | |||
! use CHookVariables | |||
! use CTongEnumVariables | |||
! use CHoistingVariables | |||
! use CKellyConnectionEnumVariables | |||
! use COperationScenariosVariables | |||
! ! use CElevatorConnectionEnumVariables | |||
! use COperationConditionEnumVariables | |||
! use CMouseHoleEnumVariables | |||
! implicit none | |||
! if(Hoisting%DriveType == Kelly_DriveType) then ! kelly mode | |||
! if(Get_OperationCondition() == OPERATION_DRILL) then | |||
! if(Get_KellyConnection() == KELLY_CONNECTION_NOTHING) then | |||
! call Kelly_ConnectionNothing() | |||
! elseif (Get_KellyConnection() == KELLY_CONNECTION_STRING) then | |||
! call Kelly_ConnectionString() | |||
! elseif (Get_KellyConnection() == KELLY_CONNECTION_SINGLE) then | |||
! call Kelly_ConnectionSingle() | |||
! endif | |||
! elseif (Get_OperationCondition() == OPERATION_TRIP) then | |||
! if(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING) then | |||
! call Elevator_ConnectionNothing() | |||
! elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING) then | |||
! call Elevator_ConnectionString() | |||
! elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND) then | |||
! call Elevator_ConnectionStand() | |||
! elseif (Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE) then | |||
! call Elevator_ConnectionSingle() | |||
! endif | |||
! endif | |||
! else ! Topdrive mode | |||
! ! | |||
! endif | |||
! ! final adjustments | |||
! call Update_MouseHole_From_Snapshot() | |||
! end subroutine PreProcessingSnapshot | |||
! if(associated(UpdateUnityPtr)) call UpdateUnityPtr() | |||
! end subroutine | |||
subroutine Kelly_ConnectionNothing | |||
! use CSwingEnumVariables | |||
! use CSlipsEnumVariables | |||
use UnitySignalVariables | |||
use CHookVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use ConfigurationVariables | |||
implicit none | |||
call Set_HookHeight(75.0) | |||
@@ -435,23 +180,23 @@ module COperationScenariosMain | |||
!TODO: possibly goto a position to activate swing | |||
! goto preferred swing position | |||
if(UnitySignals%Swing_S == SWING_MOUSE_HOLE_END) then | |||
if(data%State%unitySignals%Swing_S == SWING_MOUSE_HOLE_END) then | |||
call Set_Swing(SWING_MOUSE_HOLE_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop2: do | |||
if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop2 | |||
call sleepqq(100) | |||
enddo loop2 | |||
elseif (UnitySignals%Swing_S == SWING_RAT_HOLE_END) then | |||
elseif (data%State%unitySignals%Swing_S == SWING_RAT_HOLE_END) then | |||
call Set_Swing(SWING_RAT_HOLE_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop3: do | |||
if(Get_Swing() == SWING_RAT_HOLE_END) exit loop3 | |||
call sleepqq(100) | |||
enddo loop3 | |||
!elseif (Swing_S == SWING_WELL_END) then | |||
! call Set_Swing(SWING_WELL_BEGIN) | |||
! call UpdateUnity() | |||
! !@call UpdateUnity() | |||
! loop4: do | |||
! if(Get_Swing() == SWING_WELL_END) exit loop4 | |||
! call sleepqq(100) | |||
@@ -473,7 +218,9 @@ module COperationScenariosMain | |||
! use CSwingEnumVariables | |||
! use CSlipsEnumVariables | |||
use UnitySignalVariables | |||
use CHookVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use ConfigurationVariables | |||
! use CTongEnumVariables | |||
implicit none | |||
@@ -493,7 +240,7 @@ module COperationScenariosMain | |||
! start tong makeup | |||
call Set_Tong(TONG_MAKEUP_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop2: do | |||
if(Get_Tong() == TONG_MAKEUP_END) exit loop2 | |||
call sleepqq(100) | |||
@@ -502,7 +249,7 @@ module COperationScenariosMain | |||
! release slips | |||
call Set_Slips(SLIPS_UNSET_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop3: do | |||
if(Get_Slips() == SLIPS_UNSET_END) exit loop3 | |||
call sleepqq(100) | |||
@@ -515,10 +262,10 @@ module COperationScenariosMain | |||
! put slips to saved position | |||
if(UnitySignals%Slips_S == SLIPS_SET_END) then | |||
if(data%State%unitySignals%Slips_S == SLIPS_SET_END) then | |||
call Set_Slips(SLIPS_SET_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop4: do | |||
if(Get_Slips() == SLIPS_SET_END) exit loop4 | |||
call sleepqq(100) | |||
@@ -537,7 +284,9 @@ module COperationScenariosMain | |||
! use CSlipsEnumVariables | |||
! use CTongEnumVariables | |||
use UnitySignalVariables | |||
use CHookVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use ConfigurationVariables | |||
implicit none | |||
call Set_HookHeight(75.0) | |||
@@ -557,7 +306,7 @@ module COperationScenariosMain | |||
! swing mouse hole | |||
call Set_Swing(SWING_MOUSE_HOLE_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop2: do | |||
if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop2 | |||
call sleepqq(100) | |||
@@ -572,7 +321,7 @@ module COperationScenariosMain | |||
! start tong makeup | |||
call Set_Tong(TONG_MAKEUP_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop3: do | |||
if(Get_Tong() == TONG_MAKEUP_END) exit loop3 | |||
call sleepqq(100) | |||
@@ -581,7 +330,7 @@ module COperationScenariosMain | |||
if (UnitySignals%Swing_S == SWING_WELL_END) then ! already in mouse hole | |||
if (data%State%unitySignals%Swing_S == SWING_WELL_END) then ! already in mouse hole | |||
! goto swing location | |||
call Set_HookHeight_S(98.0) | |||
@@ -589,7 +338,7 @@ module COperationScenariosMain | |||
! goto preferred swing position | |||
call Set_Swing(SWING_WELL_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop4: do | |||
if(Get_Swing() == SWING_WELL_END) exit loop4 | |||
call sleepqq(100) | |||
@@ -604,17 +353,14 @@ module COperationScenariosMain | |||
call sleep(3) | |||
end subroutine Kelly_ConnectionSingle | |||
subroutine Elevator_ConnectionNothing | |||
! use CSwingEnumVariables | |||
! use CSlipsEnumVariables | |||
use UnitySignalVariables | |||
use CHookVariables | |||
use UnitySignalsModule | |||
use CHook | |||
use ConfigurationVariables | |||
! use CKellyEnumVariables | |||
implicit none | |||
@@ -633,7 +379,7 @@ module COperationScenariosMain | |||
!! first goto mouse hole | |||
!call Set_Swing(SWING_MOUSE_HOLE_BEGIN) | |||
!call UpdateUnity() | |||
!!@call UpdateUnity() | |||
!loop2: do | |||
! if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop2 | |||
! call sleepqq(100) | |||
@@ -642,7 +388,7 @@ module COperationScenariosMain | |||
! | |||
!! then goto rat hole | |||
!call Set_Swing(SWING_RAT_HOLE_BEGIN) | |||
!call UpdateUnity() | |||
!!@call UpdateUnity() | |||
!loop3: do | |||
! if(Get_Swing() == SWING_RAT_HOLE_END) exit loop3 | |||
! call sleepqq(100) | |||
@@ -653,26 +399,24 @@ module COperationScenariosMain | |||
call Set_Kelly(KELLY_REMOVE) | |||
call sleepqq(100) | |||
! goto preferred swing position | |||
if(UnitySignals%Swing_S == SWING_MOUSE_HOLE_END) then | |||
if(data%State%unitySignals%Swing_S == SWING_MOUSE_HOLE_END) then | |||
call Set_Swing(SWING_MOUSE_HOLE_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop4: do | |||
if(Get_Swing() == SWING_MOUSE_HOLE_END) exit loop4 | |||
call sleepqq(100) | |||
enddo loop4 | |||
elseif (UnitySignals%Swing_S == SWING_RAT_HOLE_END) then | |||
elseif (data%State%unitySignals%Swing_S == SWING_RAT_HOLE_END) then | |||
call Set_Swing(SWING_RAT_HOLE_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop5: do | |||
if(Get_Swing() == SWING_RAT_HOLE_END) exit loop5 | |||
call sleepqq(100) | |||
enddo loop5 | |||
elseif (UnitySignals%Swing_S == SWING_WELL_END) then | |||
elseif (data%State%unitySignals%Swing_S == SWING_WELL_END) then | |||
call Set_Swing(SWING_WELL_BEGIN) | |||
call UpdateUnity() | |||
!@call UpdateUnity() | |||
loop6: do | |||
if(Get_Swing() == SWING_WELL_END) exit loop6 | |||
call sleepqq(100) | |||
@@ -714,9 +458,5 @@ module COperationScenariosMain | |||
subroutine Elevator_ConnectionSingle | |||
implicit none | |||
end subroutine Elevator_ConnectionSingle | |||
end module COperationScenariosMain |
@@ -12,10 +12,10 @@ module COperationScenariosSettings | |||
! use CSwingEnum | |||
! use CSlipsEnum | |||
! use CSafetyValveEnum | |||
! use COperationConditionEnum | |||
! use UnitySignalsModule | |||
! use CMouseHoleEnum | |||
! use CKellyEnum | |||
! use CKellyConnectionEnum | |||
! use OperationScenariosModule | |||
! use CIbopEnum | |||
! use CHeadEnum | |||
! use CElevatorEnum | |||
@@ -60,7 +60,7 @@ module COperationScenariosSettings | |||
! use CSwingOffPermission | |||
! use CSwingTiltPermission | |||
! use CTdsStemJointHeight | |||
! use CTdsConnectionModesEnum | |||
! use UnitySignalsModule !for CTdsConnectionModesEnum | |||
! use CTdsElevatorModesEnum | |||
! use CTdsSpineEnum | |||
! use CTdsSwingEnum | |||
@@ -153,8 +153,9 @@ module COperationScenariosSettings | |||
!end subroutine | |||
subroutine SetDefaultValues() | |||
use COperationScenariosVariables | |||
use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType | |||
use OperationScenariosModule | |||
use CHoistingVariables | |||
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType | |||
use CManifolds, only: RemoveSafetyValve_TripMode, RemoveSafetyValve_KellyMode | |||
implicit none | |||
@@ -185,7 +186,7 @@ module COperationScenariosSettings | |||
call Set_FillMouseHoleLed(.true.) !Get_FillMouseHoleLed() | |||
call Set_IrIBopLed(.false.) !Get_IrIBopLed() | |||
!call Set_IrSafetyValveLed(.true.) !Get_IrSafetyValveLed() | |||
if(Hoisting%DriveType == TopDrive_DriveType) then | |||
if(data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
call RemoveSafetyValve_TripMode() | |||
call RemoveSafetyValve_KellyMode() | |||
call Set_IrSafetyValveLed(.false.) | |||
@@ -302,7 +303,7 @@ module COperationScenariosSettings | |||
!Get_SafetyValve() | |||
!SAFETY_VALVE_INSTALL | |||
!SAFETY_VALVE_REMOVE | |||
if(Hoisting%DriveType == TopDrive_DriveType) call Set_SafetyValve(SAFETY_VALVE_REMOVE) | |||
if(data%State%Hoisting%DriveType == TopDrive_DriveType) call Set_SafetyValve(SAFETY_VALVE_REMOVE) | |||
call Set_Slips(SLIPS_SET_BEGIN) | |||
!Get_Slips() | |||
@@ -1,92 +1,4 @@ | |||
module COperationScenariosVariables | |||
use CKellyConnectionEnumVariables | |||
use CElevatorConnectionEnumVariables | |||
use NotificationVariables | |||
! use CCloseKellyCockLedNotificationVariables | |||
! use CCloseSafetyValveLedNotificationVariables | |||
! use CFillMouseHoleLedNotificationVariables | |||
! use CIrIBopLedNotificationVariables | |||
! use CIrSafetyValveLedNotificationVariables | |||
! use CLatchLedNotificationVariables | |||
! use COpenKellyCockLedNotificationVariables | |||
! use COpenSafetyValveLedNotificationVariables | |||
! use CSlipsNotificationVariables | |||
! use CSwingLedNotificationVariables | |||
! use CTongNotificationVariables | |||
! use CUnlatchLedNotificationVariables | |||
use PermissionsVariables | |||
! use CInstallFillupHeadPermissionVariables | |||
! use CInstallMudBucketPermissionVariables | |||
! use CIrIbopPermissionVariables | |||
! use CIrSafetyValvePermissionVariables | |||
! use CRemoveFillupHeadPermissionVariables | |||
! use CRemoveMudBucketPermissionVariables | |||
use SoftwareInputsVariables | |||
!use CHookHeight | |||
!use CIbopHeight | |||
!use CNearFloorConnection | |||
!use CSafetyValveHeight | |||
!use CSlackOff | |||
!use CStandRack | |||
!use CStringPressure | |||
!use CZeroStringSpeed | |||
! use CStringUpdateVariables | |||
use CUnityInputs | |||
!, only: Get_OutOfMouseHole,& | |||
! Get_Unlatch,& | |||
! Get_Latch,& | |||
! Get_SlipsUnSet,& | |||
! Get_SlipsSet,& | |||
! Get_BreakupTong,& | |||
! Get_MakeupTong,& | |||
! Get_NewHookHeight,& | |||
! Get_ElevatorConnectionPossible,& | |||
! Get_JointConnectionPossible,& | |||
! Get_NearMonkeyBoardPosition,& | |||
! Get_SingleSetInMouseHole,& | |||
! Get_SwingCenter | |||
use CUnityOutputs, only: GetRotaryRpm | |||
use UnitySignalVariables | |||
! use CBucketEnumVariables | |||
! use CElevatorEnumVariables | |||
! use CHeadEnumVariables | |||
! use CIbopEnumVariables | |||
! use CKellyEnumVariables | |||
! use CMouseHoleEnumVariables | |||
! use COperationConditionEnumVariables | |||
! use CSafetyValveEnumVariables | |||
! use CSlipsEnumVariables | |||
! use CSwingEnumVariables | |||
! use CTongEnumVariables | |||
use PermissionsVariables | |||
! use CFillupHeadPermissionVariables | |||
! use CSwingDrillPermissionVariables | |||
! use CSwingOffPermissionVariables | |||
! use CSwingTiltPermissionVariables | |||
! use CTdsStemJointHeight | |||
use CTdsConnectionModesEnumVariables | |||
use CTdsElevatorModesEnumVariables | |||
! use CTdsSpineEnumVariables | |||
! use CTdsSwingEnumVariables | |||
! use CTdsTongEnumVariables | |||
! use CTdsBackupClampVariables | |||
use CHoistingVariables | |||
use CTopDrivePanelVariables | |||
! use CTdsPowerLedNotificationVariables | |||
! use CTdsIbopLedNotificationVariables | |||
use NotificationVariables | |||
! use CTdsTorqueWrenchLedNotificationVariables | |||
module COperationScenariosVariables | |||
implicit none | |||
public | |||
type::OperationScenarioType | |||
@@ -102,76 +14,35 @@ module COperationScenariosVariables | |||
!moved from enum/CElevatorConnectionEnum | |||
integer :: ElevatorConnection = 0 | |||
! type(VoidEventHandlerCollection) :: OnElevatorConnectionChange | |||
!moved from SoftwareOutputs/CStringUpdateVariables | |||
integer :: StringUpdate = 0 | |||
!**type(IntegerEventHandlerCollection) :: OnStringUpdateChange | |||
integer :: KellyConnection = 0 | |||
end type OperationScenarioType | |||
type(OperationScenarioType)::OperationScenario | |||
enum, bind(c) | |||
enumerator STRING_UPDATE_NEUTRAL | |||
enumerator STRING_UPDATE_ADD_SINGLE | |||
enumerator STRING_UPDATE_ADD_STAND | |||
enumerator STRING_UPDATE_REMOVE_SINGLE | |||
enumerator STRING_UPDATE_REMOVE_STAND | |||
end enum | |||
enumerator KELLY_CONNECTION_NOTHING | |||
enumerator KELLY_CONNECTION_STRING | |||
enumerator KELLY_CONNECTION_SINGLE | |||
enumerator ELEVATOR_CONNECTION_NOTHING | |||
enumerator ELEVATOR_CONNECTION_STRING | |||
enumerator ELEVATOR_CONNECTION_STAND | |||
enumerator ELEVATOR_CONNECTION_SINGLE | |||
enumerator ELEVATOR_LATCH_STRING | |||
enumerator ELEVATOR_LATCH_SINGLE | |||
enumerator ELEVATOR_LATCH_STAND | |||
end enum | |||
contains | |||
subroutine Set_StringUpdate(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(OperationScenario%StringUpdate == v) return | |||
#endif | |||
OperationScenario%StringUpdate = v | |||
!**call OperationScenario%OnStringUpdateChange%RunAll(v) | |||
end subroutine | |||
integer function Get_StringUpdate() | |||
implicit none | |||
Get_StringUpdate = OperationScenario%StringUpdate | |||
end function | |||
real(8) function TJH() | |||
use TD_DrillStemComponents | |||
implicit none | |||
TJH = TD_String%TopJointHeight | |||
end function | |||
real function TL() | |||
implicit none | |||
TL = 26.97 | |||
end function | |||
real function NFC() | |||
implicit none | |||
NFC = Get_NearFloorConnection() | |||
end function | |||
subroutine Set_ElevatorConnection(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(OperationScenario%ElevatorConnection == v) return | |||
#endif | |||
OperationScenario%ElevatorConnection = v | |||
#ifdef deb | |||
print*, 'OperationScenario%ElevatorConnection=', OperationScenario%ElevatorConnection | |||
#endif | |||
!**call OperationScenario%OnElevatorConnectionChange%RunAll() | |||
end subroutine | |||
integer function Get_ElevatorConnection() | |||
implicit none | |||
Get_ElevatorConnection = OperationScenario%ElevatorConnection | |||
end function | |||
end module COperationScenariosVariables |
@@ -1,46 +1,68 @@ | |||
module CKellyConnectionEnum | |||
use COperationScenariosVariables | |||
use CLog4 | |||
implicit none | |||
module OperationScenariosModule | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
!! Paseted From ....Variables.f90 | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
! use OperationScenariosModule ! | |||
! use OperationScenariosModule !!CElevator... | |||
! use COperationScenariosVariables | |||
use ConfigurationVariables | |||
use PermissionsModule | |||
use SoftwareInputsVariables | |||
use CUnityInputs | |||
use CUnityOutputs, only: GetRotaryRpm | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
use PermissionsModule | |||
! use CTdsElevatorModesEnumVariables ! | |||
use CHoistingVariables | |||
use ConfigurationVariables | |||
use CTopDrivePanelVariables | |||
use ConfigurationVariables | |||
use NotificationModule | |||
use UnitySignalsModule !for CTdsConnectionModesEnum!!!! | |||
! use CTdsTorqueWrenchLedNotificationVariables ! | |||
contains | |||
subroutine Evaluate_KellyConnection() | |||
! moved from kellyConnectionEnum | |||
subroutine Set_KellyConnection(v) | |||
use CManifolds, Only: KellyConnected, KellyDisconnected | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%OperationScenario%KellyConnection == v) return | |||
#endif | |||
data%State%OperationScenario%KellyConnection = v | |||
if(data%State%OperationScenario%KellyConnection /= KELLY_CONNECTION_STRING) then | |||
call KellyDisconnected() | |||
else | |||
call KellyConnected() | |||
endif | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef deb | |||
print*, 'data%State%OperationScenario%KellyConnection=', data%State%OperationScenario%KellyConnection | |||
#endif | |||
!**call data%State%OperationScenario%OnKellyConnectionChange%RunAll() | |||
end subroutine | |||
integer function Get_KellyConnection() | |||
implicit none | |||
Get_KellyConnection = data%State%OperationScenario%KellyConnection | |||
end function | |||
subroutine Evaluate_KellyConnection() | |||
implicit none | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_KellyConnection=TopDrive' | |||
#endif | |||
endif | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_KellyConnection=Kelly' | |||
#endif | |||
!!OPERATION-CODE=4 | |||
!if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
! Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.& | |||
@@ -71,7 +93,7 @@ module CKellyConnectionEnum | |||
!OPERATION-CODE=2 | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
Get_StringPressure() == 0 .and.& | |||
Get_HookHeight() <= (OperationScenario%HKL + Get_NearFloorConnection()) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HKL + Get_NearFloorConnection()) .and.& | |||
Get_KellyConnection() == KELLY_CONNECTION_STRING .and.& | |||
Get_Swing() == SWING_WELL_END .and.& | |||
!Get_TongNotification() .and.& | |||
@@ -142,16 +164,14 @@ module CKellyConnectionEnum | |||
return | |||
end if | |||
endif | |||
endif | |||
end subroutine | |||
! subroutine Subscribe_KellyConnection() | |||
! use CDrillingConsoleVariables | |||
! use ConfigurationVariables | |||
! use ConfigurationVariables | |||
! implicit none | |||
! call OnBreakoutLeverPress%Add(ButtonPress_Breakout) | |||
@@ -171,5 +191,57 @@ module CKellyConnectionEnum | |||
print*, 'ButtonPress_Makeup on ======> CKellyConnectionEnum' | |||
#endif | |||
end subroutine | |||
subroutine Set_StringUpdate(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%OperationScenario%StringUpdate == v) return | |||
#endif | |||
data%State%OperationScenario%StringUpdate = v | |||
!**call data%State%OperationScenario%OnStringUpdateChange%RunAll(v) | |||
end subroutine | |||
integer function Get_StringUpdate() | |||
implicit none | |||
Get_StringUpdate = data%State%OperationScenario%StringUpdate | |||
end function | |||
real(8) function TJH() | |||
use TD_DrillStemComponents | |||
implicit none | |||
TJH = data%State%TD_String%TopJointHeight | |||
end function | |||
real function TL() | |||
implicit none | |||
TL = 26.97 | |||
end function | |||
real function NFC() | |||
implicit none | |||
NFC = Get_NearFloorConnection() | |||
end function | |||
end module CKellyConnectionEnum | |||
subroutine Set_ElevatorConnection(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%OperationScenario%ElevatorConnection == v) return | |||
#endif | |||
data%State%OperationScenario%ElevatorConnection = v | |||
#ifdef deb | |||
print*, 'data%State%OperationScenario%ElevatorConnection=', data%State%OperationScenario%ElevatorConnection | |||
#endif | |||
!**call data%State%OperationScenario%OnElevatorConnectionChange%RunAll() | |||
end subroutine | |||
integer function Get_ElevatorConnection() | |||
implicit none | |||
Get_ElevatorConnection = data%State%OperationScenario%ElevatorConnection | |||
end function | |||
end module OperationScenariosModule |
@@ -1,5 +1,5 @@ | |||
module CElevatorConnectionEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use CLog3 | |||
use CLog4 | |||
implicit none | |||
@@ -7,11 +7,12 @@ module CElevatorConnectionEnum | |||
subroutine Evaluate_ElevatorConnection() | |||
use CHoistingVariables | |||
use ConfigurationVariables | |||
use CCommon, only: SetStandRack | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_ElevatorConnection=TopDrive' | |||
#endif | |||
@@ -25,7 +26,7 @@ module CElevatorConnectionEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ElevatorConnection=Kelly' | |||
#endif | |||
@@ -54,7 +55,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=78 | |||
if (Get_ElevatorPickup() == .false. .and.& | |||
Get_Tong() == TONG_BREAKOUT_END .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%PL) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) then | |||
call Set_ElevatorConnection(ELEVATOR_LATCH_SINGLE) | |||
return | |||
@@ -63,7 +64,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=79 | |||
if (Get_ElevatorPickup() == .false. .and.& | |||
Get_Tong() == TONG_BREAKOUT_END .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%SL - OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SL - data%State%OperationScenario%LG) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) then | |||
call Set_ElevatorConnection(ELEVATOR_LATCH_STAND) | |||
return | |||
@@ -229,7 +230,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=13 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%PL) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.& | |||
!Get_Swing() == SWING_WELL_END .and.& | |||
!Get_TongNotification() .and.& | |||
@@ -245,7 +246,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=14 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%PL) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.& | |||
!Get_Swing() == SWING_WELL_END .and.& | |||
!Get_TongNotification() .and.& | |||
@@ -261,7 +262,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=15 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%SL - OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SL - data%State%OperationScenario%LG) .and.& | |||
!Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL - RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.& | |||
!Get_Swing() == SWING_WELL_END .and.& | |||
@@ -322,6 +323,8 @@ module CElevatorConnectionEnum | |||
! subroutine Subscribe_ElevatorConnection() | |||
! use CDrillingConsoleVariables | |||
! use ConfigurationVariables | |||
! use ConfigurationVariables | |||
! implicit none | |||
! call OnLatchPipePress%Add(ButtonPress_Latch_ElevatorConnection) | |||
! call OnUnlatchPipePress%Add(ButtonPress_Unlatch_ElevatorConnection) | |||
@@ -339,7 +342,7 @@ module CElevatorConnectionEnum | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Latch_ElevatorConnection=TopDrive' | |||
#endif | |||
@@ -348,7 +351,7 @@ module CElevatorConnectionEnum | |||
!TOPDRIVE-CODE=73 | |||
if ((Get_HookHeight() >= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC() + OperationScenario%TG)) .and.& | |||
if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_LatchLed()) then | |||
@@ -365,7 +368,7 @@ module CElevatorConnectionEnum | |||
!TOPDRIVE-CODE=74 | |||
if (Get_HookHeight() <= (TL() + NFC() - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() - data%State%OperationScenario%ECG) .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_ElevatorConnectionPossible() .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.& | |||
@@ -411,20 +414,20 @@ module CElevatorConnectionEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Latch_ElevatorConnection=Kelly' | |||
#endif | |||
!OPERATION-CODE=86 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() - OperationScenario%ECG) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() - data%State%OperationScenario%ECG) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.& | |||
Get_LatchLed() .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_Swing() == SWING_WELL_END .and.& | |||
Get_ElevatorConnectionPossible() .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection())) then | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection())) then | |||
!call Log_4("OPERATION-CODE=ELEVATOR_LATCH_STRING_BEGIN") | |||
call Set_Elevator(ELEVATOR_LATCH_STRING_BEGIN) | |||
@@ -434,7 +437,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=85 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection() + OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.& | |||
Get_LatchLed() .and.& | |||
Get_Swing() == SWING_WELL_END) then | |||
@@ -482,7 +485,7 @@ module CElevatorConnectionEnum | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Unlatch_ElevatorConnection=TopDrive' | |||
#endif | |||
@@ -490,7 +493,7 @@ module CElevatorConnectionEnum | |||
!TOPDRIVE-CODE=76 | |||
if ((Get_HookHeight() >= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC() + OperationScenario%TG)) .and.& | |||
if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STAND .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_UnlatchLed()) then | |||
@@ -508,7 +511,7 @@ module CElevatorConnectionEnum | |||
!TOPDRIVE-CODE=77 | |||
if (Get_HookHeight() <= (TL() + NFC() - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() - data%State%OperationScenario%ECG) .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.& | |||
(Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_STRING .or. Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING) .and.& | |||
@@ -527,7 +530,7 @@ module CElevatorConnectionEnum | |||
!TOPDRIVE-CODE=78 | |||
if ((Get_HookHeight() > TL() .and. Get_HookHeight() < (TL() + NFC() + OperationScenario%SG)) .and.& | |||
if ((Get_HookHeight() > TL() .and. Get_HookHeight() < (TL() + NFC() + data%State%OperationScenario%SG)) .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE .and.& | |||
Get_TdsSwing() == TDS_SWING_TILT_END .and.& | |||
Get_UnlatchLed() .and.& | |||
@@ -550,15 +553,15 @@ module CElevatorConnectionEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Unlatch_ElevatorConnection=Kelly' | |||
#endif | |||
!OPERATION-CODE=89 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() - OperationScenario%ECG) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() - data%State%OperationScenario%ECG) .and.& | |||
(Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection()) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection()) .and.& | |||
Get_UnlatchLed() .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_Swing() == SWING_WELL_END .and.& | |||
@@ -572,7 +575,7 @@ module CElevatorConnectionEnum | |||
!OPERATION-CODE=88 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection() + OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.& | |||
!Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL + RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG) | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_STAND .and.& | |||
Get_UnlatchLed() .and.& | |||
@@ -587,7 +590,7 @@ module CElevatorConnectionEnum | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.& | |||
Get_UnlatchLed() .and.& | |||
Get_HookHeight() >= OperationScenario%HL .and. Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%SG) .and.& | |||
Get_HookHeight() >= data%State%OperationScenario%HL .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SG) .and.& | |||
!Get_JointConnectionPossible() .and.& | |||
Get_Swing() == SWING_MOUSE_HOLE_END) then | |||
@@ -1,47 +0,0 @@ | |||
module CElevatorConnectionEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
! Mahmood: this variable moved to operationscenariocommon | |||
! integer :: OperationScenario%ElevatorConnection = 0 | |||
! ! type(VoidEventHandlerCollection) :: OnElevatorConnectionChange | |||
public | |||
enum, bind(c) | |||
enumerator ELEVATOR_CONNECTION_NOTHING | |||
enumerator ELEVATOR_CONNECTION_STRING | |||
enumerator ELEVATOR_CONNECTION_STAND | |||
enumerator ELEVATOR_CONNECTION_SINGLE | |||
enumerator ELEVATOR_LATCH_STRING | |||
enumerator ELEVATOR_LATCH_SINGLE | |||
enumerator ELEVATOR_LATCH_STAND | |||
end enum | |||
! private :: OperationScenario%ElevatorConnection | |||
contains | |||
! subroutine Set_ElevatorConnection_WN(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Set_ElevatorConnection_WN | |||
! !DEC$ ATTRIBUTES ALIAS: 'Set_ElevatorConnection_WN' :: Set_ElevatorConnection_WN | |||
! implicit none | |||
! integer , intent(in) :: v | |||
! call Set_ElevatorConnection(v) | |||
! end subroutine | |||
! integer function Get_ElevatorConnection_WN() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Get_ElevatorConnection_WN | |||
! !DEC$ ATTRIBUTES ALIAS: 'Get_ElevatorConnection_WN' :: Get_ElevatorConnection_WN | |||
! implicit none | |||
! Get_ElevatorConnection_WN = OperationScenario%ElevatorConnection | |||
! end function | |||
end module CElevatorConnectionEnumVariables |
@@ -1,68 +0,0 @@ | |||
module CKellyConnectionEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
type::KellyConnectionEnumType | |||
integer :: KellyConnection = 0 | |||
! type(VoidEventHandlerCollection) :: OnKellyConnectionChange | |||
end type KellyConnectionEnumType | |||
type(KellyConnectionEnumType)::KellyConnectionEnum | |||
! public | |||
enum, bind(c) | |||
enumerator KELLY_CONNECTION_NOTHING | |||
enumerator KELLY_CONNECTION_STRING | |||
enumerator KELLY_CONNECTION_SINGLE | |||
end enum | |||
! private :: OperationScenario%KellyConnection | |||
contains | |||
subroutine Set_KellyConnection(v) | |||
use CManifolds, Only: KellyConnected, KellyDisconnected | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(KellyConnectionEnum%KellyConnection == v) return | |||
#endif | |||
KellyConnectionEnum%KellyConnection = v | |||
if(KellyConnectionEnum%KellyConnection /= KELLY_CONNECTION_STRING) then | |||
call KellyDisconnected() | |||
else | |||
call KellyConnected() | |||
endif | |||
#ifdef deb | |||
print*, 'KellyConnectionEnum%KellyConnection=', KellyConnectionEnum%KellyConnection | |||
#endif | |||
!**call KellyConnectionEnum%OnKellyConnectionChange%RunAll() | |||
end subroutine | |||
integer function Get_KellyConnection() | |||
implicit none | |||
Get_KellyConnection = KellyConnectionEnum%KellyConnection | |||
end function | |||
! subroutine Set_KellyConnection_WN(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Set_KellyConnection_WN | |||
! !DEC$ ATTRIBUTES ALIAS: 'Set_KellyConnection_WN' :: Set_KellyConnection_WN | |||
! implicit none | |||
! integer , intent(in) :: v | |||
! call Set_KellyConnection(v) | |||
! end subroutine | |||
! integer function Get_KellyConnection_WN() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Get_KellyConnection_WN | |||
! !DEC$ ATTRIBUTES ALIAS: 'Get_KellyConnection_WN' :: Get_KellyConnection_WN | |||
! implicit none | |||
! Get_KellyConnection_WN = OperationScenario%KellyConnection | |||
! end function | |||
end module CKellyConnectionEnumVariables |
@@ -1,81 +0,0 @@ | |||
module CTdsConnectionModesEnum | |||
use COperationScenariosVariables | |||
implicit none | |||
contains | |||
subroutine Evaluate_TdsConnectionModes() | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsConnectionModes=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=3 | |||
if (Get_TdsStemIn() .and.& | |||
Get_TdsSpine() == TDS_SPINE_CONNECT_END .and.& | |||
!TopDriveDrillTorqueState == TdsMu_SPINE | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING) then | |||
call Set_TdsConnectionModes(TDS_CONNECTION_SPINE) | |||
return | |||
end if | |||
!TOPDRIVE-CODE=4 | |||
if (Get_TdsTong() == TDS_TONG_MAKEUP_END .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_SPINE ) then | |||
call Set_TdsConnectionModes(TDS_CONNECTION_STRING) | |||
TopDrivePanel%TopDriveTorqueWrenchLed = LED_OFF | |||
return | |||
end if | |||
!TOPDRIVE-CODE=5 | |||
if (Get_TdsTong() == TDS_TONG_BREAKOUT_END .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_STRING ) then | |||
call Set_TdsConnectionModes(TDS_CONNECTION_SPINE) | |||
TopDrivePanel%TopDriveTorqueWrenchLed = LED_OFF | |||
return | |||
end if | |||
!TOPDRIVE-CODE=6 | |||
if (Get_TdsSpine() == TDS_SPINE_DISCONNECT_END .and.& | |||
!Get_TdsStemIn() == .false. .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_SPINE) then | |||
call Set_TdsConnectionModes(TDS_CONNECTION_NOTHING) | |||
return | |||
end if | |||
endif | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsConnectionModes=Kelly' | |||
#endif | |||
endif | |||
end subroutine | |||
subroutine Subscribe_TdsConnectionModes() | |||
use CDrillingConsoleVariables | |||
implicit none | |||
end subroutine | |||
end module CTdsConnectionModesEnum |
@@ -1,67 +0,0 @@ | |||
module CTdsConnectionModesEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
type:: TdsConnectionModesEnumType | |||
integer :: TdsConnectionModes = 0 | |||
! type(VoidEventHandlerCollection) :: OnTdsConnectionModesChange | |||
end type TdsConnectionModesEnumType | |||
type(TdsConnectionModesEnumType)::TdsConnectionModesEnum | |||
enum, bind(c) | |||
enumerator TDS_CONNECTION_NOTHING | |||
enumerator TDS_CONNECTION_STRING | |||
enumerator TDS_CONNECTION_SPINE | |||
end enum | |||
! private :: TdsConnectionModesEnum%TdsConnectionModes | |||
contains | |||
subroutine Set_TdsConnectionModes(v) | |||
use CManifolds, Only: KellyConnected, KellyDisconnected | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(TdsConnectionModesEnum%TdsConnectionModes == v) return | |||
#endif | |||
TdsConnectionModesEnum%TdsConnectionModes = v | |||
if(TdsConnectionModesEnum%TdsConnectionModes == TDS_CONNECTION_NOTHING) then | |||
call KellyDisconnected() | |||
else | |||
call KellyConnected() | |||
endif | |||
#ifdef deb | |||
print*, 'TdsConnectionModesEnum%TdsConnectionModes=', TdsConnectionModesEnum%TdsConnectionModes | |||
#endif | |||
!**call TdsConnectionModesEnum%OnTdsConnectionModesChange%RunAll() | |||
end subroutine | |||
integer function Get_TdsConnectionModes() | |||
implicit none | |||
Get_TdsConnectionModes = TdsConnectionModesEnum%TdsConnectionModes | |||
end function | |||
subroutine Set_TdsConnectionModes_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsConnectionModes_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_TdsConnectionModes_WN' :: Set_TdsConnectionModes_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_TdsConnectionModes(v) | |||
end subroutine | |||
integer function Get_TdsConnectionModes_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsConnectionModes_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_TdsConnectionModes_WN' :: Get_TdsConnectionModes_WN | |||
implicit none | |||
Get_TdsConnectionModes_WN = TdsConnectionModesEnum%TdsConnectionModes | |||
end function | |||
end module CTdsConnectionModesEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CTdsElevatorModesEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -7,7 +7,7 @@ module CTdsElevatorModesEnum | |||
use CCommon, only: SetStandRack | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsElevatorModes=TopDrive' | |||
#endif | |||
@@ -26,7 +26,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=8 | |||
if (Get_HookHeight() <= (TL() + TJH() - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + TJH() - data%State%OperationScenario%ECG) .and.& | |||
Get_ElevatorPickup() == .false. .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING) then | |||
@@ -132,7 +132,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=16 | |||
if (Get_HookHeight() <= (TL() + NFC() + OperationScenario%PL - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG) .and.& | |||
Get_Tong() == TONG_BREAKOUT_END .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_STRING .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING) then | |||
@@ -147,7 +147,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=17 | |||
if (Get_HookHeight() <= (TL() + NFC() + OperationScenario%PL - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG) .and.& | |||
Get_Tong() == TONG_BREAKOUT_END .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING) then | |||
@@ -172,7 +172,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=19 | |||
if (Get_HookHeight() <= (TL() + NFC() + OperationScenario%PL - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG) .and.& | |||
Get_ElevatorPickup() == .false. .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_SINGLE) then | |||
@@ -212,7 +212,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=22 | |||
if (Get_HookHeight() <= (TL() + NFC() + OperationScenario%SL - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG) .and.& | |||
Get_Tong() == TONG_BREAKOUT_END .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_LATCH_STRING .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING) then | |||
@@ -226,7 +226,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=23 | |||
if (Get_HookHeight() <= (TL() + NFC() + OperationScenario%SL - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG) .and.& | |||
Get_Tong() == TONG_BREAKOUT_END .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STRING .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING) then | |||
@@ -252,7 +252,7 @@ module CTdsElevatorModesEnum | |||
!TOPDRIVE-CODE=25 | |||
if (Get_HookHeight() <= (TL() + NFC() + OperationScenario%SL - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG) .and.& | |||
Get_ElevatorPickup() == .false. .and.& | |||
Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_STAND) then | |||
@@ -311,7 +311,7 @@ module CTdsElevatorModesEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TdsElevatorModes=Kelly' | |||
#endif | |||
@@ -324,6 +324,8 @@ module CTdsElevatorModesEnum | |||
subroutine Subscribe_TdsElevatorModes() | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
end subroutine | |||
@@ -1,61 +0,0 @@ | |||
module CTdsElevatorModesEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
type:: TdsElevatorModesEnumType | |||
integer :: TdsElevatorModes = 0 | |||
! type(VoidEventHandlerCollection) :: OnTdsElevatorModesChange | |||
end type TdsElevatorModesEnumType | |||
type(TdsElevatorModesEnumType)::TdsElevatorModesEnum | |||
enum, bind(c) | |||
enumerator TDS_ELEVATOR_CONNECTION_NOTHING | |||
enumerator TDS_ELEVATOR_CONNECTION_STRING | |||
enumerator TDS_ELEVATOR_CONNECTION_SINGLE | |||
enumerator TDS_ELEVATOR_CONNECTION_STAND | |||
enumerator TDS_ELEVATOR_LATCH_STRING | |||
enumerator TDS_ELEVATOR_LATCH_SINGLE | |||
enumerator TDS_ELEVATOR_LATCH_STAND | |||
end enum | |||
! private :: TdsElevatorModesEnum%TdsElevatorModes | |||
contains | |||
subroutine Set_TdsElevatorModes(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(TdsElevatorModesEnum%TdsElevatorModes == v) return | |||
#endif | |||
TdsElevatorModesEnum%TdsElevatorModes = v | |||
!**call TdsElevatorModesEnum%OnTdsElevatorModesChange%RunAll() | |||
end subroutine | |||
integer function Get_TdsElevatorModes() | |||
implicit none | |||
Get_TdsElevatorModes = TdsElevatorModesEnum%TdsElevatorModes | |||
end function | |||
subroutine Set_TdsElevatorModes_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsElevatorModes_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_TdsElevatorModes_WN' :: Set_TdsElevatorModes_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_TdsElevatorModes(v) | |||
end subroutine | |||
integer function Get_TdsElevatorModes_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsElevatorModes_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_TdsElevatorModes_WN' :: Get_TdsElevatorModes_WN | |||
implicit none | |||
Get_TdsElevatorModes_WN = TdsElevatorModesEnum%TdsElevatorModes | |||
end function | |||
end module CTdsElevatorModesEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CCloseKellyCockLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -33,6 +33,8 @@ module CCloseKellyCockLedNotification | |||
! subroutine Subscribe_CloseKellyCockLed() | |||
! use CDrillingConsoleVariables | |||
! use ConfigurationVariables | |||
! use ConfigurationVariables | |||
! implicit none | |||
! call OnCloseKellyCockPress%Add(ButtonPress_CloseKellyCock) | |||
! end subroutine | |||
@@ -41,13 +43,13 @@ module CCloseKellyCockLedNotification | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseKellyCockLed=TopDrive' | |||
#endif | |||
endif | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseKellyCockLed=Kelly' | |||
#endif | |||
@@ -1,5 +1,5 @@ | |||
module CCloseSafetyValveLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -32,6 +32,8 @@ module CCloseSafetyValveLedNotification | |||
! subroutine Subscribe_CloseSafetyValveLed() | |||
! use CDrillingConsoleVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
! implicit none | |||
! call OnCloseSafetyValvePress%Add(ButtonPress_CloseSafetyValve) | |||
! call OnOperationConditionChangeInt%Add(Set_Operation_CloseSafetyValveLed) | |||
@@ -41,11 +43,11 @@ module CCloseSafetyValveLedNotification | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(Notifications%operation_CloseSafetyValveLed == v) return | |||
if(data%State%notifications%operation_CloseSafetyValveLed == v) return | |||
#endif | |||
Notifications%operation_CloseSafetyValveLed = v | |||
data%State%notifications%operation_CloseSafetyValveLed = v | |||
#ifdef deb | |||
print*, 'operation_CloseSafetyValveLed=', Notifications%operation_CloseSafetyValveLed | |||
print*, 'operation_CloseSafetyValveLed=', data%State%notifications%operation_CloseSafetyValveLed | |||
#endif | |||
end subroutine | |||
@@ -55,7 +57,7 @@ module CCloseSafetyValveLedNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseSafetyValveLed=TopDrive' | |||
#endif | |||
@@ -82,7 +84,7 @@ module CCloseSafetyValveLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_CloseSafetyValveLed=Kelly' | |||
#endif | |||
@@ -1,53 +1,20 @@ | |||
module CFillMouseHoleLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use NotificationModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_FillMouseHoleLed() | |||
implicit none | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_FillMouseHoleLed=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_FillMouseHoleLed=Kelly' | |||
!#endif | |||
! endif | |||
implicit none | |||
end subroutine | |||
! subroutine Subscribe_FillMouseHoleLed() | |||
! use CDrillingConsoleVariables | |||
! implicit none | |||
! call OnFillMouseHolePress%Add(ButtonPress_FillMouseHole) | |||
! end subroutine | |||
subroutine ButtonPress_FillMouseHole() | |||
! use OperationScenariosModule | |||
use UnitySignalsModule | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillMouseHoleLed=TopDrive' | |||
#endif | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
!TOPDRIVE-CODE=71 | |||
if (Get_FillMouseHoleLed()) then | |||
@@ -66,23 +33,9 @@ module CFillMouseHoleLedNotification | |||
return | |||
end if | |||
endif | |||
endif | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillMouseHoleLed=Kelly' | |||
#endif | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
!OPERATION-CODE=81 | |||
@@ -99,16 +52,10 @@ module CFillMouseHoleLedNotification | |||
call Set_FillMouseHoleLed(.true.) | |||
call Set_MouseHole(MOUSE_HOLE_FILL) | |||
return | |||
end if | |||
end if | |||
endif | |||
end subroutine | |||
end module CFillMouseHoleLedNotification |
@@ -1,6 +1,7 @@ | |||
module CIrIBopLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
! use CTopDrivePanelVariables | |||
use ConfigurationVariables | |||
implicit none | |||
contains | |||
@@ -35,6 +36,8 @@ module CIrIBopLedNotification | |||
! subroutine Subscribe_IrIBopLed() | |||
! use CDrillingConsoleVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
! implicit none | |||
! call OnIRIBopPress%Add(ButtonPress_IrIBop) | |||
! end subroutine | |||
@@ -46,7 +49,7 @@ module CIrIBopLedNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIBopLed=TopDrive' | |||
#endif | |||
@@ -67,7 +70,7 @@ module CIrIBopLedNotification | |||
!TOPDRIVE-CODE=60 | |||
if (Get_IrIbopPermission() .and.& | |||
Get_IrIBopLed() == .true. .and.& | |||
TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF) then | |||
call Set_IrIBopLed(.false.) | |||
return | |||
@@ -84,7 +87,7 @@ module CIrIBopLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIBopLed=Kelly' | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
module CIrSafetyValveLedNotification | |||
use COperationScenariosVariables | |||
!use COperationConditionEnumVariables | |||
use OperationScenariosModule | |||
!use UnitySignalsModuleVariables | |||
implicit none | |||
contains | |||
@@ -11,7 +11,7 @@ module CIrSafetyValveLedNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||
#endif | |||
@@ -31,7 +31,7 @@ module CIrSafetyValveLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||
#endif | |||
@@ -64,6 +64,8 @@ module CIrSafetyValveLedNotification | |||
! subroutine Subscribe_IrSafetyValveLed() | |||
! use CDrillingConsoleVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
! implicit none | |||
! call OnIRSafetyValvePress%Add(ButtonPress_IrSafetyValve) | |||
! call OnOperationConditionChangeInt%Add(Set_Operation_IrSafetyValveLed) | |||
@@ -73,11 +75,11 @@ module CIrSafetyValveLedNotification | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(Notifications%operation_IrSafetyValveLed == v) return | |||
if(data%State%notifications%operation_IrSafetyValveLed == v) return | |||
#endif | |||
Notifications%operation_IrSafetyValveLed = v | |||
data%State%notifications%operation_IrSafetyValveLed = v | |||
#ifdef deb | |||
print*, 'operation_IrSafetyValveLed=', Notifications%operation_IrSafetyValveLed | |||
print*, 'operation_IrSafetyValveLed=', data%State%notifications%operation_IrSafetyValveLed | |||
#endif | |||
end subroutine | |||
@@ -87,7 +89,7 @@ module CIrSafetyValveLedNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=TopDrive' | |||
#endif | |||
@@ -126,7 +128,7 @@ module CIrSafetyValveLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValveLed=Kelly' | |||
#endif | |||
@@ -1,5 +1,5 @@ | |||
module CLatchLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use CLog4 | |||
implicit none | |||
contains | |||
@@ -11,14 +11,14 @@ module CLatchLedNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_LatchLed=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=44 | |||
if (Get_HookHeight() <= (TL() + NFC() - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() - data%State%OperationScenario%ECG) .and.& | |||
Get_ElevatorConnectionPossible() .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
@@ -41,7 +41,7 @@ module CLatchLedNotification | |||
!TOPDRIVE-CODE=45 | |||
if ((Get_HookHeight() >= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC() + OperationScenario%TG)) .and.& | |||
if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.& | |||
GetStandRack() > 0 .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
@@ -64,7 +64,7 @@ module CLatchLedNotification | |||
!TOPDRIVE-CODE=46 | |||
if ((Get_HookHeight() >= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC() + OperationScenario%TG)) .and.& | |||
if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.& | |||
Get_ElevatorConnectionPossible() .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
@@ -106,14 +106,14 @@ module CLatchLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_LatchLed=Kelly' | |||
#endif | |||
!OPERATION-CODE=36 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() - OperationScenario%ECG) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() - data%State%OperationScenario%ECG) .and.& | |||
Get_ElevatorConnectionPossible() .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
@@ -137,7 +137,7 @@ module CLatchLedNotification | |||
!OPERATION-CODE=37 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_StandRack() > 0 .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection() + OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
@@ -228,7 +228,7 @@ module CLatchLedNotification | |||
end subroutine | |||
! subroutine Subscribe_LatchLed() | |||
! use COperationConditionEnumVariables | |||
! use UnitySignalsModuleVariables | |||
! use CStandRack | |||
! use CUnityInputs, OnElevatorConnectionChangePosibility => OnElevatorConnectionPossibleChange | |||
! use CSwingEnumVariables | |||
@@ -1,5 +1,5 @@ | |||
module COpenKellyCockLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -24,6 +24,8 @@ module COpenKellyCockLedNotification | |||
! subroutine Subscribe_OpenKellyCockLed() | |||
! use CDrillingConsoleVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
! implicit none | |||
! call OnOpenKellyCockPress%Add(ButtonPress_OpenKellyCock) | |||
! end subroutine | |||
@@ -32,7 +34,7 @@ module COpenKellyCockLedNotification | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenKellyCock=TopDrive' | |||
#endif | |||
@@ -41,7 +43,7 @@ module COpenKellyCockLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenKellyCock=Kelly' | |||
#endif | |||
@@ -1,5 +1,5 @@ | |||
module COpenSafetyValveLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -33,6 +33,8 @@ module COpenSafetyValveLedNotification | |||
! subroutine Subscribe_OpenSafetyValveLed() | |||
! use CDrillingConsoleVariables | |||
! use ConfigurationVariables | |||
! use ConfigurationVariables | |||
! implicit none | |||
! call OnOpenSafetyValvePress%Add(ButtonPress_OpenSafetyValve) | |||
! call OnOperationConditionChangeInt%Add(Set_Operation_OpenSafetyValveLed) | |||
@@ -43,11 +45,11 @@ module COpenSafetyValveLedNotification | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%operation_OpenSafetyValveLed == v) return | |||
if(data%State%notifications%operation_OpenSafetyValveLed == v) return | |||
#endif | |||
notifications%operation_OpenSafetyValveLed = v | |||
data%State%notifications%operation_OpenSafetyValveLed = v | |||
#ifdef deb | |||
print*, 'notifications%operation_OpenSafetyValveLed=', notifications%operation_OpenSafetyValveLed | |||
print*, 'data%State%notifications%operation_OpenSafetyValveLed=', data%State%notifications%operation_OpenSafetyValveLed | |||
#endif | |||
end subroutine | |||
@@ -56,7 +58,7 @@ module COpenSafetyValveLedNotification | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenSafetyValve=TopDrive' | |||
#endif | |||
@@ -80,7 +82,7 @@ module COpenSafetyValveLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_OpenSafetyValve=Kelly' | |||
#endif | |||
@@ -1,5 +1,5 @@ | |||
module CSlipsNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -9,7 +9,7 @@ module CSlipsNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SlipsNotification=TopDrive' | |||
#endif | |||
@@ -52,7 +52,7 @@ module CSlipsNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SlipsNotification=Kelly' | |||
#endif | |||
@@ -125,7 +125,7 @@ module CSlipsNotification | |||
! call OnSlackOffChange%Add(Evaluate_SlipsNotification) | |||
! call OnZeroStringSpeedChange%Add(Evaluate_SlipsNotification) | |||
! call OnNearFloorConnectionChange%Add(Evaluate_SlipsNotification) | |||
! call OperationScenario%OnElevatorConnectionChange%Add(Evaluate_SlipsNotification) | |||
! call data%State%OperationScenario%OnElevatorConnectionChange%Add(Evaluate_SlipsNotification) | |||
! call OnKellyConnectionChange%Add(Evaluate_SlipsNotification) | |||
! call OnSlipsChange%Add(Evaluate_SlipsNotification) | |||
@@ -1,5 +1,5 @@ | |||
module CSwingLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -10,7 +10,7 @@ module CSwingLedNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingLed=TopDrive' | |||
#endif | |||
@@ -27,7 +27,7 @@ module CSwingLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingLed=Kelly' | |||
#endif | |||
@@ -35,7 +35,7 @@ module CSwingLedNotification | |||
!OPERATION-CODE=22 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + Get_NearFloorConnection()) .and. Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
(Get_Swing() /= SWING_WELL_BEGIN .and.& | |||
@@ -50,7 +50,7 @@ module CSwingLedNotification | |||
!OPERATION-CODE=23 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%PL) .and. Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%LG + OperationScenario%PL) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%LG + data%State%OperationScenario%PL) .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_SINGLE .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
(Get_Swing() /= SWING_WELL_BEGIN .and.& | |||
@@ -65,7 +65,7 @@ module CSwingLedNotification | |||
!OPERATION-CODE=24 | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
Get_HookHeight() >= (OperationScenario%HKL + Get_NearFloorConnection()) .and. Get_HookHeight() <= (OperationScenario%HKL + Get_NearFloorConnection() + OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
Get_KellyConnection() == KELLY_CONNECTION_NOTHING .and.& | |||
(Get_Swing() /= SWING_WELL_BEGIN .and.& | |||
@@ -79,7 +79,7 @@ module CSwingLedNotification | |||
!OPERATION-CODE=25 | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
Get_HookHeight() >= (OperationScenario%HKL + Get_NearFloorConnection() + OperationScenario%PL) .and. Get_HookHeight() <= (OperationScenario%HKL + Get_NearFloorConnection() + OperationScenario%LG + OperationScenario%PL) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%PL) .and. Get_HookHeight() <= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%LG + data%State%OperationScenario%PL) .and.& | |||
Get_KellyConnection() == KELLY_CONNECTION_SINGLE .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
(Get_Swing() /= SWING_WELL_BEGIN .and.& | |||
@@ -1,5 +1,5 @@ | |||
module CTdsIbopLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -8,7 +8,7 @@ module CTdsIbopLedNotification | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IbopLed=TopDrive' | |||
#endif | |||
@@ -18,11 +18,11 @@ module CTdsIbopLedNotification | |||
!TOPDRIVE-CODE=61 | |||
if (Get_IbopLed() == .false. .and.& | |||
TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF .and.& | |||
TopDrivePanel%TopDriveIbop == .false.) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF .and.& | |||
data%EquipmentControl%TopDrivePanel%TopDriveIbop == .false.) then | |||
call Set_IbopLed(.true.) | |||
TopDrivePanel%TopDriveLinkTiltLed = LED_OFF | |||
data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltLed = LED_OFF | |||
return | |||
end if | |||
@@ -31,11 +31,11 @@ module CTdsIbopLedNotification | |||
!TOPDRIVE-CODE=62 | |||
if (Get_IbopLed() .and.& | |||
TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF .and.& | |||
TopDrivePanel%TopDriveIbop) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF .and.& | |||
data%EquipmentControl%TopDrivePanel%TopDriveIbop) then | |||
call Set_IbopLed(.false.) | |||
TopDrivePanel%TopDriveLinkTiltLed = LED_ON | |||
data%EquipmentControl%TopDrivePanel%TopDriveLinkTiltLed = LED_ON | |||
return | |||
end if | |||
@@ -1,5 +1,6 @@ | |||
module CTdsPowerLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use ConfigurationVariables | |||
implicit none | |||
contains | |||
@@ -8,13 +9,13 @@ module CTdsPowerLedNotification | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_PowerLed=TopDrive' | |||
#endif | |||
!TOPDRIVE-CODE=63 | |||
if (TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF) then | |||
if (data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState == TdsPower_OFF) then | |||
call Set_PowerLed(.true.) | |||
return | |||
end if | |||
@@ -28,7 +29,7 @@ module CTdsPowerLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_PowerLed=Kelly' | |||
#endif | |||
@@ -1,12 +1,12 @@ | |||
module CTdsTorqueWrenchLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_TorqueWrenchLed() | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TorqueWrenchLed=TopDrive' | |||
#endif | |||
@@ -14,14 +14,14 @@ module CTdsTorqueWrenchLedNotification | |||
!TOPDRIVE-CODE=81 | |||
if((Get_TdsBackupClamp() == BACKUP_CLAMP_OFF_BEGIN .or.& | |||
Get_TdsBackupClamp() == BACKUP_CLAMP_FW_BEGIN) .and.& | |||
TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
call Set_TorqueWrenchLed(LED_BLINK) | |||
return | |||
endif | |||
!TOPDRIVE-CODE=81 | |||
if(Get_TdsBackupClamp() == BACKUP_CLAMP_FW_END .and.& | |||
TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
call Set_TorqueWrenchLed(LED_ON) | |||
return | |||
endif | |||
@@ -39,7 +39,7 @@ module CTdsTorqueWrenchLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingLed=Kelly' | |||
#endif | |||
@@ -1,5 +1,5 @@ | |||
module CTongNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -10,7 +10,7 @@ module CTongNotification | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TongNotification=TopDrive' | |||
#endif | |||
@@ -19,8 +19,8 @@ module CTongNotification | |||
!TOPDRIVE-CODE=50 | |||
if (((Get_HookHeight() >= (TL() + OperationScenario%PL - OperationScenario%ECG + NFC() - OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + OperationScenario%PL - OperationScenario%ECG + OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC() - OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + OperationScenario%SL - OperationScenario%ECG + OperationScenario%TG))).and.& | |||
if (((Get_HookHeight() >= (TL() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + NFC() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG))).and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.& | |||
((Get_Tong() /= TONG_BREAKOUT_BEGIN .and.& | |||
@@ -86,7 +86,7 @@ module CTongNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_TongNotification=Kelly' | |||
#endif | |||
@@ -95,8 +95,8 @@ module CTongNotification | |||
if (Get_OperationCondition() == OPERATION_DRILL .and.& | |||
!((Get_HookHeight() >= 65.0 .and. Get_HookHeight() <= 70.0) .or.& | |||
! (Get_HookHeight() >= 96.0 .and. Get_HookHeight() <= 101.0)).and.& | |||
((Get_HookHeight() >= (OperationScenario%HKL + Get_NearFloorConnection() - OperationScenario%RE) .and. Get_HookHeight() <= (OperationScenario%HKL + Get_NearFloorConnection() + OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (OperationScenario%HKL + Get_NearFloorConnection() + OperationScenario%PL -OperationScenario%RE) .and. Get_HookHeight() <= (OperationScenario%HKL + Get_NearFloorConnection() + OperationScenario%TG + OperationScenario%PL))).and.& | |||
((Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%PL -data%State%OperationScenario%RE) .and. Get_HookHeight() <= (data%State%OperationScenario%HKL + Get_NearFloorConnection() + data%State%OperationScenario%TG + data%State%OperationScenario%PL))).and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_KellyConnection() == KELLY_CONNECTION_STRING .and.& | |||
Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.& | |||
@@ -189,8 +189,8 @@ module CTongNotification | |||
!OPERATION-CODE=50 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
((Get_HookHeight() >= (OperationScenario%HL + OperationScenario%PL - OperationScenario%ECG + Get_NearFloorConnection() - OperationScenario%RE) .and. Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%PL - OperationScenario%ECG + OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection() - OperationScenario%RE) .and. Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%TG - OperationScenario%ECG + OperationScenario%SL))).and.& | |||
((Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + Get_NearFloorConnection() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%PL - data%State%OperationScenario%ECG + data%State%OperationScenario%TG)) .or.& | |||
(Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() - data%State%OperationScenario%RE) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%TG - data%State%OperationScenario%ECG + data%State%OperationScenario%SL))).and.& | |||
Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.& | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
Get_ElevatorConnection() == ELEVATOR_CONNECTION_STRING .and.& | |||
@@ -271,14 +271,14 @@ module CTongNotification | |||
! subroutine Subscribe_TongNotification() | |||
! implicit none | |||
! call UnitySignals%OnOperationConditionChange%Add(Evaluate_TongNotification) | |||
! call data%State%unitySignals%OnOperationConditionChange%Add(Evaluate_TongNotification) | |||
! ! call softwareInputs%OnHookHeightChange%Add(Evaluate_TongNotification) | |||
! call UnityInputs%OnJointConnectionPossibleChange%Add(Evaluate_TongNotification) | |||
! call UnityInputs%OnSingleSetInMouseHoleChange%Add(Evaluate_TongNotification) | |||
! call OperationScenario%OnElevatorConnectionChange%Add(Evaluate_TongNotification) | |||
! call data%State%OperationScenario%OnElevatorConnectionChange%Add(Evaluate_TongNotification) | |||
! call KellyConnectionEnum%OnKellyConnectionChange%Add(Evaluate_TongNotification) | |||
! call UnitySignals%OnSwingChange%Add(Evaluate_TongNotification) | |||
! call UnitySignals%OnSlipsChange%Add(Evaluate_TongNotification) | |||
! call data%State%unitySignals%OnSwingChange%Add(Evaluate_TongNotification) | |||
! call data%State%unitySignals%OnSlipsChange%Add(Evaluate_TongNotification) | |||
! end subroutine | |||
@@ -1,5 +1,5 @@ | |||
module CUnlatchLedNotification | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use CLog4 | |||
implicit none | |||
contains | |||
@@ -9,7 +9,7 @@ module CUnlatchLedNotification | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_UnlatchLed=TopDrive' | |||
#endif | |||
@@ -17,7 +17,7 @@ module CUnlatchLedNotification | |||
!TOPDRIVE-CODE=47 | |||
if (Get_HookHeight() <= (TL() + NFC() - OperationScenario%ECG) .and.& | |||
if (Get_HookHeight() <= (TL() + NFC() - data%State%OperationScenario%ECG) .and.& | |||
Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
@@ -38,7 +38,7 @@ module CUnlatchLedNotification | |||
!TOPDRIVE-CODE=48 | |||
if ((Get_HookHeight() >= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + OperationScenario%SL - OperationScenario%ECG + NFC() + OperationScenario%TG)) .and.& | |||
if ((Get_HookHeight() >= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC()) .and. Get_HookHeight() <= (TL() + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + NFC() + data%State%OperationScenario%TG)) .and.& | |||
GetStandRack() > 80 .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
@@ -61,7 +61,7 @@ module CUnlatchLedNotification | |||
!TOPDRIVE-CODE=49 | |||
if ((Get_HookHeight() >= TL() .and. Get_HookHeight() <= (TL() + NFC() + OperationScenario%SG)) .and.& | |||
if ((Get_HookHeight() >= TL() .and. Get_HookHeight() <= (TL() + NFC() + data%State%OperationScenario%SG)) .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_LATCH_STAND_BEGIN .and.& | |||
@@ -92,7 +92,7 @@ module CUnlatchLedNotification | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_UnlatchLed=Kelly' | |||
#endif | |||
@@ -101,7 +101,7 @@ module CUnlatchLedNotification | |||
!OPERATION-CODE=40 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() - OperationScenario%ECG) .and.& | |||
Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() - data%State%OperationScenario%ECG) .and.& | |||
Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 6.0 .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
@@ -130,7 +130,7 @@ module CUnlatchLedNotification | |||
!OPERATION-CODE=41 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (OperationScenario%HL + OperationScenario%SL - OperationScenario%ECG + Get_NearFloorConnection() + OperationScenario%LG) .and.& | |||
Get_HookHeight() >= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection()) .and. Get_HookHeight() <= (data%State%OperationScenario%HL + data%State%OperationScenario%SL - data%State%OperationScenario%ECG + Get_NearFloorConnection() + data%State%OperationScenario%LG) .and.& | |||
!Get_HookHeight() >= (HL + Get_NearFloorConnection() + SL + RE) .and. Get_HookHeight() <= (HL + Get_NearFloorConnection() + SL + LG) .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
@@ -157,7 +157,7 @@ module CUnlatchLedNotification | |||
!OPERATION-CODE=42 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
Get_HookHeight() >= OperationScenario%HL .and. Get_HookHeight() <= (OperationScenario%HL + Get_NearFloorConnection() + OperationScenario%SG) .and.& | |||
Get_HookHeight() >= data%State%OperationScenario%HL .and. Get_HookHeight() <= (data%State%OperationScenario%HL + Get_NearFloorConnection() + data%State%OperationScenario%SG) .and.& | |||
(Get_Elevator() /= ELEVATOR_LATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_UNLATCH_STRING_BEGIN .and.& | |||
Get_Elevator() /= ELEVATOR_LATCH_STAND_BEGIN .and.& | |||
@@ -203,14 +203,14 @@ module CUnlatchLedNotification | |||
! subroutine Subscribe_UnlatchLed() | |||
! implicit none | |||
! !**call UnitySignals%OnOperationConditionChange%Add(Evaluate_UnlatchLed) | |||
! !**call data%State%unitySignals%OnOperationConditionChange%Add(Evaluate_UnlatchLed) | |||
! ! call softwareInputs%OnHookHeightChange%Add(Evaluate_UnlatchLed) | |||
! ! call softwareInputs%OnStandRackChanged%Add(Evaluate_UnlatchLed) | |||
! call OperationScenario%OnElevatorConnectionChange%Add(Evaluate_UnlatchLed) | |||
! !**call UnitySignals%OnSwingChange%Add(Evaluate_UnlatchLed) | |||
! !**call UnitySignals%OnSlipsChange%Add(Evaluate_UnlatchLed) | |||
! !**call Notifications%OnLatchLedChange%Add(Evaluate_UnlatchLed) | |||
! !**call Notifications%OnFillMouseHoleLedChange%Add(Evaluate_UnlatchLed) | |||
! call data%State%OperationScenario%OnElevatorConnectionChange%Add(Evaluate_UnlatchLed) | |||
! !**call data%State%unitySignals%OnSwingChange%Add(Evaluate_UnlatchLed) | |||
! !**call data%State%unitySignals%OnSlipsChange%Add(Evaluate_UnlatchLed) | |||
! !**call data%State%notifications%OnLatchLedChange%Add(Evaluate_UnlatchLed) | |||
! !**call data%State%notifications%OnFillMouseHoleLedChange%Add(Evaluate_UnlatchLed) | |||
! end subroutine | |||
end module CUnlatchLedNotification |
@@ -3,432 +3,23 @@ module NotificationVariables | |||
implicit none | |||
type::NotificationType | |||
logical :: CloseKellyCockLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnCloseKellyCockLedChange | |||
logical :: CloseSafetyValveLed = .false. | |||
integer :: operation_CloseSafetyValveLed = 0 | |||
! type(VoidEventHandlerCollection) :: OnCloseSafetyValveLedChange | |||
logical :: FillMouseHoleLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnFillMouseHoleLedChange | |||
logical :: IrIBopLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnIrIBopLedChange | |||
logical :: IrSafetyValveLed = .false. | |||
integer :: operation_IrSafetyValveLed = 0 | |||
! type(VoidEventHandlerCollection) :: OnIrSafetyValveLedChange | |||
logical :: LatchLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnLatchLedChange | |||
logical :: OpenKellyCockLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnOpenKellyCockLedChange | |||
logical :: OpenSafetyValveLed = .false. | |||
integer :: operation_OpenSafetyValveLed = 0 | |||
! type(VoidEventHandlerCollection) :: OnOpenSafetyValveLedChange | |||
logical :: SlipsNotification = .false. | |||
! procedure (ActionBool), pointer :: SlipsNotificationPtr | |||
! type(VoidEventHandlerCollection) :: OnSlipsNotificationChange | |||
logical :: SwingLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnSwingLedChange | |||
logical :: IbopLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnIbopLedChange | |||
logical :: IbopLed = .false. | |||
logical :: PowerLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnPowerLedChange | |||
integer :: TorqueWrenchLed = 0 | |||
! type(VoidEventHandlerCollection) :: OnTorqueWrenchLedChange | |||
logical :: TongNotification = .false. | |||
! procedure (ActionBool), pointer :: TongNotificationPtr | |||
! type(VoidEventHandlerCollection) :: OnTongNotificationChange | |||
logical :: UnlatchLed = .false. | |||
! type(VoidEventHandlerCollection) :: OnUnlatchLedChange | |||
end type NotificationType | |||
type(NotificationType)::notifications | |||
contains | |||
subroutine Set_UnlatchLed(v) | |||
use CDrillingConsoleVariables!, only: DrillingConsole%UnlatchPipeLED | |||
!use CLatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%UnlatchLed == v) return | |||
#endif | |||
notifications%UnlatchLed = v | |||
if(notifications%UnlatchLed) then | |||
DrillingConsole%UnlatchPipeLED = 1 | |||
!call Set_LatchLed(.false.) | |||
else | |||
DrillingConsole%UnlatchPipeLED = 0 | |||
endif | |||
!**call notifications%OnUnlatchLedChange%RunAll() | |||
end subroutine | |||
logical function Get_UnlatchLed() | |||
implicit none | |||
Get_UnlatchLed = notifications%UnlatchLed | |||
end function | |||
subroutine Set_TongNotification(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%TongNotification == v) return | |||
#endif | |||
notifications%TongNotification = v | |||
! if(associated(notifications%TongNotificationPtr)) !**call notifications%TongNotificationPtr(notifications%TongNotification) | |||
#ifdef deb | |||
print*, 'notifications%TongNotification=', notifications%TongNotification | |||
#endif | |||
!**call notifications%OnTongNotificationChange%RunAll() | |||
end subroutine | |||
logical function Get_TongNotification() | |||
implicit none | |||
Get_TongNotification = notifications%TongNotification | |||
end function | |||
subroutine Set_TorqueWrenchLed(v) | |||
use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveTorqueWrenchLed | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%TorqueWrenchLed == v) return | |||
#endif | |||
notifications%TorqueWrenchLed = v | |||
TopDrivePanel%TopDriveTorqueWrenchLed = v | |||
!**call notifications%OnTorqueWrenchLedChange%RunAll() | |||
end subroutine | |||
logical function Get_TorqueWrenchLed() | |||
implicit none | |||
Get_TorqueWrenchLed = notifications%TorqueWrenchLed | |||
end function | |||
subroutine Set_PowerLed(v) | |||
use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveTdsPowerLed | |||
!use CLatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%PowerLed == v) return | |||
#endif | |||
notifications%PowerLed = v | |||
if(notifications%PowerLed) then | |||
TopDrivePanel%TopDriveTdsPowerLed = 1 | |||
!call Set_LatchLed(.false.) | |||
else | |||
TopDrivePanel%TopDriveTdsPowerLed = 0 | |||
endif | |||
!**call notifications%OnPowerLedChange%RunAll() | |||
end subroutine | |||
logical function Get_PowerLed() | |||
implicit none | |||
Get_PowerLed = notifications%PowerLed | |||
end function | |||
subroutine Set_IbopLed(v) | |||
use CTopDrivePanelVariables!, only: TopDrivePanel%TopDriveIbopLed | |||
use CManifolds, Only: OpenTopDriveIBop, CloseTopDriveIBop | |||
!use CLatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%IbopLed == v) return | |||
#endif | |||
notifications%IbopLed = v | |||
if(notifications%IbopLed) then | |||
TopDrivePanel%TopDriveIbopLed = 1 | |||
call CloseTopDriveIBop() | |||
else | |||
TopDrivePanel%TopDriveIbopLed = 0 | |||
call OpenTopDriveIBop() | |||
endif | |||
!**call notifications%OnIbopLedChange%RunAll() | |||
end subroutine | |||
logical function Get_IbopLed() | |||
implicit none | |||
Get_IbopLed = notifications%IbopLed | |||
end function | |||
subroutine Set_SwingLed(v) | |||
use CDrillingConsoleVariables!, only: SwingLedHw => SwingLed | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%SwingLed == v) return | |||
#endif | |||
notifications%SwingLed = v | |||
if(notifications%SwingLed) then | |||
DrillingConsole%SwingLed = 1 | |||
else | |||
DrillingConsole%SwingLed = 0 | |||
endif | |||
!**call notifications%OnSwingLedChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingLed() | |||
implicit none | |||
Get_SwingLed = notifications%SwingLed | |||
end function | |||
subroutine Set_SlipsNotification(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%SlipsNotification == v) return | |||
#endif | |||
notifications%SlipsNotification = v | |||
! if(associated(notifications%SlipsNotificationPtr)) !**call notifications%SlipsNotificationPtr(notifications%SlipsNotification) | |||
#ifdef deb | |||
print*, 'notifications%SlipsNotification=', notifications%SlipsNotification | |||
#endif | |||
!**call notifications%OnSlipsNotificationChange%RunAll() | |||
end subroutine | |||
logical function Get_SlipsNotification() | |||
implicit none | |||
Get_SlipsNotification = notifications%SlipsNotification | |||
end function | |||
subroutine Set_OpenSafetyValveLed(v) | |||
use CDrillingConsoleVariables!, only: OpenSafetyValveLedHw => OpenSafetyValveLed | |||
use CManifolds, only: OpenSafetyValve_TopDrive, OpenSafetyValve_KellyMode, OpenSafetyValve_TripMode | |||
use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%OpenSafetyValveLed == v) return | |||
#endif | |||
notifications%OpenSafetyValveLed = v | |||
if(notifications%OpenSafetyValveLed) then | |||
!!call OpenSafetyValve() | |||
if(Hoisting%DriveType == TopDrive_DriveType) call OpenSafetyValve_TopDrive() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_OpenSafetyValveLed == 0) call OpenSafetyValve_KellyMode() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_OpenSafetyValveLed == 1) call OpenSafetyValve_TripMode() | |||
endif | |||
!**call notifications%OnOpenSafetyValveLedChange%RunAll() | |||
end subroutine | |||
logical function Get_OpenSafetyValveLed() | |||
implicit none | |||
Get_OpenSafetyValveLed = notifications%OpenSafetyValveLed | |||
end function | |||
subroutine Set_OpenKellyCockLed(v) | |||
! use CDrillingConsoleVariables!, only: OpenKellyCockLedHw => OpenKellyCockLed | |||
use CManifolds, only: OpenKellyCock | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%OpenKellyCockLed == v) return | |||
#endif | |||
notifications%OpenKellyCockLed = v | |||
if(notifications%OpenKellyCockLed) then | |||
call OpenKellyCock() | |||
endif | |||
! HAS BEEN IMPLEMENTED IN CMANIFOLD | |||
!if(OpenKellyCockLed) then | |||
! OpenKellyCockLedHw = 1 | |||
!else | |||
! OpenKellyCockLedHw = 0 | |||
!endif | |||
!**call notifications%OnOpenKellyCockLedChange%RunAll() | |||
end subroutine | |||
logical function Get_OpenKellyCockLed() | |||
implicit none | |||
Get_OpenKellyCockLed = notifications%OpenKellyCockLed | |||
end function | |||
subroutine Set_LatchLed(v) | |||
use CDrillingConsoleVariables!, only: DrillingConsole%LatchPipeLED | |||
!use CUnlatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%LatchLed == v) return | |||
#endif | |||
notifications%LatchLed = v | |||
if(notifications%LatchLed) then | |||
DrillingConsole%LatchPipeLED = 1 | |||
!call Set_UnlatchLed(.false.) | |||
else | |||
DrillingConsole%LatchPipeLED = 0 | |||
endif | |||
!**call notifications%OnLatchLedChange%RunAll() | |||
end subroutine | |||
logical function Get_LatchLed() | |||
implicit none | |||
Get_LatchLed = notifications%LatchLed | |||
end function | |||
subroutine Set_IrSafetyValveLed(v) | |||
use CDrillingConsoleVariables!, only: DrillingConsole%CloseKellyCockLed => IRSafetyValveLed | |||
use CManifolds, only: & | |||
InstallSafetyValve_TopDrive, & | |||
InstallSafetyValve_KellyMode, & | |||
InstallSafetyValve_TripMode, & | |||
RemoveSafetyValve_TopDrive, & | |||
RemoveSafetyValve_KellyMode, & | |||
RemoveSafetyValve_TripMode | |||
use UnitySignalVariables, only: Set_SafetyValve_Install, Set_SafetyValve_Remove | |||
use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%IrSafetyValveLed == v) return | |||
#endif | |||
notifications%IrSafetyValveLed = v | |||
if(notifications%IrSafetyValveLed) then | |||
DrillingConsole%IRSafetyValveLed = 1 | |||
if(Hoisting%DriveType == TopDrive_DriveType) call InstallSafetyValve_TopDrive() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 0) call InstallSafetyValve_KellyMode() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 1) call InstallSafetyValve_TripMode() | |||
call Set_SafetyValve_Install() | |||
else | |||
DrillingConsole%IRSafetyValveLed = 0 | |||
if(Hoisting%DriveType == TopDrive_DriveType) call RemoveSafetyValve_TopDrive() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 0) call RemoveSafetyValve_KellyMode() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_IrSafetyValveLed == 1) call RemoveSafetyValve_TripMode() | |||
call Set_SafetyValve_Remove() | |||
endif | |||
!**call notifications%OnIrSafetyValveLedChange%RunAll() | |||
end subroutine | |||
logical function Get_IrSafetyValveLed() | |||
implicit none | |||
Get_IrSafetyValveLed = notifications%IrSafetyValveLed | |||
end function | |||
subroutine Set_IrIBopLed(v) | |||
use CDrillingConsoleVariables!, only: IRIBopLedHw => IRIBopLed | |||
use CManifolds, only: InstallIBop, RemoveIBop | |||
use UnitySignalVariables, only: Set_Ibop_Install, Set_Ibop_Remove | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%IrIBopLed == v) return | |||
#endif | |||
notifications%IrIBopLed = v | |||
if(notifications%IrIBopLed) then | |||
DrillingConsole%IRIBopLed = 1 | |||
call InstallIBop() | |||
call Set_Ibop_Install() | |||
else | |||
DrillingConsole%IRIBopLed = 0 | |||
call RemoveIBop() | |||
call Set_Ibop_Remove() | |||
endif | |||
!**call notifications%OnIrIBopLedChange%RunAll() | |||
end subroutine | |||
logical function Get_IrIBopLed() | |||
implicit none | |||
Get_IrIBopLed = notifications%IrIBopLed | |||
end function | |||
subroutine Set_FillMouseHoleLed(v) | |||
use CDrillingConsoleVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed | |||
! use CMouseHoleEnumVariables | |||
use UnitySignalVariables | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%FillMouseHoleLed == v) return | |||
#endif | |||
notifications%FillMouseHoleLed = v | |||
if(notifications%FillMouseHoleLed) then | |||
DrillingConsole%FillMouseHoleLed = 1 | |||
!call Set_MouseHole(MOUSE_HOLE_FILL) | |||
else | |||
DrillingConsole%FillMouseHoleLed = 0 | |||
!call Set_MouseHole(MOUSE_HOLE_EMPTY) | |||
endif | |||
!**call notifications%OnFillMouseHoleLedChange%RunAll() | |||
end subroutine | |||
logical function Get_FillMouseHoleLed() | |||
implicit none | |||
Get_FillMouseHoleLed = notifications%FillMouseHoleLed | |||
end function | |||
subroutine Set_CloseKellyCockLed(v) | |||
use CDrillingConsoleVariables!, only: CloseKellyCockLedHw => CloseKellyCockLed | |||
use CManifolds, only: CloseKellyCock | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%CloseKellyCockLed == v) return | |||
#endif | |||
notifications%CloseKellyCockLed = v | |||
if(notifications%CloseKellyCockLed) then | |||
call CloseKellyCock() | |||
endif | |||
!**call notifications%OnCloseKellyCockLedChange%RunAll() | |||
end subroutine | |||
logical function Get_CloseKellyCockLed() | |||
implicit none | |||
Get_CloseKellyCockLed = notifications%CloseKellyCockLed | |||
end function | |||
subroutine Set_CloseSafetyValveLed(v) | |||
! use CDrillingConsoleVariables, only: CloseSafetyValveLedHw => CloseSafetyValveLed | |||
use CManifolds, only: CloseSafetyValve_TopDrive, CloseSafetyValve_KellyMode, CloseSafetyValve_TripMode | |||
use CHoistingVariables!, only: Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(notifications%CloseSafetyValveLed == v) return | |||
#endif | |||
notifications%CloseSafetyValveLed = v | |||
if(notifications%CloseSafetyValveLed) then | |||
!!call CloseSafetyValve() | |||
if(Hoisting%DriveType == TopDrive_DriveType) call CloseSafetyValve_TopDrive() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_CloseSafetyValveLed == 0) call CloseSafetyValve_KellyMode() | |||
if(Hoisting%DriveType == Kelly_DriveType .and. notifications%operation_CloseSafetyValveLed == 1) call CloseSafetyValve_TripMode() | |||
endif | |||
!**call notifications%OnCloseSafetyValveLedChange%RunAll() | |||
end subroutine | |||
logical function Get_CloseSafetyValveLed() | |||
implicit none | |||
Get_CloseSafetyValveLed = notifications%CloseSafetyValveLed | |||
end function | |||
end module NotificationVariables |
@@ -0,0 +1,408 @@ | |||
module NotificationModule | |||
use ConfigurationVariables | |||
implicit none | |||
contains | |||
subroutine Set_UnlatchLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
!use CLatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%UnlatchLed == v) return | |||
#endif | |||
data%State%notifications%UnlatchLed = v | |||
if(data%State%notifications%UnlatchLed) then | |||
data%EquipmentControl%DrillingConsole%UnlatchPipeLED = 1 | |||
!call Set_LatchLed(.false.) | |||
else | |||
data%EquipmentControl%DrillingConsole%UnlatchPipeLED = 0 | |||
endif | |||
!**call data%State%notifications%OnUnlatchLedChange%RunAll() | |||
end subroutine | |||
logical function Get_UnlatchLed() | |||
implicit none | |||
Get_UnlatchLed = data%State%notifications%UnlatchLed | |||
end function | |||
subroutine Set_TongNotification(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%TongNotification == v) return | |||
#endif | |||
data%State%notifications%TongNotification = v | |||
! if(associated(data%State%notifications%TongNotificationPtr)) !**call data%State%notifications%TongNotificationPtr(data%State%notifications%TongNotification) | |||
#ifdef deb | |||
print*, 'data%State%notifications%TongNotification=', data%State%notifications%TongNotification | |||
#endif | |||
!**call data%State%notifications%OnTongNotificationChange%RunAll() | |||
end subroutine | |||
logical function Get_TongNotification() | |||
implicit none | |||
Get_TongNotification = data%State%notifications%TongNotification | |||
end function | |||
subroutine Set_TorqueWrenchLed(v) | |||
use CTopDrivePanelVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrenchLed | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%TorqueWrenchLed == v) return | |||
#endif | |||
data%State%notifications%TorqueWrenchLed = v | |||
data%EquipmentControl%TopDrivePanel%TopDriveTorqueWrenchLed = v | |||
!**call data%State%notifications%OnTorqueWrenchLedChange%RunAll() | |||
end subroutine | |||
logical function Get_TorqueWrenchLed() | |||
implicit none | |||
Get_TorqueWrenchLed = data%State%notifications%TorqueWrenchLed | |||
end function | |||
subroutine Set_PowerLed(v) | |||
use CTopDrivePanelVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed | |||
!use CLatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%PowerLed == v) return | |||
#endif | |||
data%State%notifications%PowerLed = v | |||
if(data%State%notifications%PowerLed) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed = 1 | |||
!call Set_LatchLed(.false.) | |||
else | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerLed = 0 | |||
endif | |||
!**call data%State%notifications%OnPowerLedChange%RunAll() | |||
end subroutine | |||
logical function Get_PowerLed() | |||
implicit none | |||
Get_PowerLed = data%State%notifications%PowerLed | |||
end function | |||
subroutine Set_IbopLed(v) | |||
use CTopDrivePanelVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%TopDrivePanel%TopDriveIbopLed | |||
use CManifolds, Only: OpenTopDriveIBop, CloseTopDriveIBop | |||
!use CLatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%IbopLed == v) return | |||
#endif | |||
data%State%notifications%IbopLed = v | |||
if(data%State%notifications%IbopLed) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveIbopLed = 1 | |||
call CloseTopDriveIBop() | |||
else | |||
data%EquipmentControl%TopDrivePanel%TopDriveIbopLed = 0 | |||
call OpenTopDriveIBop() | |||
endif | |||
!**call data%State%notifications%OnIbopLedChange%RunAll() | |||
end subroutine | |||
logical function Get_IbopLed() | |||
implicit none | |||
Get_IbopLed = data%State%notifications%IbopLed | |||
end function | |||
subroutine Set_SwingLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: SwingLedHw => SwingLed | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%SwingLed == v) return | |||
#endif | |||
data%State%notifications%SwingLed = v | |||
if(data%State%notifications%SwingLed) then | |||
data%EquipmentControl%DrillingConsole%SwingLed = 1 | |||
else | |||
data%EquipmentControl%DrillingConsole%SwingLed = 0 | |||
endif | |||
!**call data%State%notifications%OnSwingLedChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingLed() | |||
implicit none | |||
Get_SwingLed = data%State%notifications%SwingLed | |||
end function | |||
subroutine Set_SlipsNotification(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%SlipsNotification == v) return | |||
#endif | |||
data%State%notifications%SlipsNotification = v | |||
! if(associated(data%State%notifications%SlipsNotificationPtr)) !**call data%State%notifications%SlipsNotificationPtr(data%State%notifications%SlipsNotification) | |||
#ifdef deb | |||
print*, 'data%State%notifications%SlipsNotification=', data%State%notifications%SlipsNotification | |||
#endif | |||
!**call data%State%notifications%OnSlipsNotificationChange%RunAll() | |||
end subroutine | |||
logical function Get_SlipsNotification() | |||
implicit none | |||
Get_SlipsNotification = data%State%notifications%SlipsNotification | |||
end function | |||
subroutine Set_OpenSafetyValveLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: OpenSafetyValveLedHw => OpenSafetyValveLed | |||
use CManifolds, only: OpenSafetyValve_TopDrive, OpenSafetyValve_KellyMode, OpenSafetyValve_TripMode | |||
use CHoistingVariables | |||
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%OpenSafetyValveLed == v) return | |||
#endif | |||
data%State%notifications%OpenSafetyValveLed = v | |||
if(data%State%notifications%OpenSafetyValveLed) then | |||
!!call OpenSafetyValve() | |||
if(data%State%Hoisting%DriveType == TopDrive_DriveType) call OpenSafetyValve_TopDrive() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_OpenSafetyValveLed == 0) call OpenSafetyValve_KellyMode() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_OpenSafetyValveLed == 1) call OpenSafetyValve_TripMode() | |||
endif | |||
!**call data%State%notifications%OnOpenSafetyValveLedChange%RunAll() | |||
end subroutine | |||
logical function Get_OpenSafetyValveLed() | |||
implicit none | |||
Get_OpenSafetyValveLed = data%State%notifications%OpenSafetyValveLed | |||
end function | |||
subroutine Set_OpenKellyCockLed(v) | |||
! use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: OpenKellyCockLedHw => OpenKellyCockLed | |||
use CManifolds, only: OpenKellyCock | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%OpenKellyCockLed == v) return | |||
#endif | |||
data%State%notifications%OpenKellyCockLed = v | |||
if(data%State%notifications%OpenKellyCockLed) then | |||
call OpenKellyCock() | |||
endif | |||
! HAS BEEN IMPLEMENTED IN CMANIFOLD | |||
!if(OpenKellyCockLed) then | |||
! OpenKellyCockLedHw = 1 | |||
!else | |||
! OpenKellyCockLedHw = 0 | |||
!endif | |||
!**call data%State%notifications%OnOpenKellyCockLedChange%RunAll() | |||
end subroutine | |||
logical function Get_OpenKellyCockLed() | |||
implicit none | |||
Get_OpenKellyCockLed = data%State%notifications%OpenKellyCockLed | |||
end function | |||
subroutine Set_LatchLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%LatchPipeLED | |||
!use CUnlatchLedNotification | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%LatchLed == v) return | |||
#endif | |||
data%State%notifications%LatchLed = v | |||
if(data%State%notifications%LatchLed) then | |||
data%EquipmentControl%DrillingConsole%LatchPipeLED = 1 | |||
!call Set_UnlatchLed(.false.) | |||
else | |||
data%EquipmentControl%DrillingConsole%LatchPipeLED = 0 | |||
endif | |||
!**call data%State%notifications%OnLatchLedChange%RunAll() | |||
end subroutine | |||
logical function Get_LatchLed() | |||
implicit none | |||
Get_LatchLed = data%State%notifications%LatchLed | |||
end function | |||
subroutine Set_IrSafetyValveLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: data%EquipmentControl%DrillingConsole%CloseKellyCockLed => IRSafetyValveLed | |||
use CManifolds, only: & | |||
InstallSafetyValve_TopDrive, & | |||
InstallSafetyValve_KellyMode, & | |||
InstallSafetyValve_TripMode, & | |||
RemoveSafetyValve_TopDrive, & | |||
RemoveSafetyValve_KellyMode, & | |||
RemoveSafetyValve_TripMode | |||
use UnitySignalVariables | |||
use UnitySignalsModule, only: Set_SafetyValve_Install, Set_SafetyValve_Remove | |||
use CHoistingVariables | |||
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%IrSafetyValveLed == v) return | |||
#endif | |||
data%State%notifications%IrSafetyValveLed = v | |||
if(data%State%notifications%IrSafetyValveLed) then | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 1 | |||
if(data%State%Hoisting%DriveType == TopDrive_DriveType) call InstallSafetyValve_TopDrive() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 0) call InstallSafetyValve_KellyMode() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 1) call InstallSafetyValve_TripMode() | |||
call Set_SafetyValve_Install() | |||
else | |||
data%EquipmentControl%DrillingConsole%IRSafetyValveLed = 0 | |||
if(data%State%Hoisting%DriveType == TopDrive_DriveType) call RemoveSafetyValve_TopDrive() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 0) call RemoveSafetyValve_KellyMode() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_IrSafetyValveLed == 1) call RemoveSafetyValve_TripMode() | |||
call Set_SafetyValve_Remove() | |||
endif | |||
!**call data%State%notifications%OnIrSafetyValveLedChange%RunAll() | |||
end subroutine | |||
logical function Get_IrSafetyValveLed() | |||
implicit none | |||
Get_IrSafetyValveLed = data%State%notifications%IrSafetyValveLed | |||
end function | |||
subroutine Set_IrIBopLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: IRIBopLedHw => IRIBopLed | |||
use CManifolds, only: InstallIBop, RemoveIBop | |||
use UnitySignalVariables | |||
use UnitySignalsModule, only: Set_Ibop_Install, Set_Ibop_Remove | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%IrIBopLed == v) return | |||
#endif | |||
data%State%notifications%IrIBopLed = v | |||
if(data%State%notifications%IrIBopLed) then | |||
data%EquipmentControl%DrillingConsole%IRIBopLed = 1 | |||
call InstallIBop() | |||
call Set_Ibop_Install() | |||
else | |||
data%EquipmentControl%DrillingConsole%IRIBopLed = 0 | |||
call RemoveIBop() | |||
call Set_Ibop_Remove() | |||
endif | |||
!**call data%State%notifications%OnIrIBopLedChange%RunAll() | |||
end subroutine | |||
logical function Get_IrIBopLed() | |||
implicit none | |||
Get_IrIBopLed = data%State%notifications%IrIBopLed | |||
end function | |||
subroutine Set_FillMouseHoleLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: FillMouseHoleLedHw => FillMouseHoleLed | |||
! use CMouseHoleEnumVariables | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%FillMouseHoleLed == v) return | |||
#endif | |||
data%State%notifications%FillMouseHoleLed = v | |||
if(data%State%notifications%FillMouseHoleLed) then | |||
data%EquipmentControl%DrillingConsole%FillMouseHoleLed = 1 | |||
!call Set_MouseHole(MOUSE_HOLE_FILL) | |||
else | |||
data%EquipmentControl%DrillingConsole%FillMouseHoleLed = 0 | |||
!call Set_MouseHole(MOUSE_HOLE_EMPTY) | |||
endif | |||
!**call data%State%notifications%OnFillMouseHoleLedChange%RunAll() | |||
end subroutine | |||
logical function Get_FillMouseHoleLed() | |||
implicit none | |||
Get_FillMouseHoleLed = data%State%notifications%FillMouseHoleLed | |||
end function | |||
subroutine Set_CloseKellyCockLed(v) | |||
use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables!, only: CloseKellyCockLedHw => CloseKellyCockLed | |||
use CManifolds, only: CloseKellyCock | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%CloseKellyCockLed == v) return | |||
#endif | |||
data%State%notifications%CloseKellyCockLed = v | |||
if(data%State%notifications%CloseKellyCockLed) then | |||
call CloseKellyCock() | |||
endif | |||
!**call data%State%notifications%OnCloseKellyCockLedChange%RunAll() | |||
end subroutine | |||
logical function Get_CloseKellyCockLed() | |||
implicit none | |||
Get_CloseKellyCockLed = data%State%notifications%CloseKellyCockLed | |||
end function | |||
subroutine Set_CloseSafetyValveLed(v) | |||
! use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
!@use ConfigurationVariables, only: CloseSafetyValveLedHw => CloseSafetyValveLed | |||
use CManifolds, only: CloseSafetyValve_TopDrive, CloseSafetyValve_KellyMode, CloseSafetyValve_TripMode | |||
use CHoistingVariables | |||
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, TopDrive_DriveType, Kelly_DriveType | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%notifications%CloseSafetyValveLed == v) return | |||
#endif | |||
data%State%notifications%CloseSafetyValveLed = v | |||
if(data%State%notifications%CloseSafetyValveLed) then | |||
!!call CloseSafetyValve() | |||
if(data%State%Hoisting%DriveType == TopDrive_DriveType) call CloseSafetyValve_TopDrive() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_CloseSafetyValveLed == 0) call CloseSafetyValve_KellyMode() | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType .and. data%State%notifications%operation_CloseSafetyValveLed == 1) call CloseSafetyValve_TripMode() | |||
endif | |||
!**call data%State%notifications%OnCloseSafetyValveLedChange%RunAll() | |||
end subroutine | |||
logical function Get_CloseSafetyValveLed() | |||
implicit none | |||
Get_CloseSafetyValveLed = data%State%notifications%CloseSafetyValveLed | |||
end function | |||
end module NotificationModule | |||
@@ -1,13 +1,14 @@ | |||
module CFillupHeadPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_FillupHeadPermission() | |||
! use UnitySignalsModule !for CTdsConnectionModesEnum | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillupHeadPermission=TopDrive' | |||
#endif | |||
@@ -1,5 +1,5 @@ | |||
module CInstallFillupHeadPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -10,7 +10,7 @@ module CInstallFillupHeadPermission | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_InstallFillupHeadPermission=TopDrive' | |||
#endif | |||
@@ -24,7 +24,7 @@ module CInstallFillupHeadPermission | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_InstallFillupHeadPermission=Kelly' | |||
#endif | |||
@@ -45,7 +45,7 @@ module CInstallFillupHeadPermission | |||
!OPERATION-CODE=70 | |||
if (Get_OperationCondition() == OPERATION_TRIP .and.& | |||
TD_String%TopJointHeight >= 3.0 .and. TD_String%TopJointHeight <= 9.0 .and.& | |||
data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 9.0 .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
!Get_ElevatorConnectionPossible() == .false. .and.& | |||
!Get_ElevatorConnection() /= ELEVATOR_CONNECTION_STRING .and.& | |||
@@ -1,5 +1,5 @@ | |||
module CInstallMudBucketPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,15 +1,16 @@ | |||
module CIrIbopPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_IrIbopPermission() | |||
use TD_DrillStemComponents | |||
use CStudentStationVariables!, only: StudentStation%FillupHeadInstallation | |||
use UnitySignalsModule !for CTdsConnectionModesEnum | |||
use CStudentStationVariables!, only: data%State%StudentStation%FillupHeadInstallation | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIbopPermission=TopDrive' | |||
#endif | |||
@@ -20,7 +21,7 @@ module CIrIbopPermission | |||
Get_NearFloorConnection() >= 3 .and. Get_NearFloorConnection() <= 10 .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.& | |||
StudentStation%FillupHeadInstallation == .false.) then | |||
data%State%StudentStation%FillupHeadInstallation == .false.) then | |||
call Set_IrIbopPermission(.true.) | |||
return | |||
@@ -39,7 +40,7 @@ module CIrIbopPermission | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrIbopPermission=Kelly' | |||
#endif | |||
@@ -48,7 +49,7 @@ module CIrIbopPermission | |||
if (GetRotaryRpm() == 0.0d0 .and.& | |||
Get_OperationCondition() == OPERATION_TRIP .and.& | |||
!(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.& | |||
TD_String%TopJointHeight >= 3.0 .and. TD_String%TopJointHeight <= 10.0 .and.& | |||
data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 10.0 .and.& | |||
!Get_IbopHeight() >= 22.0 .and. Get_IbopHeight() <= 35.0 .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
Get_Swing() == SWING_WELL_END .and.& | |||
@@ -1,17 +1,17 @@ | |||
module CIrSafetyValvePermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_IrSafetyValvePermission() | |||
use TD_DrillStemComponents | |||
use CStudentStationVariables!!, only: StudentStation%FillupHeadInstallation | |||
use CStudentStationVariables!!, only: data%State%StudentStation%FillupHeadInstallation | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValvePermission=TopDrive' | |||
#endif | |||
@@ -23,7 +23,7 @@ module CIrSafetyValvePermission | |||
(Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0) .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.& | |||
StudentStation%FillupHeadInstallation == .false.) then | |||
data%State%StudentStation%FillupHeadInstallation == .false.) then | |||
call Set_IrSafetyValvePermission(.true.) | |||
return | |||
@@ -40,7 +40,7 @@ module CIrSafetyValvePermission | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_IrSafetyValvePermission=Kelly' | |||
#endif | |||
@@ -51,7 +51,7 @@ module CIrSafetyValvePermission | |||
GetRotaryRpm() == 0.0d0 .and.& | |||
!(Get_ElevatorConnection() == ELEVATOR_CONNECTION_NOTHING .or. Get_ElevatorConnection() == ELEVATOR_LATCH_STRING) .and.& | |||
!Get_NearFloorConnection() >= 3.0 .and. Get_NearFloorConnection() <= 10.0 .and.& | |||
TD_String%TopJointHeight >= 3.0 .and. TD_String%TopJointHeight <= 10.0 .and.& | |||
data%State%TD_String%TopJointHeight >= 3.0 .and. data%State%TD_String%TopJointHeight <= 10.0 .and.& | |||
!Get_SafetyValveHeight() >= 22.0 .and. Get_SafetyValveHeight() <= 35.0 .and.& | |||
Get_JointConnectionPossible() == .false. .and.& | |||
Get_FillupHead() == FILLUP_HEAD_REMOVE .and.& | |||
@@ -1,5 +1,5 @@ | |||
module CRemoveFillupHeadPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,5 +1,5 @@ | |||
module CRemoveMudBucketPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,6 +1,7 @@ | |||
module CSwingDrillPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use CTopDrivePanelVariables | |||
use ConfigurationVariables | |||
implicit none | |||
contains | |||
@@ -9,7 +10,7 @@ module CSwingDrillPermission | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingDrillPermission=TopDrive' | |||
#endif | |||
@@ -17,7 +18,7 @@ module CSwingDrillPermission | |||
!TOPDRIVE-CODE=33 | |||
if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
call Set_SwingDrillPermission(.true.) | |||
return | |||
@@ -1,5 +1,5 @@ | |||
module CSwingOffPermission | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -8,7 +8,7 @@ module CSwingOffPermission | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingOffPermission=TopDrive' | |||
#endif | |||
@@ -20,7 +20,7 @@ module CSwingOffPermission | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.& | |||
Get_TdsSwing() == TDS_SWING_TILT_END .and.& | |||
Get_Slips() == SLIPS_SET_END .and.& | |||
TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
call Set_SwingOffPermission(.true.) | |||
return | |||
@@ -33,7 +33,7 @@ module CSwingOffPermission | |||
if (Get_TdsElevatorModes() == TDS_ELEVATOR_CONNECTION_NOTHING .and.& | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.& | |||
Get_TdsSwing() == TDS_SWING_DRILL_END .and.& | |||
TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
call Set_SwingOffPermission(.true.) | |||
return | |||
@@ -1,5 +1,7 @@ | |||
module CSwingTiltPermission | |||
use COperationScenariosVariables | |||
use UnitySignalsModule | |||
use OperationScenariosModule | |||
use ConfigurationVariables | |||
implicit none | |||
contains | |||
@@ -7,7 +9,7 @@ module CSwingTiltPermission | |||
subroutine Evaluate_SwingTiltPermission() | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_SwingTiltPermission=TopDrive' | |||
#endif | |||
@@ -18,7 +20,7 @@ module CSwingTiltPermission | |||
Get_TdsConnectionModes() == TDS_CONNECTION_NOTHING .and.& | |||
Get_TdsSwing() == TDS_SWING_OFF_END .and.& | |||
Get_Slips() == SLIPS_SET_END .and.& | |||
TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then | |||
call Set_SwingTiltPermission(.true.) | |||
return | |||
@@ -0,0 +1,188 @@ | |||
module PermissionsModule | |||
use ConfigurationVariables | |||
implicit none | |||
contains | |||
subroutine Set_SwingTiltPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%SwingTiltPermission == v) return | |||
#endif | |||
data%State%permissions%SwingTiltPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%SwingTiltPermission=', data%State%permissions%SwingTiltPermission | |||
#endif | |||
!**call data%State%permissions%OnSwingTiltPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingTiltPermission() | |||
implicit none | |||
Get_SwingTiltPermission = data%State%permissions%SwingTiltPermission | |||
end function | |||
subroutine Set_SwingOffPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%SwingOffPermission == v) return | |||
#endif | |||
data%State%permissions%SwingOffPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%SwingOffPermission=', data%State%permissions%SwingOffPermission | |||
#endif | |||
!**call data%State%permissions%OnSwingOffPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingOffPermission() | |||
implicit none | |||
Get_SwingOffPermission = data%State%permissions%SwingOffPermission | |||
end function | |||
subroutine Set_SwingDrillPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%SwingDrillPermission == v) return | |||
#endif | |||
data%State%permissions%SwingDrillPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%SwingDrillPermission=', data%State%permissions%SwingDrillPermission | |||
#endif | |||
!**call data%State%permissions%OnSwingDrillPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingDrillPermission() | |||
implicit none | |||
Get_SwingDrillPermission = data%State%permissions%SwingDrillPermission | |||
end function | |||
subroutine Set_RemoveMudBucketPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%RemoveMudBucketPermission == v) return | |||
#endif | |||
data%State%permissions%RemoveMudBucketPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%RemoveMudBucketPermission=', data%State%permissions%RemoveMudBucketPermission | |||
#endif | |||
!**call data%State%permissions%OnRemoveMudBucketPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_RemoveMudBucketPermission() | |||
implicit none | |||
Get_RemoveMudBucketPermission = data%State%permissions%RemoveMudBucketPermission | |||
end function | |||
subroutine Set_RemoveFillupHeadPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%RemoveFillupHeadPermission == v) return | |||
#endif | |||
data%State%permissions%RemoveFillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%RemoveFillupHeadPermission=', data%State%permissions%RemoveFillupHeadPermission | |||
#endif | |||
!**call data%State%permissions%OnRemoveFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_RemoveFillupHeadPermission() | |||
implicit none | |||
Get_RemoveFillupHeadPermission = data%State%permissions%RemoveFillupHeadPermission | |||
end function | |||
subroutine Set_IrSafetyValvePermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%IrSafetyValvePermission == v) return | |||
#endif | |||
data%State%permissions%IrSafetyValvePermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%IrSafetyValvePermission=', data%State%permissions%IrSafetyValvePermission | |||
#endif | |||
!**call data%State%permissions%OnIrSafetyValvePermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_IrSafetyValvePermission() | |||
implicit none | |||
Get_IrSafetyValvePermission = data%State%permissions%IrSafetyValvePermission | |||
end function | |||
subroutine Set_IrIbopPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%IrIbopPermission == v) return | |||
#endif | |||
data%State%permissions%IrIbopPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%IrIbopPermission=', data%State%permissions%IrIbopPermission | |||
#endif | |||
!**call data%State%permissions%OnIrIbopPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_IrIbopPermission() | |||
implicit none | |||
Get_IrIbopPermission = data%State%permissions%IrIbopPermission | |||
end function | |||
subroutine Set_InstallMudBucketPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%InstallMudBucketPermission == v) return | |||
#endif | |||
data%State%permissions%InstallMudBucketPermission = v | |||
#ifdef deb | |||
print*, 'data%State%permissions%InstallMudBucketPermission=', data%State%permissions%InstallMudBucketPermission | |||
#endif | |||
!**call data%State%permissions%OnInstallMudBucketPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_InstallMudBucketPermission() | |||
implicit none | |||
Get_InstallMudBucketPermission = data%State%permissions%InstallMudBucketPermission | |||
end function | |||
subroutine Set_InstallFillupHeadPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%InstallFillupHeadPermission == v) return | |||
#endif | |||
data%State%permissions%InstallFillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'InstallFillupHeadPermission=', data%State%permissions%InstallFillupHeadPermission | |||
#endif | |||
!**call data%State%permissions%OnInstallFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_InstallFillupHeadPermission() | |||
implicit none | |||
Get_InstallFillupHeadPermission = data%State%permissions%InstallFillupHeadPermission | |||
end function | |||
subroutine Set_FillupHeadPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%permissions%FillupHeadPermission == v) return | |||
#endif | |||
data%State%permissions%FillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'FillupHeadPermission=', data%State%permissions%FillupHeadPermission | |||
#endif | |||
!**call data%State%permissions%OnFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_FillupHeadPermission() | |||
implicit none | |||
Get_FillupHeadPermission = data%State%permissions%FillupHeadPermission | |||
end function | |||
end module PermissionsModule |
@@ -2,211 +2,15 @@ module PermissionsVariables | |||
! use CVoidEventHandlerCollection | |||
type::PermissionsType | |||
logical :: FillupHeadPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnFillupHeadPermissionChange | |||
logical :: InstallFillupHeadPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnInstallFillupHeadPermissionChange | |||
logical :: InstallMudBucketPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnInstallMudBucketPermissionChange | |||
logical :: IrIbopPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnIrIbopPermissionChange | |||
logical :: IrSafetyValvePermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnIrSafetyValvePermissionChange | |||
logical :: RemoveFillupHeadPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnRemoveFillupHeadPermissionChange | |||
logical :: RemoveMudBucketPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnRemoveMudBucketPermissionChange | |||
logical :: SwingDrillPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnSwingDrillPermissionChange | |||
logical :: SwingOffPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnSwingOffPermissionChange | |||
logical :: SwingTiltPermission = .false. | |||
! type(VoidEventHandlerCollection) :: OnSwingTiltPermissionChange | |||
end type PermissionsType | |||
type(PermissionsType):: permissions | |||
contains | |||
subroutine Set_SwingTiltPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%SwingTiltPermission == v) return | |||
#endif | |||
permissions%SwingTiltPermission = v | |||
#ifdef deb | |||
print*, 'permissions%SwingTiltPermission=', permissions%SwingTiltPermission | |||
#endif | |||
!**call permissions%OnSwingTiltPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingTiltPermission() | |||
implicit none | |||
Get_SwingTiltPermission = permissions%SwingTiltPermission | |||
end function | |||
subroutine Set_SwingOffPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%SwingOffPermission == v) return | |||
#endif | |||
permissions%SwingOffPermission = v | |||
#ifdef deb | |||
print*, 'permissions%SwingOffPermission=', permissions%SwingOffPermission | |||
#endif | |||
!**call permissions%OnSwingOffPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingOffPermission() | |||
implicit none | |||
Get_SwingOffPermission = permissions%SwingOffPermission | |||
end function | |||
subroutine Set_SwingDrillPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%SwingDrillPermission == v) return | |||
#endif | |||
permissions%SwingDrillPermission = v | |||
#ifdef deb | |||
print*, 'permissions%SwingDrillPermission=', permissions%SwingDrillPermission | |||
#endif | |||
!**call permissions%OnSwingDrillPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_SwingDrillPermission() | |||
implicit none | |||
Get_SwingDrillPermission = permissions%SwingDrillPermission | |||
end function | |||
subroutine Set_RemoveMudBucketPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%RemoveMudBucketPermission == v) return | |||
#endif | |||
permissions%RemoveMudBucketPermission = v | |||
#ifdef deb | |||
print*, 'permissions%RemoveMudBucketPermission=', permissions%RemoveMudBucketPermission | |||
#endif | |||
!**call permissions%OnRemoveMudBucketPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_RemoveMudBucketPermission() | |||
implicit none | |||
Get_RemoveMudBucketPermission = permissions%RemoveMudBucketPermission | |||
end function | |||
subroutine Set_RemoveFillupHeadPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%RemoveFillupHeadPermission == v) return | |||
#endif | |||
permissions%RemoveFillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'permissions%RemoveFillupHeadPermission=', permissions%RemoveFillupHeadPermission | |||
#endif | |||
!**call permissions%OnRemoveFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_RemoveFillupHeadPermission() | |||
implicit none | |||
Get_RemoveFillupHeadPermission = permissions%RemoveFillupHeadPermission | |||
end function | |||
subroutine Set_IrSafetyValvePermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%IrSafetyValvePermission == v) return | |||
#endif | |||
permissions%IrSafetyValvePermission = v | |||
#ifdef deb | |||
print*, 'permissions%IrSafetyValvePermission=', permissions%IrSafetyValvePermission | |||
#endif | |||
!**call permissions%OnIrSafetyValvePermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_IrSafetyValvePermission() | |||
implicit none | |||
Get_IrSafetyValvePermission = permissions%IrSafetyValvePermission | |||
end function | |||
subroutine Set_IrIbopPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%IrIbopPermission == v) return | |||
#endif | |||
permissions%IrIbopPermission = v | |||
#ifdef deb | |||
print*, 'permissions%IrIbopPermission=', permissions%IrIbopPermission | |||
#endif | |||
!**call permissions%OnIrIbopPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_IrIbopPermission() | |||
implicit none | |||
Get_IrIbopPermission = permissions%IrIbopPermission | |||
end function | |||
subroutine Set_InstallMudBucketPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%InstallMudBucketPermission == v) return | |||
#endif | |||
permissions%InstallMudBucketPermission = v | |||
#ifdef deb | |||
print*, 'permissions%InstallMudBucketPermission=', permissions%InstallMudBucketPermission | |||
#endif | |||
!**call permissions%OnInstallMudBucketPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_InstallMudBucketPermission() | |||
implicit none | |||
Get_InstallMudBucketPermission = permissions%InstallMudBucketPermission | |||
end function | |||
subroutine Set_InstallFillupHeadPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%InstallFillupHeadPermission == v) return | |||
#endif | |||
permissions%InstallFillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'InstallFillupHeadPermission=', permissions%InstallFillupHeadPermission | |||
#endif | |||
!**call permissions%OnInstallFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_InstallFillupHeadPermission() | |||
implicit none | |||
Get_InstallFillupHeadPermission = permissions%InstallFillupHeadPermission | |||
end function | |||
subroutine Set_FillupHeadPermission(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(permissions%FillupHeadPermission == v) return | |||
#endif | |||
permissions%FillupHeadPermission = v | |||
#ifdef deb | |||
print*, 'FillupHeadPermission=', permissions%FillupHeadPermission | |||
#endif | |||
!**call permissions%OnFillupHeadPermissionChange%RunAll() | |||
end subroutine | |||
logical function Get_FillupHeadPermission() | |||
implicit none | |||
Get_FillupHeadPermission = permissions%FillupHeadPermission | |||
end function | |||
end module |
@@ -1,195 +0,0 @@ | |||
module SoftwareInputsVariables | |||
! use CVoidEventHandlerCollection | |||
type:: SoftwareInputsType | |||
real :: HookHeight = 0 | |||
! type(VoidEventHandlerCollection) :: OnHookHeightChange | |||
real :: IbopHeight = 0 | |||
! type(VoidEventHandlerCollection) :: OnIbopHeightChange | |||
real :: NearFloorConnection = 0 | |||
! type(VoidEventHandlerCollection) :: OnNearFloorConnectionChange | |||
real :: SafetyValveHeight = 0 | |||
! type(VoidEventHandlerCollection) :: OnSafetyValveHeightChange | |||
logical :: SlackOff = .false. | |||
! type(VoidEventHandlerCollection) :: OnSlackOffChange | |||
integer :: StandRack = 0 | |||
! type(VoidEventHandlerCollection) :: OnStandRackChanged | |||
real :: StringPressure = 0 | |||
! type(VoidEventHandlerCollection) :: OnStringPressureChange | |||
real :: TdsStemJointHeight = 0 | |||
! type(VoidEventHandlerCollection) :: OnTdsStemJointHeightChange | |||
logical :: ZeroStringSpeed = .false. | |||
! type(VoidEventHandlerCollection) :: OnZeroStringSpeedChange | |||
end type SoftwareInputsType | |||
type(SoftwareInputsType):: softwareInputs | |||
contains | |||
subroutine Set_ZeroStringSpeed(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%ZeroStringSpeed == v) return | |||
#endif | |||
softwareInputs%ZeroStringSpeed = v | |||
#ifdef deb | |||
print*, 'ZeroStringSpeed=', softwareInputs%ZeroStringSpeed | |||
#endif | |||
! call softwareInputs%OnZeroStringSpeedChange%RunAll() | |||
end subroutine | |||
logical function Get_ZeroStringSpeed() | |||
implicit none | |||
Get_ZeroStringSpeed = softwareInputs%ZeroStringSpeed | |||
!Get_ZeroStringSpeed = .true. | |||
end function | |||
subroutine Set_TdsStemJointHeight(v) | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%TdsStemJointHeight == v) return | |||
#endif | |||
softwareInputs%TdsStemJointHeight = v | |||
#ifdef deb | |||
print*, 'TdsStemJointHeight=', softwareInputs%TdsStemJointHeight | |||
#endif | |||
! call softwareInputs%OnTdsStemJointHeightChange%RunAll() | |||
end subroutine | |||
real function Get_TdsStemJointHeight() | |||
implicit none | |||
Get_TdsStemJointHeight = softwareInputs%TdsStemJointHeight | |||
end function | |||
subroutine Set_StringPressure(v) | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%StringPressure == v) return | |||
#endif | |||
softwareInputs%StringPressure = v | |||
#ifdef deb | |||
print*, 'StringPressure=', softwareInputs%StringPressure | |||
#endif | |||
! call softwareInputs%OnStringPressureChange%RunAll() | |||
end subroutine | |||
real function Get_StringPressure() | |||
implicit none | |||
Get_StringPressure = softwareInputs%StringPressure | |||
end function | |||
subroutine Set_StandRack(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%StandRack == v) return | |||
#endif | |||
softwareInputs%StandRack = v | |||
#ifdef deb | |||
print*, 'StandRack=', softwareInputs%StandRack | |||
#endif | |||
! call softwareInputs%OnStandRackChanged%RunAll() | |||
end subroutine | |||
integer function Get_StandRack() | |||
implicit none | |||
Get_StandRack = softwareInputs%StandRack | |||
end function | |||
subroutine Set_SlackOff(v) | |||
implicit none | |||
logical , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%SlackOff == v) return | |||
#endif | |||
softwareInputs%SlackOff = v | |||
#ifdef deb | |||
print*, 'SlackOff=', softwareInputs%SlackOff | |||
#endif | |||
! call softwareInputs%OnSlackOffChange%RunAll() | |||
end subroutine | |||
logical function Get_SlackOff() | |||
implicit none | |||
Get_SlackOff = softwareInputs%SlackOff | |||
end function | |||
subroutine Set_SafetyValveHeight(v) | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%SafetyValveHeight == v) return | |||
#endif | |||
softwareInputs%SafetyValveHeight = v | |||
#ifdef deb | |||
print*, 'SafetyValveHeight=', softwareInputs%SafetyValveHeight | |||
#endif | |||
! call softwareInputs%OnSafetyValveHeightChange%RunAll() | |||
end subroutine | |||
real function Get_SafetyValveHeight() | |||
implicit none | |||
Get_SafetyValveHeight = softwareInputs%SafetyValveHeight | |||
!Get_SafetyValveHeight = 23 | |||
end function | |||
subroutine Set_NearFloorConnection(v) | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%NearFloorConnection == v) return | |||
#endif | |||
softwareInputs%NearFloorConnection = v | |||
#ifdef deb | |||
print*, 'NearFloorConnection=', softwareInputs%NearFloorConnection | |||
#endif | |||
! call softwareInputs%OnNearFloorConnectionChange%RunAll() | |||
end subroutine | |||
real function Get_NearFloorConnection() | |||
implicit none | |||
Get_NearFloorConnection = softwareInputs%NearFloorConnection | |||
!Get_NearFloorConnection = 4 | |||
end function | |||
subroutine Set_IbopHeight(v) | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%IbopHeight == v) return | |||
#endif | |||
softwareInputs%IbopHeight = v | |||
#ifdef deb | |||
print*, 'IbopHeight=', softwareInputs%IbopHeight | |||
#endif | |||
! call softwareInputs%OnIbopHeightChange%RunAll() | |||
end subroutine | |||
real function Get_IbopHeight() | |||
implicit none | |||
Get_IbopHeight = softwareInputs%IbopHeight | |||
!Get_IbopHeight = 23.0 | |||
end function | |||
subroutine Set_HookHeight(v) | |||
implicit none | |||
real , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(softwareInputs%HookHeight == v) return | |||
#endif | |||
softwareInputs%HookHeight = v | |||
#ifdef deb | |||
print*, 'HookHeight=', softwareInputs%HookHeight | |||
#endif | |||
! call softwareInputs%OnHookHeightChange%RunAll() | |||
end subroutine | |||
real function Get_HookHeight() | |||
implicit none | |||
Get_HookHeight = softwareInputs%HookHeight | |||
end function | |||
end module |
@@ -1,56 +0,0 @@ | |||
module CStringUpdateVariables | |||
use CIntegerEventHandlerCollection | |||
implicit none | |||
integer :: StringUpdate = 0 | |||
public | |||
!**type(IntegerEventHandlerCollection) :: OnStringUpdateChange | |||
enum, bind(c) | |||
enumerator STRING_UPDATE_NEUTRAL | |||
enumerator STRING_UPDATE_ADD_SINGLE | |||
enumerator STRING_UPDATE_ADD_STAND | |||
enumerator STRING_UPDATE_REMOVE_SINGLE | |||
enumerator STRING_UPDATE_REMOVE_STAND | |||
end enum | |||
private :: StringUpdate | |||
contains | |||
subroutine Set_StringUpdate(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(StringUpdate == v) return | |||
#endif | |||
StringUpdate = v | |||
call OnStringUpdateChange%RunAll(v) | |||
end subroutine | |||
integer function Get_StringUpdate() | |||
implicit none | |||
Get_StringUpdate = StringUpdate | |||
end function | |||
subroutine Set_StringUpdate_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_StringUpdate_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_StringUpdate_WN' :: Set_StringUpdate_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_StringUpdate(v) | |||
end subroutine | |||
integer function Get_StringUpdate_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_StringUpdate_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_StringUpdate_WN' :: Get_StringUpdate_WN | |||
implicit none | |||
Get_StringUpdate_WN = StringUpdate | |||
end function | |||
end module CStringUpdateVariables |
@@ -494,98 +494,12 @@ module CUnityInputs | |||
end function | |||
! logical function Get_SingleSetInMouseHole_WN() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Get_SingleSetInMouseHole_WN | |||
! !DEC$ ATTRIBUTES ALIAS: 'Get_SingleSetInMouseHole_WN' :: Get_SingleSetInMouseHole_WN | |||
! implicit none | |||
! Get_SingleSetInMouseHole_WN = UnityInputs%SingleSetInMouseHole | |||
! end function | |||
! subroutine Set_SwingCenter(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Set_SwingCenter | |||
! !DEC$ ATTRIBUTES ALIAS: 'Set_SwingCenter' :: Set_SwingCenter | |||
! !USE CSwingEnum | |||
! implicit none | |||
! logical, intent(in) :: v | |||
! !#ifdef ExcludeExtraChanges | |||
! ! if(SwingCenter == v) return | |||
! !#endif | |||
! ! SwingCenter = v | |||
! ! call OnSwingCenterChange%RunAll() | |||
! ! !if(SwingCenter .and. Get_Swing() /= SWING_WELL ) call Set_Swing(SWING_WELL) | |||
! !#ifdef deb | |||
! ! print*, 'SwingCenter=', SwingCenter | |||
! !#endif | |||
! end subroutine | |||
!logical function Get_SwingCenter() | |||
! implicit none | |||
! Get_SwingCenter = SwingCenter | |||
!end function | |||
!top drive | |||
! subroutine Set_TdsConnectionPossible(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsConnectionPossible | |||
! !DEC$ ATTRIBUTES ALIAS: 'Set_TdsConnectionPossible' :: Set_TdsConnectionPossible | |||
! implicit none | |||
! logical, intent(in) :: v | |||
! #ifdef ExcludeExtraChanges | |||
! if(UnityInputs%TdsConnectionPossible == v) return | |||
! #endif | |||
! UnityInputs%TdsConnectionPossible = v | |||
! !**call UnityInputs%OnTdsConnectionPossibleChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'TdsConnectionPossible=', UnityInputs%TdsConnectionPossible | |||
! #endif | |||
! end subroutine | |||
logical function Get_TdsConnectionPossible() | |||
implicit none | |||
Get_TdsConnectionPossible = UnityInputs%TdsConnectionPossible | |||
end function | |||
! logical function Get_TdsConnectionPossible_WN() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Get_TdsConnectionPossible_WN | |||
! !DEC$ ATTRIBUTES ALIAS: 'Get_TdsConnectionPossible_WN' :: Get_TdsConnectionPossible_WN | |||
! implicit none | |||
! Get_TdsConnectionPossible_WN = UnityInputs%TdsConnectionPossible | |||
! !Get_TdsConnectionPossible_WN = .true. | |||
! end function | |||
! subroutine Set_TdsStemIn(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Set_TdsStemIn | |||
! !DEC$ ATTRIBUTES ALIAS: 'Set_TdsStemIn' :: Set_TdsStemIn | |||
! implicit none | |||
! logical, intent(in) :: v | |||
! #ifdef ExcludeExtraChanges | |||
! if(UnityInputs%TdsStemIn == v) return | |||
! #endif | |||
! UnityInputs%TdsStemIn = v | |||
! !**call UnityInputs%OnTdsStemInChange%RunAll() | |||
! #ifdef deb | |||
! print*, 'TdsStemIn=', UnityInputs%TdsStemIn | |||
! #endif | |||
! end subroutine | |||
logical function Get_TdsStemIn() | |||
implicit none | |||
@@ -18,12 +18,13 @@ module CUnityOutputs | |||
contains | |||
subroutine Setup() | |||
use CDataDisplayConsoleVariables | |||
implicit none | |||
PumpsSpmChanges => Calc_KellyHoseVibrationRate | |||
! call DataDisplayConsole%OnRotaryRpmChange%Add(Set_RotaryRpm) | |||
end subroutine | |||
! subroutine Setup() | |||
! use CDataDisplayConsole | |||
! use ConfigurationVariables | |||
! implicit none | |||
! ! PumpsSpmChanges => Calc_KellyHoseVibrationRate | |||
! ! call data%EquipmentControl%DataDisplayConsole%OnRotaryRpmChange%Add(Set_RotaryRpm) | |||
! end subroutine | |||
@@ -1,93 +1,74 @@ | |||
module CBucketEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_MudBucket() | |||
use CStudentStationVariables!, only: StudentStation%MudBoxInstallation | |||
subroutine Set_MudBucket(v) | |||
use CManifolds, only: ToggleMudBox | |||
implicit none | |||
! if (DriveType == TopDrive_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_MudBucket=TopDrive' | |||
!#endif | |||
! endif | |||
! | |||
! | |||
! | |||
! | |||
! if (DriveType == Kelly_DriveType) then | |||
!#ifdef OST | |||
! print*, 'Evaluate_MudBucket=Kelly' | |||
!#endif | |||
! endif | |||
if (Get_MudBucket() == MUD_BUCKET_INSTALL) then | |||
StudentStation%MudBoxInstallation = .true. | |||
else if (Get_MudBucket() == MUD_BUCKET_REMOVE) then | |||
StudentStation%MudBoxInstallation = .false. | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(MudBucket == v) return | |||
#endif | |||
MudBucket = v | |||
if (MudBucket == MUD_BUCKET_INSTALL) then | |||
call ToggleMudBox(.true.) | |||
else if (MudBucket == MUD_BUCKET_REMOVE) then | |||
call ToggleMudBox(.false.) | |||
endif | |||
#ifdef deb | |||
print*, 'MudBucket=', MudBucket | |||
#endif | |||
call OnMudBucketChange%RunAll() | |||
end subroutine | |||
! subroutine Subscribe_MudBucket() | |||
! use CStudentStationVariables | |||
! implicit none | |||
! call OnMudBoxInstallationPress%Add(ButtonPress_MudBoxInstallation) | |||
! call OnMudBoxRemovePress%Add(ButtonPress_MudBoxRemove) | |||
! end subroutine | |||
subroutine ButtonPress_MudBoxInstallation() | |||
integer function Get_MudBucket() | |||
implicit none | |||
Get_MudBucket = MudBucket | |||
end function | |||
! subroutine ButtonPress_MudBoxInstallation() | |||
! implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_MudBoxInstallation=TopDrive' | |||
#endif | |||
endif | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_MudBoxInstallation=Kelly' | |||
#endif | |||
! if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
! #ifdef OST | |||
! print*, 'ButtonPress_MudBoxInstallation=TopDrive' | |||
! #endif | |||
! endif | |||
! if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
! #ifdef OST | |||
! print*, 'ButtonPress_MudBoxInstallation=Kelly' | |||
! #endif | |||
call Set_MudBucket(MUD_BUCKET_INSTALL) | |||
! call Set_MudBucket(MUD_BUCKET_INSTALL) | |||
endif | |||
! endif | |||
end subroutine | |||
! end subroutine | |||
subroutine ButtonPress_MudBoxRemove() | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_MudBoxRemove=TopDrive' | |||
#endif | |||
endif | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_MudBoxRemove=Kelly' | |||
#endif | |||
call Set_MudBucket(MUD_BUCKET_REMOVE) | |||
! subroutine ButtonPress_MudBoxRemove() | |||
! implicit none | |||
! if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
! #ifdef OST | |||
! print*, 'ButtonPress_MudBoxRemove=TopDrive' | |||
! #endif | |||
! endif | |||
! if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
! #ifdef OST | |||
! print*, 'ButtonPress_MudBoxRemove=Kelly' | |||
! #endif | |||
! call Set_MudBucket(MUD_BUCKET_REMOVE) | |||
endif | |||
! endif | |||
end subroutine | |||
! end subroutine | |||
end module CBucketEnum |
@@ -1,79 +0,0 @@ | |||
module CBucketEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: MudBucket = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnMudBucketChange | |||
enum, bind(c) | |||
!enumerator MUD_BUCKET_NEUTRAL | |||
enumerator MUD_BUCKET_REMOVE | |||
enumerator MUD_BUCKET_INSTALL | |||
end enum | |||
private :: MudBucket | |||
contains | |||
subroutine Set_MudBucket(v) | |||
use CManifolds, only: ToggleMudBox | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(MudBucket == v) return | |||
#endif | |||
MudBucket = v | |||
if (MudBucket == MUD_BUCKET_INSTALL) then | |||
call ToggleMudBox(.true.) | |||
else if (MudBucket == MUD_BUCKET_REMOVE) then | |||
call ToggleMudBox(.false.) | |||
endif | |||
#ifdef deb | |||
print*, 'MudBucket=', MudBucket | |||
#endif | |||
call OnMudBucketChange%RunAll() | |||
end subroutine | |||
integer function Get_MudBucket() | |||
implicit none | |||
Get_MudBucket = MudBucket | |||
end function | |||
subroutine Set_MudBucket_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_MudBucket_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_MudBucket_WN' :: Set_MudBucket_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_MudBucket(v) | |||
end subroutine | |||
integer function Get_MudBucket_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_MudBucket_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_MudBucket_WN' :: Get_MudBucket_WN | |||
implicit none | |||
Get_MudBucket_WN = MudBucket | |||
end function | |||
logical function Get_RemoveMudBucket() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveMudBucket | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_RemoveMudBucket' :: Get_RemoveMudBucket | |||
implicit none | |||
Get_RemoveMudBucket = .false. ! MudBucket == REMOVE_MUD_BUCKET | |||
end function | |||
logical function Get_InstallMudBucket() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallMudBucket | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_InstallMudBucket' :: Get_InstallMudBucket | |||
implicit none | |||
Get_InstallMudBucket = .false. ! MudBucket == INSTALL_MUD_BUCKET | |||
end function | |||
end module CBucketEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CElevatorEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,220 +0,0 @@ | |||
module CElevatorEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: Elevator = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnElevatorChange | |||
enum, bind(c) | |||
enumerator ELEVATOR_NEUTRAL | |||
enumerator ELEVATOR_LATCH_STRING_BEGIN | |||
enumerator ELEVATOR_LATCH_STRING_END | |||
enumerator ELEVATOR_UNLATCH_STRING_BEGIN | |||
enumerator ELEVATOR_UNLATCH_STRING_END | |||
enumerator ELEVATOR_LATCH_STAND_BEGIN | |||
enumerator ELEVATOR_LATCH_STAND_END | |||
enumerator ELEVATOR_UNLATCH_STAND_BEGIN | |||
enumerator ELEVATOR_UNLATCH_STAND_END | |||
enumerator ELEVATOR_LATCH_SINGLE_BEGIN | |||
enumerator ELEVATOR_LATCH_SINGLE_END | |||
enumerator ELEVATOR_UNLATCH_SINGLE_BEGIN | |||
enumerator ELEVATOR_UNLATCH_SINGLE_END | |||
end enum | |||
private :: Elevator | |||
contains | |||
subroutine Set_Elevator(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(Elevator == v) return | |||
#endif | |||
Elevator = v | |||
#ifdef deb | |||
print*, 'Elevator=', Elevator | |||
#endif | |||
call OnElevatorChange%RunAll() | |||
end subroutine | |||
integer function Get_Elevator() | |||
implicit none | |||
Get_Elevator = Elevator | |||
end function | |||
subroutine Set_Elevator_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_Elevator_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_Elevator_WN' :: Set_Elevator_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_Elevator(v) | |||
end subroutine | |||
integer function Get_Elevator_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_Elevator_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_Elevator_WN' :: Get_Elevator_WN | |||
implicit none | |||
Get_Elevator_WN = Elevator | |||
end function | |||
subroutine ElevatorLatchStringEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: ElevatorLatchStringEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'ElevatorLatchStringEnd' :: ElevatorLatchStringEnd | |||
implicit none | |||
#ifdef deb | |||
print*, 'ElevatorLatchStringEnd' | |||
#endif | |||
!if(Elevator /= ELEVATOR_LATCH_STRING_END) Elevator = ELEVATOR_LATCH_STRING_END | |||
call Set_Elevator(ELEVATOR_LATCH_STRING_END) | |||
end subroutine | |||
subroutine ElevatorUnLatchStringEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: ElevatorUnLatchStringEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'ElevatorUnLatchStringEnd' :: ElevatorUnLatchStringEnd | |||
implicit none | |||
#ifdef deb | |||
print*, 'ElevatorUnLatchStringEnd' | |||
#endif | |||
!if(Elevator /= ELEVATOR_UNLATCH_STRING_END) Elevator = ELEVATOR_UNLATCH_STRING_END | |||
call Set_Elevator(ELEVATOR_UNLATCH_STRING_END) | |||
end subroutine | |||
subroutine ElevatorLatchStandEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: ElevatorLatchStandEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'ElevatorLatchStandEnd' :: ElevatorLatchStandEnd | |||
!use CCommon, only: SetStandRack | |||
!use CStandRack | |||
implicit none | |||
#ifdef deb | |||
print*, 'ElevatorLatchStandEnd' | |||
#endif | |||
!if(Elevator /= ELEVATOR_LATCH_STAND_END) then | |||
! Elevator = ELEVATOR_LATCH_STAND_END | |||
! !call SetStandRack(Get_StandRack() - 1) | |||
!endif | |||
call Set_Elevator(ELEVATOR_LATCH_STAND_END) | |||
end subroutine | |||
subroutine ElevatorUnLatchStandEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: ElevatorUnLatchStandEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'ElevatorUnLatchStandEnd' :: ElevatorUnLatchStandEnd | |||
!use CCommon, only: SetStandRack | |||
!use CStandRack | |||
implicit none | |||
#ifdef deb | |||
print*, 'ElevatorUnLatchStandEnd' | |||
#endif | |||
!if(Elevator /= ELEVATOR_UNLATCH_STAND_END) then | |||
! Elevator = ELEVATOR_UNLATCH_STAND_END | |||
! !call SetStandRack(Get_StandRack() + 1) | |||
!endif | |||
call Set_Elevator(ELEVATOR_UNLATCH_STAND_END) | |||
end subroutine | |||
subroutine ElevatorLatchSingleEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: ElevatorLatchSingleEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'ElevatorLatchSingleEnd' :: ElevatorLatchSingleEnd | |||
implicit none | |||
#ifdef deb | |||
print*, 'ElevatorLatchSingleEnd' | |||
#endif | |||
!if(Elevator /= ELEVATOR_LATCH_SINGLE_END) Elevator = ELEVATOR_LATCH_SINGLE_END | |||
call Set_Elevator(ELEVATOR_LATCH_SINGLE_END) | |||
end subroutine | |||
subroutine ElevatorUnLatchSingleEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: ElevatorUnLatchSingleEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'ElevatorUnLatchSingleEnd' :: ElevatorUnLatchSingleEnd | |||
implicit none | |||
#ifdef deb | |||
print*, 'ElevatorUnLatchSingleEnd' | |||
#endif | |||
!if(Elevator /= ELEVATOR_UNLATCH_SINGLE_END) Elevator = ELEVATOR_UNLATCH_SINGLE_END | |||
call Set_Elevator(ELEVATOR_UNLATCH_SINGLE_END) | |||
end subroutine | |||
logical function Get_EvelatorLatchString() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorLatchString | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorLatchString' :: Get_EvelatorLatchString | |||
implicit none | |||
Get_EvelatorLatchString = .false. ! Elevator == ELEVATOR_LATCH_STRING | |||
end function | |||
logical function Get_EvelatorLatchStand() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorLatchStand | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorLatchStand' :: Get_EvelatorLatchStand | |||
implicit none | |||
Get_EvelatorLatchStand = .false. ! Elevator == ELEVATOR_LATCH_STAND | |||
end function | |||
logical function Get_EvelatorLatchSingle() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorLatchSingle | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorLatchSingle' :: Get_EvelatorLatchSingle | |||
implicit none | |||
Get_EvelatorLatchSingle = .false. ! Elevator == ELEVATOR_LATCH_SINGLE | |||
end function | |||
logical function Get_EvelatorUnlatchString() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorUnlatchString | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorUnlatchString' :: Get_EvelatorUnlatchString | |||
implicit none | |||
Get_EvelatorUnlatchString = .false. ! Elevator == ELEVATOR_UNLATCH_STRING | |||
end function | |||
logical function Get_EvelatorUnlatchStand() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorUnlatchStand | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorUnlatchStand' :: Get_EvelatorUnlatchStand | |||
implicit none | |||
Get_EvelatorUnlatchStand = .false. ! Elevator == ELEVATOR_UNLATCH_STAND | |||
end function | |||
logical function Get_EvelatorUnlatchSingle() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EvelatorUnlatchSingle | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EvelatorUnlatchSingle' :: Get_EvelatorUnlatchSingle | |||
implicit none | |||
Get_EvelatorUnlatchSingle = .false. ! Elevator == ELEVATOR_UNLATCH_SINGLE | |||
end function | |||
end module CElevatorEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CFlowKellyDisconnectEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,60 +0,0 @@ | |||
module CFlowKellyDisconnectEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
! integer :: FlowKellyDisconnect = 0 | |||
! | |||
! public | |||
! | |||
! ! type(VoidEventHandlerCollection) :: OnFlowKellyDisconnectChange | |||
! | |||
! enum, bind(c) | |||
! enumerator FLOW_KELLY_DISCONNECT_NEUTRAL | |||
! enumerator FLOW_KELLY_DISCONNECT_BEGIN | |||
! enumerator FLOW_KELLY_DISCONNECT_END | |||
! end enum | |||
! | |||
! private :: FlowKellyDisconnect | |||
! | |||
! contains | |||
! | |||
! subroutine Set_FlowKellyDisconnect(v) | |||
! implicit none | |||
! integer , intent(in) :: v | |||
!#ifdef ExcludeExtraChanges | |||
! if(FlowKellyDisconnect == v) return | |||
!#endif | |||
! FlowKellyDisconnect = v | |||
!#ifdef deb | |||
! print*, 'FlowKellyDisconnect=', FlowKellyDisconnect | |||
!#endif | |||
! call OnFlowKellyDisconnectChange%RunAll() | |||
! end subroutine | |||
! | |||
! integer function Get_FlowKellyDisconnect2() | |||
! implicit none | |||
! Get_FlowKellyDisconnect2 = FlowKellyDisconnect | |||
! end function | |||
! integer function Get_FlowKellyDisconnect_deprecated() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowKellyDisconnect_deprecated | |||
! !DEC$ ATTRIBUTES ALIAS: 'Get_FlowKellyDisconnect_deprecated' :: Get_FlowKellyDisconnect_deprecated | |||
! implicit none | |||
! !Get_FlowKellyDisconnect_WN = FlowKellyDisconnect | |||
! end function | |||
! | |||
! | |||
! subroutine FlowKellyDisconnectEnd() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: FlowKellyDisconnectEnd | |||
! !DEC$ ATTRIBUTES ALIAS: 'FlowKellyDisconnectEnd' :: FlowKellyDisconnectEnd | |||
! implicit none | |||
! call Set_FlowKellyDisconnect(FLOW_KELLY_DISCONNECT_END) | |||
!#ifdef deb | |||
! print*, 'FLOW_KELLY_DISCONNECT_END' | |||
!#endif | |||
! end subroutine | |||
end module CFlowKellyDisconnectEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CFlowPipeDisconnectEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,70 +0,0 @@ | |||
module CFlowPipeDisconnectEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
! integer :: FlowPipeDisconnect = 0 | |||
! | |||
! public | |||
! | |||
! ! type(VoidEventHandlerCollection) :: OnFlowPipeDisconnectChange | |||
! | |||
! enum, bind(c) | |||
! enumerator FLOW_PIPE_DISCONNECT_NEUTRAL | |||
! enumerator FLOW_PIPE_DISCONNECT_BEGIN | |||
! enumerator FLOW_PIPE_DISCONNECT_END | |||
! end enum | |||
! | |||
! private :: FlowPipeDisconnect | |||
! | |||
! contains | |||
! | |||
! subroutine Set_FlowPipeDisconnect(v) | |||
! implicit none | |||
! integer , intent(in) :: v | |||
!#ifdef ExcludeExtraChanges | |||
! if(FlowPipeDisconnect == v) return | |||
!#endif | |||
! FlowPipeDisconnect = v | |||
!#ifdef deb | |||
! print*, 'FlowPipeDisconnect=', FlowPipeDisconnect | |||
!#endif | |||
! call OnFlowPipeDisconnectChange%RunAll() | |||
! end subroutine | |||
! | |||
! integer function Get_FlowPipeDisconnect2() | |||
! implicit none | |||
! Get_FlowPipeDisconnect2 = FlowPipeDisconnect | |||
! end function | |||
! subroutine Set_FlowPipeDisconnect_deprecated(v) | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowPipeDisconnect_deprecated | |||
! !DEC$ ATTRIBUTES ALIAS: 'Set_FlowPipeDisconnect_deprecated' :: Set_FlowPipeDisconnect_deprecated | |||
! implicit none | |||
! integer , intent(in) :: v | |||
! call Set_FlowPipeDisconnect(v) | |||
! end subroutine | |||
! | |||
! | |||
! integer function Get_FlowPipeDisconnect_deprecated() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowPipeDisconnect_deprecated | |||
! !DEC$ ATTRIBUTES ALIAS: 'Get_FlowPipeDisconnect_deprecated' :: Get_FlowPipeDisconnect_deprecated | |||
! implicit none | |||
! Get_FlowPipeDisconnect_WN = FlowPipeDisconnect | |||
! end function | |||
! | |||
! | |||
! | |||
! subroutine FlowPipeDisconnectEnd() | |||
! !DEC$ ATTRIBUTES DLLEXPORT :: FlowPipeDisconnectEnd | |||
! !DEC$ ATTRIBUTES ALIAS: 'FlowPipeDisconnectEnd' :: FlowPipeDisconnectEnd | |||
! implicit none | |||
! call Set_FlowPipeDisconnect(FLOW_PIPE_DISCONNECT_END) | |||
!#ifdef deb | |||
! print*, 'FLOW_PIPE_DISCONNECT_END' | |||
!#endif | |||
! end subroutine | |||
end module CFlowPipeDisconnectEnumVariables |
@@ -1,14 +1,44 @@ | |||
module CHeadEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
! enum, bind(c) | |||
! enumerator FILLUP_HEAD_REMOVE | |||
! enumerator FILLUP_HEAD_INSTALL | |||
! end enum | |||
contains | |||
subroutine Set_FillupHead(v) | |||
use CManifolds, only: ToggleFillupHead | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%unitySignals%FillupHead == v) return | |||
#endif | |||
data%State%unitySignals%FillupHead = v | |||
if (data%State%unitySignals%FillupHead == FILLUP_HEAD_INSTALL) then | |||
call ToggleFillupHead(.true.) | |||
else if (data%State%unitySignals%FillupHead == FILLUP_HEAD_REMOVE) then | |||
call ToggleFillupHead(.false.) | |||
endif | |||
#ifdef deb | |||
print*, 'data%State%unitySignals%FillupHead=', data%State%unitySignals%FillupHead | |||
#endif | |||
call OnFillupHeadChange%RunAll() | |||
end subroutine | |||
integer function Get_FillupHead() | |||
implicit none | |||
Get_FillupHead = FillupHead | |||
end function | |||
subroutine Evaluate_FillupHead() | |||
use CStudentStationVariables!, only: StudentStation%FillupHeadInstallation | |||
use CStudentStationVariables!, only: data%State%StudentStation%FillupHeadInstallation | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillupHead=TopDrive' | |||
#endif | |||
@@ -19,7 +49,7 @@ module CHeadEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'Evaluate_FillupHead=Kelly' | |||
#endif | |||
@@ -27,9 +57,9 @@ module CHeadEnum | |||
if (Get_FillupHead() == FILLUP_HEAD_INSTALL) then | |||
StudentStation%FillupHeadInstallation = .true. | |||
data%State%StudentStation%FillupHeadInstallation = .true. | |||
else if (Get_FillupHead() == FILLUP_HEAD_REMOVE) then | |||
StudentStation%FillupHeadInstallation = .false. | |||
data%State%StudentStation%FillupHeadInstallation = .false. | |||
endif | |||
end subroutine | |||
@@ -37,7 +67,7 @@ module CHeadEnum | |||
! subroutine Subscribe_FillupHead() | |||
! use CStudentStationVariables | |||
! implicit none | |||
! call OnStudentStation%FillupHeadInstallationPress%Add(ButtonPress_StudentStation%FillupHeadInstallation) | |||
! call OnState%StudentStation%FillupHeadInstallationPress%Add(ButtonPress_State%StudentStation%FillupHeadInstallation) | |||
! call OnFillupHeadRemovePress%Add(ButtonPress_FillupHeadRemove) | |||
! end subroutine | |||
@@ -48,9 +78,9 @@ module CHeadEnum | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_StudentStation%FillupHeadInstallation=TopDrive' | |||
print*, 'ButtonPress_State%StudentStation%FillupHeadInstallation=TopDrive' | |||
#endif | |||
@@ -70,9 +100,9 @@ module CHeadEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_StudentStation%FillupHeadInstallation=Kelly' | |||
print*, 'ButtonPress_State%StudentStation%FillupHeadInstallation=Kelly' | |||
#endif | |||
@@ -102,7 +132,7 @@ module CHeadEnum | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_FillupHeadRemove=TopDrive' | |||
#endif | |||
@@ -123,7 +153,7 @@ module CHeadEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_FillupHeadRemove=Kelly' | |||
#endif | |||
@@ -1,90 +0,0 @@ | |||
module CHeadEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: FillupHead = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnFillupHeadChange | |||
enum, bind(c) | |||
!enumerator FILLUP_HEAD_NEUTRAL | |||
enumerator FILLUP_HEAD_REMOVE | |||
enumerator FILLUP_HEAD_INSTALL | |||
end enum | |||
private :: FillupHead | |||
contains | |||
subroutine Set_FillupHead(v) | |||
use CManifolds, only: ToggleFillupHead | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(FillupHead == v) return | |||
#endif | |||
FillupHead = v | |||
if (FillupHead == FILLUP_HEAD_INSTALL) then | |||
call ToggleFillupHead(.true.) | |||
else if (FillupHead == FILLUP_HEAD_REMOVE) then | |||
call ToggleFillupHead(.false.) | |||
endif | |||
#ifdef deb | |||
print*, 'FillupHead=', FillupHead | |||
#endif | |||
call OnFillupHeadChange%RunAll() | |||
end subroutine | |||
integer function Get_FillupHead() | |||
implicit none | |||
Get_FillupHead = FillupHead | |||
end function | |||
subroutine Set_FillupHead_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FillupHead_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_FillupHead_WN' :: Set_FillupHead_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_FillupHead(v) | |||
end subroutine | |||
integer function Get_FillupHead_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FillupHead_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_FillupHead_WN' :: Get_FillupHead_WN | |||
implicit none | |||
Get_FillupHead_WN = FillupHead | |||
end function | |||
logical function Get_RemoveFillupHead() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveFillupHead | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_RemoveFillupHead' :: Get_RemoveFillupHead | |||
implicit none | |||
Get_RemoveFillupHead = .false. ! FillupHead == REMOVE_FILLUP_HEAD | |||
end function | |||
logical function Get_InstallFillupHead() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallFillupHead | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_InstallFillupHead' :: Get_InstallFillupHead | |||
implicit none | |||
Get_InstallFillupHead = .false. ! FillupHead == INSTALL_FILLUP_HEAD | |||
end function | |||
end module CHeadEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CIbopEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,85 +0,0 @@ | |||
module CIbopEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: Ibop = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnIbopChange | |||
enum, bind(c) | |||
!enumerator IBOP_NEUTRAL | |||
enumerator IBOP_REMOVE | |||
enumerator IBOP_INSTALL | |||
end enum | |||
private :: Ibop | |||
contains | |||
subroutine Set_Ibop(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(Ibop == v) return | |||
#endif | |||
Ibop = v | |||
#ifdef deb | |||
print*, 'Ibop=', Ibop | |||
#endif | |||
call OnIbopChange%RunAll() | |||
end subroutine | |||
integer function Get_Ibop() | |||
implicit none | |||
Get_Ibop = Ibop | |||
end function | |||
subroutine Set_Ibop_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_Ibop_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_Ibop_WN' :: Set_Ibop_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_Ibop(v) | |||
end subroutine | |||
integer function Get_Ibop_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_Ibop_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_Ibop_WN' :: Get_Ibop_WN | |||
implicit none | |||
Get_Ibop_WN = Ibop | |||
end function | |||
subroutine Set_Ibop_Install() | |||
implicit none | |||
call Set_Ibop(IBOP_INSTALL) | |||
end subroutine | |||
subroutine Set_Ibop_Remove() | |||
implicit none | |||
call Set_Ibop(IBOP_REMOVE) | |||
end subroutine | |||
logical function Get_RemoveIbop() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveIbop | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_RemoveIbop' :: Get_RemoveIbop | |||
implicit none | |||
Get_RemoveIBop = .false. ! Ibop == REMOVE_IBOP | |||
end function | |||
logical function Get_InstallIbop() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallIbop | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_InstallIbop' :: Get_InstallIbop | |||
implicit none | |||
Get_InstallIbop = .false. ! Ibop == INSTALL_IBOP | |||
end function | |||
end module CIbopEnumVariables |
@@ -1,10 +1,10 @@ | |||
module CKellyEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
subroutine Evaluate_Kelly() | |||
!use COperationConditionEnum | |||
!use UnitySignalsModule | |||
implicit none | |||
@@ -1,79 +0,0 @@ | |||
module CKellyEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: Kelly = 0 | |||
integer :: Kelly_S = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnKellyChange | |||
enum, bind(c) | |||
enumerator KELLY_NEUTRAL | |||
enumerator KELLY_INSTALL | |||
enumerator KELLY_REMOVE | |||
end enum | |||
private :: Kelly | |||
contains | |||
subroutine Set_Kelly(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(Kelly == v) return | |||
#endif | |||
Kelly = v | |||
#ifdef deb | |||
print*, 'Kelly=', Kelly | |||
#endif | |||
call OnKellyChange%RunAll() | |||
end subroutine | |||
integer function Get_Kelly() | |||
implicit none | |||
Get_Kelly = Kelly | |||
end function | |||
subroutine Set_Kelly_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_Kelly_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_Kelly_WN' :: Set_Kelly_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
!call Set_Kelly(v) | |||
Kelly_S = v | |||
end subroutine | |||
integer function Get_Kelly_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_Kelly_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_Kelly_WN' :: Get_Kelly_WN | |||
implicit none | |||
Get_Kelly_WN = Kelly | |||
end function | |||
logical function Get_KellyBack() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_KellyBack | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_KellyBack' :: Get_KellyBack | |||
implicit none | |||
Get_KellyBack = .false. ! Kelly == KELLY_BACK | |||
end function | |||
logical function Get_InstallKelly() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallKelly | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_InstallKelly' :: Get_InstallKelly | |||
implicit none | |||
Get_InstallKelly = .false. ! Kelly == INSTALL_KELLY | |||
end function | |||
end module CKellyEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CMouseHoleEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -27,6 +27,8 @@ module CMouseHoleEnum | |||
subroutine Subscribe_MouseHole() | |||
!use CDrillingConsoleVariables | |||
use ConfigurationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
!call OnFillMouseHolePress%Add(ButtonPress_MouseHole) | |||
end subroutine | |||
@@ -1,83 +0,0 @@ | |||
module CMouseHoleEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: MouseHole = 0 | |||
integer :: MouseHole_S = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnMouseHoleChange | |||
enum, bind(c) | |||
enumerator MOUSE_HOLE_NEUTRAL | |||
enumerator MOUSE_HOLE_FILL | |||
enumerator MOUSE_HOLE_EMPTY | |||
end enum | |||
private :: MouseHole | |||
contains | |||
subroutine Set_MouseHole(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(MouseHole == v) return | |||
#endif | |||
!call sleep(2) | |||
MouseHole = v | |||
#ifdef deb | |||
print*, 'MouseHole=', MouseHole | |||
#endif | |||
call OnMouseHoleChange%RunAll() | |||
end subroutine | |||
integer function Get_MouseHole() | |||
implicit none | |||
Get_MouseHole = MouseHole | |||
end function | |||
subroutine Update_MouseHole_From_Snapshot() | |||
implicit none | |||
call Set_MouseHole(MouseHole_S) | |||
end subroutine | |||
subroutine Set_MouseHole_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_MouseHole_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_MouseHole_WN' :: Set_MouseHole_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
!call Set_MouseHole(v) | |||
MouseHole_S = v | |||
end subroutine | |||
integer function Get_MouseHole_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_MouseHole_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_MouseHole_WN' :: Get_MouseHole_WN | |||
implicit none | |||
Get_MouseHole_WN = MouseHole | |||
end function | |||
logical function Get_EmptyMouseHole() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_EmptyMouseHole | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_EmptyMouseHole' :: Get_EmptyMouseHole | |||
implicit none | |||
Get_EmptyMouseHole = .false. ! MouseHole == EMPTY_MOUSE_HOLE | |||
end function | |||
logical function Get_FillMouseHole() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FillMouseHole | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_FillMouseHole' :: Get_FillMouseHole | |||
implicit none | |||
Get_FillMouseHole = .false. ! MouseHole == FILL_MOUSE_HOLE | |||
end function | |||
end module CMouseHoleEnumVariables |
@@ -1,9 +1,38 @@ | |||
module COperationConditionEnum | |||
use CLog4 | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
use ConfigurationVariables | |||
implicit none | |||
! enum, bind(c) | |||
! enumerator OPERATION_DRILL | |||
! enumerator OPERATION_TRIP | |||
! end enum | |||
contains | |||
subroutine Set_OperationCondition(v) | |||
! use CKellyEnumVariables | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(data%State%unitySignals%OperationCondition == v) return | |||
#endif | |||
data%State%unitySignals%OperationCondition = v | |||
#ifdef deb | |||
print*, 'data%State%unitySignals%OperationCondition=', data%State%unitySignals%OperationCondition | |||
#endif | |||
! call OnOperationConditionChange%RunAll() | |||
! call OnOperationConditionChangeInt%RunAll(data%State%unitySignals%OperationCondition) | |||
end subroutine | |||
integer function Get_OperationCondition() | |||
implicit none | |||
Get_OperationCondition = data%State%unitySignals%OperationCondition | |||
end function | |||
subroutine Evaluate_OperationCondition() | |||
implicit none | |||
@@ -30,18 +59,22 @@ module COperationConditionEnum | |||
! subroutine Subscribe_OperationCondition() | |||
! use CDrillingConsoleVariables | |||
!@ use ConfigurationVariables | |||
!@ use ConfigurationVariables | |||
! implicit none | |||
! call OnLatchPipePress%Add(ButtonPress_Latch_OperationCondition) | |||
! call OnUnlatchPipePress%Add(ButtonPress_Unlatch_OperationCondition) | |||
! end subroutine | |||
subroutine ButtonPress_Latch_OperationCondition() | |||
use CHoistingVariables!, only: Hoisting%DriveType, Kelly_DriveType | |||
! use ConfigurationVariables | |||
use CHoistingVariables | |||
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, Kelly_DriveType | |||
use CManifolds, only: InstallKellyCock | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Latch_OperationCondition=TopDrive' | |||
#endif | |||
@@ -54,7 +87,7 @@ module COperationConditionEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Latch_OperationCondition=Kelly' | |||
#endif | |||
@@ -71,7 +104,7 @@ module COperationConditionEnum | |||
call Set_LatchLed(.false.) | |||
call Set_UnlatchLed(.true.) | |||
call Set_Kelly(KELLY_INSTALL) | |||
if(Hoisting%DriveType == Kelly_DriveType) then | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
call InstallKellyCock() !drill mode | |||
endif | |||
return | |||
@@ -90,11 +123,12 @@ module COperationConditionEnum | |||
end subroutine | |||
subroutine ButtonPress_Unlatch_OperationCondition() | |||
use CHoistingVariables!, only: Hoisting%DriveType, Kelly_DriveType | |||
use CHoistingVariables | |||
use ConfigurationVariables!, only: data%State%Hoisting%DriveType, Kelly_DriveType | |||
use CManifolds, only: RemoveKellyCock | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Unlatch_OperationCondition=TopDrive' | |||
#endif | |||
@@ -107,7 +141,7 @@ module COperationConditionEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Unlatch_OperationConditions=Kelly' | |||
#endif | |||
@@ -127,7 +161,7 @@ module COperationConditionEnum | |||
call Set_LatchLed(.true.) | |||
call Set_UnlatchLed(.false.) | |||
call Set_IrSafetyValveLed(.false.) | |||
if(Hoisting%DriveType == Kelly_DriveType) then ! top drive mode | |||
if(data%State%Hoisting%DriveType == Kelly_DriveType) then ! top drive mode | |||
call RemoveKellyCock() !trip mode | |||
endif | |||
return | |||
@@ -1,81 +0,0 @@ | |||
module COperationConditionEnumVariables | |||
use CIntegerEventHandlerCollection | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: OperationCondition = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnOperationConditionChange | |||
!**type(IntegerEventHandlerCollection) :: OnOperationConditionChangeInt | |||
enum, bind(c) | |||
enumerator OPERATION_DRILL | |||
enumerator OPERATION_TRIP | |||
end enum | |||
private :: OperationCondition | |||
contains | |||
subroutine Set_OperationCondition(v) | |||
use CKellyEnumVariables | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(OperationCondition == v) return | |||
#endif | |||
OperationCondition = v | |||
#ifdef deb | |||
print*, 'OperationCondition=', OperationCondition | |||
#endif | |||
call OnOperationConditionChange%RunAll() | |||
call OnOperationConditionChangeInt%RunAll(OperationCondition) | |||
end subroutine | |||
integer function Get_OperationCondition() | |||
implicit none | |||
Get_OperationCondition = OperationCondition | |||
end function | |||
subroutine Set_OperationCondition_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_OperationCondition_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_OperationCondition_WN' :: Set_OperationCondition_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_OperationCondition(v) | |||
end subroutine | |||
integer function Get_OperationCondition_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_OperationCondition_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_OperationCondition_WN' :: Get_OperationCondition_WN | |||
implicit none | |||
Get_OperationCondition_WN = OperationCondition | |||
end function | |||
logical function Get_DrillCondition() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_DrillCondition | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_DrillCondition' :: Get_DrillCondition | |||
implicit none | |||
Get_DrillCondition = OperationCondition == OPERATION_DRILL | |||
end function | |||
logical function Get_TripCondition() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_TripCondition | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_TripCondition' :: Get_TripCondition | |||
implicit none | |||
Get_TripCondition = OperationCondition == OPERATION_TRIP | |||
end function | |||
end module COperationConditionEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CSafetyValveEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -1,101 +0,0 @@ | |||
module CSafetyValveEnumVariables | |||
! use CVoidEventHandlerCollection | |||
implicit none | |||
integer :: SafetyValve = 0 | |||
integer :: operation = 0 | |||
public | |||
! type(VoidEventHandlerCollection) :: OnSafetyValveChange | |||
enum, bind(c) | |||
enumerator SAFETY_VALVE_NEUTRAL | |||
enumerator SAFETY_VALVE_REMOVE | |||
enumerator SAFETY_VALVE_INSTALL | |||
end enum | |||
private :: SafetyValve | |||
contains | |||
subroutine Set_Operation(i) | |||
implicit none | |||
integer, intent (in) :: i | |||
operation = i | |||
end subroutine | |||
subroutine Set_SafetyValve(v) | |||
implicit none | |||
integer , intent(in) :: v | |||
#ifdef ExcludeExtraChanges | |||
if(SafetyValve == v) return | |||
#endif | |||
SafetyValve = v | |||
#ifdef deb | |||
if(SafetyValve == SAFETY_VALVE_NEUTRAL) then | |||
print*, 'SafetyValve=SAFETY_VALVE_NEUTRAL' | |||
else if (SafetyValve == SAFETY_VALVE_INSTALL) then | |||
print*, 'SafetyValve=SAFETY_VALVE_INSTALL' | |||
else if (SafetyValve == SAFETY_VALVE_INSTALL) then | |||
print*, 'SafetyValve=SAFETY_VALVE_REMOVE' | |||
endif | |||
#endif | |||
call OnSafetyValveChange%RunAll() | |||
end subroutine | |||
integer function Get_SafetyValve() | |||
implicit none | |||
Get_SafetyValve = SafetyValve | |||
end function | |||
subroutine Set_SafetyValve_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_SafetyValve_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_SafetyValve_WN' :: Set_SafetyValve_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
call Set_SafetyValve(v) | |||
end subroutine | |||
integer function Get_SafetyValve_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_SafetyValve_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_SafetyValve_WN' :: Get_SafetyValve_WN | |||
implicit none | |||
Get_SafetyValve_WN = SafetyValve | |||
end function | |||
subroutine Set_SafetyValve_Install() | |||
implicit none | |||
call Set_SafetyValve(SAFETY_VALVE_INSTALL) | |||
end subroutine | |||
subroutine Set_SafetyValve_Remove() | |||
implicit none | |||
call Set_SafetyValve(SAFETY_VALVE_REMOVE) | |||
end subroutine | |||
logical function Get_RemoveSafetyValve() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_RemoveSafetyValve | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_RemoveSafetyValve' :: Get_RemoveSafetyValve | |||
implicit none | |||
Get_RemoveSafetyValve = .false. ! SafetyValve == REMOVE_SAFETY_VALVE | |||
end function | |||
logical function Get_InstallSafetyValve() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_InstallSafetyValve | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_InstallSafetyValve' :: Get_InstallSafetyValve | |||
implicit none | |||
Get_InstallSafetyValve = .false. ! SafetyValve == INSTALL_SAFETY_VALVE | |||
end function | |||
end module CSafetyValveEnumVariables |
@@ -1,5 +1,5 @@ | |||
module CSlipsEnum | |||
use COperationScenariosVariables | |||
use OperationScenariosModule | |||
implicit none | |||
contains | |||
@@ -29,6 +29,8 @@ module CSlipsEnum | |||
! subroutine Subscribe_Slips() | |||
! use CDrillingConsoleVariables | |||
! use ConfigurationVariables | |||
! use ConfigurationVariables | |||
! implicit none | |||
! !call Set_Slips(SLIPS_SET) | |||
@@ -37,13 +39,17 @@ module CSlipsEnum | |||
! end subroutine | |||
subroutine ButtonPress_Slips() | |||
use UnitySignalsModule | |||
use NotificationModule | |||
use CUnityOutputs | |||
use UnitySignalsModule !for CTdsConnectionModesEnum | |||
implicit none | |||
if (Hoisting%DriveType == TopDrive_DriveType) then | |||
if (data%State%Hoisting%DriveType == TopDrive_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Slips=TopDrive' | |||
#endif | |||
@@ -96,7 +102,7 @@ module CSlipsEnum | |||
if (Hoisting%DriveType == Kelly_DriveType) then | |||
if (data%State%Hoisting%DriveType == Kelly_DriveType) then | |||
#ifdef OST | |||
print*, 'ButtonPress_Slips=Kelly' | |||
#endif | |||
@@ -37,72 +37,4 @@ module CSlipsEnumVariables | |||
implicit none | |||
Get_Slips = Slips | |||
end function | |||
subroutine Set_Slips_WN(v) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Set_Slips_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Set_Slips_WN' :: Set_Slips_WN | |||
implicit none | |||
integer , intent(in) :: v | |||
!call Set_Slips(v) | |||
Slips_S = v | |||
end subroutine | |||
integer function Get_Slips_WN() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_Slips_WN | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_Slips_WN' :: Get_Slips_WN | |||
implicit none | |||
Get_Slips_WN = Slips | |||
end function | |||
subroutine SlipsSetEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SlipsSetEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'SlipsSetEnd' :: SlipsSetEnd | |||
implicit none | |||
!if(Slips /= SLIPS_SET_END) Slips = SLIPS_SET_END | |||
call Set_Slips(SLIPS_SET_END) | |||
#ifdef deb | |||
print*, 'SlipsSetEnd' | |||
#endif | |||
end subroutine | |||
subroutine SlipsUnsetEnd() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SlipsUnsetEnd | |||
!DEC$ ATTRIBUTES ALIAS: 'SlipsUnsetEnd' :: SlipsUnsetEnd | |||
implicit none | |||
!if(Slips /= SLIPS_UNSET_END) Slips = SLIPS_UNSET_END | |||
call Set_Slips(SLIPS_UNSET_END) | |||
#ifdef deb | |||
print*, 'SlipsUnsetEnd' | |||
#endif | |||
end subroutine | |||
logical function Get_SlipsUnset() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_SlipsUnset | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_SlipsUnset' :: Get_SlipsUnset | |||
implicit none | |||
Get_SlipsUnset = .false. ! Slips == SLIPS_UNSET | |||
end function | |||
logical function Get_SlipsSet() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: Get_SlipsSet | |||
!DEC$ ATTRIBUTES ALIAS: 'Get_SlipsSet' :: Get_SlipsSet | |||
implicit none | |||
Get_SlipsSet = .false. ! Slips == SLIPS_SET | |||
end function | |||
end module CSlipsEnumVariables |